diff --git a/services/loadbalancer/src/stackit/loadbalancer/__init__.py b/services/loadbalancer/src/stackit/loadbalancer/__init__.py index 37ec2c5d..0b9598fe 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/__init__.py +++ b/services/loadbalancer/src/stackit/loadbalancer/__init__.py @@ -11,82 +11,149 @@ 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", + "ActiveHealthCheck", + "CreateCredentialsPayload", + "CreateCredentialsResponse", + "CreateLoadBalancerPayload", + "CredentialsResponse", + "GetCredentialsResponse", + "GetQuotaResponse", + "GoogleProtobufAny", + "ListCredentialsResponse", + "ListLoadBalancersResponse", + "ListPlansResponse", + "Listener", + "LoadBalancer", + "LoadBalancerError", + "LoadBalancerOptions", + "LoadbalancerOptionAccessControl", + "LoadbalancerOptionLogs", + "LoadbalancerOptionMetrics", + "LoadbalancerOptionObservability", + "Network", + "OptionsTCP", + "OptionsUDP", + "PlanDetails", + "SecurityGroup", + "ServerNameIndicator", + "SessionPersistence", + "Status", + "Target", + "TargetPool", + "UpdateCredentialsPayload", + "UpdateCredentialsResponse", + "UpdateLoadBalancerPayload", + "UpdateTargetPoolPayload", +] + # import apis into sdk package -from stackit.loadbalancer.api.default_api import DefaultApi -from stackit.loadbalancer.api_client import ApiClient +from stackit.loadbalancer.api.default_api import DefaultApi as DefaultApi +from stackit.loadbalancer.api_client import ApiClient as ApiClient # import ApiClient -from stackit.loadbalancer.api_response import ApiResponse -from stackit.loadbalancer.configuration import HostConfiguration -from stackit.loadbalancer.exceptions import ( - ApiAttributeError, - ApiException, - ApiKeyError, - ApiTypeError, - ApiValueError, - OpenApiException, -) +from stackit.loadbalancer.api_response import ApiResponse as ApiResponse +from stackit.loadbalancer.configuration import HostConfiguration as HostConfiguration +from stackit.loadbalancer.exceptions import ApiAttributeError as ApiAttributeError +from stackit.loadbalancer.exceptions import ApiException as ApiException +from stackit.loadbalancer.exceptions import ApiKeyError as ApiKeyError +from stackit.loadbalancer.exceptions import ApiTypeError as ApiTypeError +from stackit.loadbalancer.exceptions import ApiValueError as ApiValueError +from stackit.loadbalancer.exceptions import OpenApiException as OpenApiException # import models into sdk package -from stackit.loadbalancer.models.active_health_check import ActiveHealthCheck +from stackit.loadbalancer.models.active_health_check import ( + ActiveHealthCheck as ActiveHealthCheck, +) from stackit.loadbalancer.models.create_credentials_payload import ( - CreateCredentialsPayload, + CreateCredentialsPayload as CreateCredentialsPayload, ) from stackit.loadbalancer.models.create_credentials_response import ( - CreateCredentialsResponse, + CreateCredentialsResponse as CreateCredentialsResponse, ) from stackit.loadbalancer.models.create_load_balancer_payload import ( - CreateLoadBalancerPayload, + CreateLoadBalancerPayload as CreateLoadBalancerPayload, +) +from stackit.loadbalancer.models.credentials_response import ( + CredentialsResponse as CredentialsResponse, +) +from stackit.loadbalancer.models.get_credentials_response import ( + GetCredentialsResponse as GetCredentialsResponse, +) +from stackit.loadbalancer.models.get_quota_response import ( + GetQuotaResponse as GetQuotaResponse, +) +from stackit.loadbalancer.models.google_protobuf_any import ( + GoogleProtobufAny as GoogleProtobufAny, ) -from stackit.loadbalancer.models.credentials_response import CredentialsResponse -from stackit.loadbalancer.models.get_credentials_response import GetCredentialsResponse -from stackit.loadbalancer.models.get_quota_response import GetQuotaResponse -from stackit.loadbalancer.models.google_protobuf_any import GoogleProtobufAny from stackit.loadbalancer.models.list_credentials_response import ( - ListCredentialsResponse, + ListCredentialsResponse as ListCredentialsResponse, ) from stackit.loadbalancer.models.list_load_balancers_response import ( - ListLoadBalancersResponse, + ListLoadBalancersResponse as ListLoadBalancersResponse, +) +from stackit.loadbalancer.models.list_plans_response import ( + ListPlansResponse as ListPlansResponse, +) +from stackit.loadbalancer.models.listener import Listener as Listener +from stackit.loadbalancer.models.load_balancer import LoadBalancer as LoadBalancer +from stackit.loadbalancer.models.load_balancer_error import ( + LoadBalancerError as LoadBalancerError, +) +from stackit.loadbalancer.models.load_balancer_options import ( + LoadBalancerOptions as LoadBalancerOptions, ) -from stackit.loadbalancer.models.list_plans_response import ListPlansResponse -from stackit.loadbalancer.models.listener import Listener -from stackit.loadbalancer.models.load_balancer import LoadBalancer -from stackit.loadbalancer.models.load_balancer_error import LoadBalancerError -from stackit.loadbalancer.models.load_balancer_options import LoadBalancerOptions from stackit.loadbalancer.models.loadbalancer_option_access_control import ( - LoadbalancerOptionAccessControl, + LoadbalancerOptionAccessControl as LoadbalancerOptionAccessControl, +) +from stackit.loadbalancer.models.loadbalancer_option_logs import ( + LoadbalancerOptionLogs as LoadbalancerOptionLogs, ) -from stackit.loadbalancer.models.loadbalancer_option_logs import LoadbalancerOptionLogs from stackit.loadbalancer.models.loadbalancer_option_metrics import ( - LoadbalancerOptionMetrics, + LoadbalancerOptionMetrics as LoadbalancerOptionMetrics, ) from stackit.loadbalancer.models.loadbalancer_option_observability import ( - LoadbalancerOptionObservability, -) -from stackit.loadbalancer.models.network import Network -from stackit.loadbalancer.models.options_tcp import OptionsTCP -from stackit.loadbalancer.models.options_udp import OptionsUDP -from stackit.loadbalancer.models.plan_details import PlanDetails -from stackit.loadbalancer.models.security_group import SecurityGroup -from stackit.loadbalancer.models.server_name_indicator import ServerNameIndicator -from stackit.loadbalancer.models.session_persistence import SessionPersistence -from stackit.loadbalancer.models.status import Status -from stackit.loadbalancer.models.target import Target -from stackit.loadbalancer.models.target_pool import TargetPool + LoadbalancerOptionObservability as LoadbalancerOptionObservability, +) +from stackit.loadbalancer.models.network import Network as Network +from stackit.loadbalancer.models.options_tcp import OptionsTCP as OptionsTCP +from stackit.loadbalancer.models.options_udp import OptionsUDP as OptionsUDP +from stackit.loadbalancer.models.plan_details import PlanDetails as PlanDetails +from stackit.loadbalancer.models.security_group import SecurityGroup as SecurityGroup +from stackit.loadbalancer.models.server_name_indicator import ( + ServerNameIndicator as ServerNameIndicator, +) +from stackit.loadbalancer.models.session_persistence import ( + SessionPersistence as SessionPersistence, +) +from stackit.loadbalancer.models.status import Status as Status +from stackit.loadbalancer.models.target import Target as Target +from stackit.loadbalancer.models.target_pool import TargetPool as TargetPool from stackit.loadbalancer.models.update_credentials_payload import ( - UpdateCredentialsPayload, + UpdateCredentialsPayload as UpdateCredentialsPayload, ) from stackit.loadbalancer.models.update_credentials_response import ( - UpdateCredentialsResponse, + UpdateCredentialsResponse as UpdateCredentialsResponse, ) from stackit.loadbalancer.models.update_load_balancer_payload import ( - UpdateLoadBalancerPayload, + UpdateLoadBalancerPayload as UpdateLoadBalancerPayload, ) from stackit.loadbalancer.models.update_target_pool_payload import ( - UpdateTargetPoolPayload, + UpdateTargetPoolPayload as UpdateTargetPoolPayload, ) diff --git a/services/loadbalancer/src/stackit/loadbalancer/api/default_api.py b/services/loadbalancer/src/stackit/loadbalancer/api/default_api.py index aa987f8e..022aad54 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/api/default_api.py +++ b/services/loadbalancer/src/stackit/loadbalancer/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 typing import Any, Dict, List, Optional, Tuple, Union @@ -116,7 +116,7 @@ def create_credentials( 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_credentials_serialize( project_id=project_id, @@ -192,7 +192,7 @@ def create_credentials_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_credentials_serialize( project_id=project_id, @@ -268,7 +268,7 @@ def create_credentials_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_credentials_serialize( project_id=project_id, @@ -311,7 +311,7 @@ def _create_credentials_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 @@ -407,7 +407,7 @@ def create_load_balancer( 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_load_balancer_serialize( project_id=project_id, @@ -484,7 +484,7 @@ def create_load_balancer_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_load_balancer_serialize( project_id=project_id, @@ -561,7 +561,7 @@ def create_load_balancer_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_load_balancer_serialize( project_id=project_id, @@ -605,7 +605,7 @@ def _create_load_balancer_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 @@ -698,7 +698,7 @@ def delete_credentials( 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_credentials_serialize( project_id=project_id, @@ -770,7 +770,7 @@ def delete_credentials_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_credentials_serialize( project_id=project_id, @@ -842,7 +842,7 @@ def delete_credentials_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_credentials_serialize( project_id=project_id, @@ -883,7 +883,7 @@ def _delete_credentials_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 @@ -966,7 +966,7 @@ def delete_load_balancer( 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_load_balancer_serialize( project_id=project_id, @@ -1038,7 +1038,7 @@ def delete_load_balancer_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_load_balancer_serialize( project_id=project_id, @@ -1110,7 +1110,7 @@ def delete_load_balancer_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_load_balancer_serialize( project_id=project_id, @@ -1151,7 +1151,7 @@ def _delete_load_balancer_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 @@ -1234,7 +1234,7 @@ def get_credentials( 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_credentials_serialize( project_id=project_id, @@ -1307,7 +1307,7 @@ def get_credentials_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_credentials_serialize( project_id=project_id, @@ -1380,7 +1380,7 @@ def get_credentials_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_credentials_serialize( project_id=project_id, @@ -1422,7 +1422,7 @@ def _get_credentials_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 @@ -1505,7 +1505,7 @@ def get_load_balancer( 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_load_balancer_serialize( project_id=project_id, @@ -1578,7 +1578,7 @@ def get_load_balancer_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_load_balancer_serialize( project_id=project_id, @@ -1651,7 +1651,7 @@ def get_load_balancer_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_load_balancer_serialize( project_id=project_id, @@ -1693,7 +1693,7 @@ def _get_load_balancer_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 @@ -1773,7 +1773,7 @@ def get_quota( 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_quota_serialize( project_id=project_id, @@ -1841,7 +1841,7 @@ def get_quota_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_quota_serialize( project_id=project_id, @@ -1909,7 +1909,7 @@ def get_quota_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_quota_serialize( project_id=project_id, @@ -1948,7 +1948,7 @@ def _get_quota_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 @@ -2026,7 +2026,7 @@ def list_credentials( 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_credentials_serialize( project_id=project_id, @@ -2094,7 +2094,7 @@ def list_credentials_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_credentials_serialize( project_id=project_id, @@ -2162,7 +2162,7 @@ def list_credentials_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_credentials_serialize( project_id=project_id, @@ -2201,7 +2201,7 @@ def _list_credentials_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 @@ -2295,7 +2295,7 @@ def list_load_balancers( 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_load_balancers_serialize( project_id=project_id, @@ -2382,7 +2382,7 @@ def list_load_balancers_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_load_balancers_serialize( project_id=project_id, @@ -2469,7 +2469,7 @@ def list_load_balancers_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_load_balancers_serialize( project_id=project_id, @@ -2513,7 +2513,7 @@ def _list_load_balancers_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 @@ -2596,7 +2596,7 @@ def list_plans( 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_plans_serialize( region=region, @@ -2660,7 +2660,7 @@ def list_plans_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_plans_serialize( region=region, @@ -2724,7 +2724,7 @@ def list_plans_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_plans_serialize( region=region, @@ -2761,7 +2761,7 @@ def _list_plans_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 @@ -2843,7 +2843,7 @@ def update_credentials( 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._update_credentials_serialize( project_id=project_id, @@ -2920,7 +2920,7 @@ def update_credentials_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._update_credentials_serialize( project_id=project_id, @@ -2997,7 +2997,7 @@ def update_credentials_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._update_credentials_serialize( project_id=project_id, @@ -3041,7 +3041,7 @@ def _update_credentials_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 @@ -3137,7 +3137,7 @@ def update_load_balancer( 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._update_load_balancer_serialize( project_id=project_id, @@ -3214,7 +3214,7 @@ def update_load_balancer_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._update_load_balancer_serialize( project_id=project_id, @@ -3291,7 +3291,7 @@ def update_load_balancer_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._update_load_balancer_serialize( project_id=project_id, @@ -3335,7 +3335,7 @@ def _update_load_balancer_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 @@ -3434,7 +3434,7 @@ def update_target_pool( 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._update_target_pool_serialize( project_id=project_id, @@ -3514,7 +3514,7 @@ def update_target_pool_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._update_target_pool_serialize( project_id=project_id, @@ -3594,7 +3594,7 @@ def update_target_pool_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._update_target_pool_serialize( project_id=project_id, @@ -3639,7 +3639,7 @@ def _update_target_pool_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/loadbalancer/src/stackit/loadbalancer/api_client.py b/services/loadbalancer/src/stackit/loadbalancer/api_client.py index 3542b18f..0f1b2e94 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/api_client.py +++ b/services/loadbalancer/src/stackit/loadbalancer/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/loadbalancer/src/stackit/loadbalancer/configuration.py b/services/loadbalancer/src/stackit/loadbalancer/configuration.py index da49ec15..2a31b83c 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/configuration.py +++ b/services/loadbalancer/src/stackit/loadbalancer/configuration.py @@ -1,10 +1,5 @@ # coding: utf-8 -import sys - -import os - - """ Load Balancer 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/loadbalancer/src/stackit/loadbalancer/exceptions.py b/services/loadbalancer/src/stackit/loadbalancer/exceptions.py index cc3b4f97..69d51a5b 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/exceptions.py +++ b/services/loadbalancer/src/stackit/loadbalancer/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/loadbalancer/src/stackit/loadbalancer/models/__init__.py b/services/loadbalancer/src/stackit/loadbalancer/models/__init__.py index a04c158f..c400291e 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/__init__.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/__init__.py @@ -10,7 +10,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 models into model package diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/active_health_check.py b/services/loadbalancer/src/stackit/loadbalancer/models/active_health_check.py index e6e45cc2..b89bfa78 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/active_health_check.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/active_health_check.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 @@ -25,7 +25,7 @@ class ActiveHealthCheck(BaseModel): """ ActiveHealthCheck - """ + """ # noqa: E501 healthy_threshold: Optional[Annotated[int, Field(le=1000000, strict=True, ge=1)]] = Field( default=None, description="Healthy threshold of the health checking", alias="healthyThreshold" diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/create_credentials_payload.py b/services/loadbalancer/src/stackit/loadbalancer/models/create_credentials_payload.py index 715ff3e1..ceccb6e4 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/create_credentials_payload.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/create_credentials_payload.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, StrictStr, field_validator @@ -25,7 +25,7 @@ class CreateCredentialsPayload(BaseModel): """ CreateCredentialsPayload - """ + """ # noqa: E501 display_name: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="Credential name", alias="displayName" diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/create_credentials_response.py b/services/loadbalancer/src/stackit/loadbalancer/models/create_credentials_response.py index 374d16e8..b07f5a5e 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/create_credentials_response.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/create_credentials_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 CreateCredentialsResponse(BaseModel): """ CreateCredentialsResponse - """ + """ # noqa: E501 credential: Optional[CredentialsResponse] = None __properties: ClassVar[List[str]] = ["credential"] diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/create_load_balancer_payload.py b/services/loadbalancer/src/stackit/loadbalancer/models/create_load_balancer_payload.py index 9102b893..be20966c 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/create_load_balancer_payload.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/create_load_balancer_payload.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 ( @@ -39,7 +39,7 @@ class CreateLoadBalancerPayload(BaseModel): """ CreateLoadBalancerPayload - """ + """ # noqa: E501 disable_target_security_group_assignment: Optional[StrictBool] = Field( default=None, diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/credentials_response.py b/services/loadbalancer/src/stackit/loadbalancer/models/credentials_response.py index 6e67b41c..ab05893b 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/credentials_response.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/credentials_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, StrictStr, field_validator @@ -25,7 +25,7 @@ class CredentialsResponse(BaseModel): """ CredentialsResponse - """ + """ # noqa: E501 credentials_ref: Optional[StrictStr] = Field( default=None, diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/get_credentials_response.py b/services/loadbalancer/src/stackit/loadbalancer/models/get_credentials_response.py index 66debb29..54f5575c 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/get_credentials_response.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/get_credentials_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 GetCredentialsResponse(BaseModel): """ GetCredentialsResponse - """ + """ # noqa: E501 credential: Optional[CredentialsResponse] = None __properties: ClassVar[List[str]] = ["credential"] diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/get_quota_response.py b/services/loadbalancer/src/stackit/loadbalancer/models/get_quota_response.py index 51038bd9..cd9e1452 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/get_quota_response.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/get_quota_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 @@ -25,7 +25,7 @@ class GetQuotaResponse(BaseModel): """ GetQuotaResponse - """ + """ # noqa: E501 max_load_balancers: Optional[Annotated[int, Field(le=1000000, strict=True, ge=-1)]] = Field( default=None, diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/google_protobuf_any.py b/services/loadbalancer/src/stackit/loadbalancer/models/google_protobuf_any.py index de07d88e..53c08a13 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/google_protobuf_any.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/google_protobuf_any.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 GoogleProtobufAny(BaseModel): """ Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. - """ + """ # noqa: E501 type: Optional[StrictStr] = Field(default=None, description="The type of the serialized message.", alias="@type") additional_properties: Dict[str, Any] = {} diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/list_credentials_response.py b/services/loadbalancer/src/stackit/loadbalancer/models/list_credentials_response.py index ff1a14e9..631ea6ed 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/list_credentials_response.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/list_credentials_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 ListCredentialsResponse(BaseModel): """ ListCredentialsResponse - """ + """ # noqa: E501 credentials: Optional[List[CredentialsResponse]] = None __properties: ClassVar[List[str]] = ["credentials"] diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/list_load_balancers_response.py b/services/loadbalancer/src/stackit/loadbalancer/models/list_load_balancers_response.py index 644c96f3..3ffa3ad9 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/list_load_balancers_response.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/list_load_balancers_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 ListLoadBalancersResponse(BaseModel): """ ListLoadBalancersResponse - """ + """ # noqa: E501 load_balancers: Optional[List[LoadBalancer]] = Field(default=None, alias="loadBalancers") next_page_id: Optional[Annotated[str, Field(strict=True)]] = Field( diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/list_plans_response.py b/services/loadbalancer/src/stackit/loadbalancer/models/list_plans_response.py index 41ecbbc7..fd2e7bd9 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/list_plans_response.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/list_plans_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 ListPlansResponse(BaseModel): """ ListPlansResponse - """ + """ # noqa: E501 valid_plans: Optional[List[PlanDetails]] = Field(default=None, alias="validPlans") __properties: ClassVar[List[str]] = ["validPlans"] diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/listener.py b/services/loadbalancer/src/stackit/loadbalancer/models/listener.py index e192d503..2ac92640 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/listener.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/listener.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 Listener(BaseModel): """ Listener - """ + """ # noqa: E501 display_name: Optional[StrictStr] = Field(default=None, alias="displayName") name: Optional[StrictStr] = Field( diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/load_balancer.py b/services/loadbalancer/src/stackit/loadbalancer/models/load_balancer.py index bfc94782..7857cf14 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/load_balancer.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/load_balancer.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 ( @@ -39,7 +39,7 @@ class LoadBalancer(BaseModel): """ LoadBalancer - """ + """ # noqa: E501 disable_target_security_group_assignment: Optional[StrictBool] = Field( default=None, diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/load_balancer_error.py b/services/loadbalancer/src/stackit/loadbalancer/models/load_balancer_error.py index e89c93b2..9d9ae86e 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/load_balancer_error.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/load_balancer_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 LoadBalancerError(BaseModel): """ LoadBalancerError - """ + """ # noqa: E501 description: Optional[StrictStr] = Field( default=None, diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/load_balancer_options.py b/services/loadbalancer/src/stackit/loadbalancer/models/load_balancer_options.py index 9306f60f..e283e804 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/load_balancer_options.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/load_balancer_options.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 @@ -31,7 +31,7 @@ class LoadBalancerOptions(BaseModel): """ Defines any optional functionality you want to have enabled on your load balancer. - """ + """ # noqa: E501 access_control: Optional[LoadbalancerOptionAccessControl] = Field(default=None, alias="accessControl") ephemeral_address: Optional[StrictBool] = Field(default=None, alias="ephemeralAddress") diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/loadbalancer_option_access_control.py b/services/loadbalancer/src/stackit/loadbalancer/models/loadbalancer_option_access_control.py index 13345d4c..aabe7c72 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/loadbalancer_option_access_control.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/loadbalancer_option_access_control.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 LoadbalancerOptionAccessControl(BaseModel): """ Use this option to limit the IP ranges that can use the load balancer. - """ + """ # noqa: E501 allowed_source_ranges: Optional[List[StrictStr]] = Field( default=None, diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/loadbalancer_option_logs.py b/services/loadbalancer/src/stackit/loadbalancer/models/loadbalancer_option_logs.py index 2e8d6891..336c07f5 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/loadbalancer_option_logs.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/loadbalancer_option_logs.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 LoadbalancerOptionLogs(BaseModel): """ LoadbalancerOptionLogs - """ + """ # noqa: E501 credentials_ref: Optional[StrictStr] = Field( default=None, diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/loadbalancer_option_metrics.py b/services/loadbalancer/src/stackit/loadbalancer/models/loadbalancer_option_metrics.py index 21afed4c..b6f54551 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/loadbalancer_option_metrics.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/loadbalancer_option_metrics.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 LoadbalancerOptionMetrics(BaseModel): """ LoadbalancerOptionMetrics - """ + """ # noqa: E501 credentials_ref: Optional[StrictStr] = Field( default=None, diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/loadbalancer_option_observability.py b/services/loadbalancer/src/stackit/loadbalancer/models/loadbalancer_option_observability.py index a9980bf2..9752501c 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/loadbalancer_option_observability.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/loadbalancer_option_observability.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 LoadbalancerOptionObservability(BaseModel): """ We offer Load Balancer metrics observability via ARGUS or external solutions. Not changeable after creation. - """ + """ # noqa: E501 logs: Optional[LoadbalancerOptionLogs] = None metrics: Optional[LoadbalancerOptionMetrics] = None diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/network.py b/services/loadbalancer/src/stackit/loadbalancer/models/network.py index 5f022b5c..e53d96cf 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/network.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/network.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, StrictStr, field_validator @@ -25,7 +25,7 @@ class Network(BaseModel): """ Network - """ + """ # noqa: E501 network_id: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="Openstack network ID", alias="networkId" diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/options_tcp.py b/services/loadbalancer/src/stackit/loadbalancer/models/options_tcp.py index 19ecef68..8bc4323d 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/options_tcp.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/options_tcp.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 @@ -25,7 +25,7 @@ class OptionsTCP(BaseModel): """ OptionsTCP - """ + """ # noqa: E501 idle_timeout: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/options_udp.py b/services/loadbalancer/src/stackit/loadbalancer/models/options_udp.py index d2756fcc..5887f58c 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/options_udp.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/options_udp.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 @@ -25,7 +25,7 @@ class OptionsUDP(BaseModel): """ OptionsUDP - """ + """ # noqa: E501 idle_timeout: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/plan_details.py b/services/loadbalancer/src/stackit/loadbalancer/models/plan_details.py index 172c54b9..0539aa82 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/plan_details.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/plan_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 PlanDetails(BaseModel): """ PlanDetails - """ + """ # noqa: E501 description: Optional[StrictStr] = Field(default=None, description="Description") flavor_name: Optional[StrictStr] = Field(default=None, description="Flavor Name", alias="flavorName") diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/security_group.py b/services/loadbalancer/src/stackit/loadbalancer/models/security_group.py index 205abe03..695f196f 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/security_group.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/security_group.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 SecurityGroup(BaseModel): """ SecurityGroup - """ + """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="ID of the security Group") name: Optional[StrictStr] = Field(default=None, description="Name of the security Group") diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/server_name_indicator.py b/services/loadbalancer/src/stackit/loadbalancer/models/server_name_indicator.py index d90156a4..b70fb7de 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/server_name_indicator.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/server_name_indicator.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 ServerNameIndicator(BaseModel): """ ServerNameIndicator - """ + """ # noqa: E501 name: Optional[StrictStr] = Field(default=None, description="The domain name for this SNI config.") __properties: ClassVar[List[str]] = ["name"] diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/session_persistence.py b/services/loadbalancer/src/stackit/loadbalancer/models/session_persistence.py index 641f861c..2b9b53dd 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/session_persistence.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/session_persistence.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 SessionPersistence(BaseModel): """ SessionPersistence - """ + """ # noqa: E501 use_source_ip_address: Optional[StrictBool] = Field( default=None, diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/status.py b/services/loadbalancer/src/stackit/loadbalancer/models/status.py index 460d96ea..962454d4 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/status.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/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 @@ -26,7 +26,7 @@ class Status(BaseModel): """ The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). - """ + """ # noqa: E501 code: Optional[StrictInt] = Field( default=None, diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/target.py b/services/loadbalancer/src/stackit/loadbalancer/models/target.py index 14e07fc4..1c2c6f0e 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/target.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/target.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, StrictStr, field_validator @@ -25,7 +25,7 @@ class Target(BaseModel): """ Target - """ + """ # noqa: E501 display_name: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="Target name", alias="displayName" diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/target_pool.py b/services/loadbalancer/src/stackit/loadbalancer/models/target_pool.py index 5e2019d7..95a8ccce 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/target_pool.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/target_pool.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 @@ -29,7 +29,7 @@ class TargetPool(BaseModel): """ TargetPool - """ + """ # noqa: E501 active_health_check: Optional[ActiveHealthCheck] = Field(default=None, alias="activeHealthCheck") name: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Target pool name") diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/update_credentials_payload.py b/services/loadbalancer/src/stackit/loadbalancer/models/update_credentials_payload.py index c7192923..256922c7 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/update_credentials_payload.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/update_credentials_payload.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, StrictStr, field_validator @@ -25,7 +25,7 @@ class UpdateCredentialsPayload(BaseModel): """ UpdateCredentialsPayload - """ + """ # noqa: E501 display_name: Optional[Annotated[str, Field(strict=True)]] = Field( default=None, description="Credential name", alias="displayName" diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/update_credentials_response.py b/services/loadbalancer/src/stackit/loadbalancer/models/update_credentials_response.py index ab34a5d3..13f03667 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/update_credentials_response.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/update_credentials_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 UpdateCredentialsResponse(BaseModel): """ UpdateCredentialsResponse - """ + """ # noqa: E501 credential: Optional[CredentialsResponse] = None __properties: ClassVar[List[str]] = ["credential"] diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/update_load_balancer_payload.py b/services/loadbalancer/src/stackit/loadbalancer/models/update_load_balancer_payload.py index 6bdd9430..fc6e50db 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/update_load_balancer_payload.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/update_load_balancer_payload.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 ( @@ -39,7 +39,7 @@ class UpdateLoadBalancerPayload(BaseModel): """ UpdateLoadBalancerPayload - """ + """ # noqa: E501 disable_target_security_group_assignment: Optional[StrictBool] = Field( default=None, diff --git a/services/loadbalancer/src/stackit/loadbalancer/models/update_target_pool_payload.py b/services/loadbalancer/src/stackit/loadbalancer/models/update_target_pool_payload.py index 49545229..e7aa7ef4 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/models/update_target_pool_payload.py +++ b/services/loadbalancer/src/stackit/loadbalancer/models/update_target_pool_payload.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 @@ -29,7 +29,7 @@ class UpdateTargetPoolPayload(BaseModel): """ UpdateTargetPoolPayload - """ + """ # noqa: E501 active_health_check: Optional[ActiveHealthCheck] = Field(default=None, alias="activeHealthCheck") name: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Target pool name") diff --git a/services/loadbalancer/src/stackit/loadbalancer/rest.py b/services/loadbalancer/src/stackit/loadbalancer/rest.py index d02425a3..6834ed28 100644 --- a/services/loadbalancer/src/stackit/loadbalancer/rest.py +++ b/services/loadbalancer/src/stackit/loadbalancer/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: