diff --git a/docs/api.md b/docs/api.md index 68d9187a..669e3327 100644 --- a/docs/api.md +++ b/docs/api.md @@ -71,6 +71,7 @@ This class contains various settings of the API client. :param tls_server_name: SSL/TLS Server Name Indication (SNI). Set this to the SNI value expected by the server. :param connection_pool_maxsize: Connection pool max size. None in the constructor is coerced to 100 for async and cpu_count * 5 for sync. :param proxy: Proxy URL. + :param no_proxy: Comma-separated hosts that bypass the proxy. :param proxy_headers: Proxy headers. :param safe_chars_for_path_param: Safe characters for path parameter encoding. :param client_side_validation: Enable client-side validation. Default True. @@ -127,6 +128,7 @@ def __init__(host: Optional[str] = None, tls_server_name: Optional[str] = None, connection_pool_maxsize: Optional[int] = None, proxy: Optional[str] = None, + no_proxy: Optional[str] = None, proxy_headers: Optional[Any] = None, safe_chars_for_path_param: str = '', client_side_validation: bool = True, @@ -413,6 +415,52 @@ def host(value: str) -> None Fix base path. + + +# koyeb/api.test.test\_service\_pool + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestServicePool Objects + +```python +class TestServicePool(unittest.TestCase) +``` + +ServicePool unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> ServicePool +``` + +Test ServicePool +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testServicePool + +```python +def testServicePool() +``` + +Test ServicePool + # koyeb/api.test.test\_get\_metrics\_reply\_metric @@ -538,6 +586,52 @@ def testKgitproxyIndexingStatus() Test KgitproxyIndexingStatus + + +# koyeb/api.test.test\_persistent\_volume\_region\_usage + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestPersistentVolumeRegionUsage Objects + +```python +class TestPersistentVolumeRegionUsage(unittest.TestCase) +``` + +PersistentVolumeRegionUsage unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> PersistentVolumeRegionUsage +``` + +Test PersistentVolumeRegionUsage +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testPersistentVolumeRegionUsage + +```python +def testPersistentVolumeRegionUsage() +``` + +Test PersistentVolumeRegionUsage + # koyeb/api.test.test\_declare\_stage\_progress\_request @@ -2512,6 +2606,52 @@ def testEgressPolicy() Test EgressPolicy + + +# koyeb/api.test.test\_create\_service\_pool + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestCreateServicePool Objects + +```python +class TestCreateServicePool(unittest.TestCase) +``` + +CreateServicePool unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> CreateServicePool +``` + +Test CreateServicePool +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testCreateServicePool + +```python +def testCreateServicePool() +``` + +Test CreateServicePool + # koyeb/api.test.test\_desired\_deployment @@ -3313,6 +3453,52 @@ def testNotificationList() Test NotificationList + + +# koyeb/api.test.test\_update\_service\_pool\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestUpdateServicePoolReply Objects + +```python +class TestUpdateServicePoolReply(unittest.TestCase) +``` + +UpdateServicePoolReply unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> UpdateServicePoolReply +``` + +Test UpdateServicePoolReply +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testUpdateServicePoolReply + +```python +def testUpdateServicePoolReply() +``` + +Test UpdateServicePoolReply + # koyeb/api.test.test\_user @@ -5633,6 +5819,52 @@ def testRegionalDeploymentEvent() Test RegionalDeploymentEvent + + +# koyeb/api.test.test\_mesh + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestMesh Objects + +```python +class TestMesh(unittest.TestCase) +``` + +Mesh unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> Mesh +``` + +Test Mesh +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testMesh + +```python +def testMesh() +``` + +Test Mesh + # koyeb/api.test.test\_reset\_password\_request @@ -7580,6 +7812,52 @@ Test case for remove_organization_member Remove an organization member + + +# koyeb/api.test.test\_update\_service\_pool + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestUpdateServicePool Objects + +```python +class TestUpdateServicePool(unittest.TestCase) +``` + +UpdateServicePool unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> UpdateServicePool +``` + +Test UpdateServicePool +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testUpdateServicePool + +```python +def testUpdateServicePool() +``` + +Test UpdateServicePool + # koyeb/api.test.test\_update\_organization\_reply @@ -7902,6 +8180,52 @@ def testCreateInstanceSnapshotRequest() Test CreateInstanceSnapshotRequest + + +# koyeb/api.test.test\_pool\_claim\_request + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestPoolClaimRequest Objects + +```python +class TestPoolClaimRequest(unittest.TestCase) +``` + +PoolClaimRequest unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> PoolClaimRequest +``` + +Test PoolClaimRequest +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testPoolClaimRequest + +```python +def testPoolClaimRequest() +``` + +Test PoolClaimRequest + # koyeb/api.test @@ -9280,6 +9604,39 @@ def testGitSource() Test GitSource + + +# koyeb/api.test.test\_mesh\_scope + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestMeshScope Objects + +```python +class TestMeshScope(unittest.TestCase) +``` + +MeshScope unit test stubs + + + +#### testMeshScope + +```python +def testMeshScope() +``` + +Test MeshScope + # koyeb/api.test.test\_instance\_event @@ -9372,6 +9729,52 @@ def testDockerBuilder() Test DockerBuilder + + +# koyeb/api.test.test\_create\_service\_pool\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestCreateServicePoolReply Objects + +```python +class TestCreateServicePoolReply(unittest.TestCase) +``` + +CreateServicePoolReply unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> CreateServicePoolReply +``` + +Test CreateServicePoolReply +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testCreateServicePoolReply + +```python +def testCreateServicePoolReply() +``` + +Test CreateServicePoolReply + # koyeb/api.test.test\_get\_region\_reply @@ -10594,6 +10997,98 @@ Test case for update_secret2 Update Secret + + +# koyeb/api.test.test\_instance\_type\_usage + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestInstanceTypeUsage Objects + +```python +class TestInstanceTypeUsage(unittest.TestCase) +``` + +InstanceTypeUsage unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> InstanceTypeUsage +``` + +Test InstanceTypeUsage +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testInstanceTypeUsage + +```python +def testInstanceTypeUsage() +``` + +Test InstanceTypeUsage + + + +# koyeb/api.test.test\_list\_service\_pools\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestListServicePoolsReply Objects + +```python +class TestListServicePoolsReply(unittest.TestCase) +``` + +ListServicePoolsReply unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> ListServicePoolsReply +``` + +Test ListServicePoolsReply +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testListServicePoolsReply + +```python +def testListServicePoolsReply() +``` + +Test ListServicePoolsReply + # koyeb/api.test.test\_update\_user\_settings\_request @@ -11929,6 +12424,52 @@ def testSecurityPolicies() Test SecurityPolicies + + +# koyeb/api.test.test\_instance\_snapshot\_type\_usage + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestInstanceSnapshotTypeUsage Objects + +```python +class TestInstanceSnapshotTypeUsage(unittest.TestCase) +``` + +InstanceSnapshotTypeUsage unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> InstanceSnapshotTypeUsage +``` + +Test InstanceSnapshotTypeUsage +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testInstanceSnapshotTypeUsage + +```python +def testInstanceSnapshotTypeUsage() +``` + +Test InstanceSnapshotTypeUsage + # koyeb/api.test.test\_credentials\_api @@ -12024,6 +12565,52 @@ Test case for update_credential2 Update credential + + +# koyeb/api.test.test\_get\_service\_pool\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestGetServicePoolReply Objects + +```python +class TestGetServicePoolReply(unittest.TestCase) +``` + +GetServicePoolReply unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> GetServicePoolReply +``` + +Test GetServicePoolReply +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testGetServicePoolReply + +```python +def testGetServicePoolReply() +``` + +Test GetServicePoolReply + # koyeb/api.test.test\_user\_role\_role @@ -13444,6 +14031,52 @@ def testRegionAvailability() Test RegionAvailability + + +# koyeb/api.test.test\_list\_pool\_claim\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestListPoolClaimReply Objects + +```python +class TestListPoolClaimReply(unittest.TestCase) +``` + +ListPoolClaimReply unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> ListPoolClaimReply +``` + +Test ListPoolClaimReply +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testListPoolClaimReply + +```python +def testListPoolClaimReply() +``` + +Test ListPoolClaimReply + # koyeb/api.test.test\_login\_method\_reply @@ -15011,6 +15644,39 @@ def testInstanceAvailability() Test InstanceAvailability + + +# koyeb/api.test.test\_service\_pool\_status + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestServicePoolStatus Objects + +```python +class TestServicePoolStatus(unittest.TestCase) +``` + +ServicePoolStatus unit test stubs + + + +#### testServicePoolStatus + +```python +def testServicePoolStatus() +``` + +Test ServicePoolStatus + # koyeb/api.test.test\_snapshot @@ -16442,6 +17108,52 @@ def testMetricName() Test MetricName + + +# koyeb/api.test.test\_pool\_claim + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestPoolClaim Objects + +```python +class TestPoolClaim(unittest.TestCase) +``` + +PoolClaim unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> PoolClaim +``` + +Test PoolClaim +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testPoolClaim + +```python +def testPoolClaim() +``` + +Test PoolClaim + # koyeb/api.test.test\_deployment\_scaling\_target\_requests\_per\_second @@ -16489,6 +17201,98 @@ def testDeploymentScalingTargetRequestsPerSecond() Test DeploymentScalingTargetRequestsPerSecond + + +# koyeb/api.test.test\_get\_pool\_claim\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestGetPoolClaimReply Objects + +```python +class TestGetPoolClaimReply(unittest.TestCase) +``` + +GetPoolClaimReply unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> GetPoolClaimReply +``` + +Test GetPoolClaimReply +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testGetPoolClaimReply + +```python +def testGetPoolClaimReply() +``` + +Test GetPoolClaimReply + + + +# koyeb/api.test.test\_quota\_usage + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestQuotaUsage Objects + +```python +class TestQuotaUsage(unittest.TestCase) +``` + +QuotaUsage unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> QuotaUsage +``` + +Test QuotaUsage +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testQuotaUsage + +```python +def testQuotaUsage() +``` + +Test QuotaUsage + # koyeb/api.test.test\_get\_organization\_reply @@ -17580,6 +18384,52 @@ def testDatabaseUsage() Test DatabaseUsage + + +# koyeb/api.test.test\_get\_organization\_quotas\_usage\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestGetOrganizationQuotasUsageReply Objects + +```python +class TestGetOrganizationQuotasUsageReply(unittest.TestCase) +``` + +GetOrganizationQuotasUsageReply unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> GetOrganizationQuotasUsageReply +``` + +Test GetOrganizationQuotasUsageReply +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testGetOrganizationQuotasUsageReply + +```python +def testGetOrganizationQuotasUsageReply() +``` + +Test GetOrganizationQuotasUsageReply + # koyeb/api.test.test\_kgitproxy\_git\_hub\_repository @@ -18631,6 +19481,52 @@ def testKsearchService() Test KsearchService + + +# koyeb/api.test.test\_pool\_claim\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestPoolClaimReply Objects + +```python +class TestPoolClaimReply(unittest.TestCase) +``` + +PoolClaimReply unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> PoolClaimReply +``` + +Test PoolClaimReply +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testPoolClaimReply + +```python +def testPoolClaimReply() +``` + +Test PoolClaimReply + # koyeb/api.test.test\_decline\_organization\_invitation\_reply @@ -19447,6 +20343,39 @@ def testDeactivateOrganizationReply() Test DeactivateOrganizationReply + + +# koyeb/api.test.test\_pool\_claim\_status + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestPoolClaimStatus Objects + +```python +class TestPoolClaimStatus(unittest.TestCase) +``` + +PoolClaimStatus unit test stubs + + + +#### testPoolClaimStatus + +```python +def testPoolClaimStatus() +``` + +Test PoolClaimStatus + # koyeb/api.test.test\_domain\_load\_balancer\_quotas @@ -20019,6 +20948,65 @@ def testCreateDomainReply() Test CreateDomainReply + + +# koyeb/api.test.test\_pool\_claims\_api + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestPoolClaimsApi Objects + +```python +class TestPoolClaimsApi(unittest.TestCase) +``` + +PoolClaimsApi unit test stubs + + + +#### test\_claim + +```python +def test_claim() -> None +``` + +Test case for claim + +Claim a sandbox from a service pool + + + +#### test\_get\_claim + +```python +def test_get_claim() -> None +``` + +Test case for get_claim + +Get a claim + + + +#### test\_list\_claim + +```python +def test_list_claim() -> None +``` + +Test case for list_claim + +List claims of a service pool + # koyeb/api.test.test\_accept\_organization\_invitation\_reply @@ -20635,6 +21623,75 @@ def testAppStatus() Test AppStatus + + +# koyeb/api.test.test\_service\_pools\_api + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestServicePoolsApi Objects + +```python +class TestServicePoolsApi(unittest.TestCase) +``` + +ServicePoolsApi unit test stubs + + + +#### test\_create\_service\_pool + +```python +def test_create_service_pool() -> None +``` + +Test case for create_service_pool + +Create a ServicePool + + + +#### test\_get\_service\_pool + +```python +def test_get_service_pool() -> None +``` + +Test case for get_service_pool + +Get a ServicePool + + + +#### test\_list\_service\_pools + +```python +def test_list_service_pools() -> None +``` + +Test case for list_service_pools + +List ServicePools + + + +#### test\_update\_service\_pool + +```python +def test_update_service_pool() -> None +``` + +Test case for update_service_pool + # koyeb/api.test.test\_persistent\_volume @@ -21223,6 +22280,16 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. + + +#### should\_bypass\_proxies + +```python +def should_bypass_proxies(url: str, no_proxy: str) -> bool +``` + +Return whether ``url`` matches the comma-separated ``no_proxy`` rules. + ## RESTResponse Objects @@ -23963,6 +25030,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of ListSnapshotsReply from a dict + + +# koyeb/api.models.pool\_claim + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## PoolClaim Objects + +```python +class PoolClaim(BaseModel) +``` + +PoolClaim + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of PoolClaim from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of PoolClaim from a dict + # koyeb/api.models.canny\_auth\_reply @@ -26033,6 +27182,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of Token from a dict + + +# koyeb/api.models.get\_service\_pool\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## GetServicePoolReply Objects + +```python +class GetServicePoolReply(BaseModel) +``` + +GetServicePoolReply + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of GetServicePoolReply from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of GetServicePoolReply from a dict + # koyeb/api.models.deployment\_proxy\_port @@ -26675,6 +27906,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of CreateCompose from a dict + + +# koyeb/api.models.pool\_claim\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## PoolClaimReply Objects + +```python +class PoolClaimReply(BaseModel) +``` + +PoolClaimReply + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of PoolClaimReply from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of PoolClaimReply from a dict + # koyeb/api.models.payment\_method @@ -28151,6 +29464,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of NeonPostgresDatabase from a dict + + +# koyeb/api.models.update\_service\_pool + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## UpdateServicePool Objects + +```python +class UpdateServicePool(BaseModel) +``` + +UpdateServicePool + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of UpdateServicePool from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of UpdateServicePool from a dict + # koyeb/api.models.decline\_organization\_invitation\_reply @@ -29859,6 +31254,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of UpdateUserSettingsRequest from a dict + + +# koyeb/api.models.create\_service\_pool + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## CreateServicePool Objects + +```python +class CreateServicePool(BaseModel) +``` + +CreateServicePool + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of CreateServicePool from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of CreateServicePool from a dict + # koyeb/api.models.user\_role\_role @@ -31191,6 +32668,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of DigitalOceanRegistryConfiguration from a dict + + +# koyeb/api.models.instance\_snapshot\_type\_usage + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## InstanceSnapshotTypeUsage Objects + +```python +class InstanceSnapshotTypeUsage(BaseModel) +``` + +InstanceSnapshotTypeUsage + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of InstanceSnapshotTypeUsage from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of InstanceSnapshotTypeUsage from a dict + # koyeb/api.models.list\_user\_organization\_invitations\_reply @@ -33097,6 +34656,40 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of LoginRequest from a dict + + +# koyeb/api.models.pool\_claim\_status + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## PoolClaimStatus Objects + +```python +class PoolClaimStatus(str, Enum) +``` + +PoolClaimStatus + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Self +``` + +Create an instance of PoolClaimStatus from a JSON string + # koyeb/api.models.update\_snapshot\_request @@ -34456,6 +36049,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of GithubInstallationRequest from a dict + + +# koyeb/api.models.get\_pool\_claim\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## GetPoolClaimReply Objects + +```python +class GetPoolClaimReply(BaseModel) +``` + +GetPoolClaimReply + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of GetPoolClaimReply from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of GetPoolClaimReply from a dict + # koyeb/api.models.deployment\_scaling\_target\_average\_mem @@ -35426,6 +37101,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of PersistentVolume from a dict + + +# koyeb/api.models.list\_service\_pools\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## ListServicePoolsReply Objects + +```python +class ListServicePoolsReply(BaseModel) +``` + +ListServicePoolsReply + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of ListServicePoolsReply from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of ListServicePoolsReply from a dict + # koyeb/api.models.service\_state @@ -35672,6 +37429,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of LogEntry from a dict + + +# koyeb/api.models.mesh + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## Mesh Objects + +```python +class Mesh(BaseModel) +``` + +Mesh groups the mesh scope selector and the (optional) custom mesh name. Kept inside NetworkPolicy so scope/name and other network-policy dimensions (egress, future inbound) live together. + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of Mesh from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of Mesh from a dict + # koyeb/api.models.database\_deployment\_metadata @@ -35836,6 +37675,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of GitLabRegistryConfiguration from a dict + + +# koyeb/api.models.list\_pool\_claim\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## ListPoolClaimReply Objects + +```python +class ListPoolClaimReply(BaseModel) +``` + +ListPoolClaimReply + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of ListPoolClaimReply from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of ListPoolClaimReply from a dict + # koyeb/api.models.delete\_organization\_reply @@ -38206,6 +40127,88 @@ def from_json(cls, json_str: str) -> Self Create an instance of MetricName from a JSON string + + +# koyeb/api.models.quota\_usage + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## QuotaUsage Objects + +```python +class QuotaUsage(BaseModel) +``` + +QuotaUsage carries an organization's current resource consumption alongside the corresponding plan limits (from the caller's InternalToken.Quotas). Paused services are included in services_used but excluded from memory / instances_by_type / proxy_ports totals, matching enforcement semantics. + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of QuotaUsage from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of QuotaUsage from a dict + # koyeb/api.models.regional\_deployment @@ -38650,6 +40653,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of CreatePaymentAuthorizationReply from a dict + + +# koyeb/api.models.update\_service\_pool\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## UpdateServicePoolReply Objects + +```python +class UpdateServicePoolReply(BaseModel) +``` + +UpdateServicePoolReply + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of UpdateServicePoolReply from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of UpdateServicePoolReply from a dict + # koyeb/api.models.get\_idenfy\_token\_reply @@ -42496,6 +44581,40 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of DeploymentPort from a dict + + +# koyeb/api.models.mesh\_scope + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## MeshScope Objects + +```python +class MeshScope(str, Enum) +``` + +MeshScope selects which set of services can communicate over the mesh. Only meaningful when the mesh is on (i.e. DeploymentMesh is ENABLED, or AUTO and the service is eligible). UNSPECIFIED defers to the organization-level default (workspace-scoped since KOYEB-6062, legacy organizations opted back to organization scope via use_organization_level_mesh). - MESH_SCOPE_ORGANIZATION: Private communication between services in the same organization (mesh label k-). - MESH_SCOPE_WORKSPACE: Private communication between services in the same workspace/project (mesh label pr_). - MESH_SCOPE_APP: Private communication between services in the same app (mesh label app_). - MESH_SCOPE_CUSTOM: Private communication between services in the same workspace that share the same NetworkPolicy.mesh.name. Server-computed label is scoped by workspace, so the same custom name in different workspaces never collides. + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Self +``` + +Create an instance of MeshScope from a JSON string + # koyeb/api.models.stream\_result\_of\_log\_entry @@ -42961,7 +45080,7 @@ Do not edit the class manually. class GoogleProtobufAny(BaseModel) ``` -GoogleProtobufAny +`Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } @@ -43945,6 +46064,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of TriggerGitDeploymentMetadata from a dict + + +# koyeb/api.models.pool\_claim\_request + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## PoolClaimRequest Objects + +```python +class PoolClaimRequest(BaseModel) +``` + +PoolClaimRequest + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of PoolClaimRequest from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of PoolClaimRequest from a dict + # koyeb/api.models.update\_project\_reply @@ -44191,6 +46392,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of GetRegionReply from a dict + + +# koyeb/api.models.create\_service\_pool\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## CreateServicePoolReply Objects + +```python +class CreateServicePoolReply(BaseModel) +``` + +CreateServicePoolReply + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of CreateServicePoolReply from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of CreateServicePoolReply from a dict + # koyeb/api.models.autocomplete\_request @@ -46241,6 +48524,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of UpdateAppReply from a dict + + +# koyeb/api.models.persistent\_volume\_region\_usage + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## PersistentVolumeRegionUsage Objects + +```python +class PersistentVolumeRegionUsage(BaseModel) +``` + +PersistentVolumeRegionUsage + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of PersistentVolumeRegionUsage from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of PersistentVolumeRegionUsage from a dict + # koyeb/api.models.update\_organization\_reply @@ -47197,6 +49562,88 @@ def from_json(cls, json_str: str) -> Self Create an instance of DomainStatus from a JSON string + + +# koyeb/api.models.service\_pool + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## ServicePool Objects + +```python +class ServicePool(BaseModel) +``` + +ServicePool + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of ServicePool from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of ServicePool from a dict + # koyeb/api.models.next\_invoice\_reply\_line\_period @@ -47361,6 +49808,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of VerifyDockerImageReply from a dict + + +# koyeb/api.models.instance\_type\_usage + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## InstanceTypeUsage Objects + +```python +class InstanceTypeUsage(BaseModel) +``` + +InstanceTypeUsage + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of InstanceTypeUsage from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of InstanceTypeUsage from a dict + # koyeb/api.models.create\_instance\_snapshot\_reply @@ -47525,6 +50054,40 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of RevealSecretReply from a dict + + +# koyeb/api.models.service\_pool\_status + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## ServicePoolStatus Objects + +```python +class ServicePoolStatus(str, Enum) +``` + +ServicePoolStatus + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Self +``` + +Create an instance of ServicePoolStatus from a JSON string + # koyeb/api.models.compose\_reply @@ -48653,7 +51216,7 @@ ExecCommandIO #### data\_validate\_regular\_expression ```python -@field_validator('data') +@field_validator('data', mode="before") def data_validate_regular_expression(cls, value) ``` @@ -50508,6 +53071,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of KsearchGlobalDeployment from a dict + + +# koyeb/api.models.get\_organization\_quotas\_usage\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## GetOrganizationQuotasUsageReply Objects + +```python +class GetOrganizationQuotasUsageReply(BaseModel) +``` + +GetOrganizationQuotasUsageReply + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of GetOrganizationQuotasUsageReply from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of GetOrganizationQuotasUsageReply from a dict + # koyeb/api.models.organization\_member\_status @@ -53081,6 +55726,10 @@ def list_regional_deployments( Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return" )] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on regional deployment ids" + )] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -53103,6 +55752,7 @@ Experimental: use at your own risk - `deployment_id` (`str`): (Optional) Filter on deployment id - `limit` (`str`): (Optional) The number of items to return - `offset` (`str`): (Optional) The offset in the list of item to return +- `ids` (`List[str]`): (Optional) Filter on regional deployment ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -53139,6 +55789,10 @@ def list_regional_deployments_with_http_info( Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return" )] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on regional deployment ids" + )] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -53161,6 +55815,7 @@ Experimental: use at your own risk - `deployment_id` (`str`): (Optional) Filter on deployment id - `limit` (`str`): (Optional) The number of items to return - `offset` (`str`): (Optional) The offset in the list of item to return +- `ids` (`List[str]`): (Optional) Filter on regional deployment ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -53197,6 +55852,10 @@ def list_regional_deployments_without_preload_content( Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return" )] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on regional deployment ids" + )] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -53219,6 +55878,7 @@ Experimental: use at your own risk - `deployment_id` (`str`): (Optional) Filter on deployment id - `limit` (`str`): (Optional) The number of items to return - `offset` (`str`): (Optional) The offset in the list of item to return +- `ids` (`List[str]`): (Optional) Filter on regional deployment ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -55764,9 +58424,9 @@ def list_domains( description="(Optional) A filter for apps")] = None, name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on domain ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -55790,7 +58450,7 @@ List Domains - `statuses` (`List[str]`): (Optional) A filter for statuses - `app_ids` (`List[str]`): (Optional) A filter for apps - `name` (`str`): (Optional) A filter for name -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on domain ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -55838,9 +58498,9 @@ def list_domains_with_http_info( description="(Optional) A filter for apps")] = None, name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on domain ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -55864,7 +58524,7 @@ List Domains - `statuses` (`List[str]`): (Optional) A filter for statuses - `app_ids` (`List[str]`): (Optional) A filter for apps - `name` (`str`): (Optional) A filter for name -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on domain ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -55912,9 +58572,9 @@ def list_domains_without_preload_content( description="(Optional) A filter for apps")] = None, name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on domain ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -55938,7 +58598,7 @@ List Domains - `statuses` (`List[str]`): (Optional) A filter for statuses - `app_ids` (`List[str]`): (Optional) A filter for apps - `name` (`str`): (Optional) A filter for name -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on domain ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -58219,9 +60879,9 @@ def list_services( regions: Annotated[Optional[List[StrictStr]], Field( description="(Optional) Filter on regions")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on service ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -58246,7 +60906,7 @@ List Services - `types` (`List[str]`): (Optional) Filter on service types - `statuses` (`List[str]`): (Optional) Filter on service statuses - `regions` (`List[str]`): (Optional) Filter on regions -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on service ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -58294,9 +60954,9 @@ def list_services_with_http_info( regions: Annotated[Optional[List[StrictStr]], Field( description="(Optional) Filter on regions")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on service ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -58321,7 +60981,7 @@ List Services - `types` (`List[str]`): (Optional) Filter on service types - `statuses` (`List[str]`): (Optional) Filter on service statuses - `regions` (`List[str]`): (Optional) Filter on regions -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on service ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -58369,9 +61029,9 @@ def list_services_without_preload_content( regions: Annotated[Optional[List[StrictStr]], Field( description="(Optional) Filter on regions")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on service ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -58396,7 +61056,7 @@ List Services - `types` (`List[str]`): (Optional) Filter on service types - `statuses` (`List[str]`): (Optional) Filter on service statuses - `regions` (`List[str]`): (Optional) Filter on regions -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on service ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -60178,9 +62838,9 @@ def list_persistent_volumes( name: Annotated[ Optional[StrictStr], Field(description="(Optional) A filter for the name")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on volume ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -60203,7 +62863,7 @@ List all PersistentVolumes - `service_id` (`str`): (Optional) A filter for the service id - `region` (`str`): (Optional) A filter for the region - `name` (`str`): (Optional) A filter for the name -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on volume ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -60246,9 +62906,9 @@ def list_persistent_volumes_with_http_info( name: Annotated[ Optional[StrictStr], Field(description="(Optional) A filter for the name")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on volume ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -60271,7 +62931,7 @@ List all PersistentVolumes - `service_id` (`str`): (Optional) A filter for the service id - `region` (`str`): (Optional) A filter for the region - `name` (`str`): (Optional) A filter for the name -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on volume ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -60314,9 +62974,9 @@ def list_persistent_volumes_without_preload_content( name: Annotated[ Optional[StrictStr], Field(description="(Optional) A filter for the name")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on volume ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -60339,7 +62999,7 @@ List all PersistentVolumes - `service_id` (`str`): (Optional) A filter for the service id - `region` (`str`): (Optional) A filter for the region - `name` (`str`): (Optional) A filter for the name -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on volume ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -60500,9 +63160,9 @@ in the spec for a single request. Returns the result object. - + -# koyeb/api.api.users\_api +# koyeb/api.api.pool\_claims\_api Koyeb Rest API @@ -60513,12 +63173,12 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. - + -## UsersApi Objects +## PoolClaimsApi Objects ```python -class UsersApi() +class PoolClaimsApi() ``` NOTE: This class is auto generated by OpenAPI Generator @@ -60526,15 +63186,14 @@ Ref: https://openapi-generator.tech Do not edit the class manually. - + -#### delete\_user +#### claim ```python @validate_call -def delete_user( - id: Annotated[StrictStr, - Field(description="The id of the user")], +def claim( + body: PoolClaimRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -60545,14 +63204,14 @@ def delete_user( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, - Field(ge=0, le=0)] = 0) -> DeleteUserReply + Field(ge=0, le=0)] = 0) -> PoolClaimReply ``` -Delete user +Claim a sandbox from a service pool **Arguments**: -- `id` (`str`): The id of the user (required) +- `body` (`PoolClaimRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -60572,15 +63231,14 @@ in the spec for a single request. Returns the result object. - + -#### delete\_user\_with\_http\_info +#### claim\_with\_http\_info ```python @validate_call -def delete_user_with_http_info( - id: Annotated[StrictStr, - Field(description="The id of the user")], +def claim_with_http_info( + body: PoolClaimRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -60591,14 +63249,14 @@ def delete_user_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> ApiResponse[DeleteUserReply] +) -> ApiResponse[PoolClaimReply] ``` -Delete user +Claim a sandbox from a service pool **Arguments**: -- `id` (`str`): The id of the user (required) +- `body` (`PoolClaimRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -60618,15 +63276,14 @@ in the spec for a single request. Returns the result object. - + -#### delete\_user\_without\_preload\_content +#### claim\_without\_preload\_content ```python @validate_call -def delete_user_without_preload_content( - id: Annotated[StrictStr, - Field(description="The id of the user")], +def claim_without_preload_content( + body: PoolClaimRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -60640,11 +63297,11 @@ def delete_user_without_preload_content( Field(ge=0, le=0)] = 0) -> RESTResponseType ``` -Delete user +Claim a sandbox from a service pool **Arguments**: -- `id` (`str`): The id of the user (required) +- `body` (`PoolClaimRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -60664,15 +63321,15 @@ in the spec for a single request. Returns the result object. - + -#### delete\_user\_v2 +#### get\_claim ```python @validate_call -def delete_user_v2( - id: Annotated[StrictStr, - Field(description="The id of the user")], +def get_claim( + claim_id: StrictStr, + request_id: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -60683,14 +63340,15 @@ def delete_user_v2( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, - Field(ge=0, le=0)] = 0) -> DeleteUserReply + Field(ge=0, le=0)] = 0) -> GetPoolClaimReply ``` -V2 Delete user +Get a claim **Arguments**: -- `id` (`str`): The id of the user (required) +- `claim_id` (`str`): (required) +- `request_id` (`str`): - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -60710,15 +63368,15 @@ in the spec for a single request. Returns the result object. - + -#### delete\_user\_v2\_with\_http\_info +#### get\_claim\_with\_http\_info ```python @validate_call -def delete_user_v2_with_http_info( - id: Annotated[StrictStr, - Field(description="The id of the user")], +def get_claim_with_http_info( + claim_id: StrictStr, + request_id: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -60729,14 +63387,15 @@ def delete_user_v2_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> ApiResponse[DeleteUserReply] +) -> ApiResponse[GetPoolClaimReply] ``` -V2 Delete user +Get a claim **Arguments**: -- `id` (`str`): The id of the user (required) +- `claim_id` (`str`): (required) +- `request_id` (`str`): - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -60756,13 +63415,239 @@ in the spec for a single request. Returns the result object. - + -#### delete\_user\_v2\_without\_preload\_content +#### get\_claim\_without\_preload\_content ```python @validate_call -def delete_user_v2_without_preload_content( +def get_claim_without_preload_content( + claim_id: StrictStr, + request_id: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Get a claim + +**Arguments**: + +- `claim_id` (`str`): (required) +- `request_id` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### list\_claim + +```python +@validate_call +def list_claim( + pool_id: StrictStr, + status: Optional[StrictStr] = None, + limit: Optional[StrictStr] = None, + offset: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ListPoolClaimReply +``` + +List claims of a service pool + +**Arguments**: + +- `pool_id` (`str`): (required) +- `status` (`str`): +- `limit` (`str`): +- `offset` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### list\_claim\_with\_http\_info + +```python +@validate_call +def list_claim_with_http_info( + pool_id: StrictStr, + status: Optional[StrictStr] = None, + limit: Optional[StrictStr] = None, + offset: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ApiResponse[ListPoolClaimReply] +``` + +List claims of a service pool + +**Arguments**: + +- `pool_id` (`str`): (required) +- `status` (`str`): +- `limit` (`str`): +- `offset` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### list\_claim\_without\_preload\_content + +```python +@validate_call +def list_claim_without_preload_content( + pool_id: StrictStr, + status: Optional[StrictStr] = None, + limit: Optional[StrictStr] = None, + offset: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +List claims of a service pool + +**Arguments**: + +- `pool_id` (`str`): (required) +- `status` (`str`): +- `limit` (`str`): +- `offset` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +# koyeb/api.api.users\_api + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## UsersApi Objects + +```python +class UsersApi() +``` + +NOTE: This class is auto generated by OpenAPI Generator +Ref: https://openapi-generator.tech + +Do not edit the class manually. + + + +#### delete\_user + +```python +@validate_call +def delete_user( id: Annotated[StrictStr, Field(description="The id of the user")], _request_timeout: Union[None, Annotated[StrictFloat, @@ -60775,10 +63660,240 @@ def delete_user_v2_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, - Field(ge=0, le=0)] = 0) -> RESTResponseType + Field(ge=0, le=0)] = 0) -> DeleteUserReply ``` -V2 Delete user +Delete user + +**Arguments**: + +- `id` (`str`): The id of the user (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### delete\_user\_with\_http\_info + +```python +@validate_call +def delete_user_with_http_info( + id: Annotated[StrictStr, + Field(description="The id of the user")], + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ApiResponse[DeleteUserReply] +``` + +Delete user + +**Arguments**: + +- `id` (`str`): The id of the user (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### delete\_user\_without\_preload\_content + +```python +@validate_call +def delete_user_without_preload_content( + id: Annotated[StrictStr, + Field(description="The id of the user")], + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Delete user + +**Arguments**: + +- `id` (`str`): The id of the user (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### delete\_user\_v2 + +```python +@validate_call +def delete_user_v2( + id: Annotated[StrictStr, + Field(description="The id of the user")], + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> DeleteUserReply +``` + +V2 Delete user + +**Arguments**: + +- `id` (`str`): The id of the user (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### delete\_user\_v2\_with\_http\_info + +```python +@validate_call +def delete_user_v2_with_http_info( + id: Annotated[StrictStr, + Field(description="The id of the user")], + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ApiResponse[DeleteUserReply] +``` + +V2 Delete user + +**Arguments**: + +- `id` (`str`): The id of the user (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### delete\_user\_v2\_without\_preload\_content + +```python +@validate_call +def delete_user_v2_without_preload_content( + id: Annotated[StrictStr, + Field(description="The id of the user")], + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +V2 Delete user **Arguments**: @@ -63388,6 +66503,730 @@ in the spec for a single request. Returns the result object. + + +# koyeb/api.api.service\_pools\_api + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## ServicePoolsApi Objects + +```python +class ServicePoolsApi() +``` + +NOTE: This class is auto generated by OpenAPI Generator +Ref: https://openapi-generator.tech + +Do not edit the class manually. + + + +#### create\_service\_pool + +```python +@validate_call +def create_service_pool( + service_pool: CreateServicePool, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> CreateServicePoolReply +``` + +Create a ServicePool + +**Arguments**: + +- `service_pool` (`CreateServicePool`): (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### create\_service\_pool\_with\_http\_info + +```python +@validate_call +def create_service_pool_with_http_info( + service_pool: CreateServicePool, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ApiResponse[CreateServicePoolReply] +``` + +Create a ServicePool + +**Arguments**: + +- `service_pool` (`CreateServicePool`): (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### create\_service\_pool\_without\_preload\_content + +```python +@validate_call +def create_service_pool_without_preload_content( + service_pool: CreateServicePool, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Create a ServicePool + +**Arguments**: + +- `service_pool` (`CreateServicePool`): (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### delete\_service\_pool + +```python +@validate_call +def delete_service_pool( + id: StrictStr, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> object +``` + +Delete a ServicePool + +**Arguments**: + +- `id` (`str`): (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### delete\_service\_pool\_with\_http\_info + +```python +@validate_call +def delete_service_pool_with_http_info( + id: StrictStr, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ApiResponse[object] +``` + +Delete a ServicePool + +**Arguments**: + +- `id` (`str`): (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### delete\_service\_pool\_without\_preload\_content + +```python +@validate_call +def delete_service_pool_without_preload_content( + id: StrictStr, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Delete a ServicePool + +**Arguments**: + +- `id` (`str`): (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### get\_service\_pool + +```python +@validate_call +def get_service_pool( + id: StrictStr, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> GetServicePoolReply +``` + +Get a ServicePool + +**Arguments**: + +- `id` (`str`): (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### get\_service\_pool\_with\_http\_info + +```python +@validate_call +def get_service_pool_with_http_info( + id: StrictStr, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ApiResponse[GetServicePoolReply] +``` + +Get a ServicePool + +**Arguments**: + +- `id` (`str`): (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### get\_service\_pool\_without\_preload\_content + +```python +@validate_call +def get_service_pool_without_preload_content( + id: StrictStr, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Get a ServicePool + +**Arguments**: + +- `id` (`str`): (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### list\_service\_pools + +```python +@validate_call +def list_service_pools( + name: Optional[StrictStr] = None, + limit: Optional[StrictStr] = None, + offset: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ListServicePoolsReply +``` + +List ServicePools + +**Arguments**: + +- `name` (`str`): +- `limit` (`str`): +- `offset` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### list\_service\_pools\_with\_http\_info + +```python +@validate_call +def list_service_pools_with_http_info( + name: Optional[StrictStr] = None, + limit: Optional[StrictStr] = None, + offset: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ApiResponse[ListServicePoolsReply] +``` + +List ServicePools + +**Arguments**: + +- `name` (`str`): +- `limit` (`str`): +- `offset` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### list\_service\_pools\_without\_preload\_content + +```python +@validate_call +def list_service_pools_without_preload_content( + name: Optional[StrictStr] = None, + limit: Optional[StrictStr] = None, + offset: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +List ServicePools + +**Arguments**: + +- `name` (`str`): +- `limit` (`str`): +- `offset` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### update\_service\_pool + +```python +@validate_call +def update_service_pool( + id: StrictStr, + service_pool: UpdateServicePool, + update_mask: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> UpdateServicePoolReply +``` + +update_service_pool + +**Arguments**: + +- `id` (`str`): (required) +- `service_pool` (`UpdateServicePool`): (required) +- `update_mask` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### update\_service\_pool\_with\_http\_info + +```python +@validate_call +def update_service_pool_with_http_info( + id: StrictStr, + service_pool: UpdateServicePool, + update_mask: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ApiResponse[UpdateServicePoolReply] +``` + +update_service_pool + +**Arguments**: + +- `id` (`str`): (required) +- `service_pool` (`UpdateServicePool`): (required) +- `update_mask` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### update\_service\_pool\_without\_preload\_content + +```python +@validate_call +def update_service_pool_without_preload_content( + id: StrictStr, + service_pool: UpdateServicePool, + update_mask: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +update_service_pool + +**Arguments**: + +- `id` (`str`): (required) +- `service_pool` (`UpdateServicePool`): (required) +- `update_mask` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + # koyeb/api.api.intercom\_api @@ -64200,10 +68039,9 @@ def list_apps( name: Annotated[ Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on app ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -64224,7 +68062,7 @@ List App - `limit` (`str`): (Optional) The number of items to return - `offset` (`str`): (Optional) The offset in the list of item to return - `name` (`str`): (Optional) A filter for name -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on app ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -64260,9 +68098,8 @@ def list_apps_with_http_info( )] = None, name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field(description="(Optional) Filter on app ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -64283,7 +68120,7 @@ List App - `limit` (`str`): (Optional) The number of items to return - `offset` (`str`): (Optional) The offset in the list of item to return - `name` (`str`): (Optional) A filter for name -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on app ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -64319,9 +68156,8 @@ def list_apps_without_preload_content( )] = None, name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field(description="(Optional) Filter on app ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -64342,7 +68178,7 @@ List App - `limit` (`str`): (Optional) The number of items to return - `offset` (`str`): (Optional) The offset in the list of item to return - `name` (`str`): (Optional) A filter for name -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on app ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -65799,6 +69635,9 @@ def list_deployments( statuses: Annotated[ Optional[List[StrictStr]], Field(description="(Optional) Filter on statuses")] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on deployment ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -65821,6 +69660,7 @@ List Deployments - `limit` (`str`): (Optional) The number of items to return - `offset` (`str`): (Optional) The offset in the list of item to return - `statuses` (`List[str]`): (Optional) Filter on statuses +- `ids` (`List[str]`): (Optional) Filter on deployment ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -65863,6 +69703,9 @@ def list_deployments_with_http_info( statuses: Annotated[ Optional[List[StrictStr]], Field(description="(Optional) Filter on statuses")] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on deployment ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -65885,6 +69728,7 @@ List Deployments - `limit` (`str`): (Optional) The number of items to return - `offset` (`str`): (Optional) The offset in the list of item to return - `statuses` (`List[str]`): (Optional) Filter on statuses +- `ids` (`List[str]`): (Optional) Filter on deployment ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -65927,6 +69771,9 @@ def list_deployments_without_preload_content( statuses: Annotated[ Optional[List[StrictStr]], Field(description="(Optional) Filter on statuses")] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on deployment ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -65949,6 +69796,7 @@ List Deployments - `limit` (`str`): (Optional) The number of items to return - `offset` (`str`): (Optional) The offset in the list of item to return - `statuses` (`List[str]`): (Optional) Filter on statuses +- `ids` (`List[str]`): (Optional) Filter on deployment ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69344,16 +73192,162 @@ in the spec for a single request. Returns the result object. - + + +#### update\_organization2 + +```python +@validate_call +def update_organization2( + id: StrictStr, + organization: Organization, + update_mask: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> UpdateOrganizationReply +``` + +Update Organization + +**Arguments**: + +- `id` (`str`): (required) +- `organization` (`Organization`): (required) +- `update_mask` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### update\_organization2\_with\_http\_info + +```python +@validate_call +def update_organization2_with_http_info( + id: StrictStr, + organization: Organization, + update_mask: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ApiResponse[UpdateOrganizationReply] +``` + +Update Organization + +**Arguments**: + +- `id` (`str`): (required) +- `organization` (`Organization`): (required) +- `update_mask` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### update\_organization2\_without\_preload\_content + +```python +@validate_call +def update_organization2_without_preload_content( + id: StrictStr, + organization: Organization, + update_mask: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Update Organization + +**Arguments**: + +- `id` (`str`): (required) +- `organization` (`Organization`): (required) +- `update_mask` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + -#### update\_organization2 +#### update\_organization\_default\_project ```python @validate_call -def update_organization2( +def update_organization_default_project( id: StrictStr, - organization: Organization, - update_mask: Optional[StrictStr] = None, + body: UpdateOrganizationDefaultProjectRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69364,16 +73358,15 @@ def update_organization2( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> UpdateOrganizationReply +) -> UpdateOrganizationDefaultProjectReply ``` -Update Organization +Update Organization's default project **Arguments**: - `id` (`str`): (required) -- `organization` (`Organization`): (required) -- `update_mask` (`str`): +- `body` (`UpdateOrganizationDefaultProjectRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69393,16 +73386,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization2\_with\_http\_info +#### update\_organization\_default\_project\_with\_http\_info ```python @validate_call -def update_organization2_with_http_info( +def update_organization_default_project_with_http_info( id: StrictStr, - organization: Organization, - update_mask: Optional[StrictStr] = None, + body: UpdateOrganizationDefaultProjectRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69413,16 +73405,15 @@ def update_organization2_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> ApiResponse[UpdateOrganizationReply] +) -> ApiResponse[UpdateOrganizationDefaultProjectReply] ``` -Update Organization +Update Organization's default project **Arguments**: - `id` (`str`): (required) -- `organization` (`Organization`): (required) -- `update_mask` (`str`): +- `body` (`UpdateOrganizationDefaultProjectRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69442,16 +73433,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization2\_without\_preload\_content +#### update\_organization\_default\_project\_without\_preload\_content ```python @validate_call -def update_organization2_without_preload_content( +def update_organization_default_project_without_preload_content( id: StrictStr, - organization: Organization, - update_mask: Optional[StrictStr] = None, + body: UpdateOrganizationDefaultProjectRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69465,13 +73455,12 @@ def update_organization2_without_preload_content( Field(ge=0, le=0)] = 0) -> RESTResponseType ``` -Update Organization +Update Organization's default project **Arguments**: - `id` (`str`): (required) -- `organization` (`Organization`): (required) -- `update_mask` (`str`): +- `body` (`UpdateOrganizationDefaultProjectRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69491,15 +73480,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization\_default\_project +#### update\_organization\_name ```python @validate_call -def update_organization_default_project( +def update_organization_name( id: StrictStr, - body: UpdateOrganizationDefaultProjectRequest, + body: UpdateOrganizationNameRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69510,15 +73499,15 @@ def update_organization_default_project( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> UpdateOrganizationDefaultProjectReply +) -> UpdateOrganizationNameReply ``` -Update Organization's default project +Update Organization Name **Arguments**: - `id` (`str`): (required) -- `body` (`UpdateOrganizationDefaultProjectRequest`): (required) +- `body` (`UpdateOrganizationNameRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69538,15 +73527,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization\_default\_project\_with\_http\_info +#### update\_organization\_name\_with\_http\_info ```python @validate_call -def update_organization_default_project_with_http_info( +def update_organization_name_with_http_info( id: StrictStr, - body: UpdateOrganizationDefaultProjectRequest, + body: UpdateOrganizationNameRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69557,15 +73546,15 @@ def update_organization_default_project_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> ApiResponse[UpdateOrganizationDefaultProjectReply] +) -> ApiResponse[UpdateOrganizationNameReply] ``` -Update Organization's default project +Update Organization Name **Arguments**: - `id` (`str`): (required) -- `body` (`UpdateOrganizationDefaultProjectRequest`): (required) +- `body` (`UpdateOrganizationNameRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69585,15 +73574,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization\_default\_project\_without\_preload\_content +#### update\_organization\_name\_without\_preload\_content ```python @validate_call -def update_organization_default_project_without_preload_content( +def update_organization_name_without_preload_content( id: StrictStr, - body: UpdateOrganizationDefaultProjectRequest, + body: UpdateOrganizationNameRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69607,12 +73596,12 @@ def update_organization_default_project_without_preload_content( Field(ge=0, le=0)] = 0) -> RESTResponseType ``` -Update Organization's default project +Update Organization Name **Arguments**: - `id` (`str`): (required) -- `body` (`UpdateOrganizationDefaultProjectRequest`): (required) +- `body` (`UpdateOrganizationNameRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69632,15 +73621,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization\_name +#### update\_organization\_plan ```python @validate_call -def update_organization_name( +def update_organization_plan( id: StrictStr, - body: UpdateOrganizationNameRequest, + body: UpdateOrganizationPlanRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69651,15 +73640,15 @@ def update_organization_name( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> UpdateOrganizationNameReply +) -> UpdateOrganizationPlanReply ``` -Update Organization Name +Update Organization plan **Arguments**: - `id` (`str`): (required) -- `body` (`UpdateOrganizationNameRequest`): (required) +- `body` (`UpdateOrganizationPlanRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69679,15 +73668,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization\_name\_with\_http\_info +#### update\_organization\_plan\_with\_http\_info ```python @validate_call -def update_organization_name_with_http_info( +def update_organization_plan_with_http_info( id: StrictStr, - body: UpdateOrganizationNameRequest, + body: UpdateOrganizationPlanRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69698,15 +73687,15 @@ def update_organization_name_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> ApiResponse[UpdateOrganizationNameReply] +) -> ApiResponse[UpdateOrganizationPlanReply] ``` -Update Organization Name +Update Organization plan **Arguments**: - `id` (`str`): (required) -- `body` (`UpdateOrganizationNameRequest`): (required) +- `body` (`UpdateOrganizationPlanRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69726,15 +73715,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization\_name\_without\_preload\_content +#### update\_organization\_plan\_without\_preload\_content ```python @validate_call -def update_organization_name_without_preload_content( +def update_organization_plan_without_preload_content( id: StrictStr, - body: UpdateOrganizationNameRequest, + body: UpdateOrganizationPlanRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69748,12 +73737,12 @@ def update_organization_name_without_preload_content( Field(ge=0, le=0)] = 0) -> RESTResponseType ``` -Update Organization Name +Update Organization plan **Arguments**: - `id` (`str`): (required) -- `body` (`UpdateOrganizationNameRequest`): (required) +- `body` (`UpdateOrganizationPlanRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69773,15 +73762,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization\_plan +#### upsert\_signup\_qualification ```python @validate_call -def update_organization_plan( +def upsert_signup_qualification( id: StrictStr, - body: UpdateOrganizationPlanRequest, + body: UpsertSignupQualificationRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69792,15 +73781,15 @@ def update_organization_plan( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> UpdateOrganizationPlanReply +) -> UpsertSignupQualificationReply ``` -Update Organization plan +Upsert Organization's signup qualification **Arguments**: - `id` (`str`): (required) -- `body` (`UpdateOrganizationPlanRequest`): (required) +- `body` (`UpsertSignupQualificationRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69820,15 +73809,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization\_plan\_with\_http\_info +#### upsert\_signup\_qualification\_with\_http\_info ```python @validate_call -def update_organization_plan_with_http_info( +def upsert_signup_qualification_with_http_info( id: StrictStr, - body: UpdateOrganizationPlanRequest, + body: UpsertSignupQualificationRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69839,15 +73828,15 @@ def update_organization_plan_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> ApiResponse[UpdateOrganizationPlanReply] +) -> ApiResponse[UpsertSignupQualificationReply] ``` -Update Organization plan +Upsert Organization's signup qualification **Arguments**: - `id` (`str`): (required) -- `body` (`UpdateOrganizationPlanRequest`): (required) +- `body` (`UpsertSignupQualificationRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69867,15 +73856,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization\_plan\_without\_preload\_content +#### upsert\_signup\_qualification\_without\_preload\_content ```python @validate_call -def update_organization_plan_without_preload_content( +def upsert_signup_qualification_without_preload_content( id: StrictStr, - body: UpdateOrganizationPlanRequest, + body: UpsertSignupQualificationRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69889,12 +73878,12 @@ def update_organization_plan_without_preload_content( Field(ge=0, le=0)] = 0) -> RESTResponseType ``` -Update Organization plan +Upsert Organization's signup qualification **Arguments**: - `id` (`str`): (required) -- `body` (`UpdateOrganizationPlanRequest`): (required) +- `body` (`UpsertSignupQualificationRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69914,15 +73903,40 @@ in the spec for a single request. Returns the result object. - + -#### upsert\_signup\_qualification +# koyeb/api.api.quotas\_api + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## QuotasApi Objects + +```python +class QuotasApi() +``` + +NOTE: This class is auto generated by OpenAPI Generator +Ref: https://openapi-generator.tech + +Do not edit the class manually. + + + +#### get\_organization\_quotas\_usage ```python @validate_call -def upsert_signup_qualification( - id: StrictStr, - body: UpsertSignupQualificationRequest, +def get_organization_quotas_usage( + organization_id: StrictStr, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69933,15 +73947,14 @@ def upsert_signup_qualification( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> UpsertSignupQualificationReply +) -> GetOrganizationQuotasUsageReply ``` -Upsert Organization's signup qualification +Return the organization's current quota usage alongside the plan's limits. Response is cached in Redis for 60s. Accept text/plain (or ?format=prometheus) to receive the response rendered as Prometheus text exposition format ("koyeb_quota_" for usage, "koyeb_quota__limit" for the plan limit) suitable for scraping into an external Prometheus. **Arguments**: -- `id` (`str`): (required) -- `body` (`UpsertSignupQualificationRequest`): (required) +- `organization_id` (`str`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69961,15 +73974,14 @@ in the spec for a single request. Returns the result object. - + -#### upsert\_signup\_qualification\_with\_http\_info +#### get\_organization\_quotas\_usage\_with\_http\_info ```python @validate_call -def upsert_signup_qualification_with_http_info( - id: StrictStr, - body: UpsertSignupQualificationRequest, +def get_organization_quotas_usage_with_http_info( + organization_id: StrictStr, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69980,15 +73992,14 @@ def upsert_signup_qualification_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> ApiResponse[UpsertSignupQualificationReply] +) -> ApiResponse[GetOrganizationQuotasUsageReply] ``` -Upsert Organization's signup qualification +Return the organization's current quota usage alongside the plan's limits. Response is cached in Redis for 60s. Accept text/plain (or ?format=prometheus) to receive the response rendered as Prometheus text exposition format ("koyeb_quota_" for usage, "koyeb_quota__limit" for the plan limit) suitable for scraping into an external Prometheus. **Arguments**: -- `id` (`str`): (required) -- `body` (`UpsertSignupQualificationRequest`): (required) +- `organization_id` (`str`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -70008,15 +74019,14 @@ in the spec for a single request. Returns the result object. - + -#### upsert\_signup\_qualification\_without\_preload\_content +#### get\_organization\_quotas\_usage\_without\_preload\_content ```python @validate_call -def upsert_signup_qualification_without_preload_content( - id: StrictStr, - body: UpsertSignupQualificationRequest, +def get_organization_quotas_usage_without_preload_content( + organization_id: StrictStr, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -70030,12 +74040,11 @@ def upsert_signup_qualification_without_preload_content( Field(ge=0, le=0)] = 0) -> RESTResponseType ``` -Upsert Organization's signup qualification +Return the organization's current quota usage alongside the plan's limits. Response is cached in Redis for 60s. Accept text/plain (or ?format=prometheus) to receive the response rendered as Prometheus text exposition format ("koyeb_quota_" for usage, "koyeb_quota__limit" for the plan limit) suitable for scraping into an external Prometheus. **Arguments**: -- `id` (`str`): (required) -- `body` (`UpsertSignupQualificationRequest`): (required) +- `organization_id` (`str`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -70055,32 +74064,6 @@ in the spec for a single request. Returns the result object. - - -# koyeb/api.api.quotas\_api - -Koyeb Rest API - -The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. - -The version of the OpenAPI document: 1.0.0 -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. - - - -## QuotasApi Objects - -```python -class QuotasApi() -``` - -NOTE: This class is auto generated by OpenAPI Generator -Ref: https://openapi-generator.tech - -Do not edit the class manually. - #### review\_organization\_capacity @@ -71629,9 +75612,9 @@ def list_secrets( offset: Optional[StrictStr] = None, types: Annotated[Optional[List[StrictStr]], Field(description="Filter by secret types")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on secret ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -71653,7 +75636,7 @@ List Secrets - `limit` (`str`): - `offset` (`str`): - `types` (`List[str]`): Filter by secret types -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on secret ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -71685,9 +75668,9 @@ def list_secrets_with_http_info( offset: Optional[StrictStr] = None, types: Annotated[Optional[List[StrictStr]], Field(description="Filter by secret types")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on secret ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -71709,7 +75692,7 @@ List Secrets - `limit` (`str`): - `offset` (`str`): - `types` (`List[str]`): Filter by secret types -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on secret ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -71741,9 +75724,9 @@ def list_secrets_without_preload_content( offset: Optional[StrictStr] = None, types: Annotated[Optional[List[StrictStr]], Field(description="Filter by secret types")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on secret ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -71765,7 +75748,7 @@ List Secrets - `limit` (`str`): - `offset` (`str`): - `types` (`List[str]`): Filter by secret types -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on secret ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -76849,6 +80832,9 @@ def list_instances( Field(description= "(Optional) The ending time of the period of running instance" )] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on instance ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -76878,6 +80864,7 @@ List Instances - `order` (`str`): (Optional) Sorts the list in the ascending or the descending order - `starting_time` (`datetime`): (Optional) The starting time of the period of running instance - `ending_time` (`datetime`): (Optional) The ending time of the period of running instance +- `ids` (`List[str]`): (Optional) Filter on instance ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -76949,6 +80936,9 @@ def list_instances_with_http_info( Field(description= "(Optional) The ending time of the period of running instance" )] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on instance ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -76978,6 +80968,7 @@ List Instances - `order` (`str`): (Optional) Sorts the list in the ascending or the descending order - `starting_time` (`datetime`): (Optional) The starting time of the period of running instance - `ending_time` (`datetime`): (Optional) The ending time of the period of running instance +- `ids` (`List[str]`): (Optional) Filter on instance ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -77049,6 +81040,9 @@ def list_instances_without_preload_content( Field(description= "(Optional) The ending time of the period of running instance" )] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on instance ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -77078,6 +81072,7 @@ List Instances - `order` (`str`): (Optional) Sorts the list in the ascending or the descending order - `starting_time` (`datetime`): (Optional) The starting time of the period of running instance - `ending_time` (`datetime`): (Optional) The ending time of the period of running instance +- `ids` (`List[str]`): (Optional) Filter on instance ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -79044,6 +83039,7 @@ def list_instance_snapshots( name: Optional[StrictStr] = None, statuses: Optional[List[StrictStr]] = None, type: Optional[StrictStr] = None, + ids: Optional[List[StrictStr]] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -79066,6 +83062,7 @@ list_instance_snapshots - `name` (`str`): - `statuses` (`List[str]`): - `type` (`str`): +- `ids` (`List[str]`): - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -79097,6 +83094,7 @@ def list_instance_snapshots_with_http_info( name: Optional[StrictStr] = None, statuses: Optional[List[StrictStr]] = None, type: Optional[StrictStr] = None, + ids: Optional[List[StrictStr]] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -79119,6 +83117,7 @@ list_instance_snapshots - `name` (`str`): - `statuses` (`List[str]`): - `type` (`str`): +- `ids` (`List[str]`): - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -79150,6 +83149,7 @@ def list_instance_snapshots_without_preload_content( name: Optional[StrictStr] = None, statuses: Optional[List[StrictStr]] = None, type: Optional[StrictStr] = None, + ids: Optional[List[StrictStr]] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -79172,6 +83172,7 @@ list_instance_snapshots - `name` (`str`): - `statuses` (`List[str]`): - `type` (`str`): +- `ids` (`List[str]`): - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -79648,6 +83649,9 @@ def list_snapshots( region: Annotated[ Optional[StrictStr], Field(description="(Optional) A filter for the region")] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on snapshot ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -79670,6 +83674,7 @@ List all Snapshots - `organization_id` (`str`): (Optional) Filter by organization_id - `statuses` (`List[str]`): (Optional) Filter by status - SNAPSHOT_STATUS_INVALID: zero value, invalid - SNAPSHOT_STATUS_CREATING: the snapshot is being created - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted - SNAPSHOT_STATUS_DELETED: the snapshot is deleted - `region` (`str`): (Optional) A filter for the region +- `ids` (`List[str]`): (Optional) Filter on snapshot ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -79715,6 +83720,9 @@ def list_snapshots_with_http_info( region: Annotated[ Optional[StrictStr], Field(description="(Optional) A filter for the region")] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on snapshot ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -79737,6 +83745,7 @@ List all Snapshots - `organization_id` (`str`): (Optional) Filter by organization_id - `statuses` (`List[str]`): (Optional) Filter by status - SNAPSHOT_STATUS_INVALID: zero value, invalid - SNAPSHOT_STATUS_CREATING: the snapshot is being created - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted - SNAPSHOT_STATUS_DELETED: the snapshot is deleted - `region` (`str`): (Optional) A filter for the region +- `ids` (`List[str]`): (Optional) Filter on snapshot ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -79782,6 +83791,9 @@ def list_snapshots_without_preload_content( region: Annotated[ Optional[StrictStr], Field(description="(Optional) A filter for the region")] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on snapshot ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -79804,6 +83816,7 @@ List all Snapshots - `organization_id` (`str`): (Optional) Filter by organization_id - `statuses` (`List[str]`): (Optional) Filter by status - SNAPSHOT_STATUS_INVALID: zero value, invalid - SNAPSHOT_STATUS_CREATING: the snapshot is being created - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted - SNAPSHOT_STATUS_DELETED: the snapshot is deleted - `region` (`str`): (Optional) A filter for the region +- `ids` (`List[str]`): (Optional) Filter on snapshot ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of diff --git a/docs/api_async.md b/docs/api_async.md index 3b2caad0..44f84159 100644 --- a/docs/api_async.md +++ b/docs/api_async.md @@ -413,6 +413,52 @@ def host(value: str) -> None Fix base path. + + +# koyeb/api\_async.test.test\_service\_pool + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestServicePool Objects + +```python +class TestServicePool(unittest.TestCase) +``` + +ServicePool unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> ServicePool +``` + +Test ServicePool +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testServicePool + +```python +def testServicePool() +``` + +Test ServicePool + # koyeb/api\_async.test.test\_get\_metrics\_reply\_metric @@ -538,6 +584,52 @@ def testKgitproxyIndexingStatus() Test KgitproxyIndexingStatus + + +# koyeb/api\_async.test.test\_persistent\_volume\_region\_usage + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestPersistentVolumeRegionUsage Objects + +```python +class TestPersistentVolumeRegionUsage(unittest.TestCase) +``` + +PersistentVolumeRegionUsage unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> PersistentVolumeRegionUsage +``` + +Test PersistentVolumeRegionUsage +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testPersistentVolumeRegionUsage + +```python +def testPersistentVolumeRegionUsage() +``` + +Test PersistentVolumeRegionUsage + # koyeb/api\_async.test.test\_declare\_stage\_progress\_request @@ -2512,6 +2604,52 @@ def testEgressPolicy() Test EgressPolicy + + +# koyeb/api\_async.test.test\_create\_service\_pool + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestCreateServicePool Objects + +```python +class TestCreateServicePool(unittest.TestCase) +``` + +CreateServicePool unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> CreateServicePool +``` + +Test CreateServicePool +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testCreateServicePool + +```python +def testCreateServicePool() +``` + +Test CreateServicePool + # koyeb/api\_async.test.test\_desired\_deployment @@ -3313,6 +3451,52 @@ def testNotificationList() Test NotificationList + + +# koyeb/api\_async.test.test\_update\_service\_pool\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestUpdateServicePoolReply Objects + +```python +class TestUpdateServicePoolReply(unittest.TestCase) +``` + +UpdateServicePoolReply unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> UpdateServicePoolReply +``` + +Test UpdateServicePoolReply +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testUpdateServicePoolReply + +```python +def testUpdateServicePoolReply() +``` + +Test UpdateServicePoolReply + # koyeb/api\_async.test.test\_user @@ -5633,6 +5817,52 @@ def testRegionalDeploymentEvent() Test RegionalDeploymentEvent + + +# koyeb/api\_async.test.test\_mesh + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestMesh Objects + +```python +class TestMesh(unittest.TestCase) +``` + +Mesh unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> Mesh +``` + +Test Mesh +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testMesh + +```python +def testMesh() +``` + +Test Mesh + # koyeb/api\_async.test.test\_reset\_password\_request @@ -7606,6 +7836,52 @@ Test case for remove_organization_member Remove an organization member + + +# koyeb/api\_async.test.test\_update\_service\_pool + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestUpdateServicePool Objects + +```python +class TestUpdateServicePool(unittest.TestCase) +``` + +UpdateServicePool unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> UpdateServicePool +``` + +Test UpdateServicePool +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testUpdateServicePool + +```python +def testUpdateServicePool() +``` + +Test UpdateServicePool + # koyeb/api\_async.test.test\_update\_organization\_reply @@ -7928,6 +8204,52 @@ def testCreateInstanceSnapshotRequest() Test CreateInstanceSnapshotRequest + + +# koyeb/api\_async.test.test\_pool\_claim\_request + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestPoolClaimRequest Objects + +```python +class TestPoolClaimRequest(unittest.TestCase) +``` + +PoolClaimRequest unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> PoolClaimRequest +``` + +Test PoolClaimRequest +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testPoolClaimRequest + +```python +def testPoolClaimRequest() +``` + +Test PoolClaimRequest + # koyeb/api\_async.test @@ -9318,6 +9640,39 @@ def testGitSource() Test GitSource + + +# koyeb/api\_async.test.test\_mesh\_scope + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestMeshScope Objects + +```python +class TestMeshScope(unittest.TestCase) +``` + +MeshScope unit test stubs + + + +#### testMeshScope + +```python +def testMeshScope() +``` + +Test MeshScope + # koyeb/api\_async.test.test\_instance\_event @@ -9410,6 +9765,52 @@ def testDockerBuilder() Test DockerBuilder + + +# koyeb/api\_async.test.test\_create\_service\_pool\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestCreateServicePoolReply Objects + +```python +class TestCreateServicePoolReply(unittest.TestCase) +``` + +CreateServicePoolReply unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> CreateServicePoolReply +``` + +Test CreateServicePoolReply +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testCreateServicePoolReply + +```python +def testCreateServicePoolReply() +``` + +Test CreateServicePoolReply + # koyeb/api\_async.test.test\_get\_region\_reply @@ -10632,6 +11033,98 @@ Test case for update_secret2 Update Secret + + +# koyeb/api\_async.test.test\_instance\_type\_usage + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestInstanceTypeUsage Objects + +```python +class TestInstanceTypeUsage(unittest.TestCase) +``` + +InstanceTypeUsage unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> InstanceTypeUsage +``` + +Test InstanceTypeUsage +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testInstanceTypeUsage + +```python +def testInstanceTypeUsage() +``` + +Test InstanceTypeUsage + + + +# koyeb/api\_async.test.test\_list\_service\_pools\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestListServicePoolsReply Objects + +```python +class TestListServicePoolsReply(unittest.TestCase) +``` + +ListServicePoolsReply unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> ListServicePoolsReply +``` + +Test ListServicePoolsReply +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testListServicePoolsReply + +```python +def testListServicePoolsReply() +``` + +Test ListServicePoolsReply + # koyeb/api\_async.test.test\_update\_user\_settings\_request @@ -11967,6 +12460,52 @@ def testSecurityPolicies() Test SecurityPolicies + + +# koyeb/api\_async.test.test\_instance\_snapshot\_type\_usage + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestInstanceSnapshotTypeUsage Objects + +```python +class TestInstanceSnapshotTypeUsage(unittest.TestCase) +``` + +InstanceSnapshotTypeUsage unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> InstanceSnapshotTypeUsage +``` + +Test InstanceSnapshotTypeUsage +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testInstanceSnapshotTypeUsage + +```python +def testInstanceSnapshotTypeUsage() +``` + +Test InstanceSnapshotTypeUsage + # koyeb/api\_async.test.test\_credentials\_api @@ -12062,6 +12601,52 @@ Test case for update_credential2 Update credential + + +# koyeb/api\_async.test.test\_get\_service\_pool\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestGetServicePoolReply Objects + +```python +class TestGetServicePoolReply(unittest.TestCase) +``` + +GetServicePoolReply unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> GetServicePoolReply +``` + +Test GetServicePoolReply +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testGetServicePoolReply + +```python +def testGetServicePoolReply() +``` + +Test GetServicePoolReply + # koyeb/api\_async.test.test\_user\_role\_role @@ -13482,6 +14067,52 @@ def testRegionAvailability() Test RegionAvailability + + +# koyeb/api\_async.test.test\_list\_pool\_claim\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestListPoolClaimReply Objects + +```python +class TestListPoolClaimReply(unittest.TestCase) +``` + +ListPoolClaimReply unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> ListPoolClaimReply +``` + +Test ListPoolClaimReply +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testListPoolClaimReply + +```python +def testListPoolClaimReply() +``` + +Test ListPoolClaimReply + # koyeb/api\_async.test.test\_login\_method\_reply @@ -15049,6 +15680,39 @@ def testInstanceAvailability() Test InstanceAvailability + + +# koyeb/api\_async.test.test\_service\_pool\_status + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestServicePoolStatus Objects + +```python +class TestServicePoolStatus(unittest.TestCase) +``` + +ServicePoolStatus unit test stubs + + + +#### testServicePoolStatus + +```python +def testServicePoolStatus() +``` + +Test ServicePoolStatus + # koyeb/api\_async.test.test\_snapshot @@ -16480,6 +17144,52 @@ def testMetricName() Test MetricName + + +# koyeb/api\_async.test.test\_pool\_claim + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestPoolClaim Objects + +```python +class TestPoolClaim(unittest.TestCase) +``` + +PoolClaim unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> PoolClaim +``` + +Test PoolClaim +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testPoolClaim + +```python +def testPoolClaim() +``` + +Test PoolClaim + # koyeb/api\_async.test.test\_deployment\_scaling\_target\_requests\_per\_second @@ -16527,6 +17237,98 @@ def testDeploymentScalingTargetRequestsPerSecond() Test DeploymentScalingTargetRequestsPerSecond + + +# koyeb/api\_async.test.test\_get\_pool\_claim\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestGetPoolClaimReply Objects + +```python +class TestGetPoolClaimReply(unittest.TestCase) +``` + +GetPoolClaimReply unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> GetPoolClaimReply +``` + +Test GetPoolClaimReply +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testGetPoolClaimReply + +```python +def testGetPoolClaimReply() +``` + +Test GetPoolClaimReply + + + +# koyeb/api\_async.test.test\_quota\_usage + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestQuotaUsage Objects + +```python +class TestQuotaUsage(unittest.TestCase) +``` + +QuotaUsage unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> QuotaUsage +``` + +Test QuotaUsage +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testQuotaUsage + +```python +def testQuotaUsage() +``` + +Test QuotaUsage + # koyeb/api\_async.test.test\_get\_organization\_reply @@ -17618,6 +18420,52 @@ def testDatabaseUsage() Test DatabaseUsage + + +# koyeb/api\_async.test.test\_get\_organization\_quotas\_usage\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestGetOrganizationQuotasUsageReply Objects + +```python +class TestGetOrganizationQuotasUsageReply(unittest.TestCase) +``` + +GetOrganizationQuotasUsageReply unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> GetOrganizationQuotasUsageReply +``` + +Test GetOrganizationQuotasUsageReply +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testGetOrganizationQuotasUsageReply + +```python +def testGetOrganizationQuotasUsageReply() +``` + +Test GetOrganizationQuotasUsageReply + # koyeb/api\_async.test.test\_kgitproxy\_git\_hub\_repository @@ -18705,6 +19553,52 @@ def testKsearchService() Test KsearchService + + +# koyeb/api\_async.test.test\_pool\_claim\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestPoolClaimReply Objects + +```python +class TestPoolClaimReply(unittest.TestCase) +``` + +PoolClaimReply unit test stubs + + + +#### make\_instance + +```python +def make_instance(include_optional) -> PoolClaimReply +``` + +Test PoolClaimReply +include_optional is a boolean, when False only required +params are included, when True both required and +optional params are included + + + +#### testPoolClaimReply + +```python +def testPoolClaimReply() +``` + +Test PoolClaimReply + # koyeb/api\_async.test.test\_decline\_organization\_invitation\_reply @@ -19521,6 +20415,39 @@ def testDeactivateOrganizationReply() Test DeactivateOrganizationReply + + +# koyeb/api\_async.test.test\_pool\_claim\_status + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestPoolClaimStatus Objects + +```python +class TestPoolClaimStatus(unittest.TestCase) +``` + +PoolClaimStatus unit test stubs + + + +#### testPoolClaimStatus + +```python +def testPoolClaimStatus() +``` + +Test PoolClaimStatus + # koyeb/api\_async.test.test\_domain\_load\_balancer\_quotas @@ -20093,6 +21020,65 @@ def testCreateDomainReply() Test CreateDomainReply + + +# koyeb/api\_async.test.test\_pool\_claims\_api + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestPoolClaimsApi Objects + +```python +class TestPoolClaimsApi(unittest.IsolatedAsyncioTestCase) +``` + +PoolClaimsApi unit test stubs + + + +#### test\_claim + +```python +async def test_claim() -> None +``` + +Test case for claim + +Claim a sandbox from a service pool + + + +#### test\_get\_claim + +```python +async def test_get_claim() -> None +``` + +Test case for get_claim + +Get a claim + + + +#### test\_list\_claim + +```python +async def test_list_claim() -> None +``` + +Test case for list_claim + +List claims of a service pool + # koyeb/api\_async.test.test\_accept\_organization\_invitation\_reply @@ -20709,6 +21695,75 @@ def testAppStatus() Test AppStatus + + +# koyeb/api\_async.test.test\_service\_pools\_api + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## TestServicePoolsApi Objects + +```python +class TestServicePoolsApi(unittest.IsolatedAsyncioTestCase) +``` + +ServicePoolsApi unit test stubs + + + +#### test\_create\_service\_pool + +```python +async def test_create_service_pool() -> None +``` + +Test case for create_service_pool + +Create a ServicePool + + + +#### test\_get\_service\_pool + +```python +async def test_get_service_pool() -> None +``` + +Test case for get_service_pool + +Get a ServicePool + + + +#### test\_list\_service\_pools + +```python +async def test_list_service_pools() -> None +``` + +Test case for list_service_pools + +List ServicePools + + + +#### test\_update\_service\_pool + +```python +async def test_update_service_pool() -> None +``` + +Test case for update_service_pool + # koyeb/api\_async.test.test\_persistent\_volume @@ -24037,6 +25092,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of ListSnapshotsReply from a dict + + +# koyeb/api\_async.models.pool\_claim + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## PoolClaim Objects + +```python +class PoolClaim(BaseModel) +``` + +PoolClaim + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of PoolClaim from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of PoolClaim from a dict + # koyeb/api\_async.models.canny\_auth\_reply @@ -26107,6 +27244,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of Token from a dict + + +# koyeb/api\_async.models.get\_service\_pool\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## GetServicePoolReply Objects + +```python +class GetServicePoolReply(BaseModel) +``` + +GetServicePoolReply + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of GetServicePoolReply from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of GetServicePoolReply from a dict + # koyeb/api\_async.models.deployment\_proxy\_port @@ -26749,6 +27968,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of CreateCompose from a dict + + +# koyeb/api\_async.models.pool\_claim\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## PoolClaimReply Objects + +```python +class PoolClaimReply(BaseModel) +``` + +PoolClaimReply + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of PoolClaimReply from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of PoolClaimReply from a dict + # koyeb/api\_async.models.payment\_method @@ -28225,6 +29526,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of NeonPostgresDatabase from a dict + + +# koyeb/api\_async.models.update\_service\_pool + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## UpdateServicePool Objects + +```python +class UpdateServicePool(BaseModel) +``` + +UpdateServicePool + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of UpdateServicePool from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of UpdateServicePool from a dict + # koyeb/api\_async.models.decline\_organization\_invitation\_reply @@ -29933,6 +31316,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of UpdateUserSettingsRequest from a dict + + +# koyeb/api\_async.models.create\_service\_pool + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## CreateServicePool Objects + +```python +class CreateServicePool(BaseModel) +``` + +CreateServicePool + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of CreateServicePool from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of CreateServicePool from a dict + # koyeb/api\_async.models.user\_role\_role @@ -31265,6 +32730,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of DigitalOceanRegistryConfiguration from a dict + + +# koyeb/api\_async.models.instance\_snapshot\_type\_usage + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## InstanceSnapshotTypeUsage Objects + +```python +class InstanceSnapshotTypeUsage(BaseModel) +``` + +InstanceSnapshotTypeUsage + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of InstanceSnapshotTypeUsage from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of InstanceSnapshotTypeUsage from a dict + # koyeb/api\_async.models.list\_user\_organization\_invitations\_reply @@ -33171,6 +34718,40 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of LoginRequest from a dict + + +# koyeb/api\_async.models.pool\_claim\_status + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## PoolClaimStatus Objects + +```python +class PoolClaimStatus(str, Enum) +``` + +PoolClaimStatus + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Self +``` + +Create an instance of PoolClaimStatus from a JSON string + # koyeb/api\_async.models.update\_snapshot\_request @@ -34530,6 +36111,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of GithubInstallationRequest from a dict + + +# koyeb/api\_async.models.get\_pool\_claim\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## GetPoolClaimReply Objects + +```python +class GetPoolClaimReply(BaseModel) +``` + +GetPoolClaimReply + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of GetPoolClaimReply from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of GetPoolClaimReply from a dict + # koyeb/api\_async.models.deployment\_scaling\_target\_average\_mem @@ -35500,6 +37163,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of PersistentVolume from a dict + + +# koyeb/api\_async.models.list\_service\_pools\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## ListServicePoolsReply Objects + +```python +class ListServicePoolsReply(BaseModel) +``` + +ListServicePoolsReply + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of ListServicePoolsReply from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of ListServicePoolsReply from a dict + # koyeb/api\_async.models.service\_state @@ -35746,6 +37491,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of LogEntry from a dict + + +# koyeb/api\_async.models.mesh + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## Mesh Objects + +```python +class Mesh(BaseModel) +``` + +Mesh groups the mesh scope selector and the (optional) custom mesh name. Kept inside NetworkPolicy so scope/name and other network-policy dimensions (egress, future inbound) live together. + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of Mesh from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of Mesh from a dict + # koyeb/api\_async.models.database\_deployment\_metadata @@ -35910,6 +37737,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of GitLabRegistryConfiguration from a dict + + +# koyeb/api\_async.models.list\_pool\_claim\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## ListPoolClaimReply Objects + +```python +class ListPoolClaimReply(BaseModel) +``` + +ListPoolClaimReply + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of ListPoolClaimReply from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of ListPoolClaimReply from a dict + # koyeb/api\_async.models.delete\_organization\_reply @@ -38280,6 +40189,88 @@ def from_json(cls, json_str: str) -> Self Create an instance of MetricName from a JSON string + + +# koyeb/api\_async.models.quota\_usage + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## QuotaUsage Objects + +```python +class QuotaUsage(BaseModel) +``` + +QuotaUsage carries an organization's current resource consumption alongside the corresponding plan limits (from the caller's InternalToken.Quotas). Paused services are included in services_used but excluded from memory / instances_by_type / proxy_ports totals, matching enforcement semantics. + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of QuotaUsage from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of QuotaUsage from a dict + # koyeb/api\_async.models.regional\_deployment @@ -38724,6 +40715,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of CreatePaymentAuthorizationReply from a dict + + +# koyeb/api\_async.models.update\_service\_pool\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## UpdateServicePoolReply Objects + +```python +class UpdateServicePoolReply(BaseModel) +``` + +UpdateServicePoolReply + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of UpdateServicePoolReply from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of UpdateServicePoolReply from a dict + # koyeb/api\_async.models.get\_idenfy\_token\_reply @@ -42570,6 +44643,40 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of DeploymentPort from a dict + + +# koyeb/api\_async.models.mesh\_scope + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## MeshScope Objects + +```python +class MeshScope(str, Enum) +``` + +MeshScope selects which set of services can communicate over the mesh. Only meaningful when the mesh is on (i.e. DeploymentMesh is ENABLED, or AUTO and the service is eligible). UNSPECIFIED defers to the organization-level default (workspace-scoped since KOYEB-6062, legacy organizations opted back to organization scope via use_organization_level_mesh). - MESH_SCOPE_ORGANIZATION: Private communication between services in the same organization (mesh label k-). - MESH_SCOPE_WORKSPACE: Private communication between services in the same workspace/project (mesh label pr_). - MESH_SCOPE_APP: Private communication between services in the same app (mesh label app_). - MESH_SCOPE_CUSTOM: Private communication between services in the same workspace that share the same NetworkPolicy.mesh.name. Server-computed label is scoped by workspace, so the same custom name in different workspaces never collides. + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Self +``` + +Create an instance of MeshScope from a JSON string + # koyeb/api\_async.models.stream\_result\_of\_log\_entry @@ -43035,7 +45142,7 @@ Do not edit the class manually. class GoogleProtobufAny(BaseModel) ``` -GoogleProtobufAny +`Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example "foo.bar.com/x/y.z" will yield type name "y.z". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { "@type": "type.googleapis.com/google.profile.Person", "firstName": , "lastName": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } @@ -44019,6 +46126,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of TriggerGitDeploymentMetadata from a dict + + +# koyeb/api\_async.models.pool\_claim\_request + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## PoolClaimRequest Objects + +```python +class PoolClaimRequest(BaseModel) +``` + +PoolClaimRequest + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of PoolClaimRequest from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of PoolClaimRequest from a dict + # koyeb/api\_async.models.update\_project\_reply @@ -44265,6 +46454,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of GetRegionReply from a dict + + +# koyeb/api\_async.models.create\_service\_pool\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## CreateServicePoolReply Objects + +```python +class CreateServicePoolReply(BaseModel) +``` + +CreateServicePoolReply + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of CreateServicePoolReply from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of CreateServicePoolReply from a dict + # koyeb/api\_async.models.autocomplete\_request @@ -46315,6 +48586,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of UpdateAppReply from a dict + + +# koyeb/api\_async.models.persistent\_volume\_region\_usage + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## PersistentVolumeRegionUsage Objects + +```python +class PersistentVolumeRegionUsage(BaseModel) +``` + +PersistentVolumeRegionUsage + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of PersistentVolumeRegionUsage from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of PersistentVolumeRegionUsage from a dict + # koyeb/api\_async.models.update\_organization\_reply @@ -47271,6 +49624,88 @@ def from_json(cls, json_str: str) -> Self Create an instance of DomainStatus from a JSON string + + +# koyeb/api\_async.models.service\_pool + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## ServicePool Objects + +```python +class ServicePool(BaseModel) +``` + +ServicePool + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of ServicePool from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of ServicePool from a dict + # koyeb/api\_async.models.next\_invoice\_reply\_line\_period @@ -47435,6 +49870,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of VerifyDockerImageReply from a dict + + +# koyeb/api\_async.models.instance\_type\_usage + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## InstanceTypeUsage Objects + +```python +class InstanceTypeUsage(BaseModel) +``` + +InstanceTypeUsage + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of InstanceTypeUsage from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of InstanceTypeUsage from a dict + # koyeb/api\_async.models.create\_instance\_snapshot\_reply @@ -47599,6 +50116,40 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of RevealSecretReply from a dict + + +# koyeb/api\_async.models.service\_pool\_status + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## ServicePoolStatus Objects + +```python +class ServicePoolStatus(str, Enum) +``` + +ServicePoolStatus + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Self +``` + +Create an instance of ServicePoolStatus from a JSON string + # koyeb/api\_async.models.compose\_reply @@ -48727,7 +51278,7 @@ ExecCommandIO #### data\_validate\_regular\_expression ```python -@field_validator('data') +@field_validator('data', mode="before") def data_validate_regular_expression(cls, value) ``` @@ -50582,6 +53133,88 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] Create an instance of KsearchGlobalDeployment from a dict + + +# koyeb/api\_async.models.get\_organization\_quotas\_usage\_reply + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## GetOrganizationQuotasUsageReply Objects + +```python +class GetOrganizationQuotasUsageReply(BaseModel) +``` + +GetOrganizationQuotasUsageReply + + + +#### to\_str + +```python +def to_str() -> str +``` + +Returns the string representation of the model using alias + + + +#### to\_json + +```python +def to_json() -> str +``` + +Returns the JSON representation of the model using alias + + + +#### from\_json + +```python +@classmethod +def from_json(cls, json_str: str) -> Optional[Self] +``` + +Create an instance of GetOrganizationQuotasUsageReply from a JSON string + + + +#### to\_dict + +```python +def to_dict() -> Dict[str, Any] +``` + +Return the dictionary representation of the model using alias. + +This has the following differences from calling pydantic's +`self.model_dump(by_alias=True)`: + +* `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + + + +#### from\_dict + +```python +@classmethod +def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self] +``` + +Create an instance of GetOrganizationQuotasUsageReply from a dict + # koyeb/api\_async.models.organization\_member\_status @@ -53155,6 +55788,10 @@ async def list_regional_deployments( Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return" )] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on regional deployment ids" + )] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -53177,6 +55814,7 @@ Experimental: use at your own risk - `deployment_id` (`str`): (Optional) Filter on deployment id - `limit` (`str`): (Optional) The number of items to return - `offset` (`str`): (Optional) The offset in the list of item to return +- `ids` (`List[str]`): (Optional) Filter on regional deployment ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -53213,6 +55851,10 @@ async def list_regional_deployments_with_http_info( Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return" )] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on regional deployment ids" + )] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -53235,6 +55877,7 @@ Experimental: use at your own risk - `deployment_id` (`str`): (Optional) Filter on deployment id - `limit` (`str`): (Optional) The number of items to return - `offset` (`str`): (Optional) The offset in the list of item to return +- `ids` (`List[str]`): (Optional) Filter on regional deployment ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -53271,6 +55914,10 @@ async def list_regional_deployments_without_preload_content( Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return" )] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on regional deployment ids" + )] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -53293,6 +55940,7 @@ Experimental: use at your own risk - `deployment_id` (`str`): (Optional) Filter on deployment id - `limit` (`str`): (Optional) The number of items to return - `offset` (`str`): (Optional) The offset in the list of item to return +- `ids` (`List[str]`): (Optional) Filter on regional deployment ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -55838,9 +58486,9 @@ async def list_domains( description="(Optional) A filter for apps")] = None, name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on domain ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -55864,7 +58512,7 @@ List Domains - `statuses` (`List[str]`): (Optional) A filter for statuses - `app_ids` (`List[str]`): (Optional) A filter for apps - `name` (`str`): (Optional) A filter for name -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on domain ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -55912,9 +58560,9 @@ async def list_domains_with_http_info( description="(Optional) A filter for apps")] = None, name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on domain ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -55938,7 +58586,7 @@ List Domains - `statuses` (`List[str]`): (Optional) A filter for statuses - `app_ids` (`List[str]`): (Optional) A filter for apps - `name` (`str`): (Optional) A filter for name -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on domain ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -55986,9 +58634,9 @@ async def list_domains_without_preload_content( description="(Optional) A filter for apps")] = None, name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on domain ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -56012,7 +58660,7 @@ List Domains - `statuses` (`List[str]`): (Optional) A filter for statuses - `app_ids` (`List[str]`): (Optional) A filter for apps - `name` (`str`): (Optional) A filter for name -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on domain ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -58293,9 +60941,9 @@ async def list_services( regions: Annotated[Optional[List[StrictStr]], Field( description="(Optional) Filter on regions")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on service ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -58320,7 +60968,7 @@ List Services - `types` (`List[str]`): (Optional) Filter on service types - `statuses` (`List[str]`): (Optional) Filter on service statuses - `regions` (`List[str]`): (Optional) Filter on regions -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on service ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -58368,9 +61016,9 @@ async def list_services_with_http_info( regions: Annotated[Optional[List[StrictStr]], Field( description="(Optional) Filter on regions")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on service ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -58395,7 +61043,7 @@ List Services - `types` (`List[str]`): (Optional) Filter on service types - `statuses` (`List[str]`): (Optional) Filter on service statuses - `regions` (`List[str]`): (Optional) Filter on regions -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on service ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -58443,9 +61091,9 @@ async def list_services_without_preload_content( regions: Annotated[Optional[List[StrictStr]], Field( description="(Optional) Filter on regions")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on service ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -58470,7 +61118,7 @@ List Services - `types` (`List[str]`): (Optional) Filter on service types - `statuses` (`List[str]`): (Optional) Filter on service statuses - `regions` (`List[str]`): (Optional) Filter on regions -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on service ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -60252,9 +62900,9 @@ async def list_persistent_volumes( name: Annotated[ Optional[StrictStr], Field(description="(Optional) A filter for the name")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on volume ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -60277,7 +62925,7 @@ List all PersistentVolumes - `service_id` (`str`): (Optional) A filter for the service id - `region` (`str`): (Optional) A filter for the region - `name` (`str`): (Optional) A filter for the name -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on volume ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -60320,9 +62968,9 @@ async def list_persistent_volumes_with_http_info( name: Annotated[ Optional[StrictStr], Field(description="(Optional) A filter for the name")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on volume ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -60345,7 +62993,7 @@ List all PersistentVolumes - `service_id` (`str`): (Optional) A filter for the service id - `region` (`str`): (Optional) A filter for the region - `name` (`str`): (Optional) A filter for the name -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on volume ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -60388,9 +63036,9 @@ async def list_persistent_volumes_without_preload_content( name: Annotated[ Optional[StrictStr], Field(description="(Optional) A filter for the name")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on volume ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -60413,7 +63061,7 @@ List all PersistentVolumes - `service_id` (`str`): (Optional) A filter for the service id - `region` (`str`): (Optional) A filter for the region - `name` (`str`): (Optional) A filter for the name -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on volume ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -60574,9 +63222,9 @@ in the spec for a single request. Returns the result object. - + -# koyeb/api\_async.api.users\_api +# koyeb/api\_async.api.pool\_claims\_api Koyeb Rest API @@ -60587,12 +63235,12 @@ Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. - + -## UsersApi Objects +## PoolClaimsApi Objects ```python -class UsersApi() +class PoolClaimsApi() ``` NOTE: This class is auto generated by OpenAPI Generator @@ -60600,15 +63248,14 @@ Ref: https://openapi-generator.tech Do not edit the class manually. - + -#### delete\_user +#### claim ```python @validate_call -async def delete_user( - id: Annotated[StrictStr, - Field(description="The id of the user")], +async def claim( + body: PoolClaimRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -60619,14 +63266,14 @@ async def delete_user( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, - Field(ge=0, le=0)] = 0) -> DeleteUserReply + Field(ge=0, le=0)] = 0) -> PoolClaimReply ``` -Delete user +Claim a sandbox from a service pool **Arguments**: -- `id` (`str`): The id of the user (required) +- `body` (`PoolClaimRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -60646,15 +63293,14 @@ in the spec for a single request. Returns the result object. - + -#### delete\_user\_with\_http\_info +#### claim\_with\_http\_info ```python @validate_call -async def delete_user_with_http_info( - id: Annotated[StrictStr, - Field(description="The id of the user")], +async def claim_with_http_info( + body: PoolClaimRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -60665,14 +63311,14 @@ async def delete_user_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> ApiResponse[DeleteUserReply] +) -> ApiResponse[PoolClaimReply] ``` -Delete user +Claim a sandbox from a service pool **Arguments**: -- `id` (`str`): The id of the user (required) +- `body` (`PoolClaimRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -60692,15 +63338,14 @@ in the spec for a single request. Returns the result object. - + -#### delete\_user\_without\_preload\_content +#### claim\_without\_preload\_content ```python @validate_call -async def delete_user_without_preload_content( - id: Annotated[StrictStr, - Field(description="The id of the user")], +async def claim_without_preload_content( + body: PoolClaimRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -60714,11 +63359,11 @@ async def delete_user_without_preload_content( Field(ge=0, le=0)] = 0) -> RESTResponseType ``` -Delete user +Claim a sandbox from a service pool **Arguments**: -- `id` (`str`): The id of the user (required) +- `body` (`PoolClaimRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -60738,15 +63383,15 @@ in the spec for a single request. Returns the result object. - + -#### delete\_user\_v2 +#### get\_claim ```python @validate_call -async def delete_user_v2( - id: Annotated[StrictStr, - Field(description="The id of the user")], +async def get_claim( + claim_id: StrictStr, + request_id: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -60757,14 +63402,15 @@ async def delete_user_v2( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, - Field(ge=0, le=0)] = 0) -> DeleteUserReply + Field(ge=0, le=0)] = 0) -> GetPoolClaimReply ``` -V2 Delete user +Get a claim **Arguments**: -- `id` (`str`): The id of the user (required) +- `claim_id` (`str`): (required) +- `request_id` (`str`): - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -60784,15 +63430,15 @@ in the spec for a single request. Returns the result object. - + -#### delete\_user\_v2\_with\_http\_info +#### get\_claim\_with\_http\_info ```python @validate_call -async def delete_user_v2_with_http_info( - id: Annotated[StrictStr, - Field(description="The id of the user")], +async def get_claim_with_http_info( + claim_id: StrictStr, + request_id: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -60803,14 +63449,15 @@ async def delete_user_v2_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> ApiResponse[DeleteUserReply] +) -> ApiResponse[GetPoolClaimReply] ``` -V2 Delete user +Get a claim **Arguments**: -- `id` (`str`): The id of the user (required) +- `claim_id` (`str`): (required) +- `request_id` (`str`): - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -60830,13 +63477,239 @@ in the spec for a single request. Returns the result object. - + -#### delete\_user\_v2\_without\_preload\_content +#### get\_claim\_without\_preload\_content ```python @validate_call -async def delete_user_v2_without_preload_content( +async def get_claim_without_preload_content( + claim_id: StrictStr, + request_id: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Get a claim + +**Arguments**: + +- `claim_id` (`str`): (required) +- `request_id` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### list\_claim + +```python +@validate_call +async def list_claim( + pool_id: StrictStr, + status: Optional[StrictStr] = None, + limit: Optional[StrictStr] = None, + offset: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ListPoolClaimReply +``` + +List claims of a service pool + +**Arguments**: + +- `pool_id` (`str`): (required) +- `status` (`str`): +- `limit` (`str`): +- `offset` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### list\_claim\_with\_http\_info + +```python +@validate_call +async def list_claim_with_http_info( + pool_id: StrictStr, + status: Optional[StrictStr] = None, + limit: Optional[StrictStr] = None, + offset: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ApiResponse[ListPoolClaimReply] +``` + +List claims of a service pool + +**Arguments**: + +- `pool_id` (`str`): (required) +- `status` (`str`): +- `limit` (`str`): +- `offset` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### list\_claim\_without\_preload\_content + +```python +@validate_call +async def list_claim_without_preload_content( + pool_id: StrictStr, + status: Optional[StrictStr] = None, + limit: Optional[StrictStr] = None, + offset: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +List claims of a service pool + +**Arguments**: + +- `pool_id` (`str`): (required) +- `status` (`str`): +- `limit` (`str`): +- `offset` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +# koyeb/api\_async.api.users\_api + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## UsersApi Objects + +```python +class UsersApi() +``` + +NOTE: This class is auto generated by OpenAPI Generator +Ref: https://openapi-generator.tech + +Do not edit the class manually. + + + +#### delete\_user + +```python +@validate_call +async def delete_user( id: Annotated[StrictStr, Field(description="The id of the user")], _request_timeout: Union[None, Annotated[StrictFloat, @@ -60849,10 +63722,240 @@ async def delete_user_v2_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, - Field(ge=0, le=0)] = 0) -> RESTResponseType + Field(ge=0, le=0)] = 0) -> DeleteUserReply ``` -V2 Delete user +Delete user + +**Arguments**: + +- `id` (`str`): The id of the user (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### delete\_user\_with\_http\_info + +```python +@validate_call +async def delete_user_with_http_info( + id: Annotated[StrictStr, + Field(description="The id of the user")], + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ApiResponse[DeleteUserReply] +``` + +Delete user + +**Arguments**: + +- `id` (`str`): The id of the user (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### delete\_user\_without\_preload\_content + +```python +@validate_call +async def delete_user_without_preload_content( + id: Annotated[StrictStr, + Field(description="The id of the user")], + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Delete user + +**Arguments**: + +- `id` (`str`): The id of the user (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### delete\_user\_v2 + +```python +@validate_call +async def delete_user_v2( + id: Annotated[StrictStr, + Field(description="The id of the user")], + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> DeleteUserReply +``` + +V2 Delete user + +**Arguments**: + +- `id` (`str`): The id of the user (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### delete\_user\_v2\_with\_http\_info + +```python +@validate_call +async def delete_user_v2_with_http_info( + id: Annotated[StrictStr, + Field(description="The id of the user")], + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ApiResponse[DeleteUserReply] +``` + +V2 Delete user + +**Arguments**: + +- `id` (`str`): The id of the user (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### delete\_user\_v2\_without\_preload\_content + +```python +@validate_call +async def delete_user_v2_without_preload_content( + id: Annotated[StrictStr, + Field(description="The id of the user")], + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +V2 Delete user **Arguments**: @@ -63462,6 +66565,730 @@ in the spec for a single request. Returns the result object. + + +# koyeb/api\_async.api.service\_pools\_api + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## ServicePoolsApi Objects + +```python +class ServicePoolsApi() +``` + +NOTE: This class is auto generated by OpenAPI Generator +Ref: https://openapi-generator.tech + +Do not edit the class manually. + + + +#### create\_service\_pool + +```python +@validate_call +async def create_service_pool( + service_pool: CreateServicePool, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> CreateServicePoolReply +``` + +Create a ServicePool + +**Arguments**: + +- `service_pool` (`CreateServicePool`): (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### create\_service\_pool\_with\_http\_info + +```python +@validate_call +async def create_service_pool_with_http_info( + service_pool: CreateServicePool, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ApiResponse[CreateServicePoolReply] +``` + +Create a ServicePool + +**Arguments**: + +- `service_pool` (`CreateServicePool`): (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### create\_service\_pool\_without\_preload\_content + +```python +@validate_call +async def create_service_pool_without_preload_content( + service_pool: CreateServicePool, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Create a ServicePool + +**Arguments**: + +- `service_pool` (`CreateServicePool`): (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### delete\_service\_pool + +```python +@validate_call +async def delete_service_pool( + id: StrictStr, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> object +``` + +Delete a ServicePool + +**Arguments**: + +- `id` (`str`): (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### delete\_service\_pool\_with\_http\_info + +```python +@validate_call +async def delete_service_pool_with_http_info( + id: StrictStr, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ApiResponse[object] +``` + +Delete a ServicePool + +**Arguments**: + +- `id` (`str`): (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### delete\_service\_pool\_without\_preload\_content + +```python +@validate_call +async def delete_service_pool_without_preload_content( + id: StrictStr, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Delete a ServicePool + +**Arguments**: + +- `id` (`str`): (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### get\_service\_pool + +```python +@validate_call +async def get_service_pool( + id: StrictStr, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> GetServicePoolReply +``` + +Get a ServicePool + +**Arguments**: + +- `id` (`str`): (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### get\_service\_pool\_with\_http\_info + +```python +@validate_call +async def get_service_pool_with_http_info( + id: StrictStr, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ApiResponse[GetServicePoolReply] +``` + +Get a ServicePool + +**Arguments**: + +- `id` (`str`): (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### get\_service\_pool\_without\_preload\_content + +```python +@validate_call +async def get_service_pool_without_preload_content( + id: StrictStr, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Get a ServicePool + +**Arguments**: + +- `id` (`str`): (required) +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### list\_service\_pools + +```python +@validate_call +async def list_service_pools( + name: Optional[StrictStr] = None, + limit: Optional[StrictStr] = None, + offset: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ListServicePoolsReply +``` + +List ServicePools + +**Arguments**: + +- `name` (`str`): +- `limit` (`str`): +- `offset` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### list\_service\_pools\_with\_http\_info + +```python +@validate_call +async def list_service_pools_with_http_info( + name: Optional[StrictStr] = None, + limit: Optional[StrictStr] = None, + offset: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ApiResponse[ListServicePoolsReply] +``` + +List ServicePools + +**Arguments**: + +- `name` (`str`): +- `limit` (`str`): +- `offset` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### list\_service\_pools\_without\_preload\_content + +```python +@validate_call +async def list_service_pools_without_preload_content( + name: Optional[StrictStr] = None, + limit: Optional[StrictStr] = None, + offset: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +List ServicePools + +**Arguments**: + +- `name` (`str`): +- `limit` (`str`): +- `offset` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### update\_service\_pool + +```python +@validate_call +async def update_service_pool( + id: StrictStr, + service_pool: UpdateServicePool, + update_mask: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> UpdateServicePoolReply +``` + +update_service_pool + +**Arguments**: + +- `id` (`str`): (required) +- `service_pool` (`UpdateServicePool`): (required) +- `update_mask` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### update\_service\_pool\_with\_http\_info + +```python +@validate_call +async def update_service_pool_with_http_info( + id: StrictStr, + service_pool: UpdateServicePool, + update_mask: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ApiResponse[UpdateServicePoolReply] +``` + +update_service_pool + +**Arguments**: + +- `id` (`str`): (required) +- `service_pool` (`UpdateServicePool`): (required) +- `update_mask` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### update\_service\_pool\_without\_preload\_content + +```python +@validate_call +async def update_service_pool_without_preload_content( + id: StrictStr, + service_pool: UpdateServicePool, + update_mask: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +update_service_pool + +**Arguments**: + +- `id` (`str`): (required) +- `service_pool` (`UpdateServicePool`): (required) +- `update_mask` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + # koyeb/api\_async.api.intercom\_api @@ -64274,10 +68101,9 @@ async def list_apps( name: Annotated[ Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on app ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -64298,7 +68124,7 @@ List App - `limit` (`str`): (Optional) The number of items to return - `offset` (`str`): (Optional) The offset in the list of item to return - `name` (`str`): (Optional) A filter for name -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on app ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -64334,9 +68160,8 @@ async def list_apps_with_http_info( )] = None, name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field(description="(Optional) Filter on app ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -64357,7 +68182,7 @@ List App - `limit` (`str`): (Optional) The number of items to return - `offset` (`str`): (Optional) The offset in the list of item to return - `name` (`str`): (Optional) A filter for name -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on app ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -64393,9 +68218,8 @@ async def list_apps_without_preload_content( )] = None, name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field(description="(Optional) Filter on app ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -64416,7 +68240,7 @@ List App - `limit` (`str`): (Optional) The number of items to return - `offset` (`str`): (Optional) The offset in the list of item to return - `name` (`str`): (Optional) A filter for name -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on app ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -65873,6 +69697,9 @@ async def list_deployments( statuses: Annotated[ Optional[List[StrictStr]], Field(description="(Optional) Filter on statuses")] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on deployment ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -65895,6 +69722,7 @@ List Deployments - `limit` (`str`): (Optional) The number of items to return - `offset` (`str`): (Optional) The offset in the list of item to return - `statuses` (`List[str]`): (Optional) Filter on statuses +- `ids` (`List[str]`): (Optional) Filter on deployment ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -65937,6 +69765,9 @@ async def list_deployments_with_http_info( statuses: Annotated[ Optional[List[StrictStr]], Field(description="(Optional) Filter on statuses")] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on deployment ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -65959,6 +69790,7 @@ List Deployments - `limit` (`str`): (Optional) The number of items to return - `offset` (`str`): (Optional) The offset in the list of item to return - `statuses` (`List[str]`): (Optional) Filter on statuses +- `ids` (`List[str]`): (Optional) Filter on deployment ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -66001,6 +69833,9 @@ async def list_deployments_without_preload_content( statuses: Annotated[ Optional[List[StrictStr]], Field(description="(Optional) Filter on statuses")] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on deployment ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -66023,6 +69858,7 @@ List Deployments - `limit` (`str`): (Optional) The number of items to return - `offset` (`str`): (Optional) The offset in the list of item to return - `statuses` (`List[str]`): (Optional) Filter on statuses +- `ids` (`List[str]`): (Optional) Filter on deployment ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69418,16 +73254,162 @@ in the spec for a single request. Returns the result object. - + + +#### update\_organization2 + +```python +@validate_call +async def update_organization2( + id: StrictStr, + organization: Organization, + update_mask: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> UpdateOrganizationReply +``` + +Update Organization + +**Arguments**: + +- `id` (`str`): (required) +- `organization` (`Organization`): (required) +- `update_mask` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### update\_organization2\_with\_http\_info + +```python +@validate_call +async def update_organization2_with_http_info( + id: StrictStr, + organization: Organization, + update_mask: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 +) -> ApiResponse[UpdateOrganizationReply] +``` + +Update Organization + +**Arguments**: + +- `id` (`str`): (required) +- `organization` (`Organization`): (required) +- `update_mask` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + + +#### update\_organization2\_without\_preload\_content + +```python +@validate_call +async def update_organization2_without_preload_content( + id: StrictStr, + organization: Organization, + update_mask: Optional[StrictStr] = None, + _request_timeout: Union[None, Annotated[StrictFloat, + Field(gt=0)], + Tuple[Annotated[StrictFloat, + Field(gt=0)], + Annotated[StrictFloat, + Field(gt=0)]]] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, + Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Update Organization + +**Arguments**: + +- `id` (`str`): (required) +- `organization` (`Organization`): (required) +- `update_mask` (`str`): +- `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one +number provided, it will be total request +timeout. It can also be a pair (tuple) of +(connection, read) timeouts. +- `_request_auth` (`dict, optional`): set to override the auth_settings for an a single +request; this effectively ignores the +authentication in the spec for a single request. +- `_content_type` (`str, Optional`): force content-type for the request. +- `_headers` (`dict, optional`): set to override the headers for a single +request; this effectively ignores the headers +in the spec for a single request. +- `_host_index` (`int, optional`): set to override the host_index for a single +request; this effectively ignores the host_index +in the spec for a single request. + +**Returns**: + +Returns the result object. + + -#### update\_organization2 +#### update\_organization\_default\_project ```python @validate_call -async def update_organization2( +async def update_organization_default_project( id: StrictStr, - organization: Organization, - update_mask: Optional[StrictStr] = None, + body: UpdateOrganizationDefaultProjectRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69438,16 +73420,15 @@ async def update_organization2( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> UpdateOrganizationReply +) -> UpdateOrganizationDefaultProjectReply ``` -Update Organization +Update Organization's default project **Arguments**: - `id` (`str`): (required) -- `organization` (`Organization`): (required) -- `update_mask` (`str`): +- `body` (`UpdateOrganizationDefaultProjectRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69467,16 +73448,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization2\_with\_http\_info +#### update\_organization\_default\_project\_with\_http\_info ```python @validate_call -async def update_organization2_with_http_info( +async def update_organization_default_project_with_http_info( id: StrictStr, - organization: Organization, - update_mask: Optional[StrictStr] = None, + body: UpdateOrganizationDefaultProjectRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69487,16 +73467,15 @@ async def update_organization2_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> ApiResponse[UpdateOrganizationReply] +) -> ApiResponse[UpdateOrganizationDefaultProjectReply] ``` -Update Organization +Update Organization's default project **Arguments**: - `id` (`str`): (required) -- `organization` (`Organization`): (required) -- `update_mask` (`str`): +- `body` (`UpdateOrganizationDefaultProjectRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69516,16 +73495,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization2\_without\_preload\_content +#### update\_organization\_default\_project\_without\_preload\_content ```python @validate_call -async def update_organization2_without_preload_content( +async def update_organization_default_project_without_preload_content( id: StrictStr, - organization: Organization, - update_mask: Optional[StrictStr] = None, + body: UpdateOrganizationDefaultProjectRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69539,13 +73517,12 @@ async def update_organization2_without_preload_content( Field(ge=0, le=0)] = 0) -> RESTResponseType ``` -Update Organization +Update Organization's default project **Arguments**: - `id` (`str`): (required) -- `organization` (`Organization`): (required) -- `update_mask` (`str`): +- `body` (`UpdateOrganizationDefaultProjectRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69565,15 +73542,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization\_default\_project +#### update\_organization\_name ```python @validate_call -async def update_organization_default_project( +async def update_organization_name( id: StrictStr, - body: UpdateOrganizationDefaultProjectRequest, + body: UpdateOrganizationNameRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69584,15 +73561,15 @@ async def update_organization_default_project( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> UpdateOrganizationDefaultProjectReply +) -> UpdateOrganizationNameReply ``` -Update Organization's default project +Update Organization Name **Arguments**: - `id` (`str`): (required) -- `body` (`UpdateOrganizationDefaultProjectRequest`): (required) +- `body` (`UpdateOrganizationNameRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69612,15 +73589,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization\_default\_project\_with\_http\_info +#### update\_organization\_name\_with\_http\_info ```python @validate_call -async def update_organization_default_project_with_http_info( +async def update_organization_name_with_http_info( id: StrictStr, - body: UpdateOrganizationDefaultProjectRequest, + body: UpdateOrganizationNameRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69631,15 +73608,15 @@ async def update_organization_default_project_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> ApiResponse[UpdateOrganizationDefaultProjectReply] +) -> ApiResponse[UpdateOrganizationNameReply] ``` -Update Organization's default project +Update Organization Name **Arguments**: - `id` (`str`): (required) -- `body` (`UpdateOrganizationDefaultProjectRequest`): (required) +- `body` (`UpdateOrganizationNameRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69659,15 +73636,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization\_default\_project\_without\_preload\_content +#### update\_organization\_name\_without\_preload\_content ```python @validate_call -async def update_organization_default_project_without_preload_content( +async def update_organization_name_without_preload_content( id: StrictStr, - body: UpdateOrganizationDefaultProjectRequest, + body: UpdateOrganizationNameRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69681,12 +73658,12 @@ async def update_organization_default_project_without_preload_content( Field(ge=0, le=0)] = 0) -> RESTResponseType ``` -Update Organization's default project +Update Organization Name **Arguments**: - `id` (`str`): (required) -- `body` (`UpdateOrganizationDefaultProjectRequest`): (required) +- `body` (`UpdateOrganizationNameRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69706,15 +73683,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization\_name +#### update\_organization\_plan ```python @validate_call -async def update_organization_name( +async def update_organization_plan( id: StrictStr, - body: UpdateOrganizationNameRequest, + body: UpdateOrganizationPlanRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69725,15 +73702,15 @@ async def update_organization_name( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> UpdateOrganizationNameReply +) -> UpdateOrganizationPlanReply ``` -Update Organization Name +Update Organization plan **Arguments**: - `id` (`str`): (required) -- `body` (`UpdateOrganizationNameRequest`): (required) +- `body` (`UpdateOrganizationPlanRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69753,15 +73730,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization\_name\_with\_http\_info +#### update\_organization\_plan\_with\_http\_info ```python @validate_call -async def update_organization_name_with_http_info( +async def update_organization_plan_with_http_info( id: StrictStr, - body: UpdateOrganizationNameRequest, + body: UpdateOrganizationPlanRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69772,15 +73749,15 @@ async def update_organization_name_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> ApiResponse[UpdateOrganizationNameReply] +) -> ApiResponse[UpdateOrganizationPlanReply] ``` -Update Organization Name +Update Organization plan **Arguments**: - `id` (`str`): (required) -- `body` (`UpdateOrganizationNameRequest`): (required) +- `body` (`UpdateOrganizationPlanRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69800,15 +73777,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization\_name\_without\_preload\_content +#### update\_organization\_plan\_without\_preload\_content ```python @validate_call -async def update_organization_name_without_preload_content( +async def update_organization_plan_without_preload_content( id: StrictStr, - body: UpdateOrganizationNameRequest, + body: UpdateOrganizationPlanRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69822,12 +73799,12 @@ async def update_organization_name_without_preload_content( Field(ge=0, le=0)] = 0) -> RESTResponseType ``` -Update Organization Name +Update Organization plan **Arguments**: - `id` (`str`): (required) -- `body` (`UpdateOrganizationNameRequest`): (required) +- `body` (`UpdateOrganizationPlanRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69847,15 +73824,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization\_plan +#### upsert\_signup\_qualification ```python @validate_call -async def update_organization_plan( +async def upsert_signup_qualification( id: StrictStr, - body: UpdateOrganizationPlanRequest, + body: UpsertSignupQualificationRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69866,15 +73843,15 @@ async def update_organization_plan( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> UpdateOrganizationPlanReply +) -> UpsertSignupQualificationReply ``` -Update Organization plan +Upsert Organization's signup qualification **Arguments**: - `id` (`str`): (required) -- `body` (`UpdateOrganizationPlanRequest`): (required) +- `body` (`UpsertSignupQualificationRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69894,15 +73871,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization\_plan\_with\_http\_info +#### upsert\_signup\_qualification\_with\_http\_info ```python @validate_call -async def update_organization_plan_with_http_info( +async def upsert_signup_qualification_with_http_info( id: StrictStr, - body: UpdateOrganizationPlanRequest, + body: UpsertSignupQualificationRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69913,15 +73890,15 @@ async def update_organization_plan_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> ApiResponse[UpdateOrganizationPlanReply] +) -> ApiResponse[UpsertSignupQualificationReply] ``` -Update Organization plan +Upsert Organization's signup qualification **Arguments**: - `id` (`str`): (required) -- `body` (`UpdateOrganizationPlanRequest`): (required) +- `body` (`UpsertSignupQualificationRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69941,15 +73918,15 @@ in the spec for a single request. Returns the result object. - + -#### update\_organization\_plan\_without\_preload\_content +#### upsert\_signup\_qualification\_without\_preload\_content ```python @validate_call -async def update_organization_plan_without_preload_content( +async def upsert_signup_qualification_without_preload_content( id: StrictStr, - body: UpdateOrganizationPlanRequest, + body: UpsertSignupQualificationRequest, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -69963,12 +73940,12 @@ async def update_organization_plan_without_preload_content( Field(ge=0, le=0)] = 0) -> RESTResponseType ``` -Update Organization plan +Upsert Organization's signup qualification **Arguments**: - `id` (`str`): (required) -- `body` (`UpdateOrganizationPlanRequest`): (required) +- `body` (`UpsertSignupQualificationRequest`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -69988,15 +73965,40 @@ in the spec for a single request. Returns the result object. - + -#### upsert\_signup\_qualification +# koyeb/api\_async.api.quotas\_api + +Koyeb Rest API + +The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. + +The version of the OpenAPI document: 1.0.0 +Generated by OpenAPI Generator (https://openapi-generator.tech) + +Do not edit the class manually. + + + +## QuotasApi Objects + +```python +class QuotasApi() +``` + +NOTE: This class is auto generated by OpenAPI Generator +Ref: https://openapi-generator.tech + +Do not edit the class manually. + + + +#### get\_organization\_quotas\_usage ```python @validate_call -async def upsert_signup_qualification( - id: StrictStr, - body: UpsertSignupQualificationRequest, +async def get_organization_quotas_usage( + organization_id: StrictStr, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -70007,15 +74009,14 @@ async def upsert_signup_qualification( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> UpsertSignupQualificationReply +) -> GetOrganizationQuotasUsageReply ``` -Upsert Organization's signup qualification +Return the organization's current quota usage alongside the plan's limits. Response is cached in Redis for 60s. Accept text/plain (or ?format=prometheus) to receive the response rendered as Prometheus text exposition format ("koyeb_quota_" for usage, "koyeb_quota__limit" for the plan limit) suitable for scraping into an external Prometheus. **Arguments**: -- `id` (`str`): (required) -- `body` (`UpsertSignupQualificationRequest`): (required) +- `organization_id` (`str`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -70035,15 +74036,14 @@ in the spec for a single request. Returns the result object. - + -#### upsert\_signup\_qualification\_with\_http\_info +#### get\_organization\_quotas\_usage\_with\_http\_info ```python @validate_call -async def upsert_signup_qualification_with_http_info( - id: StrictStr, - body: UpsertSignupQualificationRequest, +async def get_organization_quotas_usage_with_http_info( + organization_id: StrictStr, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -70054,15 +74054,14 @@ async def upsert_signup_qualification_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0 -) -> ApiResponse[UpsertSignupQualificationReply] +) -> ApiResponse[GetOrganizationQuotasUsageReply] ``` -Upsert Organization's signup qualification +Return the organization's current quota usage alongside the plan's limits. Response is cached in Redis for 60s. Accept text/plain (or ?format=prometheus) to receive the response rendered as Prometheus text exposition format ("koyeb_quota_" for usage, "koyeb_quota__limit" for the plan limit) suitable for scraping into an external Prometheus. **Arguments**: -- `id` (`str`): (required) -- `body` (`UpsertSignupQualificationRequest`): (required) +- `organization_id` (`str`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -70082,15 +74081,14 @@ in the spec for a single request. Returns the result object. - + -#### upsert\_signup\_qualification\_without\_preload\_content +#### get\_organization\_quotas\_usage\_without\_preload\_content ```python @validate_call -async def upsert_signup_qualification_without_preload_content( - id: StrictStr, - body: UpsertSignupQualificationRequest, +async def get_organization_quotas_usage_without_preload_content( + organization_id: StrictStr, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -70104,12 +74102,11 @@ async def upsert_signup_qualification_without_preload_content( Field(ge=0, le=0)] = 0) -> RESTResponseType ``` -Upsert Organization's signup qualification +Return the organization's current quota usage alongside the plan's limits. Response is cached in Redis for 60s. Accept text/plain (or ?format=prometheus) to receive the response rendered as Prometheus text exposition format ("koyeb_quota_" for usage, "koyeb_quota__limit" for the plan limit) suitable for scraping into an external Prometheus. **Arguments**: -- `id` (`str`): (required) -- `body` (`UpsertSignupQualificationRequest`): (required) +- `organization_id` (`str`): (required) - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -70129,32 +74126,6 @@ in the spec for a single request. Returns the result object. - - -# koyeb/api\_async.api.quotas\_api - -Koyeb Rest API - -The Koyeb API allows you to interact with the Koyeb platform in a simple, programmatic way using conventional HTTP requests. - -The version of the OpenAPI document: 1.0.0 -Generated by OpenAPI Generator (https://openapi-generator.tech) - -Do not edit the class manually. - - - -## QuotasApi Objects - -```python -class QuotasApi() -``` - -NOTE: This class is auto generated by OpenAPI Generator -Ref: https://openapi-generator.tech - -Do not edit the class manually. - #### review\_organization\_capacity @@ -71704,9 +75675,9 @@ async def list_secrets( offset: Optional[StrictStr] = None, types: Annotated[Optional[List[StrictStr]], Field(description="Filter by secret types")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on secret ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -71728,7 +75699,7 @@ List Secrets - `limit` (`str`): - `offset` (`str`): - `types` (`List[str]`): Filter by secret types -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on secret ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -71760,9 +75731,9 @@ async def list_secrets_with_http_info( offset: Optional[StrictStr] = None, types: Annotated[Optional[List[StrictStr]], Field(description="Filter by secret types")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on secret ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -71784,7 +75755,7 @@ List Secrets - `limit` (`str`): - `offset` (`str`): - `types` (`List[str]`): Filter by secret types -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on secret ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -71816,9 +75787,9 @@ async def list_secrets_without_preload_content( offset: Optional[StrictStr] = None, types: Annotated[Optional[List[StrictStr]], Field(description="Filter by secret types")] = None, - project_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the project ID")] = None, + ids: Annotated[Optional[List[StrictStr]], + Field( + description="(Optional) Filter on secret ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -71840,7 +75811,7 @@ List Secrets - `limit` (`str`): - `offset` (`str`): - `types` (`List[str]`): Filter by secret types -- `project_id` (`str`): (Optional) A filter for the project ID +- `ids` (`List[str]`): (Optional) Filter on secret ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -76924,6 +80895,9 @@ async def list_instances( Field(description= "(Optional) The ending time of the period of running instance" )] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on instance ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -76953,6 +80927,7 @@ List Instances - `order` (`str`): (Optional) Sorts the list in the ascending or the descending order - `starting_time` (`datetime`): (Optional) The starting time of the period of running instance - `ending_time` (`datetime`): (Optional) The ending time of the period of running instance +- `ids` (`List[str]`): (Optional) Filter on instance ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -77024,6 +80999,9 @@ async def list_instances_with_http_info( Field(description= "(Optional) The ending time of the period of running instance" )] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on instance ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -77053,6 +81031,7 @@ List Instances - `order` (`str`): (Optional) Sorts the list in the ascending or the descending order - `starting_time` (`datetime`): (Optional) The starting time of the period of running instance - `ending_time` (`datetime`): (Optional) The ending time of the period of running instance +- `ids` (`List[str]`): (Optional) Filter on instance ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -77124,6 +81103,9 @@ async def list_instances_without_preload_content( Field(description= "(Optional) The ending time of the period of running instance" )] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on instance ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -77153,6 +81135,7 @@ List Instances - `order` (`str`): (Optional) Sorts the list in the ascending or the descending order - `starting_time` (`datetime`): (Optional) The starting time of the period of running instance - `ending_time` (`datetime`): (Optional) The ending time of the period of running instance +- `ids` (`List[str]`): (Optional) Filter on instance ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -79119,6 +83102,7 @@ async def list_instance_snapshots( name: Optional[StrictStr] = None, statuses: Optional[List[StrictStr]] = None, type: Optional[StrictStr] = None, + ids: Optional[List[StrictStr]] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -79141,6 +83125,7 @@ list_instance_snapshots - `name` (`str`): - `statuses` (`List[str]`): - `type` (`str`): +- `ids` (`List[str]`): - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -79172,6 +83157,7 @@ async def list_instance_snapshots_with_http_info( name: Optional[StrictStr] = None, statuses: Optional[List[StrictStr]] = None, type: Optional[StrictStr] = None, + ids: Optional[List[StrictStr]] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -79194,6 +83180,7 @@ list_instance_snapshots - `name` (`str`): - `statuses` (`List[str]`): - `type` (`str`): +- `ids` (`List[str]`): - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -79225,6 +83212,7 @@ async def list_instance_snapshots_without_preload_content( name: Optional[StrictStr] = None, statuses: Optional[List[StrictStr]] = None, type: Optional[StrictStr] = None, + ids: Optional[List[StrictStr]] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -79247,6 +83235,7 @@ list_instance_snapshots - `name` (`str`): - `statuses` (`List[str]`): - `type` (`str`): +- `ids` (`List[str]`): - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -79723,6 +83712,9 @@ async def list_snapshots( region: Annotated[ Optional[StrictStr], Field(description="(Optional) A filter for the region")] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on snapshot ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -79745,6 +83737,7 @@ List all Snapshots - `organization_id` (`str`): (Optional) Filter by organization_id - `statuses` (`List[str]`): (Optional) Filter by status - SNAPSHOT_STATUS_INVALID: zero value, invalid - SNAPSHOT_STATUS_CREATING: the snapshot is being created - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted - SNAPSHOT_STATUS_DELETED: the snapshot is deleted - `region` (`str`): (Optional) A filter for the region +- `ids` (`List[str]`): (Optional) Filter on snapshot ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -79790,6 +83783,9 @@ async def list_snapshots_with_http_info( region: Annotated[ Optional[StrictStr], Field(description="(Optional) A filter for the region")] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on snapshot ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -79812,6 +83808,7 @@ List all Snapshots - `organization_id` (`str`): (Optional) Filter by organization_id - `statuses` (`List[str]`): (Optional) Filter by status - SNAPSHOT_STATUS_INVALID: zero value, invalid - SNAPSHOT_STATUS_CREATING: the snapshot is being created - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted - SNAPSHOT_STATUS_DELETED: the snapshot is deleted - `region` (`str`): (Optional) A filter for the region +- `ids` (`List[str]`): (Optional) Filter on snapshot ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -79857,6 +83854,9 @@ async def list_snapshots_without_preload_content( region: Annotated[ Optional[StrictStr], Field(description="(Optional) A filter for the region")] = None, + ids: Annotated[ + Optional[List[StrictStr]], + Field(description="(Optional) Filter on snapshot ids")] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, @@ -79879,6 +83879,7 @@ List all Snapshots - `organization_id` (`str`): (Optional) Filter by organization_id - `statuses` (`List[str]`): (Optional) Filter by status - SNAPSHOT_STATUS_INVALID: zero value, invalid - SNAPSHOT_STATUS_CREATING: the snapshot is being created - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted - SNAPSHOT_STATUS_DELETED: the snapshot is deleted - `region` (`str`): (Optional) A filter for the region +- `ids` (`List[str]`): (Optional) Filter on snapshot ids - `_request_timeout` (`int, tuple(int, int), optional`): timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of diff --git a/koyeb/api/.openapi-generator/FILES b/koyeb/api/.openapi-generator/FILES index 7307b87a..2f555426 100644 --- a/koyeb/api/.openapi-generator/FILES +++ b/koyeb/api/.openapi-generator/FILES @@ -942,27 +942,4 @@ koyeb/api/models/verify_docker_image_reply.py koyeb/api/models/verify_docker_image_reply_err_code.py koyeb/api/rest.py koyeb/api/test/__init__.py -koyeb/api/test/test_create_service_pool.py -koyeb/api/test/test_create_service_pool_reply.py -koyeb/api/test/test_get_organization_quotas_usage_reply.py -koyeb/api/test/test_get_pool_claim_reply.py -koyeb/api/test/test_get_service_pool_reply.py -koyeb/api/test/test_instance_snapshot_type_usage.py -koyeb/api/test/test_instance_type_usage.py -koyeb/api/test/test_list_pool_claim_reply.py -koyeb/api/test/test_list_service_pools_reply.py -koyeb/api/test/test_mesh.py -koyeb/api/test/test_mesh_scope.py -koyeb/api/test/test_persistent_volume_region_usage.py -koyeb/api/test/test_pool_claim.py -koyeb/api/test/test_pool_claim_reply.py -koyeb/api/test/test_pool_claim_request.py -koyeb/api/test/test_pool_claim_status.py -koyeb/api/test/test_pool_claims_api.py -koyeb/api/test/test_quota_usage.py -koyeb/api/test/test_service_pool.py -koyeb/api/test/test_service_pool_status.py -koyeb/api/test/test_service_pools_api.py -koyeb/api/test/test_update_service_pool.py -koyeb/api/test/test_update_service_pool_reply.py koyeb/api_README.md diff --git a/koyeb/api/.openapi-generator/VERSION b/koyeb/api/.openapi-generator/VERSION index 32a8cfac..07832195 100644 --- a/koyeb/api/.openapi-generator/VERSION +++ b/koyeb/api/.openapi-generator/VERSION @@ -1 +1 @@ -7.26.0-SNAPSHOT +7.24.0 diff --git a/koyeb/api/__init__.py b/koyeb/api/__init__.py index c3f6ebb7..c0d409a0 100644 --- a/koyeb/api/__init__.py +++ b/koyeb/api/__init__.py @@ -499,15 +499,9 @@ # import apis into sdk package from koyeb.api.api.apps_api import AppsApi as AppsApi from koyeb.api.api.archives_api import ArchivesApi as ArchivesApi -from koyeb.api.api.catalog_datacenters_api import ( - CatalogDatacentersApi as CatalogDatacentersApi, -) -from koyeb.api.api.catalog_instance_usage_api import ( - CatalogInstanceUsageApi as CatalogInstanceUsageApi, -) -from koyeb.api.api.catalog_instances_api import ( - CatalogInstancesApi as CatalogInstancesApi, -) +from koyeb.api.api.catalog_datacenters_api import CatalogDatacentersApi as CatalogDatacentersApi +from koyeb.api.api.catalog_instance_usage_api import CatalogInstanceUsageApi as CatalogInstanceUsageApi +from koyeb.api.api.catalog_instances_api import CatalogInstancesApi as CatalogInstancesApi from koyeb.api.api.catalog_regions_api import CatalogRegionsApi as CatalogRegionsApi from koyeb.api.api.compose_api import ComposeApi as ComposeApi from koyeb.api.api.coupons_api import CouponsApi as CouponsApi @@ -515,37 +509,23 @@ from koyeb.api.api.deployments_api import DeploymentsApi as DeploymentsApi from koyeb.api.api.docker_helper_api import DockerHelperApi as DockerHelperApi from koyeb.api.api.domains_api import DomainsApi as DomainsApi -from koyeb.api.api.instance_snapshots_api import ( - InstanceSnapshotsApi as InstanceSnapshotsApi, -) +from koyeb.api.api.instance_snapshots_api import InstanceSnapshotsApi as InstanceSnapshotsApi from koyeb.api.api.instances_api import InstancesApi as InstancesApi from koyeb.api.api.intercom_api import IntercomApi as IntercomApi from koyeb.api.api.logs_api import LogsApi as LogsApi from koyeb.api.api.metrics_api import MetricsApi as MetricsApi -from koyeb.api.api.organization_confirmations_api import ( - OrganizationConfirmationsApi as OrganizationConfirmationsApi, -) -from koyeb.api.api.organization_invitations_api import ( - OrganizationInvitationsApi as OrganizationInvitationsApi, -) -from koyeb.api.api.organization_members_api import ( - OrganizationMembersApi as OrganizationMembersApi, -) -from koyeb.api.api.organization_quotas_api import ( - OrganizationQuotasApi as OrganizationQuotasApi, -) +from koyeb.api.api.organization_confirmations_api import OrganizationConfirmationsApi as OrganizationConfirmationsApi +from koyeb.api.api.organization_invitations_api import OrganizationInvitationsApi as OrganizationInvitationsApi +from koyeb.api.api.organization_members_api import OrganizationMembersApi as OrganizationMembersApi +from koyeb.api.api.organization_quotas_api import OrganizationQuotasApi as OrganizationQuotasApi from koyeb.api.api.payment_methods_api import PaymentMethodsApi as PaymentMethodsApi -from koyeb.api.api.persistent_volumes_api import ( - PersistentVolumesApi as PersistentVolumesApi, -) +from koyeb.api.api.persistent_volumes_api import PersistentVolumesApi as PersistentVolumesApi from koyeb.api.api.pool_claims_api import PoolClaimsApi as PoolClaimsApi from koyeb.api.api.profile_api import ProfileApi as ProfileApi from koyeb.api.api.projects_api import ProjectsApi as ProjectsApi from koyeb.api.api.provisioning_api import ProvisioningApi as ProvisioningApi from koyeb.api.api.quotas_api import QuotasApi as QuotasApi -from koyeb.api.api.regional_deployments_api import ( - RegionalDeploymentsApi as RegionalDeploymentsApi, -) +from koyeb.api.api.regional_deployments_api import RegionalDeploymentsApi as RegionalDeploymentsApi from koyeb.api.api.repositories_api import RepositoriesApi as RepositoriesApi from koyeb.api.api.search_api import SearchApi as SearchApi from koyeb.api.api.secrets_api import SecretsApi as SecretsApi @@ -576,9 +556,7 @@ from koyeb.api.exceptions import ApiException as ApiException # import models into sdk package -from koyeb.api.models.accept_organization_invitation_reply import ( - AcceptOrganizationInvitationReply as AcceptOrganizationInvitationReply, -) +from koyeb.api.models.accept_organization_invitation_reply import AcceptOrganizationInvitationReply as AcceptOrganizationInvitationReply from koyeb.api.models.action import Action as Action from koyeb.api.models.activity import Activity as Activity from koyeb.api.models.activity_list import ActivityList as ActivityList @@ -590,266 +568,124 @@ from koyeb.api.models.app_usage import AppUsage as AppUsage from koyeb.api.models.apps_summary import AppsSummary as AppsSummary from koyeb.api.models.archive import Archive as Archive -from koyeb.api.models.archive_deployment_metadata import ( - ArchiveDeploymentMetadata as ArchiveDeploymentMetadata, -) +from koyeb.api.models.archive_deployment_metadata import ArchiveDeploymentMetadata as ArchiveDeploymentMetadata from koyeb.api.models.archive_source import ArchiveSource as ArchiveSource from koyeb.api.models.auto_release import AutoRelease as AutoRelease from koyeb.api.models.auto_release_group import AutoReleaseGroup as AutoReleaseGroup from koyeb.api.models.autocomplete_reply import AutocompleteReply as AutocompleteReply -from koyeb.api.models.autocomplete_request import ( - AutocompleteRequest as AutocompleteRequest, -) +from koyeb.api.models.autocomplete_request import AutocompleteRequest as AutocompleteRequest from koyeb.api.models.availability_level import AvailabilityLevel as AvailabilityLevel -from koyeb.api.models.azure_container_registry_configuration import ( - AzureContainerRegistryConfiguration as AzureContainerRegistryConfiguration, -) +from koyeb.api.models.azure_container_registry_configuration import AzureContainerRegistryConfiguration as AzureContainerRegistryConfiguration from koyeb.api.models.basic_auth_policy import BasicAuthPolicy as BasicAuthPolicy from koyeb.api.models.budget import Budget as Budget from koyeb.api.models.buildpack_builder import BuildpackBuilder as BuildpackBuilder from koyeb.api.models.canny_auth_reply import CannyAuthReply as CannyAuthReply from koyeb.api.models.catalog_gpu_details import CatalogGPUDetails as CatalogGPUDetails from koyeb.api.models.catalog_instance import CatalogInstance as CatalogInstance -from koyeb.api.models.catalog_instance_list_item import ( - CatalogInstanceListItem as CatalogInstanceListItem, -) +from koyeb.api.models.catalog_instance_list_item import CatalogInstanceListItem as CatalogInstanceListItem from koyeb.api.models.catalog_usage import CatalogUsage as CatalogUsage from koyeb.api.models.check_coupon_reply import CheckCouponReply as CheckCouponReply -from koyeb.api.models.clear_idenfy_verification_result_request import ( - ClearIdenfyVerificationResultRequest as ClearIdenfyVerificationResultRequest, -) +from koyeb.api.models.clear_idenfy_verification_result_request import ClearIdenfyVerificationResultRequest as ClearIdenfyVerificationResultRequest from koyeb.api.models.compose_reply import ComposeReply as ComposeReply from koyeb.api.models.config_file import ConfigFile as ConfigFile -from koyeb.api.models.confirm_payment_authorization_reply import ( - ConfirmPaymentAuthorizationReply as ConfirmPaymentAuthorizationReply, -) -from koyeb.api.models.create_access_token_reply import ( - CreateAccessTokenReply as CreateAccessTokenReply, -) -from koyeb.api.models.create_access_token_request import ( - CreateAccessTokenRequest as CreateAccessTokenRequest, -) -from koyeb.api.models.create_account_request import ( - CreateAccountRequest as CreateAccountRequest, -) +from koyeb.api.models.confirm_payment_authorization_reply import ConfirmPaymentAuthorizationReply as ConfirmPaymentAuthorizationReply +from koyeb.api.models.create_access_token_reply import CreateAccessTokenReply as CreateAccessTokenReply +from koyeb.api.models.create_access_token_request import CreateAccessTokenRequest as CreateAccessTokenRequest +from koyeb.api.models.create_account_request import CreateAccountRequest as CreateAccountRequest from koyeb.api.models.create_app import CreateApp as CreateApp from koyeb.api.models.create_app_reply import CreateAppReply as CreateAppReply from koyeb.api.models.create_archive import CreateArchive as CreateArchive -from koyeb.api.models.create_archive_reply import ( - CreateArchiveReply as CreateArchiveReply, -) +from koyeb.api.models.create_archive_reply import CreateArchiveReply as CreateArchiveReply from koyeb.api.models.create_budget_reply import CreateBudgetReply as CreateBudgetReply from koyeb.api.models.create_compose import CreateCompose as CreateCompose from koyeb.api.models.create_credential import CreateCredential as CreateCredential -from koyeb.api.models.create_credential_reply import ( - CreateCredentialReply as CreateCredentialReply, -) +from koyeb.api.models.create_credential_reply import CreateCredentialReply as CreateCredentialReply from koyeb.api.models.create_domain import CreateDomain as CreateDomain from koyeb.api.models.create_domain_reply import CreateDomainReply as CreateDomainReply -from koyeb.api.models.create_instance_snapshot_reply import ( - CreateInstanceSnapshotReply as CreateInstanceSnapshotReply, -) -from koyeb.api.models.create_instance_snapshot_request import ( - CreateInstanceSnapshotRequest as CreateInstanceSnapshotRequest, -) -from koyeb.api.models.create_organization_invitation_reply import ( - CreateOrganizationInvitationReply as CreateOrganizationInvitationReply, -) -from koyeb.api.models.create_organization_invitation_request import ( - CreateOrganizationInvitationRequest as CreateOrganizationInvitationRequest, -) -from koyeb.api.models.create_organization_reply import ( - CreateOrganizationReply as CreateOrganizationReply, -) -from koyeb.api.models.create_organization_request import ( - CreateOrganizationRequest as CreateOrganizationRequest, -) -from koyeb.api.models.create_payment_authorization_reply import ( - CreatePaymentAuthorizationReply as CreatePaymentAuthorizationReply, -) -from koyeb.api.models.create_persistent_volume_reply import ( - CreatePersistentVolumeReply as CreatePersistentVolumeReply, -) -from koyeb.api.models.create_persistent_volume_request import ( - CreatePersistentVolumeRequest as CreatePersistentVolumeRequest, -) +from koyeb.api.models.create_instance_snapshot_reply import CreateInstanceSnapshotReply as CreateInstanceSnapshotReply +from koyeb.api.models.create_instance_snapshot_request import CreateInstanceSnapshotRequest as CreateInstanceSnapshotRequest +from koyeb.api.models.create_organization_invitation_reply import CreateOrganizationInvitationReply as CreateOrganizationInvitationReply +from koyeb.api.models.create_organization_invitation_request import CreateOrganizationInvitationRequest as CreateOrganizationInvitationRequest +from koyeb.api.models.create_organization_reply import CreateOrganizationReply as CreateOrganizationReply +from koyeb.api.models.create_organization_request import CreateOrganizationRequest as CreateOrganizationRequest +from koyeb.api.models.create_payment_authorization_reply import CreatePaymentAuthorizationReply as CreatePaymentAuthorizationReply +from koyeb.api.models.create_persistent_volume_reply import CreatePersistentVolumeReply as CreatePersistentVolumeReply +from koyeb.api.models.create_persistent_volume_request import CreatePersistentVolumeRequest as CreatePersistentVolumeRequest from koyeb.api.models.create_project import CreateProject as CreateProject -from koyeb.api.models.create_project_reply import ( - CreateProjectReply as CreateProjectReply, -) +from koyeb.api.models.create_project_reply import CreateProjectReply as CreateProjectReply from koyeb.api.models.create_secret import CreateSecret as CreateSecret from koyeb.api.models.create_secret_reply import CreateSecretReply as CreateSecretReply from koyeb.api.models.create_service import CreateService as CreateService from koyeb.api.models.create_service_pool import CreateServicePool as CreateServicePool -from koyeb.api.models.create_service_pool_reply import ( - CreateServicePoolReply as CreateServicePoolReply, -) -from koyeb.api.models.create_service_reply import ( - CreateServiceReply as CreateServiceReply, -) -from koyeb.api.models.create_snapshot_reply import ( - CreateSnapshotReply as CreateSnapshotReply, -) -from koyeb.api.models.create_snapshot_request import ( - CreateSnapshotRequest as CreateSnapshotRequest, -) -from koyeb.api.models.create_stage_attempt_request import ( - CreateStageAttemptRequest as CreateStageAttemptRequest, -) +from koyeb.api.models.create_service_pool_reply import CreateServicePoolReply as CreateServicePoolReply +from koyeb.api.models.create_service_reply import CreateServiceReply as CreateServiceReply +from koyeb.api.models.create_snapshot_reply import CreateSnapshotReply as CreateSnapshotReply +from koyeb.api.models.create_snapshot_request import CreateSnapshotRequest as CreateSnapshotRequest +from koyeb.api.models.create_stage_attempt_request import CreateStageAttemptRequest as CreateStageAttemptRequest from koyeb.api.models.credential import Credential as Credential from koyeb.api.models.credential_type import CredentialType as CredentialType -from koyeb.api.models.database_deployment_metadata import ( - DatabaseDeploymentMetadata as DatabaseDeploymentMetadata, -) -from koyeb.api.models.database_role_password import ( - DatabaseRolePassword as DatabaseRolePassword, -) +from koyeb.api.models.database_deployment_metadata import DatabaseDeploymentMetadata as DatabaseDeploymentMetadata +from koyeb.api.models.database_role_password import DatabaseRolePassword as DatabaseRolePassword from koyeb.api.models.database_source import DatabaseSource as DatabaseSource from koyeb.api.models.database_usage import DatabaseUsage as DatabaseUsage -from koyeb.api.models.database_usage_details import ( - DatabaseUsageDetails as DatabaseUsageDetails, -) -from koyeb.api.models.datacenter_list_item import ( - DatacenterListItem as DatacenterListItem, -) -from koyeb.api.models.deactivate_organization_reply import ( - DeactivateOrganizationReply as DeactivateOrganizationReply, -) -from koyeb.api.models.deactivate_organization_request import ( - DeactivateOrganizationRequest as DeactivateOrganizationRequest, -) -from koyeb.api.models.declare_stage_progress_request import ( - DeclareStageProgressRequest as DeclareStageProgressRequest, -) -from koyeb.api.models.declare_step_progress_request import ( - DeclareStepProgressRequest as DeclareStepProgressRequest, -) -from koyeb.api.models.decline_organization_invitation_reply import ( - DeclineOrganizationInvitationReply as DeclineOrganizationInvitationReply, -) -from koyeb.api.models.delete_instance_snapshot_reply import ( - DeleteInstanceSnapshotReply as DeleteInstanceSnapshotReply, -) -from koyeb.api.models.delete_organization_reply import ( - DeleteOrganizationReply as DeleteOrganizationReply, -) -from koyeb.api.models.delete_persistent_volume_reply import ( - DeletePersistentVolumeReply as DeletePersistentVolumeReply, -) -from koyeb.api.models.delete_snapshot_reply import ( - DeleteSnapshotReply as DeleteSnapshotReply, -) +from koyeb.api.models.database_usage_details import DatabaseUsageDetails as DatabaseUsageDetails +from koyeb.api.models.datacenter_list_item import DatacenterListItem as DatacenterListItem +from koyeb.api.models.deactivate_organization_reply import DeactivateOrganizationReply as DeactivateOrganizationReply +from koyeb.api.models.deactivate_organization_request import DeactivateOrganizationRequest as DeactivateOrganizationRequest +from koyeb.api.models.declare_stage_progress_request import DeclareStageProgressRequest as DeclareStageProgressRequest +from koyeb.api.models.declare_step_progress_request import DeclareStepProgressRequest as DeclareStepProgressRequest +from koyeb.api.models.decline_organization_invitation_reply import DeclineOrganizationInvitationReply as DeclineOrganizationInvitationReply +from koyeb.api.models.delete_instance_snapshot_reply import DeleteInstanceSnapshotReply as DeleteInstanceSnapshotReply +from koyeb.api.models.delete_organization_reply import DeleteOrganizationReply as DeleteOrganizationReply +from koyeb.api.models.delete_persistent_volume_reply import DeletePersistentVolumeReply as DeletePersistentVolumeReply +from koyeb.api.models.delete_snapshot_reply import DeleteSnapshotReply as DeleteSnapshotReply from koyeb.api.models.delete_user_reply import DeleteUserReply as DeleteUserReply from koyeb.api.models.deployment import Deployment as Deployment -from koyeb.api.models.deployment_database_info import ( - DeploymentDatabaseInfo as DeploymentDatabaseInfo, -) -from koyeb.api.models.deployment_definition import ( - DeploymentDefinition as DeploymentDefinition, -) -from koyeb.api.models.deployment_definition_type import ( - DeploymentDefinitionType as DeploymentDefinitionType, -) +from koyeb.api.models.deployment_database_info import DeploymentDatabaseInfo as DeploymentDatabaseInfo +from koyeb.api.models.deployment_definition import DeploymentDefinition as DeploymentDefinition +from koyeb.api.models.deployment_definition_type import DeploymentDefinitionType as DeploymentDefinitionType from koyeb.api.models.deployment_env import DeploymentEnv as DeploymentEnv from koyeb.api.models.deployment_event import DeploymentEvent as DeploymentEvent -from koyeb.api.models.deployment_health_check import ( - DeploymentHealthCheck as DeploymentHealthCheck, -) -from koyeb.api.models.deployment_instance_type import ( - DeploymentInstanceType as DeploymentInstanceType, -) -from koyeb.api.models.deployment_list_item import ( - DeploymentListItem as DeploymentListItem, -) +from koyeb.api.models.deployment_health_check import DeploymentHealthCheck as DeploymentHealthCheck +from koyeb.api.models.deployment_instance_type import DeploymentInstanceType as DeploymentInstanceType +from koyeb.api.models.deployment_list_item import DeploymentListItem as DeploymentListItem from koyeb.api.models.deployment_mesh import DeploymentMesh as DeploymentMesh -from koyeb.api.models.deployment_metadata import ( - DeploymentMetadata as DeploymentMetadata, -) -from koyeb.api.models.deployment_neon_postgres_database_info import ( - DeploymentNeonPostgresDatabaseInfo as DeploymentNeonPostgresDatabaseInfo, -) -from koyeb.api.models.deployment_neon_postgres_database_info_role import ( - DeploymentNeonPostgresDatabaseInfoRole as DeploymentNeonPostgresDatabaseInfoRole, -) +from koyeb.api.models.deployment_metadata import DeploymentMetadata as DeploymentMetadata +from koyeb.api.models.deployment_neon_postgres_database_info import DeploymentNeonPostgresDatabaseInfo as DeploymentNeonPostgresDatabaseInfo +from koyeb.api.models.deployment_neon_postgres_database_info_role import DeploymentNeonPostgresDatabaseInfoRole as DeploymentNeonPostgresDatabaseInfoRole from koyeb.api.models.deployment_port import DeploymentPort as DeploymentPort -from koyeb.api.models.deployment_provisioning_info import ( - DeploymentProvisioningInfo as DeploymentProvisioningInfo, -) -from koyeb.api.models.deployment_provisioning_info_stage import ( - DeploymentProvisioningInfoStage as DeploymentProvisioningInfoStage, -) -from koyeb.api.models.deployment_provisioning_info_stage_build_attempt import ( - DeploymentProvisioningInfoStageBuildAttempt as DeploymentProvisioningInfoStageBuildAttempt, -) -from koyeb.api.models.deployment_provisioning_info_stage_build_attempt_build_step import ( - DeploymentProvisioningInfoStageBuildAttemptBuildStep as DeploymentProvisioningInfoStageBuildAttemptBuildStep, -) -from koyeb.api.models.deployment_provisioning_info_stage_status import ( - DeploymentProvisioningInfoStageStatus as DeploymentProvisioningInfoStageStatus, -) -from koyeb.api.models.deployment_proxy_port import ( - DeploymentProxyPort as DeploymentProxyPort, -) -from koyeb.api.models.deployment_proxy_port_metadata import ( - DeploymentProxyPortMetadata as DeploymentProxyPortMetadata, -) +from koyeb.api.models.deployment_provisioning_info import DeploymentProvisioningInfo as DeploymentProvisioningInfo +from koyeb.api.models.deployment_provisioning_info_stage import DeploymentProvisioningInfoStage as DeploymentProvisioningInfoStage +from koyeb.api.models.deployment_provisioning_info_stage_build_attempt import DeploymentProvisioningInfoStageBuildAttempt as DeploymentProvisioningInfoStageBuildAttempt +from koyeb.api.models.deployment_provisioning_info_stage_build_attempt_build_step import DeploymentProvisioningInfoStageBuildAttemptBuildStep as DeploymentProvisioningInfoStageBuildAttemptBuildStep +from koyeb.api.models.deployment_provisioning_info_stage_status import DeploymentProvisioningInfoStageStatus as DeploymentProvisioningInfoStageStatus +from koyeb.api.models.deployment_proxy_port import DeploymentProxyPort as DeploymentProxyPort +from koyeb.api.models.deployment_proxy_port_metadata import DeploymentProxyPortMetadata as DeploymentProxyPortMetadata from koyeb.api.models.deployment_role import DeploymentRole as DeploymentRole from koyeb.api.models.deployment_route import DeploymentRoute as DeploymentRoute from koyeb.api.models.deployment_scaling import DeploymentScaling as DeploymentScaling -from koyeb.api.models.deployment_scaling_target import ( - DeploymentScalingTarget as DeploymentScalingTarget, -) -from koyeb.api.models.deployment_scaling_target_average_cpu import ( - DeploymentScalingTargetAverageCPU as DeploymentScalingTargetAverageCPU, -) -from koyeb.api.models.deployment_scaling_target_average_mem import ( - DeploymentScalingTargetAverageMem as DeploymentScalingTargetAverageMem, -) -from koyeb.api.models.deployment_scaling_target_concurrent_requests import ( - DeploymentScalingTargetConcurrentRequests as DeploymentScalingTargetConcurrentRequests, -) -from koyeb.api.models.deployment_scaling_target_requests_per_second import ( - DeploymentScalingTargetRequestsPerSecond as DeploymentScalingTargetRequestsPerSecond, -) -from koyeb.api.models.deployment_scaling_target_requests_response_time import ( - DeploymentScalingTargetRequestsResponseTime as DeploymentScalingTargetRequestsResponseTime, -) -from koyeb.api.models.deployment_scaling_target_sleep_idle_delay import ( - DeploymentScalingTargetSleepIdleDelay as DeploymentScalingTargetSleepIdleDelay, -) +from koyeb.api.models.deployment_scaling_target import DeploymentScalingTarget as DeploymentScalingTarget +from koyeb.api.models.deployment_scaling_target_average_cpu import DeploymentScalingTargetAverageCPU as DeploymentScalingTargetAverageCPU +from koyeb.api.models.deployment_scaling_target_average_mem import DeploymentScalingTargetAverageMem as DeploymentScalingTargetAverageMem +from koyeb.api.models.deployment_scaling_target_concurrent_requests import DeploymentScalingTargetConcurrentRequests as DeploymentScalingTargetConcurrentRequests +from koyeb.api.models.deployment_scaling_target_requests_per_second import DeploymentScalingTargetRequestsPerSecond as DeploymentScalingTargetRequestsPerSecond +from koyeb.api.models.deployment_scaling_target_requests_response_time import DeploymentScalingTargetRequestsResponseTime as DeploymentScalingTargetRequestsResponseTime +from koyeb.api.models.deployment_scaling_target_sleep_idle_delay import DeploymentScalingTargetSleepIdleDelay as DeploymentScalingTargetSleepIdleDelay from koyeb.api.models.deployment_status import DeploymentStatus as DeploymentStatus -from koyeb.api.models.deployment_strategy import ( - DeploymentStrategy as DeploymentStrategy, -) -from koyeb.api.models.deployment_strategy_type import ( - DeploymentStrategyType as DeploymentStrategyType, -) +from koyeb.api.models.deployment_strategy import DeploymentStrategy as DeploymentStrategy +from koyeb.api.models.deployment_strategy_type import DeploymentStrategyType as DeploymentStrategyType from koyeb.api.models.deployment_volume import DeploymentVolume as DeploymentVolume from koyeb.api.models.desired_deployment import DesiredDeployment as DesiredDeployment -from koyeb.api.models.desired_deployment_group import ( - DesiredDeploymentGroup as DesiredDeploymentGroup, -) -from koyeb.api.models.digital_ocean_registry_configuration import ( - DigitalOceanRegistryConfiguration as DigitalOceanRegistryConfiguration, -) -from koyeb.api.models.discourse_auth_reply import ( - DiscourseAuthReply as DiscourseAuthReply, -) -from koyeb.api.models.discourse_auth_request import ( - DiscourseAuthRequest as DiscourseAuthRequest, -) +from koyeb.api.models.desired_deployment_group import DesiredDeploymentGroup as DesiredDeploymentGroup +from koyeb.api.models.digital_ocean_registry_configuration import DigitalOceanRegistryConfiguration as DigitalOceanRegistryConfiguration +from koyeb.api.models.discourse_auth_reply import DiscourseAuthReply as DiscourseAuthReply +from koyeb.api.models.discourse_auth_request import DiscourseAuthRequest as DiscourseAuthRequest from koyeb.api.models.docker_builder import DockerBuilder as DockerBuilder -from koyeb.api.models.docker_hub_registry_configuration import ( - DockerHubRegistryConfiguration as DockerHubRegistryConfiguration, -) +from koyeb.api.models.docker_hub_registry_configuration import DockerHubRegistryConfiguration as DockerHubRegistryConfiguration from koyeb.api.models.docker_source import DockerSource as DockerSource from koyeb.api.models.domain import Domain as Domain -from koyeb.api.models.domain_load_balancer_koyeb import ( - DomainLoadBalancerKoyeb as DomainLoadBalancerKoyeb, -) -from koyeb.api.models.domain_load_balancer_quotas import ( - DomainLoadBalancerQuotas as DomainLoadBalancerQuotas, -) +from koyeb.api.models.domain_load_balancer_koyeb import DomainLoadBalancerKoyeb as DomainLoadBalancerKoyeb +from koyeb.api.models.domain_load_balancer_quotas import DomainLoadBalancerQuotas as DomainLoadBalancerQuotas from koyeb.api.models.domain_status import DomainStatus as DomainStatus from koyeb.api.models.domain_type import DomainType as DomainType from koyeb.api.models.domains_summary import DomainsSummary as DomainsSummary @@ -861,468 +697,210 @@ from koyeb.api.models.error_with_fields import ErrorWithFields as ErrorWithFields from koyeb.api.models.exec_command_io import ExecCommandIO as ExecCommandIO from koyeb.api.models.exec_command_reply import ExecCommandReply as ExecCommandReply -from koyeb.api.models.exec_command_request_body import ( - ExecCommandRequestBody as ExecCommandRequestBody, -) -from koyeb.api.models.exec_command_request_id_type import ( - ExecCommandRequestIdType as ExecCommandRequestIdType, -) -from koyeb.api.models.exec_command_request_terminal_size import ( - ExecCommandRequestTerminalSize as ExecCommandRequestTerminalSize, -) -from koyeb.api.models.gcp_container_registry_configuration import ( - GCPContainerRegistryConfiguration as GCPContainerRegistryConfiguration, -) +from koyeb.api.models.exec_command_request_body import ExecCommandRequestBody as ExecCommandRequestBody +from koyeb.api.models.exec_command_request_id_type import ExecCommandRequestIdType as ExecCommandRequestIdType +from koyeb.api.models.exec_command_request_terminal_size import ExecCommandRequestTerminalSize as ExecCommandRequestTerminalSize +from koyeb.api.models.gcp_container_registry_configuration import GCPContainerRegistryConfiguration as GCPContainerRegistryConfiguration from koyeb.api.models.get_app_reply import GetAppReply as GetAppReply from koyeb.api.models.get_budget_reply import GetBudgetReply as GetBudgetReply -from koyeb.api.models.get_catalog_instance_reply import ( - GetCatalogInstanceReply as GetCatalogInstanceReply, -) -from koyeb.api.models.get_credential_reply import ( - GetCredentialReply as GetCredentialReply, -) -from koyeb.api.models.get_deployment_reply import ( - GetDeploymentReply as GetDeploymentReply, -) -from koyeb.api.models.get_deployment_scaling_reply import ( - GetDeploymentScalingReply as GetDeploymentScalingReply, -) -from koyeb.api.models.get_deployment_scaling_reply_item import ( - GetDeploymentScalingReplyItem as GetDeploymentScalingReplyItem, -) +from koyeb.api.models.get_catalog_instance_reply import GetCatalogInstanceReply as GetCatalogInstanceReply +from koyeb.api.models.get_credential_reply import GetCredentialReply as GetCredentialReply +from koyeb.api.models.get_deployment_reply import GetDeploymentReply as GetDeploymentReply +from koyeb.api.models.get_deployment_scaling_reply import GetDeploymentScalingReply as GetDeploymentScalingReply +from koyeb.api.models.get_deployment_scaling_reply_item import GetDeploymentScalingReplyItem as GetDeploymentScalingReplyItem from koyeb.api.models.get_domain_reply import GetDomainReply as GetDomainReply -from koyeb.api.models.get_github_installation_reply import ( - GetGithubInstallationReply as GetGithubInstallationReply, -) -from koyeb.api.models.get_idenfy_token_reply import ( - GetIdenfyTokenReply as GetIdenfyTokenReply, -) +from koyeb.api.models.get_github_installation_reply import GetGithubInstallationReply as GetGithubInstallationReply +from koyeb.api.models.get_idenfy_token_reply import GetIdenfyTokenReply as GetIdenfyTokenReply from koyeb.api.models.get_instance_reply import GetInstanceReply as GetInstanceReply -from koyeb.api.models.get_instance_snapshot_reply import ( - GetInstanceSnapshotReply as GetInstanceSnapshotReply, -) -from koyeb.api.models.get_intercom_profile_reply import ( - GetIntercomProfileReply as GetIntercomProfileReply, -) +from koyeb.api.models.get_instance_snapshot_reply import GetInstanceSnapshotReply as GetInstanceSnapshotReply +from koyeb.api.models.get_intercom_profile_reply import GetIntercomProfileReply as GetIntercomProfileReply from koyeb.api.models.get_metrics_reply import GetMetricsReply as GetMetricsReply -from koyeb.api.models.get_metrics_reply_metric import ( - GetMetricsReplyMetric as GetMetricsReplyMetric, -) -from koyeb.api.models.get_o_auth_options_reply import ( - GetOAuthOptionsReply as GetOAuthOptionsReply, -) -from koyeb.api.models.get_organization_invitation_reply import ( - GetOrganizationInvitationReply as GetOrganizationInvitationReply, -) -from koyeb.api.models.get_organization_quotas_usage_reply import ( - GetOrganizationQuotasUsageReply as GetOrganizationQuotasUsageReply, -) -from koyeb.api.models.get_organization_reply import ( - GetOrganizationReply as GetOrganizationReply, -) -from koyeb.api.models.get_organization_summary_reply import ( - GetOrganizationSummaryReply as GetOrganizationSummaryReply, -) -from koyeb.api.models.get_organization_usage_details_reply import ( - GetOrganizationUsageDetailsReply as GetOrganizationUsageDetailsReply, -) -from koyeb.api.models.get_organization_usage_reply import ( - GetOrganizationUsageReply as GetOrganizationUsageReply, -) -from koyeb.api.models.get_payment_method_reply import ( - GetPaymentMethodReply as GetPaymentMethodReply, -) -from koyeb.api.models.get_persistent_volume_reply import ( - GetPersistentVolumeReply as GetPersistentVolumeReply, -) +from koyeb.api.models.get_metrics_reply_metric import GetMetricsReplyMetric as GetMetricsReplyMetric +from koyeb.api.models.get_o_auth_options_reply import GetOAuthOptionsReply as GetOAuthOptionsReply +from koyeb.api.models.get_organization_invitation_reply import GetOrganizationInvitationReply as GetOrganizationInvitationReply +from koyeb.api.models.get_organization_quotas_usage_reply import GetOrganizationQuotasUsageReply as GetOrganizationQuotasUsageReply +from koyeb.api.models.get_organization_reply import GetOrganizationReply as GetOrganizationReply +from koyeb.api.models.get_organization_summary_reply import GetOrganizationSummaryReply as GetOrganizationSummaryReply +from koyeb.api.models.get_organization_usage_details_reply import GetOrganizationUsageDetailsReply as GetOrganizationUsageDetailsReply +from koyeb.api.models.get_organization_usage_reply import GetOrganizationUsageReply as GetOrganizationUsageReply +from koyeb.api.models.get_payment_method_reply import GetPaymentMethodReply as GetPaymentMethodReply +from koyeb.api.models.get_persistent_volume_reply import GetPersistentVolumeReply as GetPersistentVolumeReply from koyeb.api.models.get_pool_claim_reply import GetPoolClaimReply as GetPoolClaimReply from koyeb.api.models.get_project_reply import GetProjectReply as GetProjectReply from koyeb.api.models.get_quotas_reply import GetQuotasReply as GetQuotasReply from koyeb.api.models.get_region_reply import GetRegionReply as GetRegionReply -from koyeb.api.models.get_regional_deployment_reply import ( - GetRegionalDeploymentReply as GetRegionalDeploymentReply, -) +from koyeb.api.models.get_regional_deployment_reply import GetRegionalDeploymentReply as GetRegionalDeploymentReply from koyeb.api.models.get_secret_reply import GetSecretReply as GetSecretReply -from koyeb.api.models.get_service_pool_reply import ( - GetServicePoolReply as GetServicePoolReply, -) +from koyeb.api.models.get_service_pool_reply import GetServicePoolReply as GetServicePoolReply from koyeb.api.models.get_service_reply import GetServiceReply as GetServiceReply -from koyeb.api.models.get_service_scaling_reply import ( - GetServiceScalingReply as GetServiceScalingReply, -) +from koyeb.api.models.get_service_scaling_reply import GetServiceScalingReply as GetServiceScalingReply from koyeb.api.models.get_snapshot_reply import GetSnapshotReply as GetSnapshotReply -from koyeb.api.models.get_subscription_reply import ( - GetSubscriptionReply as GetSubscriptionReply, -) -from koyeb.api.models.get_user_organization_invitation_reply import ( - GetUserOrganizationInvitationReply as GetUserOrganizationInvitationReply, -) -from koyeb.api.models.get_user_settings_reply import ( - GetUserSettingsReply as GetUserSettingsReply, -) -from koyeb.api.models.git_deployment_metadata import ( - GitDeploymentMetadata as GitDeploymentMetadata, -) -from koyeb.api.models.git_env_deployment_metadata import ( - GitEnvDeploymentMetadata as GitEnvDeploymentMetadata, -) -from koyeb.api.models.git_hub_registry_configuration import ( - GitHubRegistryConfiguration as GitHubRegistryConfiguration, -) -from koyeb.api.models.git_lab_registry_configuration import ( - GitLabRegistryConfiguration as GitLabRegistryConfiguration, -) +from koyeb.api.models.get_subscription_reply import GetSubscriptionReply as GetSubscriptionReply +from koyeb.api.models.get_user_organization_invitation_reply import GetUserOrganizationInvitationReply as GetUserOrganizationInvitationReply +from koyeb.api.models.get_user_settings_reply import GetUserSettingsReply as GetUserSettingsReply +from koyeb.api.models.git_deployment_metadata import GitDeploymentMetadata as GitDeploymentMetadata +from koyeb.api.models.git_env_deployment_metadata import GitEnvDeploymentMetadata as GitEnvDeploymentMetadata +from koyeb.api.models.git_hub_registry_configuration import GitHubRegistryConfiguration as GitHubRegistryConfiguration +from koyeb.api.models.git_lab_registry_configuration import GitLabRegistryConfiguration as GitLabRegistryConfiguration from koyeb.api.models.git_source import GitSource as GitSource -from koyeb.api.models.github_installation_reply import ( - GithubInstallationReply as GithubInstallationReply, -) -from koyeb.api.models.github_installation_request import ( - GithubInstallationRequest as GithubInstallationRequest, -) +from koyeb.api.models.github_installation_reply import GithubInstallationReply as GithubInstallationReply +from koyeb.api.models.github_installation_request import GithubInstallationRequest as GithubInstallationRequest from koyeb.api.models.google_protobuf_any import GoogleProtobufAny as GoogleProtobufAny -from koyeb.api.models.google_protobuf_null_value import ( - GoogleProtobufNullValue as GoogleProtobufNullValue, -) +from koyeb.api.models.google_protobuf_null_value import GoogleProtobufNullValue as GoogleProtobufNullValue from koyeb.api.models.google_rpc_status import GoogleRpcStatus as GoogleRpcStatus from koyeb.api.models.http_header import HTTPHeader as HTTPHeader from koyeb.api.models.http_health_check import HTTPHealthCheck as HTTPHealthCheck -from koyeb.api.models.has_unpaid_invoices_reply import ( - HasUnpaidInvoicesReply as HasUnpaidInvoicesReply, -) +from koyeb.api.models.has_unpaid_invoices_reply import HasUnpaidInvoicesReply as HasUnpaidInvoicesReply from koyeb.api.models.instance import Instance as Instance -from koyeb.api.models.instance_availability import ( - InstanceAvailability as InstanceAvailability, -) +from koyeb.api.models.instance_availability import InstanceAvailability as InstanceAvailability from koyeb.api.models.instance_event import InstanceEvent as InstanceEvent from koyeb.api.models.instance_list_item import InstanceListItem as InstanceListItem from koyeb.api.models.instance_snapshot import InstanceSnapshot as InstanceSnapshot -from koyeb.api.models.instance_snapshot_event import ( - InstanceSnapshotEvent as InstanceSnapshotEvent, -) -from koyeb.api.models.instance_snapshot_quotas import ( - InstanceSnapshotQuotas as InstanceSnapshotQuotas, -) -from koyeb.api.models.instance_snapshot_status import ( - InstanceSnapshotStatus as InstanceSnapshotStatus, -) -from koyeb.api.models.instance_snapshot_type import ( - InstanceSnapshotType as InstanceSnapshotType, -) -from koyeb.api.models.instance_snapshot_type_usage import ( - InstanceSnapshotTypeUsage as InstanceSnapshotTypeUsage, -) +from koyeb.api.models.instance_snapshot_event import InstanceSnapshotEvent as InstanceSnapshotEvent +from koyeb.api.models.instance_snapshot_quotas import InstanceSnapshotQuotas as InstanceSnapshotQuotas +from koyeb.api.models.instance_snapshot_status import InstanceSnapshotStatus as InstanceSnapshotStatus +from koyeb.api.models.instance_snapshot_type import InstanceSnapshotType as InstanceSnapshotType +from koyeb.api.models.instance_snapshot_type_usage import InstanceSnapshotTypeUsage as InstanceSnapshotTypeUsage from koyeb.api.models.instance_status import InstanceStatus as InstanceStatus from koyeb.api.models.instance_type_usage import InstanceTypeUsage as InstanceTypeUsage from koyeb.api.models.instance_usage import InstanceUsage as InstanceUsage from koyeb.api.models.instances_summary import InstancesSummary as InstancesSummary from koyeb.api.models.invite_user_request import InviteUserRequest as InviteUserRequest from koyeb.api.models.kgitproxy_branch import KgitproxyBranch as KgitproxyBranch -from koyeb.api.models.kgitproxy_git_hub_repository import ( - KgitproxyGitHubRepository as KgitproxyGitHubRepository, -) -from koyeb.api.models.kgitproxy_github_installation_status import ( - KgitproxyGithubInstallationStatus as KgitproxyGithubInstallationStatus, -) -from koyeb.api.models.kgitproxy_indexing_status import ( - KgitproxyIndexingStatus as KgitproxyIndexingStatus, -) -from koyeb.api.models.kgitproxy_list_branches_reply import ( - KgitproxyListBranchesReply as KgitproxyListBranchesReply, -) -from koyeb.api.models.kgitproxy_list_repositories_reply import ( - KgitproxyListRepositoriesReply as KgitproxyListRepositoriesReply, -) -from koyeb.api.models.kgitproxy_repository import ( - KgitproxyRepository as KgitproxyRepository, -) -from koyeb.api.models.kgitproxy_repository_provider import ( - KgitproxyRepositoryProvider as KgitproxyRepositoryProvider, -) +from koyeb.api.models.kgitproxy_git_hub_repository import KgitproxyGitHubRepository as KgitproxyGitHubRepository +from koyeb.api.models.kgitproxy_github_installation_status import KgitproxyGithubInstallationStatus as KgitproxyGithubInstallationStatus +from koyeb.api.models.kgitproxy_indexing_status import KgitproxyIndexingStatus as KgitproxyIndexingStatus +from koyeb.api.models.kgitproxy_list_branches_reply import KgitproxyListBranchesReply as KgitproxyListBranchesReply +from koyeb.api.models.kgitproxy_list_repositories_reply import KgitproxyListRepositoriesReply as KgitproxyListRepositoriesReply +from koyeb.api.models.kgitproxy_repository import KgitproxyRepository as KgitproxyRepository +from koyeb.api.models.kgitproxy_repository_provider import KgitproxyRepositoryProvider as KgitproxyRepositoryProvider from koyeb.api.models.ksearch_app import KsearchApp as KsearchApp -from koyeb.api.models.ksearch_global_deployment import ( - KsearchGlobalDeployment as KsearchGlobalDeployment, -) +from koyeb.api.models.ksearch_global_deployment import KsearchGlobalDeployment as KsearchGlobalDeployment from koyeb.api.models.ksearch_instance import KsearchInstance as KsearchInstance -from koyeb.api.models.ksearch_organization import ( - KsearchOrganization as KsearchOrganization, -) -from koyeb.api.models.ksearch_regional_deployment import ( - KsearchRegionalDeployment as KsearchRegionalDeployment, -) -from koyeb.api.models.ksearch_search_reply import ( - KsearchSearchReply as KsearchSearchReply, -) +from koyeb.api.models.ksearch_organization import KsearchOrganization as KsearchOrganization +from koyeb.api.models.ksearch_regional_deployment import KsearchRegionalDeployment as KsearchRegionalDeployment +from koyeb.api.models.ksearch_search_reply import KsearchSearchReply as KsearchSearchReply from koyeb.api.models.ksearch_service import KsearchService as KsearchService from koyeb.api.models.ksearch_user import KsearchUser as KsearchUser -from koyeb.api.models.ktest_test_auth_reply import ( - KtestTestAuthReply as KtestTestAuthReply, -) -from koyeb.api.models.ktest_test_auth_request import ( - KtestTestAuthRequest as KtestTestAuthRequest, -) +from koyeb.api.models.ktest_test_auth_reply import KtestTestAuthReply as KtestTestAuthReply +from koyeb.api.models.ktest_test_auth_request import KtestTestAuthRequest as KtestTestAuthRequest from koyeb.api.models.lifecycle_quotas import LifecycleQuotas as LifecycleQuotas -from koyeb.api.models.list_app_events_reply import ( - ListAppEventsReply as ListAppEventsReply, -) +from koyeb.api.models.list_app_events_reply import ListAppEventsReply as ListAppEventsReply from koyeb.api.models.list_apps_reply import ListAppsReply as ListAppsReply -from koyeb.api.models.list_catalog_instances_reply import ( - ListCatalogInstancesReply as ListCatalogInstancesReply, -) -from koyeb.api.models.list_credentials_reply import ( - ListCredentialsReply as ListCredentialsReply, -) -from koyeb.api.models.list_datacenters_reply import ( - ListDatacentersReply as ListDatacentersReply, -) -from koyeb.api.models.list_deployment_events_reply import ( - ListDeploymentEventsReply as ListDeploymentEventsReply, -) -from koyeb.api.models.list_deployments_reply import ( - ListDeploymentsReply as ListDeploymentsReply, -) +from koyeb.api.models.list_catalog_instances_reply import ListCatalogInstancesReply as ListCatalogInstancesReply +from koyeb.api.models.list_credentials_reply import ListCredentialsReply as ListCredentialsReply +from koyeb.api.models.list_datacenters_reply import ListDatacentersReply as ListDatacentersReply +from koyeb.api.models.list_deployment_events_reply import ListDeploymentEventsReply as ListDeploymentEventsReply +from koyeb.api.models.list_deployments_reply import ListDeploymentsReply as ListDeploymentsReply from koyeb.api.models.list_domains_reply import ListDomainsReply as ListDomainsReply -from koyeb.api.models.list_instance_events_reply import ( - ListInstanceEventsReply as ListInstanceEventsReply, -) -from koyeb.api.models.list_instance_snapshot_events_reply import ( - ListInstanceSnapshotEventsReply as ListInstanceSnapshotEventsReply, -) -from koyeb.api.models.list_instance_snapshots_reply import ( - ListInstanceSnapshotsReply as ListInstanceSnapshotsReply, -) -from koyeb.api.models.list_instances_reply import ( - ListInstancesReply as ListInstancesReply, -) -from koyeb.api.models.list_organization_invitations_reply import ( - ListOrganizationInvitationsReply as ListOrganizationInvitationsReply, -) -from koyeb.api.models.list_organization_members_reply import ( - ListOrganizationMembersReply as ListOrganizationMembersReply, -) -from koyeb.api.models.list_payment_methods_reply import ( - ListPaymentMethodsReply as ListPaymentMethodsReply, -) -from koyeb.api.models.list_persistent_volume_events_reply import ( - ListPersistentVolumeEventsReply as ListPersistentVolumeEventsReply, -) -from koyeb.api.models.list_persistent_volumes_reply import ( - ListPersistentVolumesReply as ListPersistentVolumesReply, -) -from koyeb.api.models.list_pool_claim_reply import ( - ListPoolClaimReply as ListPoolClaimReply, -) +from koyeb.api.models.list_instance_events_reply import ListInstanceEventsReply as ListInstanceEventsReply +from koyeb.api.models.list_instance_snapshot_events_reply import ListInstanceSnapshotEventsReply as ListInstanceSnapshotEventsReply +from koyeb.api.models.list_instance_snapshots_reply import ListInstanceSnapshotsReply as ListInstanceSnapshotsReply +from koyeb.api.models.list_instances_reply import ListInstancesReply as ListInstancesReply +from koyeb.api.models.list_organization_invitations_reply import ListOrganizationInvitationsReply as ListOrganizationInvitationsReply +from koyeb.api.models.list_organization_members_reply import ListOrganizationMembersReply as ListOrganizationMembersReply +from koyeb.api.models.list_payment_methods_reply import ListPaymentMethodsReply as ListPaymentMethodsReply +from koyeb.api.models.list_persistent_volume_events_reply import ListPersistentVolumeEventsReply as ListPersistentVolumeEventsReply +from koyeb.api.models.list_persistent_volumes_reply import ListPersistentVolumesReply as ListPersistentVolumesReply +from koyeb.api.models.list_pool_claim_reply import ListPoolClaimReply as ListPoolClaimReply from koyeb.api.models.list_projects_reply import ListProjectsReply as ListProjectsReply -from koyeb.api.models.list_regional_deployment_events_reply import ( - ListRegionalDeploymentEventsReply as ListRegionalDeploymentEventsReply, -) -from koyeb.api.models.list_regional_deployments_reply import ( - ListRegionalDeploymentsReply as ListRegionalDeploymentsReply, -) +from koyeb.api.models.list_regional_deployment_events_reply import ListRegionalDeploymentEventsReply as ListRegionalDeploymentEventsReply +from koyeb.api.models.list_regional_deployments_reply import ListRegionalDeploymentsReply as ListRegionalDeploymentsReply from koyeb.api.models.list_regions_reply import ListRegionsReply as ListRegionsReply from koyeb.api.models.list_secrets_reply import ListSecretsReply as ListSecretsReply -from koyeb.api.models.list_service_events_reply import ( - ListServiceEventsReply as ListServiceEventsReply, -) -from koyeb.api.models.list_service_pools_reply import ( - ListServicePoolsReply as ListServicePoolsReply, -) +from koyeb.api.models.list_service_events_reply import ListServiceEventsReply as ListServiceEventsReply +from koyeb.api.models.list_service_pools_reply import ListServicePoolsReply as ListServicePoolsReply from koyeb.api.models.list_services_reply import ListServicesReply as ListServicesReply -from koyeb.api.models.list_snapshots_reply import ( - ListSnapshotsReply as ListSnapshotsReply, -) +from koyeb.api.models.list_snapshots_reply import ListSnapshotsReply as ListSnapshotsReply from koyeb.api.models.list_usage_reply import ListUsageReply as ListUsageReply -from koyeb.api.models.list_user_organization_invitations_reply import ( - ListUserOrganizationInvitationsReply as ListUserOrganizationInvitationsReply, -) -from koyeb.api.models.list_user_organizations_reply import ( - ListUserOrganizationsReply as ListUserOrganizationsReply, -) +from koyeb.api.models.list_user_organization_invitations_reply import ListUserOrganizationInvitationsReply as ListUserOrganizationInvitationsReply +from koyeb.api.models.list_user_organizations_reply import ListUserOrganizationsReply as ListUserOrganizationsReply from koyeb.api.models.log_entry import LogEntry as LogEntry from koyeb.api.models.login_method_reply import LoginMethodReply as LoginMethodReply -from koyeb.api.models.login_method_reply_method import ( - LoginMethodReplyMethod as LoginMethodReplyMethod, -) +from koyeb.api.models.login_method_reply_method import LoginMethodReplyMethod as LoginMethodReplyMethod from koyeb.api.models.login_reply import LoginReply as LoginReply from koyeb.api.models.login_request import LoginRequest as LoginRequest from koyeb.api.models.manage_reply import ManageReply as ManageReply -from koyeb.api.models.manual_service_scaling import ( - ManualServiceScaling as ManualServiceScaling, -) +from koyeb.api.models.manual_service_scaling import ManualServiceScaling as ManualServiceScaling from koyeb.api.models.members_summary import MembersSummary as MembersSummary from koyeb.api.models.mesh import Mesh as Mesh from koyeb.api.models.mesh_scope import MeshScope as MeshScope from koyeb.api.models.metric_name import MetricName as MetricName -from koyeb.api.models.neon_postgres_database import ( - NeonPostgresDatabase as NeonPostgresDatabase, -) -from koyeb.api.models.neon_postgres_database_deployment_metadata import ( - NeonPostgresDatabaseDeploymentMetadata as NeonPostgresDatabaseDeploymentMetadata, -) -from koyeb.api.models.neon_postgres_database_neon_database import ( - NeonPostgresDatabaseNeonDatabase as NeonPostgresDatabaseNeonDatabase, -) -from koyeb.api.models.neon_postgres_database_neon_role import ( - NeonPostgresDatabaseNeonRole as NeonPostgresDatabaseNeonRole, -) -from koyeb.api.models.neon_postgres_summary import ( - NeonPostgresSummary as NeonPostgresSummary, -) +from koyeb.api.models.neon_postgres_database import NeonPostgresDatabase as NeonPostgresDatabase +from koyeb.api.models.neon_postgres_database_deployment_metadata import NeonPostgresDatabaseDeploymentMetadata as NeonPostgresDatabaseDeploymentMetadata +from koyeb.api.models.neon_postgres_database_neon_database import NeonPostgresDatabaseNeonDatabase as NeonPostgresDatabaseNeonDatabase +from koyeb.api.models.neon_postgres_database_neon_role import NeonPostgresDatabaseNeonRole as NeonPostgresDatabaseNeonRole +from koyeb.api.models.neon_postgres_summary import NeonPostgresSummary as NeonPostgresSummary from koyeb.api.models.network_policy import NetworkPolicy as NetworkPolicy -from koyeb.api.models.network_policy_destination import ( - NetworkPolicyDestination as NetworkPolicyDestination, -) +from koyeb.api.models.network_policy_destination import NetworkPolicyDestination as NetworkPolicyDestination from koyeb.api.models.next_invoice_reply import NextInvoiceReply as NextInvoiceReply -from koyeb.api.models.next_invoice_reply_discount import ( - NextInvoiceReplyDiscount as NextInvoiceReplyDiscount, -) -from koyeb.api.models.next_invoice_reply_discount_type import ( - NextInvoiceReplyDiscountType as NextInvoiceReplyDiscountType, -) -from koyeb.api.models.next_invoice_reply_line import ( - NextInvoiceReplyLine as NextInvoiceReplyLine, -) -from koyeb.api.models.next_invoice_reply_line_period import ( - NextInvoiceReplyLinePeriod as NextInvoiceReplyLinePeriod, -) -from koyeb.api.models.next_invoice_reply_line_price import ( - NextInvoiceReplyLinePrice as NextInvoiceReplyLinePrice, -) +from koyeb.api.models.next_invoice_reply_discount import NextInvoiceReplyDiscount as NextInvoiceReplyDiscount +from koyeb.api.models.next_invoice_reply_discount_type import NextInvoiceReplyDiscountType as NextInvoiceReplyDiscountType +from koyeb.api.models.next_invoice_reply_line import NextInvoiceReplyLine as NextInvoiceReplyLine +from koyeb.api.models.next_invoice_reply_line_period import NextInvoiceReplyLinePeriod as NextInvoiceReplyLinePeriod +from koyeb.api.models.next_invoice_reply_line_price import NextInvoiceReplyLinePrice as NextInvoiceReplyLinePrice from koyeb.api.models.notification import Notification as Notification from koyeb.api.models.notification_list import NotificationList as NotificationList -from koyeb.api.models.o_auth_callback_reply import ( - OAuthCallbackReply as OAuthCallbackReply, -) -from koyeb.api.models.o_auth_callback_request import ( - OAuthCallbackRequest as OAuthCallbackRequest, -) +from koyeb.api.models.o_auth_callback_reply import OAuthCallbackReply as OAuthCallbackReply +from koyeb.api.models.o_auth_callback_request import OAuthCallbackRequest as OAuthCallbackRequest from koyeb.api.models.o_auth_provider import OAuthProvider as OAuthProvider from koyeb.api.models.object import Object as Object from koyeb.api.models.organization import Organization as Organization -from koyeb.api.models.organization_deactivation_reason import ( - OrganizationDeactivationReason as OrganizationDeactivationReason, -) -from koyeb.api.models.organization_detailed_status import ( - OrganizationDetailedStatus as OrganizationDetailedStatus, -) -from koyeb.api.models.organization_invitation import ( - OrganizationInvitation as OrganizationInvitation, -) -from koyeb.api.models.organization_invitation_status import ( - OrganizationInvitationStatus as OrganizationInvitationStatus, -) -from koyeb.api.models.organization_member import ( - OrganizationMember as OrganizationMember, -) -from koyeb.api.models.organization_member_status import ( - OrganizationMemberStatus as OrganizationMemberStatus, -) -from koyeb.api.models.organization_status import ( - OrganizationStatus as OrganizationStatus, -) -from koyeb.api.models.organization_summary import ( - OrganizationSummary as OrganizationSummary, -) +from koyeb.api.models.organization_deactivation_reason import OrganizationDeactivationReason as OrganizationDeactivationReason +from koyeb.api.models.organization_detailed_status import OrganizationDetailedStatus as OrganizationDetailedStatus +from koyeb.api.models.organization_invitation import OrganizationInvitation as OrganizationInvitation +from koyeb.api.models.organization_invitation_status import OrganizationInvitationStatus as OrganizationInvitationStatus +from koyeb.api.models.organization_member import OrganizationMember as OrganizationMember +from koyeb.api.models.organization_member_status import OrganizationMemberStatus as OrganizationMemberStatus +from koyeb.api.models.organization_status import OrganizationStatus as OrganizationStatus +from koyeb.api.models.organization_summary import OrganizationSummary as OrganizationSummary from koyeb.api.models.payment_method import PaymentMethod as PaymentMethod -from koyeb.api.models.payment_method_status import ( - PaymentMethodStatus as PaymentMethodStatus, -) +from koyeb.api.models.payment_method_status import PaymentMethodStatus as PaymentMethodStatus from koyeb.api.models.period_usage import PeriodUsage as PeriodUsage from koyeb.api.models.persistent_volume import PersistentVolume as PersistentVolume -from koyeb.api.models.persistent_volume_backing_store import ( - PersistentVolumeBackingStore as PersistentVolumeBackingStore, -) -from koyeb.api.models.persistent_volume_event import ( - PersistentVolumeEvent as PersistentVolumeEvent, -) -from koyeb.api.models.persistent_volume_quotas import ( - PersistentVolumeQuotas as PersistentVolumeQuotas, -) -from koyeb.api.models.persistent_volume_region_usage import ( - PersistentVolumeRegionUsage as PersistentVolumeRegionUsage, -) -from koyeb.api.models.persistent_volume_status import ( - PersistentVolumeStatus as PersistentVolumeStatus, -) +from koyeb.api.models.persistent_volume_backing_store import PersistentVolumeBackingStore as PersistentVolumeBackingStore +from koyeb.api.models.persistent_volume_event import PersistentVolumeEvent as PersistentVolumeEvent +from koyeb.api.models.persistent_volume_quotas import PersistentVolumeQuotas as PersistentVolumeQuotas +from koyeb.api.models.persistent_volume_region_usage import PersistentVolumeRegionUsage as PersistentVolumeRegionUsage +from koyeb.api.models.persistent_volume_status import PersistentVolumeStatus as PersistentVolumeStatus from koyeb.api.models.plan import Plan as Plan from koyeb.api.models.pool_claim import PoolClaim as PoolClaim from koyeb.api.models.pool_claim_reply import PoolClaimReply as PoolClaimReply from koyeb.api.models.pool_claim_request import PoolClaimRequest as PoolClaimRequest from koyeb.api.models.pool_claim_status import PoolClaimStatus as PoolClaimStatus from koyeb.api.models.port import Port as Port -from koyeb.api.models.private_registry_configuration import ( - PrivateRegistryConfiguration as PrivateRegistryConfiguration, -) +from koyeb.api.models.private_registry_configuration import PrivateRegistryConfiguration as PrivateRegistryConfiguration from koyeb.api.models.project import Project as Project from koyeb.api.models.proxy_port_protocol import ProxyPortProtocol as ProxyPortProtocol -from koyeb.api.models.public_organization import ( - PublicOrganization as PublicOrganization, -) +from koyeb.api.models.public_organization import PublicOrganization as PublicOrganization from koyeb.api.models.public_user import PublicUser as PublicUser from koyeb.api.models.query_logs_reply import QueryLogsReply as QueryLogsReply -from koyeb.api.models.query_logs_reply_pagination import ( - QueryLogsReplyPagination as QueryLogsReplyPagination, -) +from koyeb.api.models.query_logs_reply_pagination import QueryLogsReplyPagination as QueryLogsReplyPagination from koyeb.api.models.quota_usage import QuotaUsage as QuotaUsage from koyeb.api.models.quotas import Quotas as Quotas -from koyeb.api.models.reactivate_organization_reply import ( - ReactivateOrganizationReply as ReactivateOrganizationReply, -) -from koyeb.api.models.redeem_coupon_request import ( - RedeemCouponRequest as RedeemCouponRequest, -) +from koyeb.api.models.reactivate_organization_reply import ReactivateOrganizationReply as ReactivateOrganizationReply +from koyeb.api.models.redeem_coupon_request import RedeemCouponRequest as RedeemCouponRequest from koyeb.api.models.redeploy_reply import RedeployReply as RedeployReply -from koyeb.api.models.redeploy_request_info import ( - RedeployRequestInfo as RedeployRequestInfo, -) +from koyeb.api.models.redeploy_request_info import RedeployRequestInfo as RedeployRequestInfo from koyeb.api.models.region import Region as Region -from koyeb.api.models.region_availability import ( - RegionAvailability as RegionAvailability, -) +from koyeb.api.models.region_availability import RegionAvailability as RegionAvailability from koyeb.api.models.region_list_item import RegionListItem as RegionListItem from koyeb.api.models.region_usage import RegionUsage as RegionUsage -from koyeb.api.models.regional_deployment import ( - RegionalDeployment as RegionalDeployment, -) -from koyeb.api.models.regional_deployment_definition import ( - RegionalDeploymentDefinition as RegionalDeploymentDefinition, -) -from koyeb.api.models.regional_deployment_definition_type import ( - RegionalDeploymentDefinitionType as RegionalDeploymentDefinitionType, -) -from koyeb.api.models.regional_deployment_event import ( - RegionalDeploymentEvent as RegionalDeploymentEvent, -) -from koyeb.api.models.regional_deployment_list_item import ( - RegionalDeploymentListItem as RegionalDeploymentListItem, -) -from koyeb.api.models.regional_deployment_mesh import ( - RegionalDeploymentMesh as RegionalDeploymentMesh, -) -from koyeb.api.models.regional_deployment_role import ( - RegionalDeploymentRole as RegionalDeploymentRole, -) -from koyeb.api.models.regional_deployment_status import ( - RegionalDeploymentStatus as RegionalDeploymentStatus, -) -from koyeb.api.models.regional_deployment_volume import ( - RegionalDeploymentVolume as RegionalDeploymentVolume, -) -from koyeb.api.models.remove_organization_member_reply import ( - RemoveOrganizationMemberReply as RemoveOrganizationMemberReply, -) -from koyeb.api.models.resend_organization_invitation_reply import ( - ResendOrganizationInvitationReply as ResendOrganizationInvitationReply, -) -from koyeb.api.models.reset_password_request import ( - ResetPasswordRequest as ResetPasswordRequest, -) +from koyeb.api.models.regional_deployment import RegionalDeployment as RegionalDeployment +from koyeb.api.models.regional_deployment_definition import RegionalDeploymentDefinition as RegionalDeploymentDefinition +from koyeb.api.models.regional_deployment_definition_type import RegionalDeploymentDefinitionType as RegionalDeploymentDefinitionType +from koyeb.api.models.regional_deployment_event import RegionalDeploymentEvent as RegionalDeploymentEvent +from koyeb.api.models.regional_deployment_list_item import RegionalDeploymentListItem as RegionalDeploymentListItem +from koyeb.api.models.regional_deployment_mesh import RegionalDeploymentMesh as RegionalDeploymentMesh +from koyeb.api.models.regional_deployment_role import RegionalDeploymentRole as RegionalDeploymentRole +from koyeb.api.models.regional_deployment_status import RegionalDeploymentStatus as RegionalDeploymentStatus +from koyeb.api.models.regional_deployment_volume import RegionalDeploymentVolume as RegionalDeploymentVolume +from koyeb.api.models.remove_organization_member_reply import RemoveOrganizationMemberReply as RemoveOrganizationMemberReply +from koyeb.api.models.resend_organization_invitation_reply import ResendOrganizationInvitationReply as ResendOrganizationInvitationReply +from koyeb.api.models.reset_password_request import ResetPasswordRequest as ResetPasswordRequest from koyeb.api.models.reveal_secret_reply import RevealSecretReply as RevealSecretReply -from koyeb.api.models.review_organization_capacity_reply import ( - ReviewOrganizationCapacityReply as ReviewOrganizationCapacityReply, -) -from koyeb.api.models.review_organization_capacity_request import ( - ReviewOrganizationCapacityRequest as ReviewOrganizationCapacityRequest, -) +from koyeb.api.models.review_organization_capacity_reply import ReviewOrganizationCapacityReply as ReviewOrganizationCapacityReply +from koyeb.api.models.review_organization_capacity_request import ReviewOrganizationCapacityRequest as ReviewOrganizationCapacityRequest from koyeb.api.models.route import Route as Route from koyeb.api.models.sample import Sample as Sample from koyeb.api.models.sandbox_metadata import SandboxMetadata as SandboxMetadata @@ -1346,116 +924,50 @@ from koyeb.api.models.snapshot import Snapshot as Snapshot from koyeb.api.models.snapshot_status import SnapshotStatus as SnapshotStatus from koyeb.api.models.snapshot_type import SnapshotType as SnapshotType -from koyeb.api.models.stream_result_of_exec_command_reply import ( - StreamResultOfExecCommandReply as StreamResultOfExecCommandReply, -) -from koyeb.api.models.stream_result_of_log_entry import ( - StreamResultOfLogEntry as StreamResultOfLogEntry, -) +from koyeb.api.models.stream_result_of_exec_command_reply import StreamResultOfExecCommandReply as StreamResultOfExecCommandReply +from koyeb.api.models.stream_result_of_log_entry import StreamResultOfLogEntry as StreamResultOfLogEntry from koyeb.api.models.subscription import Subscription as Subscription -from koyeb.api.models.subscription_payment_failure import ( - SubscriptionPaymentFailure as SubscriptionPaymentFailure, -) -from koyeb.api.models.subscription_payment_failure_stripe_sdk import ( - SubscriptionPaymentFailureStripeSDK as SubscriptionPaymentFailureStripeSDK, -) -from koyeb.api.models.subscription_status import ( - SubscriptionStatus as SubscriptionStatus, -) +from koyeb.api.models.subscription_payment_failure import SubscriptionPaymentFailure as SubscriptionPaymentFailure +from koyeb.api.models.subscription_payment_failure_stripe_sdk import SubscriptionPaymentFailureStripeSDK as SubscriptionPaymentFailureStripeSDK +from koyeb.api.models.subscription_status import SubscriptionStatus as SubscriptionStatus from koyeb.api.models.tcp_health_check import TCPHealthCheck as TCPHealthCheck from koyeb.api.models.token import Token as Token -from koyeb.api.models.trigger_deployment_metadata import ( - TriggerDeploymentMetadata as TriggerDeploymentMetadata, -) -from koyeb.api.models.trigger_deployment_metadata_actor_type import ( - TriggerDeploymentMetadataActorType as TriggerDeploymentMetadataActorType, -) -from koyeb.api.models.trigger_deployment_metadata_trigger_type import ( - TriggerDeploymentMetadataTriggerType as TriggerDeploymentMetadataTriggerType, -) -from koyeb.api.models.trigger_git_deployment_metadata import ( - TriggerGitDeploymentMetadata as TriggerGitDeploymentMetadata, -) -from koyeb.api.models.trigger_git_deployment_metadata_provider import ( - TriggerGitDeploymentMetadataProvider as TriggerGitDeploymentMetadataProvider, -) +from koyeb.api.models.trigger_deployment_metadata import TriggerDeploymentMetadata as TriggerDeploymentMetadata +from koyeb.api.models.trigger_deployment_metadata_actor_type import TriggerDeploymentMetadataActorType as TriggerDeploymentMetadataActorType +from koyeb.api.models.trigger_deployment_metadata_trigger_type import TriggerDeploymentMetadataTriggerType as TriggerDeploymentMetadataTriggerType +from koyeb.api.models.trigger_git_deployment_metadata import TriggerGitDeploymentMetadata as TriggerGitDeploymentMetadata +from koyeb.api.models.trigger_git_deployment_metadata_provider import TriggerGitDeploymentMetadataProvider as TriggerGitDeploymentMetadataProvider from koyeb.api.models.update_app import UpdateApp as UpdateApp from koyeb.api.models.update_app_reply import UpdateAppReply as UpdateAppReply from koyeb.api.models.update_budget_reply import UpdateBudgetReply as UpdateBudgetReply -from koyeb.api.models.update_budget_request import ( - UpdateBudgetRequest as UpdateBudgetRequest, -) -from koyeb.api.models.update_credential_reply import ( - UpdateCredentialReply as UpdateCredentialReply, -) +from koyeb.api.models.update_budget_request import UpdateBudgetRequest as UpdateBudgetRequest +from koyeb.api.models.update_credential_reply import UpdateCredentialReply as UpdateCredentialReply from koyeb.api.models.update_domain import UpdateDomain as UpdateDomain from koyeb.api.models.update_domain_reply import UpdateDomainReply as UpdateDomainReply -from koyeb.api.models.update_organization_default_project_reply import ( - UpdateOrganizationDefaultProjectReply as UpdateOrganizationDefaultProjectReply, -) -from koyeb.api.models.update_organization_default_project_request import ( - UpdateOrganizationDefaultProjectRequest as UpdateOrganizationDefaultProjectRequest, -) -from koyeb.api.models.update_organization_name_reply import ( - UpdateOrganizationNameReply as UpdateOrganizationNameReply, -) -from koyeb.api.models.update_organization_name_request import ( - UpdateOrganizationNameRequest as UpdateOrganizationNameRequest, -) -from koyeb.api.models.update_organization_plan_reply import ( - UpdateOrganizationPlanReply as UpdateOrganizationPlanReply, -) -from koyeb.api.models.update_organization_plan_request import ( - UpdateOrganizationPlanRequest as UpdateOrganizationPlanRequest, -) -from koyeb.api.models.update_organization_reply import ( - UpdateOrganizationReply as UpdateOrganizationReply, -) -from koyeb.api.models.update_password_request import ( - UpdatePasswordRequest as UpdatePasswordRequest, -) -from koyeb.api.models.update_persistent_volume_reply import ( - UpdatePersistentVolumeReply as UpdatePersistentVolumeReply, -) -from koyeb.api.models.update_persistent_volume_request import ( - UpdatePersistentVolumeRequest as UpdatePersistentVolumeRequest, -) -from koyeb.api.models.update_project_reply import ( - UpdateProjectReply as UpdateProjectReply, -) +from koyeb.api.models.update_organization_default_project_reply import UpdateOrganizationDefaultProjectReply as UpdateOrganizationDefaultProjectReply +from koyeb.api.models.update_organization_default_project_request import UpdateOrganizationDefaultProjectRequest as UpdateOrganizationDefaultProjectRequest +from koyeb.api.models.update_organization_name_reply import UpdateOrganizationNameReply as UpdateOrganizationNameReply +from koyeb.api.models.update_organization_name_request import UpdateOrganizationNameRequest as UpdateOrganizationNameRequest +from koyeb.api.models.update_organization_plan_reply import UpdateOrganizationPlanReply as UpdateOrganizationPlanReply +from koyeb.api.models.update_organization_plan_request import UpdateOrganizationPlanRequest as UpdateOrganizationPlanRequest +from koyeb.api.models.update_organization_reply import UpdateOrganizationReply as UpdateOrganizationReply +from koyeb.api.models.update_password_request import UpdatePasswordRequest as UpdatePasswordRequest +from koyeb.api.models.update_persistent_volume_reply import UpdatePersistentVolumeReply as UpdatePersistentVolumeReply +from koyeb.api.models.update_persistent_volume_request import UpdatePersistentVolumeRequest as UpdatePersistentVolumeRequest +from koyeb.api.models.update_project_reply import UpdateProjectReply as UpdateProjectReply from koyeb.api.models.update_secret_reply import UpdateSecretReply as UpdateSecretReply from koyeb.api.models.update_service import UpdateService as UpdateService from koyeb.api.models.update_service_pool import UpdateServicePool as UpdateServicePool -from koyeb.api.models.update_service_pool_reply import ( - UpdateServicePoolReply as UpdateServicePoolReply, -) -from koyeb.api.models.update_service_reply import ( - UpdateServiceReply as UpdateServiceReply, -) -from koyeb.api.models.update_service_scaling_request import ( - UpdateServiceScalingRequest as UpdateServiceScalingRequest, -) -from koyeb.api.models.update_snapshot_reply import ( - UpdateSnapshotReply as UpdateSnapshotReply, -) -from koyeb.api.models.update_snapshot_request import ( - UpdateSnapshotRequest as UpdateSnapshotRequest, -) -from koyeb.api.models.update_user_request_user_update_body import ( - UpdateUserRequestUserUpdateBody as UpdateUserRequestUserUpdateBody, -) -from koyeb.api.models.update_user_settings_reply import ( - UpdateUserSettingsReply as UpdateUserSettingsReply, -) -from koyeb.api.models.update_user_settings_request import ( - UpdateUserSettingsRequest as UpdateUserSettingsRequest, -) -from koyeb.api.models.upsert_signup_qualification_reply import ( - UpsertSignupQualificationReply as UpsertSignupQualificationReply, -) -from koyeb.api.models.upsert_signup_qualification_request import ( - UpsertSignupQualificationRequest as UpsertSignupQualificationRequest, -) +from koyeb.api.models.update_service_pool_reply import UpdateServicePoolReply as UpdateServicePoolReply +from koyeb.api.models.update_service_reply import UpdateServiceReply as UpdateServiceReply +from koyeb.api.models.update_service_scaling_request import UpdateServiceScalingRequest as UpdateServiceScalingRequest +from koyeb.api.models.update_snapshot_reply import UpdateSnapshotReply as UpdateSnapshotReply +from koyeb.api.models.update_snapshot_request import UpdateSnapshotRequest as UpdateSnapshotRequest +from koyeb.api.models.update_user_request_user_update_body import UpdateUserRequestUserUpdateBody as UpdateUserRequestUserUpdateBody +from koyeb.api.models.update_user_settings_reply import UpdateUserSettingsReply as UpdateUserSettingsReply +from koyeb.api.models.update_user_settings_request import UpdateUserSettingsRequest as UpdateUserSettingsRequest +from koyeb.api.models.upsert_signup_qualification_reply import UpsertSignupQualificationReply as UpsertSignupQualificationReply +from koyeb.api.models.upsert_signup_qualification_request import UpsertSignupQualificationRequest as UpsertSignupQualificationRequest from koyeb.api.models.usage import Usage as Usage from koyeb.api.models.usage_details import UsageDetails as UsageDetails from koyeb.api.models.user import User as User @@ -1463,9 +975,6 @@ from koyeb.api.models.user_reply import UserReply as UserReply from koyeb.api.models.user_role_role import UserRoleRole as UserRoleRole from koyeb.api.models.user_settings import UserSettings as UserSettings -from koyeb.api.models.verify_docker_image_reply import ( - VerifyDockerImageReply as VerifyDockerImageReply, -) -from koyeb.api.models.verify_docker_image_reply_err_code import ( - VerifyDockerImageReplyErrCode as VerifyDockerImageReplyErrCode, -) +from koyeb.api.models.verify_docker_image_reply import VerifyDockerImageReply as VerifyDockerImageReply +from koyeb.api.models.verify_docker_image_reply_err_code import VerifyDockerImageReplyErrCode as VerifyDockerImageReplyErrCode + diff --git a/koyeb/api/api/__init__.py b/koyeb/api/api/__init__.py index 2088a1bc..264740fb 100644 --- a/koyeb/api/api/__init__.py +++ b/koyeb/api/api/__init__.py @@ -47,3 +47,4 @@ from koyeb.api.api.invite_api import InviteApi from koyeb.api.api.organization_api import OrganizationApi from koyeb.api.api.sso_api import SsoApi + diff --git a/koyeb/api/api/activity_api.py b/koyeb/api/api/activity_api.py index 9e2611ff..762be4f0 100644 --- a/koyeb/api/api/activity_api.py +++ b/koyeb/api/api/activity_api.py @@ -38,6 +38,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def get_account_activities( self, @@ -47,8 +48,9 @@ def get_account_activities( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -82,7 +84,7 @@ def get_account_activities( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_account_activities_serialize( limit=limit, @@ -90,21 +92,22 @@ def get_account_activities( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ActivityList", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ActivityList", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -112,6 +115,7 @@ def get_account_activities( response_types_map=_response_types_map, ).data + @validate_call def get_account_activities_with_http_info( self, @@ -121,8 +125,9 @@ def get_account_activities_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -156,7 +161,7 @@ def get_account_activities_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_account_activities_serialize( limit=limit, @@ -164,21 +169,22 @@ def get_account_activities_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ActivityList", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ActivityList", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -186,6 +192,7 @@ def get_account_activities_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_account_activities_without_preload_content( self, @@ -195,8 +202,9 @@ def get_account_activities_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -230,7 +238,7 @@ def get_account_activities_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_account_activities_serialize( limit=limit, @@ -238,24 +246,26 @@ def get_account_activities_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ActivityList", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ActivityList", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_account_activities_serialize( self, limit, @@ -265,9 +275,11 @@ def _get_account_activities_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -281,25 +293,35 @@ def _get_account_activities_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/account/activities", + method='GET', + resource_path='/v1/account/activities', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -309,24 +331,25 @@ def _get_account_activities_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_activities( self, limit: Optional[StrictStr] = None, offset: Optional[StrictStr] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on object type"), - ] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on object type")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -362,7 +385,7 @@ def list_activities( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_activities_serialize( limit=limit, @@ -371,21 +394,22 @@ def list_activities( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ActivityList", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ActivityList", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -393,21 +417,20 @@ def list_activities( response_types_map=_response_types_map, ).data + @validate_call def list_activities_with_http_info( self, limit: Optional[StrictStr] = None, offset: Optional[StrictStr] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on object type"), - ] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on object type")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -443,7 +466,7 @@ def list_activities_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_activities_serialize( limit=limit, @@ -452,21 +475,22 @@ def list_activities_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ActivityList", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ActivityList", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -474,21 +498,20 @@ def list_activities_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_activities_without_preload_content( self, limit: Optional[StrictStr] = None, offset: Optional[StrictStr] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on object type"), - ] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on object type")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -524,7 +547,7 @@ def list_activities_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_activities_serialize( limit=limit, @@ -533,24 +556,26 @@ def list_activities_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ActivityList", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ActivityList", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_activities_serialize( self, limit, @@ -561,10 +586,11 @@ def _list_activities_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "types": "multi", + 'types': 'multi', } _path_params: Dict[str, str] = {} @@ -579,28 +605,39 @@ def _list_activities_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/activities", + method='GET', + resource_path='/v1/activities', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -610,9 +647,12 @@ def _list_activities_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_notifications( self, @@ -626,8 +666,9 @@ def list_notifications( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -669,7 +710,7 @@ def list_notifications( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_notifications_serialize( limit=limit, @@ -681,21 +722,22 @@ def list_notifications( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NotificationList", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "NotificationList", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -703,6 +745,7 @@ def list_notifications( response_types_map=_response_types_map, ).data + @validate_call def list_notifications_with_http_info( self, @@ -716,8 +759,9 @@ def list_notifications_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -759,7 +803,7 @@ def list_notifications_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_notifications_serialize( limit=limit, @@ -771,21 +815,22 @@ def list_notifications_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NotificationList", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "NotificationList", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -793,6 +838,7 @@ def list_notifications_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_notifications_without_preload_content( self, @@ -806,8 +852,9 @@ def list_notifications_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -849,7 +896,7 @@ def list_notifications_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_notifications_serialize( limit=limit, @@ -861,24 +908,26 @@ def list_notifications_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NotificationList", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "NotificationList", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_notifications_serialize( self, limit, @@ -892,9 +941,11 @@ def _list_notifications_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -908,37 +959,51 @@ def _list_notifications_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if mark_read is not None: - _query_params.append(("mark_read", mark_read)) - + + _query_params.append(('mark_read', mark_read)) + if mark_seen is not None: - _query_params.append(("mark_seen", mark_seen)) - + + _query_params.append(('mark_seen', mark_seen)) + if unread is not None: - _query_params.append(("unread", unread)) - + + _query_params.append(('unread', unread)) + if unseen is not None: - _query_params.append(("unseen", unseen)) - + + _query_params.append(('unseen', unseen)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/notifications", + method='GET', + resource_path='/v1/notifications', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -948,5 +1013,7 @@ def _list_notifications_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/apps_api.py b/koyeb/api/api/apps_api.py index 226c614d..b4abdda8 100644 --- a/koyeb/api/api/apps_api.py +++ b/koyeb/api/api/apps_api.py @@ -43,6 +43,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def create_app( self, @@ -51,8 +52,9 @@ def create_app( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,28 +86,29 @@ def create_app( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_app_serialize( app=app, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -113,6 +116,7 @@ def create_app( response_types_map=_response_types_map, ).data + @validate_call def create_app_with_http_info( self, @@ -121,8 +125,9 @@ def create_app_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -154,28 +159,29 @@ def create_app_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_app_serialize( app=app, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -183,6 +189,7 @@ def create_app_with_http_info( response_types_map=_response_types_map, ) + @validate_call def create_app_without_preload_content( self, @@ -191,8 +198,9 @@ def create_app_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -224,31 +232,33 @@ def create_app_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_app_serialize( app=app, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_app_serialize( self, app, @@ -257,9 +267,11 @@ def _create_app_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -278,16 +290,24 @@ def _create_app_serialize( if app is not None: _body_params = app + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/apps", + method='POST', + resource_path='/v1/apps', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -297,9 +317,12 @@ def _create_app_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def delete_app( self, @@ -308,8 +331,9 @@ def delete_app( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -342,28 +366,29 @@ def delete_app( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -371,6 +396,7 @@ def delete_app( response_types_map=_response_types_map, ).data + @validate_call def delete_app_with_http_info( self, @@ -379,8 +405,9 @@ def delete_app_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -413,28 +440,29 @@ def delete_app_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -442,6 +470,7 @@ def delete_app_with_http_info( response_types_map=_response_types_map, ) + @validate_call def delete_app_without_preload_content( self, @@ -450,8 +479,9 @@ def delete_app_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -484,31 +514,33 @@ def delete_app_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_app_serialize( self, id, @@ -517,9 +549,11 @@ def _delete_app_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -532,22 +566,30 @@ def _delete_app_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/apps/{id}", + method='DELETE', + resource_path='/v1/apps/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -557,9 +599,12 @@ def _delete_app_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_app( self, @@ -568,8 +613,9 @@ def get_app( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -601,28 +647,29 @@ def get_app( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -630,6 +677,7 @@ def get_app( response_types_map=_response_types_map, ).data + @validate_call def get_app_with_http_info( self, @@ -638,8 +686,9 @@ def get_app_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -671,28 +720,29 @@ def get_app_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -700,6 +750,7 @@ def get_app_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_app_without_preload_content( self, @@ -708,8 +759,9 @@ def get_app_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -741,31 +793,33 @@ def get_app_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_app_serialize( self, id, @@ -774,9 +828,11 @@ def _get_app_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -789,22 +845,30 @@ def _get_app_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/apps/{id}", + method='GET', + resource_path='/v1/apps/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -814,39 +878,27 @@ def _get_app_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_app_events( self, - app_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on app id") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on app event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on app id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on app event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -886,7 +938,7 @@ def list_app_events( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_app_events_serialize( app_id=app_id, @@ -897,21 +949,22 @@ def list_app_events( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListAppEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListAppEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -919,36 +972,22 @@ def list_app_events( response_types_map=_response_types_map, ).data + @validate_call def list_app_events_with_http_info( self, - app_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on app id") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on app event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on app id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on app event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -988,7 +1027,7 @@ def list_app_events_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_app_events_serialize( app_id=app_id, @@ -999,21 +1038,22 @@ def list_app_events_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListAppEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListAppEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1021,36 +1061,22 @@ def list_app_events_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_app_events_without_preload_content( self, - app_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on app id") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on app event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on app id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on app event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1090,7 +1116,7 @@ def list_app_events_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_app_events_serialize( app_id=app_id, @@ -1101,24 +1127,26 @@ def list_app_events_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListAppEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListAppEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_app_events_serialize( self, app_id, @@ -1131,10 +1159,11 @@ def _list_app_events_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "types": "multi", + 'types': 'multi', } _path_params: Dict[str, str] = {} @@ -1149,34 +1178,47 @@ def _list_app_events_serialize( # process the path parameters # process the query parameters if app_id is not None: - _query_params.append(("app_id", app_id)) - + + _query_params.append(('app_id', app_id)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/app_events", + method='GET', + resource_path='/v1/app_events', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1186,32 +1228,26 @@ def _list_app_events_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_apps( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], Field(description="(Optional) Filter on app ids") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on app ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1249,7 +1285,7 @@ def list_apps( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_apps_serialize( limit=limit, @@ -1259,21 +1295,22 @@ def list_apps( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListAppsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListAppsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1281,29 +1318,21 @@ def list_apps( response_types_map=_response_types_map, ).data + @validate_call def list_apps_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], Field(description="(Optional) Filter on app ids") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on app ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1341,7 +1370,7 @@ def list_apps_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_apps_serialize( limit=limit, @@ -1351,21 +1380,22 @@ def list_apps_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListAppsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListAppsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1373,29 +1403,21 @@ def list_apps_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_apps_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], Field(description="(Optional) Filter on app ids") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on app ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1433,7 +1455,7 @@ def list_apps_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_apps_serialize( limit=limit, @@ -1443,24 +1465,26 @@ def list_apps_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListAppsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListAppsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_apps_serialize( self, limit, @@ -1472,10 +1496,11 @@ def _list_apps_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "ids": "multi", + 'ids': 'multi', } _path_params: Dict[str, str] = {} @@ -1490,31 +1515,43 @@ def _list_apps_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if ids is not None: - _query_params.append(("ids", ids)) - + + _query_params.append(('ids', ids)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/apps", + method='GET', + resource_path='/v1/apps', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1524,9 +1561,12 @@ def _list_apps_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def pause_app( self, @@ -1535,8 +1575,9 @@ def pause_app( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1569,28 +1610,29 @@ def pause_app( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._pause_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1598,6 +1640,7 @@ def pause_app( response_types_map=_response_types_map, ).data + @validate_call def pause_app_with_http_info( self, @@ -1606,8 +1649,9 @@ def pause_app_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1640,28 +1684,29 @@ def pause_app_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._pause_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1669,6 +1714,7 @@ def pause_app_with_http_info( response_types_map=_response_types_map, ) + @validate_call def pause_app_without_preload_content( self, @@ -1677,8 +1723,9 @@ def pause_app_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1711,31 +1758,33 @@ def pause_app_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._pause_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _pause_app_serialize( self, id, @@ -1744,9 +1793,11 @@ def _pause_app_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1759,22 +1810,30 @@ def _pause_app_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/apps/{id}/pause", + method='POST', + resource_path='/v1/apps/{id}/pause', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1784,9 +1843,12 @@ def _pause_app_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def resume_app( self, @@ -1795,8 +1857,9 @@ def resume_app( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1829,28 +1892,29 @@ def resume_app( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resume_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1858,6 +1922,7 @@ def resume_app( response_types_map=_response_types_map, ).data + @validate_call def resume_app_with_http_info( self, @@ -1866,8 +1931,9 @@ def resume_app_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1900,28 +1966,29 @@ def resume_app_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resume_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1929,6 +1996,7 @@ def resume_app_with_http_info( response_types_map=_response_types_map, ) + @validate_call def resume_app_without_preload_content( self, @@ -1937,8 +2005,9 @@ def resume_app_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1971,31 +2040,33 @@ def resume_app_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resume_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _resume_app_serialize( self, id, @@ -2004,9 +2075,11 @@ def _resume_app_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2019,22 +2092,30 @@ def _resume_app_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/apps/{id}/resume", + method='POST', + resource_path='/v1/apps/{id}/resume', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2044,9 +2125,12 @@ def _resume_app_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_app( self, @@ -2057,8 +2141,9 @@ def update_app( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2094,7 +2179,7 @@ def update_app( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_app_serialize( id=id, @@ -2103,21 +2188,22 @@ def update_app( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2125,6 +2211,7 @@ def update_app( response_types_map=_response_types_map, ).data + @validate_call def update_app_with_http_info( self, @@ -2135,8 +2222,9 @@ def update_app_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2172,7 +2260,7 @@ def update_app_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_app_serialize( id=id, @@ -2181,21 +2269,22 @@ def update_app_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2203,6 +2292,7 @@ def update_app_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_app_without_preload_content( self, @@ -2213,8 +2303,9 @@ def update_app_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2250,7 +2341,7 @@ def update_app_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_app_serialize( id=id, @@ -2259,24 +2350,26 @@ def update_app_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_app_serialize( self, id, @@ -2287,9 +2380,11 @@ def _update_app_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2302,27 +2397,36 @@ def _update_app_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if app is not None: _body_params = app + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/apps/{id}", + method='PUT', + resource_path='/v1/apps/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2332,9 +2436,12 @@ def _update_app_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_app2( self, @@ -2345,8 +2452,9 @@ def update_app2( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2382,7 +2490,7 @@ def update_app2( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_app2_serialize( id=id, @@ -2391,21 +2499,22 @@ def update_app2( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2413,6 +2522,7 @@ def update_app2( response_types_map=_response_types_map, ).data + @validate_call def update_app2_with_http_info( self, @@ -2423,8 +2533,9 @@ def update_app2_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2460,7 +2571,7 @@ def update_app2_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_app2_serialize( id=id, @@ -2469,21 +2580,22 @@ def update_app2_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2491,6 +2603,7 @@ def update_app2_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_app2_without_preload_content( self, @@ -2501,8 +2614,9 @@ def update_app2_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2538,7 +2652,7 @@ def update_app2_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_app2_serialize( id=id, @@ -2547,24 +2661,26 @@ def update_app2_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_app2_serialize( self, id, @@ -2575,9 +2691,11 @@ def _update_app2_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2590,27 +2708,36 @@ def _update_app2_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if app is not None: _body_params = app + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/apps/{id}", + method='PATCH', + resource_path='/v1/apps/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2620,5 +2747,7 @@ def _update_app2_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/archives_api.py b/koyeb/api/api/archives_api.py index 6f730c86..3782c3aa 100644 --- a/koyeb/api/api/archives_api.py +++ b/koyeb/api/api/archives_api.py @@ -35,6 +35,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def create_archive( self, @@ -43,8 +44,9 @@ def create_archive( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -77,28 +79,29 @@ def create_archive( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_archive_serialize( archive=archive, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateArchiveReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateArchiveReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -106,6 +109,7 @@ def create_archive( response_types_map=_response_types_map, ).data + @validate_call def create_archive_with_http_info( self, @@ -114,8 +118,9 @@ def create_archive_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -148,28 +153,29 @@ def create_archive_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_archive_serialize( archive=archive, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateArchiveReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateArchiveReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -177,6 +183,7 @@ def create_archive_with_http_info( response_types_map=_response_types_map, ) + @validate_call def create_archive_without_preload_content( self, @@ -185,8 +192,9 @@ def create_archive_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -219,31 +227,33 @@ def create_archive_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_archive_serialize( archive=archive, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateArchiveReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateArchiveReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_archive_serialize( self, archive, @@ -252,9 +262,11 @@ def _create_archive_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -273,16 +285,24 @@ def _create_archive_serialize( if archive is not None: _body_params = archive + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/archives", + method='POST', + resource_path='/v1/archives', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -292,5 +312,7 @@ def _create_archive_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/billing_api.py b/koyeb/api/api/billing_api.py index d7183ebd..ab98eed1 100644 --- a/koyeb/api/api/billing_api.py +++ b/koyeb/api/api/billing_api.py @@ -36,6 +36,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def has_unpaid_invoices( self, @@ -43,8 +44,9 @@ def has_unpaid_invoices( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -75,27 +77,28 @@ def has_unpaid_invoices( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._has_unpaid_invoices_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HasUnpaidInvoicesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "HasUnpaidInvoicesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -103,6 +106,7 @@ def has_unpaid_invoices( response_types_map=_response_types_map, ).data + @validate_call def has_unpaid_invoices_with_http_info( self, @@ -110,8 +114,9 @@ def has_unpaid_invoices_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -142,27 +147,28 @@ def has_unpaid_invoices_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._has_unpaid_invoices_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HasUnpaidInvoicesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "HasUnpaidInvoicesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -170,6 +176,7 @@ def has_unpaid_invoices_with_http_info( response_types_map=_response_types_map, ) + @validate_call def has_unpaid_invoices_without_preload_content( self, @@ -177,8 +184,9 @@ def has_unpaid_invoices_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -209,30 +217,32 @@ def has_unpaid_invoices_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._has_unpaid_invoices_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HasUnpaidInvoicesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "HasUnpaidInvoicesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _has_unpaid_invoices_serialize( self, _request_auth, @@ -240,9 +250,11 @@ def _has_unpaid_invoices_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -259,16 +271,24 @@ def _has_unpaid_invoices_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/billing/has_unpaid_invoices", + method='GET', + resource_path='/v1/billing/has_unpaid_invoices', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -278,9 +298,12 @@ def _has_unpaid_invoices_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def manage( self, @@ -288,8 +311,9 @@ def manage( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -319,27 +343,28 @@ def manage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._manage_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ManageReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ManageReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -347,6 +372,7 @@ def manage( response_types_map=_response_types_map, ).data + @validate_call def manage_with_http_info( self, @@ -354,8 +380,9 @@ def manage_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -385,27 +412,28 @@ def manage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._manage_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ManageReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ManageReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -413,6 +441,7 @@ def manage_with_http_info( response_types_map=_response_types_map, ) + @validate_call def manage_without_preload_content( self, @@ -420,8 +449,9 @@ def manage_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -451,30 +481,32 @@ def manage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._manage_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ManageReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ManageReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _manage_serialize( self, _request_auth, @@ -482,9 +514,11 @@ def _manage_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -501,16 +535,24 @@ def _manage_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/billing/manage", + method='GET', + resource_path='/v1/billing/manage', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -520,9 +562,12 @@ def _manage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def next_invoice( self, @@ -530,8 +575,9 @@ def next_invoice( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -562,27 +608,28 @@ def next_invoice( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._next_invoice_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NextInvoiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "NextInvoiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -590,6 +637,7 @@ def next_invoice( response_types_map=_response_types_map, ).data + @validate_call def next_invoice_with_http_info( self, @@ -597,8 +645,9 @@ def next_invoice_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -629,27 +678,28 @@ def next_invoice_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._next_invoice_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NextInvoiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "NextInvoiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -657,6 +707,7 @@ def next_invoice_with_http_info( response_types_map=_response_types_map, ) + @validate_call def next_invoice_without_preload_content( self, @@ -664,8 +715,9 @@ def next_invoice_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -696,30 +748,32 @@ def next_invoice_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._next_invoice_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NextInvoiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "NextInvoiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _next_invoice_serialize( self, _request_auth, @@ -727,9 +781,11 @@ def _next_invoice_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -746,16 +802,24 @@ def _next_invoice_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/billing/next_invoice", + method='GET', + resource_path='/v1/billing/next_invoice', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -765,5 +829,7 @@ def _next_invoice_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/catalog_datacenters_api.py b/koyeb/api/api/catalog_datacenters_api.py index 5113a0af..a89805c6 100644 --- a/koyeb/api/api/catalog_datacenters_api.py +++ b/koyeb/api/api/catalog_datacenters_api.py @@ -34,6 +34,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def list_datacenters( self, @@ -41,8 +42,9 @@ def list_datacenters( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -72,21 +74,22 @@ def list_datacenters( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_datacenters_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDatacentersReply", - "default": "GoogleRpcStatus", + '200': "ListDatacentersReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -94,6 +97,7 @@ def list_datacenters( response_types_map=_response_types_map, ).data + @validate_call def list_datacenters_with_http_info( self, @@ -101,8 +105,9 @@ def list_datacenters_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -132,21 +137,22 @@ def list_datacenters_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_datacenters_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDatacentersReply", - "default": "GoogleRpcStatus", + '200': "ListDatacentersReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -154,6 +160,7 @@ def list_datacenters_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_datacenters_without_preload_content( self, @@ -161,8 +168,9 @@ def list_datacenters_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -192,24 +200,26 @@ def list_datacenters_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_datacenters_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDatacentersReply", - "default": "GoogleRpcStatus", + '200': "ListDatacentersReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_datacenters_serialize( self, _request_auth, @@ -217,9 +227,11 @@ def _list_datacenters_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -236,16 +248,24 @@ def _list_datacenters_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/catalog/datacenters", + method='GET', + resource_path='/v1/catalog/datacenters', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -255,5 +275,7 @@ def _list_datacenters_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/catalog_instance_usage_api.py b/koyeb/api/api/catalog_instance_usage_api.py index 847849db..da9d01f6 100644 --- a/koyeb/api/api/catalog_instance_usage_api.py +++ b/koyeb/api/api/catalog_instance_usage_api.py @@ -36,6 +36,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def list_usage( self, @@ -44,8 +45,9 @@ def list_usage( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -77,22 +79,23 @@ def list_usage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_usage_serialize( region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUsageReply", - "default": "GoogleRpcStatus", + '200': "ListUsageReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -100,6 +103,7 @@ def list_usage( response_types_map=_response_types_map, ).data + @validate_call def list_usage_with_http_info( self, @@ -108,8 +112,9 @@ def list_usage_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -141,22 +146,23 @@ def list_usage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_usage_serialize( region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUsageReply", - "default": "GoogleRpcStatus", + '200': "ListUsageReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -164,6 +170,7 @@ def list_usage_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_usage_without_preload_content( self, @@ -172,8 +179,9 @@ def list_usage_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -205,25 +213,27 @@ def list_usage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_usage_serialize( region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUsageReply", - "default": "GoogleRpcStatus", + '200': "ListUsageReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_usage_serialize( self, region, @@ -232,9 +242,11 @@ def _list_usage_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -248,22 +260,31 @@ def _list_usage_serialize( # process the path parameters # process the query parameters if region is not None: - _query_params.append(("region", region)) - + + _query_params.append(('region', region)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/catalog/usage", + method='GET', + resource_path='/v1/catalog/usage', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -273,5 +294,7 @@ def _list_usage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/catalog_instances_api.py b/koyeb/api/api/catalog_instances_api.py index 36985bfa..6d4b70d6 100644 --- a/koyeb/api/api/catalog_instances_api.py +++ b/koyeb/api/api/catalog_instances_api.py @@ -38,6 +38,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def get_catalog_instance( self, @@ -46,8 +47,9 @@ def get_catalog_instance( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -79,22 +81,23 @@ def get_catalog_instance( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_catalog_instance_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetCatalogInstanceReply", - "default": "GoogleRpcStatus", + '200': "GetCatalogInstanceReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -102,6 +105,7 @@ def get_catalog_instance( response_types_map=_response_types_map, ).data + @validate_call def get_catalog_instance_with_http_info( self, @@ -110,8 +114,9 @@ def get_catalog_instance_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -143,22 +148,23 @@ def get_catalog_instance_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_catalog_instance_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetCatalogInstanceReply", - "default": "GoogleRpcStatus", + '200': "GetCatalogInstanceReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -166,6 +172,7 @@ def get_catalog_instance_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_catalog_instance_without_preload_content( self, @@ -174,8 +181,9 @@ def get_catalog_instance_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -207,25 +215,27 @@ def get_catalog_instance_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_catalog_instance_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetCatalogInstanceReply", - "default": "GoogleRpcStatus", + '200': "GetCatalogInstanceReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_catalog_instance_serialize( self, id, @@ -234,9 +244,11 @@ def _get_catalog_instance_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -249,22 +261,30 @@ def _get_catalog_instance_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/catalog/instances/{id}", + method='GET', + resource_path='/v1/catalog/instances/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -274,29 +294,25 @@ def _get_catalog_instance_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_catalog_instances( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - id: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for instances") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + id: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for instances")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -332,7 +348,7 @@ def list_catalog_instances( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_catalog_instances_serialize( limit=limit, @@ -341,15 +357,16 @@ def list_catalog_instances( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListCatalogInstancesReply", - "default": "GoogleRpcStatus", + '200': "ListCatalogInstancesReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -357,26 +374,20 @@ def list_catalog_instances( response_types_map=_response_types_map, ).data + @validate_call def list_catalog_instances_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - id: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for instances") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + id: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for instances")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -412,7 +423,7 @@ def list_catalog_instances_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_catalog_instances_serialize( limit=limit, @@ -421,15 +432,16 @@ def list_catalog_instances_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListCatalogInstancesReply", - "default": "GoogleRpcStatus", + '200': "ListCatalogInstancesReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -437,26 +449,20 @@ def list_catalog_instances_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_catalog_instances_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - id: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for instances") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + id: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for instances")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -492,7 +498,7 @@ def list_catalog_instances_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_catalog_instances_serialize( limit=limit, @@ -501,18 +507,20 @@ def list_catalog_instances_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListCatalogInstancesReply", - "default": "GoogleRpcStatus", + '200': "ListCatalogInstancesReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_catalog_instances_serialize( self, limit, @@ -523,9 +531,11 @@ def _list_catalog_instances_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -539,28 +549,39 @@ def _list_catalog_instances_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if id is not None: - _query_params.append(("id", id)) - + + _query_params.append(('id', id)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/catalog/instances", + method='GET', + resource_path='/v1/catalog/instances', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -570,5 +591,7 @@ def _list_catalog_instances_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/catalog_regions_api.py b/koyeb/api/api/catalog_regions_api.py index b4a00f3b..00c190ea 100644 --- a/koyeb/api/api/catalog_regions_api.py +++ b/koyeb/api/api/catalog_regions_api.py @@ -38,6 +38,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def get_region( self, @@ -46,8 +47,9 @@ def get_region( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -79,22 +81,23 @@ def get_region( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_region_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetRegionReply", - "default": "GoogleRpcStatus", + '200': "GetRegionReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -102,6 +105,7 @@ def get_region( response_types_map=_response_types_map, ).data + @validate_call def get_region_with_http_info( self, @@ -110,8 +114,9 @@ def get_region_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -143,22 +148,23 @@ def get_region_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_region_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetRegionReply", - "default": "GoogleRpcStatus", + '200': "GetRegionReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -166,6 +172,7 @@ def get_region_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_region_without_preload_content( self, @@ -174,8 +181,9 @@ def get_region_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -207,25 +215,27 @@ def get_region_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_region_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetRegionReply", - "default": "GoogleRpcStatus", + '200': "GetRegionReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_region_serialize( self, id, @@ -234,9 +244,11 @@ def _get_region_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -249,22 +261,30 @@ def _get_region_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/catalog/regions/{id}", + method='GET', + resource_path='/v1/catalog/regions/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -274,29 +294,25 @@ def _get_region_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_regions( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - id: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for regions") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + id: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for regions")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -332,7 +348,7 @@ def list_regions( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_regions_serialize( limit=limit, @@ -341,15 +357,16 @@ def list_regions( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRegionsReply", - "default": "GoogleRpcStatus", + '200': "ListRegionsReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -357,26 +374,20 @@ def list_regions( response_types_map=_response_types_map, ).data + @validate_call def list_regions_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - id: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for regions") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + id: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for regions")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -412,7 +423,7 @@ def list_regions_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_regions_serialize( limit=limit, @@ -421,15 +432,16 @@ def list_regions_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRegionsReply", - "default": "GoogleRpcStatus", + '200': "ListRegionsReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -437,26 +449,20 @@ def list_regions_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_regions_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - id: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for regions") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + id: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for regions")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -492,7 +498,7 @@ def list_regions_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_regions_serialize( limit=limit, @@ -501,18 +507,20 @@ def list_regions_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRegionsReply", - "default": "GoogleRpcStatus", + '200': "ListRegionsReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_regions_serialize( self, limit, @@ -523,9 +531,11 @@ def _list_regions_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -539,28 +549,39 @@ def _list_regions_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if id is not None: - _query_params.append(("id", id)) - + + _query_params.append(('id', id)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/catalog/regions", + method='GET', + resource_path='/v1/catalog/regions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -570,5 +591,7 @@ def _list_regions_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/compose_api.py b/koyeb/api/api/compose_api.py index 401660f1..c50e34c6 100644 --- a/koyeb/api/api/compose_api.py +++ b/koyeb/api/api/compose_api.py @@ -35,6 +35,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def compose( self, @@ -43,8 +44,9 @@ def compose( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -76,28 +78,29 @@ def compose( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._compose_serialize( compose=compose, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ComposeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ComposeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -105,6 +108,7 @@ def compose( response_types_map=_response_types_map, ).data + @validate_call def compose_with_http_info( self, @@ -113,8 +117,9 @@ def compose_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -146,28 +151,29 @@ def compose_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._compose_serialize( compose=compose, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ComposeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ComposeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -175,6 +181,7 @@ def compose_with_http_info( response_types_map=_response_types_map, ) + @validate_call def compose_without_preload_content( self, @@ -183,8 +190,9 @@ def compose_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -216,31 +224,33 @@ def compose_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._compose_serialize( compose=compose, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ComposeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ComposeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _compose_serialize( self, compose, @@ -249,9 +259,11 @@ def _compose_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -270,16 +282,24 @@ def _compose_serialize( if compose is not None: _body_params = compose + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/compose", + method='POST', + resource_path='/v1/compose', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -289,5 +309,7 @@ def _compose_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/coupons_api.py b/koyeb/api/api/coupons_api.py index c5a58033..6f83bc80 100644 --- a/koyeb/api/api/coupons_api.py +++ b/koyeb/api/api/coupons_api.py @@ -37,6 +37,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def check_coupon( self, @@ -45,8 +46,9 @@ def check_coupon( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -79,28 +81,29 @@ def check_coupon( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._check_coupon_serialize( code=code, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CheckCouponReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CheckCouponReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -108,6 +111,7 @@ def check_coupon( response_types_map=_response_types_map, ).data + @validate_call def check_coupon_with_http_info( self, @@ -116,8 +120,9 @@ def check_coupon_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -150,28 +155,29 @@ def check_coupon_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._check_coupon_serialize( code=code, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CheckCouponReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CheckCouponReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -179,6 +185,7 @@ def check_coupon_with_http_info( response_types_map=_response_types_map, ) + @validate_call def check_coupon_without_preload_content( self, @@ -187,8 +194,9 @@ def check_coupon_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -221,31 +229,33 @@ def check_coupon_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._check_coupon_serialize( code=code, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CheckCouponReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CheckCouponReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _check_coupon_serialize( self, code, @@ -254,9 +264,11 @@ def _check_coupon_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -269,22 +281,30 @@ def _check_coupon_serialize( # process the path parameters if code is not None: - _path_params["code"] = code + _path_params['code'] = code # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/coupons/{code}", + method='GET', + resource_path='/v1/coupons/{code}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -294,9 +314,12 @@ def _check_coupon_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def redeem_coupon( self, @@ -305,8 +328,9 @@ def redeem_coupon( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -339,28 +363,29 @@ def redeem_coupon( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._redeem_coupon_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -368,6 +393,7 @@ def redeem_coupon( response_types_map=_response_types_map, ).data + @validate_call def redeem_coupon_with_http_info( self, @@ -376,8 +402,9 @@ def redeem_coupon_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -410,28 +437,29 @@ def redeem_coupon_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._redeem_coupon_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -439,6 +467,7 @@ def redeem_coupon_with_http_info( response_types_map=_response_types_map, ) + @validate_call def redeem_coupon_without_preload_content( self, @@ -447,8 +476,9 @@ def redeem_coupon_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -481,31 +511,33 @@ def redeem_coupon_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._redeem_coupon_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _redeem_coupon_serialize( self, body, @@ -514,9 +546,11 @@ def _redeem_coupon_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -535,16 +569,24 @@ def _redeem_coupon_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/coupons", + method='POST', + resource_path='/v1/coupons', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -554,5 +596,7 @@ def _redeem_coupon_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/credentials_api.py b/koyeb/api/api/credentials_api.py index c25bb3fe..18b99e65 100644 --- a/koyeb/api/api/credentials_api.py +++ b/koyeb/api/api/credentials_api.py @@ -42,6 +42,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def create_credential( self, @@ -50,8 +51,9 @@ def create_credential( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -83,28 +85,29 @@ def create_credential( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_credential_serialize( credential=credential, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -112,6 +115,7 @@ def create_credential( response_types_map=_response_types_map, ).data + @validate_call def create_credential_with_http_info( self, @@ -120,8 +124,9 @@ def create_credential_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -153,28 +158,29 @@ def create_credential_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_credential_serialize( credential=credential, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -182,6 +188,7 @@ def create_credential_with_http_info( response_types_map=_response_types_map, ) + @validate_call def create_credential_without_preload_content( self, @@ -190,8 +197,9 @@ def create_credential_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -223,31 +231,33 @@ def create_credential_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_credential_serialize( credential=credential, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_credential_serialize( self, credential, @@ -256,9 +266,11 @@ def _create_credential_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -277,16 +289,24 @@ def _create_credential_serialize( if credential is not None: _body_params = credential + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/credentials", + method='POST', + resource_path='/v1/credentials', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -296,9 +316,12 @@ def _create_credential_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def delete_credential( self, @@ -307,8 +330,9 @@ def delete_credential( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -340,28 +364,29 @@ def delete_credential( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_credential_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -369,6 +394,7 @@ def delete_credential( response_types_map=_response_types_map, ).data + @validate_call def delete_credential_with_http_info( self, @@ -377,8 +403,9 @@ def delete_credential_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -410,28 +437,29 @@ def delete_credential_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_credential_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -439,6 +467,7 @@ def delete_credential_with_http_info( response_types_map=_response_types_map, ) + @validate_call def delete_credential_without_preload_content( self, @@ -447,8 +476,9 @@ def delete_credential_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -480,31 +510,33 @@ def delete_credential_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_credential_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_credential_serialize( self, id, @@ -513,9 +545,11 @@ def _delete_credential_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -528,22 +562,30 @@ def _delete_credential_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/credentials/{id}", + method='DELETE', + resource_path='/v1/credentials/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -553,9 +595,12 @@ def _delete_credential_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_credential( self, @@ -564,8 +609,9 @@ def get_credential( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -597,28 +643,29 @@ def get_credential( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_credential_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -626,6 +673,7 @@ def get_credential( response_types_map=_response_types_map, ).data + @validate_call def get_credential_with_http_info( self, @@ -634,8 +682,9 @@ def get_credential_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -667,28 +716,29 @@ def get_credential_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_credential_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -696,6 +746,7 @@ def get_credential_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_credential_without_preload_content( self, @@ -704,8 +755,9 @@ def get_credential_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -737,31 +789,33 @@ def get_credential_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_credential_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_credential_serialize( self, id, @@ -770,9 +824,11 @@ def _get_credential_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -785,22 +841,30 @@ def _get_credential_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/credentials/{id}", + method='GET', + resource_path='/v1/credentials/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -810,39 +874,28 @@ def _get_credential_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_credentials( self, - type: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for type") - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - organization_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter for an organization"), - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter for an user") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, + type: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for type")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + organization_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an organization")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an user")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -884,7 +937,7 @@ def list_credentials( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_credentials_serialize( type=type, @@ -896,21 +949,22 @@ def list_credentials( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListCredentialsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListCredentialsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -918,36 +972,23 @@ def list_credentials( response_types_map=_response_types_map, ).data + @validate_call def list_credentials_with_http_info( self, - type: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for type") - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - organization_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter for an organization"), - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter for an user") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, + type: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for type")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + organization_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an organization")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an user")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -989,7 +1030,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 + """ # noqa: E501 _param = self._list_credentials_serialize( type=type, @@ -1001,21 +1042,22 @@ def list_credentials_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListCredentialsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListCredentialsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1023,36 +1065,23 @@ def list_credentials_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_credentials_without_preload_content( self, - type: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for type") - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - organization_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter for an organization"), - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter for an user") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, + type: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for type")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + organization_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an organization")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an user")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1094,7 +1123,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 + """ # noqa: E501 _param = self._list_credentials_serialize( type=type, @@ -1106,24 +1135,26 @@ def list_credentials_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListCredentialsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListCredentialsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_credentials_serialize( self, type, @@ -1137,9 +1168,11 @@ def _list_credentials_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1153,37 +1186,51 @@ def _list_credentials_serialize( # process the path parameters # process the query parameters if type is not None: - _query_params.append(("type", type)) - + + _query_params.append(('type', type)) + if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if organization_id is not None: - _query_params.append(("organization_id", organization_id)) - + + _query_params.append(('organization_id', organization_id)) + if user_id is not None: - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/credentials", + method='GET', + resource_path='/v1/credentials', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1193,9 +1240,12 @@ def _list_credentials_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_credential( self, @@ -1206,8 +1256,9 @@ def update_credential( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1243,7 +1294,7 @@ def update_credential( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_credential_serialize( id=id, @@ -1252,21 +1303,22 @@ def update_credential( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1274,6 +1326,7 @@ def update_credential( response_types_map=_response_types_map, ).data + @validate_call def update_credential_with_http_info( self, @@ -1284,8 +1337,9 @@ def update_credential_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1321,7 +1375,7 @@ def update_credential_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_credential_serialize( id=id, @@ -1330,21 +1384,22 @@ def update_credential_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1352,6 +1407,7 @@ def update_credential_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_credential_without_preload_content( self, @@ -1362,8 +1418,9 @@ def update_credential_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1399,7 +1456,7 @@ def update_credential_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_credential_serialize( id=id, @@ -1408,24 +1465,26 @@ def update_credential_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_credential_serialize( self, id, @@ -1436,9 +1495,11 @@ def _update_credential_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1451,27 +1512,36 @@ def _update_credential_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if credential is not None: _body_params = credential + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/credentials/{id}", + method='PUT', + resource_path='/v1/credentials/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1481,9 +1551,12 @@ def _update_credential_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_credential2( self, @@ -1494,8 +1567,9 @@ def update_credential2( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1531,7 +1605,7 @@ def update_credential2( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_credential2_serialize( id=id, @@ -1540,21 +1614,22 @@ def update_credential2( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1562,6 +1637,7 @@ def update_credential2( response_types_map=_response_types_map, ).data + @validate_call def update_credential2_with_http_info( self, @@ -1572,8 +1648,9 @@ def update_credential2_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1609,7 +1686,7 @@ def update_credential2_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_credential2_serialize( id=id, @@ -1618,21 +1695,22 @@ def update_credential2_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1640,6 +1718,7 @@ def update_credential2_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_credential2_without_preload_content( self, @@ -1650,8 +1729,9 @@ def update_credential2_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1687,7 +1767,7 @@ def update_credential2_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_credential2_serialize( id=id, @@ -1696,24 +1776,26 @@ def update_credential2_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_credential2_serialize( self, id, @@ -1724,9 +1806,11 @@ def _update_credential2_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1739,27 +1823,36 @@ def _update_credential2_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if credential is not None: _body_params = credential + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/credentials/{id}", + method='PATCH', + resource_path='/v1/credentials/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1769,5 +1862,7 @@ def _update_credential2_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/deployments_api.py b/koyeb/api/api/deployments_api.py index 937df2e3..4038efc6 100644 --- a/koyeb/api/api/deployments_api.py +++ b/koyeb/api/api/deployments_api.py @@ -40,18 +40,18 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def cancel_deployment( self, - id: Annotated[ - StrictStr, Field(description="The id of the deployment to cancel.") - ], + id: Annotated[StrictStr, Field(description="The id of the deployment to cancel.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,28 +84,29 @@ def cancel_deployment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._cancel_deployment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -113,18 +114,18 @@ def cancel_deployment( response_types_map=_response_types_map, ).data + @validate_call def cancel_deployment_with_http_info( self, - id: Annotated[ - StrictStr, Field(description="The id of the deployment to cancel.") - ], + id: Annotated[StrictStr, Field(description="The id of the deployment to cancel.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -157,28 +158,29 @@ def cancel_deployment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._cancel_deployment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -186,18 +188,18 @@ def cancel_deployment_with_http_info( response_types_map=_response_types_map, ) + @validate_call def cancel_deployment_without_preload_content( self, - id: Annotated[ - StrictStr, Field(description="The id of the deployment to cancel.") - ], + id: Annotated[StrictStr, Field(description="The id of the deployment to cancel.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -230,31 +232,33 @@ def cancel_deployment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._cancel_deployment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _cancel_deployment_serialize( self, id, @@ -263,9 +267,11 @@ def _cancel_deployment_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -278,22 +284,30 @@ def _cancel_deployment_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/deployments/{id}/cancel", + method='POST', + resource_path='/v1/deployments/{id}/cancel', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -303,9 +317,12 @@ def _cancel_deployment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_deployment( self, @@ -314,8 +331,9 @@ def get_deployment( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -347,28 +365,29 @@ def get_deployment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_deployment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDeploymentReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetDeploymentReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -376,6 +395,7 @@ def get_deployment( response_types_map=_response_types_map, ).data + @validate_call def get_deployment_with_http_info( self, @@ -384,8 +404,9 @@ def get_deployment_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -417,28 +438,29 @@ def get_deployment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_deployment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDeploymentReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetDeploymentReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -446,6 +468,7 @@ def get_deployment_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_deployment_without_preload_content( self, @@ -454,8 +477,9 @@ def get_deployment_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -487,31 +511,33 @@ def get_deployment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_deployment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDeploymentReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetDeploymentReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_deployment_serialize( self, id, @@ -520,9 +546,11 @@ def _get_deployment_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -535,22 +563,30 @@ def _get_deployment_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/deployments/{id}", + method='GET', + resource_path='/v1/deployments/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -560,25 +596,25 @@ def _get_deployment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_deployment_scaling( self, id: StrictStr, - region: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on region") - ] = None, - replica_index: Annotated[ - Optional[StrictInt], Field(description="(Optional) Filter on replica_index") - ] = None, + region: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on region")] = None, + replica_index: Annotated[Optional[StrictInt], Field(description="(Optional) Filter on replica_index")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -614,7 +650,7 @@ def get_deployment_scaling( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_deployment_scaling_serialize( id=id, @@ -623,21 +659,22 @@ def get_deployment_scaling( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDeploymentScalingReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetDeploymentScalingReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -645,22 +682,20 @@ def get_deployment_scaling( response_types_map=_response_types_map, ).data + @validate_call def get_deployment_scaling_with_http_info( self, id: StrictStr, - region: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on region") - ] = None, - replica_index: Annotated[ - Optional[StrictInt], Field(description="(Optional) Filter on replica_index") - ] = None, + region: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on region")] = None, + replica_index: Annotated[Optional[StrictInt], Field(description="(Optional) Filter on replica_index")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -696,7 +731,7 @@ def get_deployment_scaling_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_deployment_scaling_serialize( id=id, @@ -705,21 +740,22 @@ def get_deployment_scaling_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDeploymentScalingReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetDeploymentScalingReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -727,22 +763,20 @@ def get_deployment_scaling_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_deployment_scaling_without_preload_content( self, id: StrictStr, - region: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on region") - ] = None, - replica_index: Annotated[ - Optional[StrictInt], Field(description="(Optional) Filter on replica_index") - ] = None, + region: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on region")] = None, + replica_index: Annotated[Optional[StrictInt], Field(description="(Optional) Filter on replica_index")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -778,7 +812,7 @@ def get_deployment_scaling_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_deployment_scaling_serialize( id=id, @@ -787,24 +821,26 @@ def get_deployment_scaling_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDeploymentScalingReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetDeploymentScalingReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_deployment_scaling_serialize( self, id, @@ -815,9 +851,11 @@ def _get_deployment_scaling_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -830,28 +868,38 @@ def _get_deployment_scaling_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if region is not None: - _query_params.append(("region", region)) - + + _query_params.append(('region', region)) + if replica_index is not None: - _query_params.append(("replica_index", replica_index)) - + + _query_params.append(('replica_index', replica_index)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/deployment/{id}/scaling", + method='GET', + resource_path='/v1/deployment/{id}/scaling', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -861,39 +909,27 @@ def _get_deployment_scaling_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_deployment_events( self, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on deployment id") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on deployment event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on deployment id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on deployment event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -933,7 +969,7 @@ def list_deployment_events( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_deployment_events_serialize( deployment_id=deployment_id, @@ -944,21 +980,22 @@ def list_deployment_events( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDeploymentEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListDeploymentEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -966,36 +1003,22 @@ def list_deployment_events( response_types_map=_response_types_map, ).data + @validate_call def list_deployment_events_with_http_info( self, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on deployment id") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on deployment event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on deployment id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on deployment event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1035,7 +1058,7 @@ def list_deployment_events_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_deployment_events_serialize( deployment_id=deployment_id, @@ -1046,21 +1069,22 @@ def list_deployment_events_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDeploymentEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListDeploymentEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1068,36 +1092,22 @@ def list_deployment_events_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_deployment_events_without_preload_content( self, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on deployment id") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on deployment event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on deployment id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on deployment event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1137,7 +1147,7 @@ def list_deployment_events_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_deployment_events_serialize( deployment_id=deployment_id, @@ -1148,24 +1158,26 @@ def list_deployment_events_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDeploymentEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListDeploymentEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_deployment_events_serialize( self, deployment_id, @@ -1178,10 +1190,11 @@ def _list_deployment_events_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "types": "multi", + 'types': 'multi', } _path_params: Dict[str, str] = {} @@ -1196,34 +1209,47 @@ def _list_deployment_events_serialize( # process the path parameters # process the query parameters if deployment_id is not None: - _query_params.append(("deployment_id", deployment_id)) - + + _query_params.append(('deployment_id', deployment_id)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/deployment_events", + method='GET', + resource_path='/v1/deployment_events', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1233,41 +1259,28 @@ def _list_deployment_events_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_deployments( self, - app_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on application id"), - ] = None, - service_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on service id") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on statuses"), - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on deployment ids"), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on application id")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on service id")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on statuses")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on deployment ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1309,7 +1322,7 @@ def list_deployments( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_deployments_serialize( app_id=app_id, @@ -1321,21 +1334,22 @@ def list_deployments( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDeploymentsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListDeploymentsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1343,38 +1357,23 @@ def list_deployments( response_types_map=_response_types_map, ).data + @validate_call def list_deployments_with_http_info( self, - app_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on application id"), - ] = None, - service_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on service id") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on statuses"), - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on deployment ids"), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on application id")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on service id")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on statuses")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on deployment ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1416,7 +1415,7 @@ def list_deployments_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_deployments_serialize( app_id=app_id, @@ -1428,21 +1427,22 @@ def list_deployments_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDeploymentsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListDeploymentsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1450,38 +1450,23 @@ def list_deployments_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_deployments_without_preload_content( self, - app_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on application id"), - ] = None, - service_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on service id") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on statuses"), - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on deployment ids"), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on application id")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on service id")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on statuses")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on deployment ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1523,7 +1508,7 @@ def list_deployments_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_deployments_serialize( app_id=app_id, @@ -1535,24 +1520,26 @@ def list_deployments_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDeploymentsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListDeploymentsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_deployments_serialize( self, app_id, @@ -1566,11 +1553,12 @@ def _list_deployments_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "statuses": "multi", - "ids": "multi", + 'statuses': 'multi', + 'ids': 'multi', } _path_params: Dict[str, str] = {} @@ -1585,37 +1573,51 @@ def _list_deployments_serialize( # process the path parameters # process the query parameters if app_id is not None: - _query_params.append(("app_id", app_id)) - + + _query_params.append(('app_id', app_id)) + if service_id is not None: - _query_params.append(("service_id", service_id)) - + + _query_params.append(('service_id', service_id)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if statuses is not None: - _query_params.append(("statuses", statuses)) - + + _query_params.append(('statuses', statuses)) + if ids is not None: - _query_params.append(("ids", ids)) - + + _query_params.append(('ids', ids)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/deployments", + method='GET', + resource_path='/v1/deployments', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1625,5 +1627,7 @@ def _list_deployments_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/docker_helper_api.py b/koyeb/api/api/docker_helper_api.py index 6ac48974..d714c6f8 100644 --- a/koyeb/api/api/docker_helper_api.py +++ b/koyeb/api/api/docker_helper_api.py @@ -37,24 +37,19 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def verify_docker_image( self, - image: Annotated[ - Optional[StrictStr], Field(description="The full image uri to be verified") - ] = None, - secret_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) the id of the secret to use to authenticate to the registry" - ), - ] = None, + image: Annotated[Optional[StrictStr], Field(description="The full image uri to be verified")] = None, + secret_id: Annotated[Optional[StrictStr], Field(description="(Optional) the id of the secret to use to authenticate to the registry")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -89,7 +84,7 @@ def verify_docker_image( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._verify_docker_image_serialize( image=image, @@ -97,21 +92,22 @@ def verify_docker_image( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VerifyDockerImageReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "VerifyDockerImageReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -119,24 +115,19 @@ def verify_docker_image( response_types_map=_response_types_map, ).data + @validate_call def verify_docker_image_with_http_info( self, - image: Annotated[ - Optional[StrictStr], Field(description="The full image uri to be verified") - ] = None, - secret_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) the id of the secret to use to authenticate to the registry" - ), - ] = None, + image: Annotated[Optional[StrictStr], Field(description="The full image uri to be verified")] = None, + secret_id: Annotated[Optional[StrictStr], Field(description="(Optional) the id of the secret to use to authenticate to the registry")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -171,7 +162,7 @@ def verify_docker_image_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._verify_docker_image_serialize( image=image, @@ -179,21 +170,22 @@ def verify_docker_image_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VerifyDockerImageReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "VerifyDockerImageReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -201,24 +193,19 @@ def verify_docker_image_with_http_info( response_types_map=_response_types_map, ) + @validate_call def verify_docker_image_without_preload_content( self, - image: Annotated[ - Optional[StrictStr], Field(description="The full image uri to be verified") - ] = None, - secret_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) the id of the secret to use to authenticate to the registry" - ), - ] = None, + image: Annotated[Optional[StrictStr], Field(description="The full image uri to be verified")] = None, + secret_id: Annotated[Optional[StrictStr], Field(description="(Optional) the id of the secret to use to authenticate to the registry")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -253,7 +240,7 @@ def verify_docker_image_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._verify_docker_image_serialize( image=image, @@ -261,24 +248,26 @@ def verify_docker_image_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VerifyDockerImageReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "VerifyDockerImageReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _verify_docker_image_serialize( self, image, @@ -288,9 +277,11 @@ def _verify_docker_image_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -304,25 +295,35 @@ def _verify_docker_image_serialize( # process the path parameters # process the query parameters if image is not None: - _query_params.append(("image", image)) - + + _query_params.append(('image', image)) + if secret_id is not None: - _query_params.append(("secret_id", secret_id)) - + + _query_params.append(('secret_id', secret_id)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/docker-helper/verify", + method='GET', + resource_path='/v1/docker-helper/verify', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -332,5 +333,7 @@ def _verify_docker_image_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/domains_api.py b/koyeb/api/api/domains_api.py index 959d7317..a67f766d 100644 --- a/koyeb/api/api/domains_api.py +++ b/koyeb/api/api/domains_api.py @@ -42,6 +42,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def create_domain( self, @@ -50,8 +51,9 @@ def create_domain( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -83,28 +85,29 @@ def create_domain( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_domain_serialize( domain=domain, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateDomainReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateDomainReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -112,6 +115,7 @@ def create_domain( response_types_map=_response_types_map, ).data + @validate_call def create_domain_with_http_info( self, @@ -120,8 +124,9 @@ def create_domain_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -153,28 +158,29 @@ def create_domain_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_domain_serialize( domain=domain, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateDomainReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateDomainReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -182,6 +188,7 @@ def create_domain_with_http_info( response_types_map=_response_types_map, ) + @validate_call def create_domain_without_preload_content( self, @@ -190,8 +197,9 @@ def create_domain_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -223,31 +231,33 @@ def create_domain_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_domain_serialize( domain=domain, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateDomainReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateDomainReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_domain_serialize( self, domain, @@ -256,9 +266,11 @@ def _create_domain_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -277,16 +289,24 @@ def _create_domain_serialize( if domain is not None: _body_params = domain + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/domains", + method='POST', + resource_path='/v1/domains', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -296,9 +316,12 @@ def _create_domain_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def delete_domain( self, @@ -307,8 +330,9 @@ def delete_domain( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -340,28 +364,29 @@ def delete_domain( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_domain_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -369,6 +394,7 @@ def delete_domain( response_types_map=_response_types_map, ).data + @validate_call def delete_domain_with_http_info( self, @@ -377,8 +403,9 @@ def delete_domain_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -410,28 +437,29 @@ def delete_domain_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_domain_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -439,6 +467,7 @@ def delete_domain_with_http_info( response_types_map=_response_types_map, ) + @validate_call def delete_domain_without_preload_content( self, @@ -447,8 +476,9 @@ def delete_domain_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -480,31 +510,33 @@ def delete_domain_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_domain_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_domain_serialize( self, id, @@ -513,9 +545,11 @@ def _delete_domain_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -528,22 +562,30 @@ def _delete_domain_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/domains/{id}", + method='DELETE', + resource_path='/v1/domains/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -553,9 +595,12 @@ def _delete_domain_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_domain( self, @@ -564,8 +609,9 @@ def get_domain( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -597,28 +643,29 @@ def get_domain( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_domain_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDomainReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetDomainReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -626,6 +673,7 @@ def get_domain( response_types_map=_response_types_map, ).data + @validate_call def get_domain_with_http_info( self, @@ -634,8 +682,9 @@ def get_domain_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -667,28 +716,29 @@ def get_domain_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_domain_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDomainReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetDomainReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -696,6 +746,7 @@ def get_domain_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_domain_without_preload_content( self, @@ -704,8 +755,9 @@ def get_domain_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -737,31 +789,33 @@ def get_domain_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_domain_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDomainReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetDomainReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_domain_serialize( self, id, @@ -770,9 +824,11 @@ def _get_domain_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -785,22 +841,30 @@ def _get_domain_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/domains/{id}", + method='GET', + resource_path='/v1/domains/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -810,46 +874,29 @@ def _get_domain_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_domains( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) A filter for types - AUTOASSIGNED: Domain like -.koyeb.app" - ), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) A filter for statuses"), - ] = None, - app_ids: Annotated[ - Optional[List[StrictStr]], Field(description="(Optional) A filter for apps") - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on domain ids"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) A filter for types - AUTOASSIGNED: Domain like -.koyeb.app")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) A filter for statuses")] = None, + app_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) A filter for apps")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on domain ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -893,7 +940,7 @@ def list_domains( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_domains_serialize( limit=limit, @@ -906,21 +953,22 @@ def list_domains( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDomainsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListDomainsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -928,43 +976,24 @@ def list_domains( response_types_map=_response_types_map, ).data + @validate_call def list_domains_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) A filter for types - AUTOASSIGNED: Domain like -.koyeb.app" - ), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) A filter for statuses"), - ] = None, - app_ids: Annotated[ - Optional[List[StrictStr]], Field(description="(Optional) A filter for apps") - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on domain ids"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) A filter for types - AUTOASSIGNED: Domain like -.koyeb.app")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) A filter for statuses")] = None, + app_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) A filter for apps")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on domain ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1008,7 +1037,7 @@ def list_domains_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_domains_serialize( limit=limit, @@ -1021,21 +1050,22 @@ def list_domains_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDomainsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListDomainsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1043,43 +1073,24 @@ def list_domains_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_domains_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) A filter for types - AUTOASSIGNED: Domain like -.koyeb.app" - ), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) A filter for statuses"), - ] = None, - app_ids: Annotated[ - Optional[List[StrictStr]], Field(description="(Optional) A filter for apps") - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on domain ids"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) A filter for types - AUTOASSIGNED: Domain like -.koyeb.app")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) A filter for statuses")] = None, + app_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) A filter for apps")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on domain ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1123,7 +1134,7 @@ def list_domains_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_domains_serialize( limit=limit, @@ -1136,24 +1147,26 @@ def list_domains_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDomainsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListDomainsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_domains_serialize( self, limit, @@ -1168,13 +1181,14 @@ def _list_domains_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "types": "multi", - "statuses": "multi", - "app_ids": "multi", - "ids": "multi", + 'types': 'multi', + 'statuses': 'multi', + 'app_ids': 'multi', + 'ids': 'multi', } _path_params: Dict[str, str] = {} @@ -1189,40 +1203,55 @@ def _list_domains_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + if statuses is not None: - _query_params.append(("statuses", statuses)) - + + _query_params.append(('statuses', statuses)) + if app_ids is not None: - _query_params.append(("app_ids", app_ids)) - + + _query_params.append(('app_ids', app_ids)) + if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if ids is not None: - _query_params.append(("ids", ids)) - + + _query_params.append(('ids', ids)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/domains", + method='GET', + resource_path='/v1/domains', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1232,9 +1261,12 @@ def _list_domains_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def refresh_domain_status( self, @@ -1243,8 +1275,9 @@ def refresh_domain_status( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1276,28 +1309,29 @@ def refresh_domain_status( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._refresh_domain_status_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1305,6 +1339,7 @@ def refresh_domain_status( response_types_map=_response_types_map, ).data + @validate_call def refresh_domain_status_with_http_info( self, @@ -1313,8 +1348,9 @@ def refresh_domain_status_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1346,28 +1382,29 @@ def refresh_domain_status_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._refresh_domain_status_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1375,6 +1412,7 @@ def refresh_domain_status_with_http_info( response_types_map=_response_types_map, ) + @validate_call def refresh_domain_status_without_preload_content( self, @@ -1383,8 +1421,9 @@ def refresh_domain_status_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1416,31 +1455,33 @@ def refresh_domain_status_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._refresh_domain_status_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _refresh_domain_status_serialize( self, id, @@ -1449,9 +1490,11 @@ def _refresh_domain_status_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1464,22 +1507,30 @@ def _refresh_domain_status_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/domains/{id}/refresh", + method='POST', + resource_path='/v1/domains/{id}/refresh', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1489,27 +1540,26 @@ def _refresh_domain_status_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_domain( self, id: StrictStr, domain: UpdateDomain, update_mask: Optional[StrictStr] = None, - dry_run: Annotated[ - Optional[StrictBool], - Field( - description="If set, run validation and check that the domain is available." - ), - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set, run validation and check that the domain is available.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1547,7 +1597,7 @@ def update_domain( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_domain_serialize( id=id, @@ -1557,21 +1607,22 @@ def update_domain( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateDomainReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateDomainReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1579,24 +1630,21 @@ def update_domain( response_types_map=_response_types_map, ).data + @validate_call def update_domain_with_http_info( self, id: StrictStr, domain: UpdateDomain, update_mask: Optional[StrictStr] = None, - dry_run: Annotated[ - Optional[StrictBool], - Field( - description="If set, run validation and check that the domain is available." - ), - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set, run validation and check that the domain is available.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1634,7 +1682,7 @@ def update_domain_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_domain_serialize( id=id, @@ -1644,21 +1692,22 @@ def update_domain_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateDomainReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateDomainReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1666,24 +1715,21 @@ def update_domain_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_domain_without_preload_content( self, id: StrictStr, domain: UpdateDomain, update_mask: Optional[StrictStr] = None, - dry_run: Annotated[ - Optional[StrictBool], - Field( - description="If set, run validation and check that the domain is available." - ), - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set, run validation and check that the domain is available.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1721,7 +1767,7 @@ def update_domain_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_domain_serialize( id=id, @@ -1731,24 +1777,26 @@ def update_domain_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateDomainReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateDomainReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_domain_serialize( self, id, @@ -1760,9 +1808,11 @@ def _update_domain_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1775,30 +1825,40 @@ def _update_domain_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + if dry_run is not None: - _query_params.append(("dry_run", dry_run)) - + + _query_params.append(('dry_run', dry_run)) + # process the header parameters # process the form parameters # process the body parameter if domain is not None: _body_params = domain + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/domains/{id}", + method='PATCH', + resource_path='/v1/domains/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1808,5 +1868,7 @@ def _update_domain_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/instance_snapshots_api.py b/koyeb/api/api/instance_snapshots_api.py index 2c35bd47..bd84a8b4 100644 --- a/koyeb/api/api/instance_snapshots_api.py +++ b/koyeb/api/api/instance_snapshots_api.py @@ -19,14 +19,10 @@ from typing import List, Optional from typing_extensions import Annotated from koyeb.api.models.create_instance_snapshot_reply import CreateInstanceSnapshotReply -from koyeb.api.models.create_instance_snapshot_request import ( - CreateInstanceSnapshotRequest, -) +from koyeb.api.models.create_instance_snapshot_request import CreateInstanceSnapshotRequest from koyeb.api.models.delete_instance_snapshot_reply import DeleteInstanceSnapshotReply from koyeb.api.models.get_instance_snapshot_reply import GetInstanceSnapshotReply -from koyeb.api.models.list_instance_snapshot_events_reply import ( - ListInstanceSnapshotEventsReply, -) +from koyeb.api.models.list_instance_snapshot_events_reply import ListInstanceSnapshotEventsReply from koyeb.api.models.list_instance_snapshots_reply import ListInstanceSnapshotsReply from koyeb.api.api_client import ApiClient, RequestSerialized @@ -46,6 +42,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def create_instance_snapshot( self, @@ -54,8 +51,9 @@ def create_instance_snapshot( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -87,28 +85,29 @@ def create_instance_snapshot( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_instance_snapshot_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateInstanceSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -116,6 +115,7 @@ def create_instance_snapshot( response_types_map=_response_types_map, ).data + @validate_call def create_instance_snapshot_with_http_info( self, @@ -124,8 +124,9 @@ def create_instance_snapshot_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -157,28 +158,29 @@ def create_instance_snapshot_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_instance_snapshot_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateInstanceSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -186,6 +188,7 @@ def create_instance_snapshot_with_http_info( response_types_map=_response_types_map, ) + @validate_call def create_instance_snapshot_without_preload_content( self, @@ -194,8 +197,9 @@ def create_instance_snapshot_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -227,31 +231,33 @@ def create_instance_snapshot_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_instance_snapshot_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateInstanceSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_instance_snapshot_serialize( self, body, @@ -260,9 +266,11 @@ def _create_instance_snapshot_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -281,16 +289,24 @@ def _create_instance_snapshot_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/instance_snapshots", + method='POST', + resource_path='/v1/instance_snapshots', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -300,9 +316,12 @@ def _create_instance_snapshot_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def delete_instance_snapshot( self, @@ -311,8 +330,9 @@ def delete_instance_snapshot( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -344,28 +364,29 @@ def delete_instance_snapshot( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_instance_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteInstanceSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -373,6 +394,7 @@ def delete_instance_snapshot( response_types_map=_response_types_map, ).data + @validate_call def delete_instance_snapshot_with_http_info( self, @@ -381,8 +403,9 @@ def delete_instance_snapshot_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -414,28 +437,29 @@ def delete_instance_snapshot_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_instance_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteInstanceSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -443,6 +467,7 @@ def delete_instance_snapshot_with_http_info( response_types_map=_response_types_map, ) + @validate_call def delete_instance_snapshot_without_preload_content( self, @@ -451,8 +476,9 @@ def delete_instance_snapshot_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -484,31 +510,33 @@ def delete_instance_snapshot_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_instance_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteInstanceSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_instance_snapshot_serialize( self, id, @@ -517,9 +545,11 @@ def _delete_instance_snapshot_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -532,22 +562,30 @@ def _delete_instance_snapshot_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/instance_snapshots/{id}", + method='DELETE', + resource_path='/v1/instance_snapshots/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -557,9 +595,12 @@ def _delete_instance_snapshot_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_instance_snapshot( self, @@ -568,8 +609,9 @@ def get_instance_snapshot( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -601,28 +643,29 @@ def get_instance_snapshot( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_instance_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetInstanceSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -630,6 +673,7 @@ def get_instance_snapshot( response_types_map=_response_types_map, ).data + @validate_call def get_instance_snapshot_with_http_info( self, @@ -638,8 +682,9 @@ def get_instance_snapshot_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -671,28 +716,29 @@ def get_instance_snapshot_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_instance_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetInstanceSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -700,6 +746,7 @@ def get_instance_snapshot_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_instance_snapshot_without_preload_content( self, @@ -708,8 +755,9 @@ def get_instance_snapshot_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -741,31 +789,33 @@ def get_instance_snapshot_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_instance_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetInstanceSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_instance_snapshot_serialize( self, id, @@ -774,9 +824,11 @@ def _get_instance_snapshot_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -789,22 +841,30 @@ def _get_instance_snapshot_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/instance_snapshots/{id}", + method='GET', + resource_path='/v1/instance_snapshots/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -814,40 +874,27 @@ def _get_instance_snapshot_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_instance_snapshot_events( self, - instance_snapshot_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on instance snapshot id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance snapshot event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + instance_snapshot_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on instance snapshot id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance snapshot event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -887,7 +934,7 @@ def list_instance_snapshot_events( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instance_snapshot_events_serialize( instance_snapshot_id=instance_snapshot_id, @@ -898,21 +945,22 @@ def list_instance_snapshot_events( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstanceSnapshotEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstanceSnapshotEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -920,37 +968,22 @@ def list_instance_snapshot_events( response_types_map=_response_types_map, ).data + @validate_call def list_instance_snapshot_events_with_http_info( self, - instance_snapshot_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on instance snapshot id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance snapshot event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + instance_snapshot_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on instance snapshot id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance snapshot event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -990,7 +1023,7 @@ def list_instance_snapshot_events_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instance_snapshot_events_serialize( instance_snapshot_id=instance_snapshot_id, @@ -1001,21 +1034,22 @@ def list_instance_snapshot_events_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstanceSnapshotEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstanceSnapshotEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1023,37 +1057,22 @@ def list_instance_snapshot_events_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_instance_snapshot_events_without_preload_content( self, - instance_snapshot_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on instance snapshot id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance snapshot event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + instance_snapshot_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on instance snapshot id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance snapshot event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1093,7 +1112,7 @@ def list_instance_snapshot_events_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instance_snapshot_events_serialize( instance_snapshot_id=instance_snapshot_id, @@ -1104,24 +1123,26 @@ def list_instance_snapshot_events_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstanceSnapshotEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstanceSnapshotEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_instance_snapshot_events_serialize( self, instance_snapshot_id, @@ -1134,10 +1155,11 @@ def _list_instance_snapshot_events_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "types": "multi", + 'types': 'multi', } _path_params: Dict[str, str] = {} @@ -1152,34 +1174,47 @@ def _list_instance_snapshot_events_serialize( # process the path parameters # process the query parameters if instance_snapshot_id is not None: - _query_params.append(("instance_snapshot_id", instance_snapshot_id)) - + + _query_params.append(('instance_snapshot_id', instance_snapshot_id)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/instance_snapshot_events", + method='GET', + resource_path='/v1/instance_snapshot_events', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1189,9 +1224,12 @@ def _list_instance_snapshot_events_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_instance_snapshots( self, @@ -1205,8 +1243,9 @@ def list_instance_snapshots( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1248,7 +1287,7 @@ def list_instance_snapshots( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instance_snapshots_serialize( limit=limit, @@ -1260,21 +1299,22 @@ def list_instance_snapshots( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstanceSnapshotsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstanceSnapshotsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1282,6 +1322,7 @@ def list_instance_snapshots( response_types_map=_response_types_map, ).data + @validate_call def list_instance_snapshots_with_http_info( self, @@ -1295,8 +1336,9 @@ def list_instance_snapshots_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1338,7 +1380,7 @@ def list_instance_snapshots_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instance_snapshots_serialize( limit=limit, @@ -1350,21 +1392,22 @@ def list_instance_snapshots_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstanceSnapshotsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstanceSnapshotsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1372,6 +1415,7 @@ def list_instance_snapshots_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_instance_snapshots_without_preload_content( self, @@ -1385,8 +1429,9 @@ def list_instance_snapshots_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1428,7 +1473,7 @@ def list_instance_snapshots_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instance_snapshots_serialize( limit=limit, @@ -1440,24 +1485,26 @@ def list_instance_snapshots_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstanceSnapshotsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstanceSnapshotsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_instance_snapshots_serialize( self, limit, @@ -1471,11 +1518,12 @@ def _list_instance_snapshots_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "statuses": "multi", - "ids": "multi", + 'statuses': 'multi', + 'ids': 'multi', } _path_params: Dict[str, str] = {} @@ -1490,37 +1538,51 @@ def _list_instance_snapshots_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if statuses is not None: - _query_params.append(("statuses", statuses)) - + + _query_params.append(('statuses', statuses)) + if type is not None: - _query_params.append(("type", type)) - + + _query_params.append(('type', type)) + if ids is not None: - _query_params.append(("ids", ids)) - + + _query_params.append(('ids', ids)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/instance_snapshots", + method='GET', + resource_path='/v1/instance_snapshots', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1530,5 +1592,7 @@ def _list_instance_snapshots_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/instances_api.py b/koyeb/api/api/instances_api.py index 3af51bdc..f3f01bd7 100644 --- a/koyeb/api/api/instances_api.py +++ b/koyeb/api/api/instances_api.py @@ -16,22 +16,13 @@ from typing_extensions import Annotated from datetime import datetime -from pydantic import ( - Field, - StrictBool, - StrictBytes, - StrictInt, - StrictStr, - field_validator, -) +from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr, field_validator from typing import List, Optional, Union from typing_extensions import Annotated from koyeb.api.models.get_instance_reply import GetInstanceReply from koyeb.api.models.list_instance_events_reply import ListInstanceEventsReply from koyeb.api.models.list_instances_reply import ListInstancesReply -from koyeb.api.models.stream_result_of_exec_command_reply import ( - StreamResultOfExecCommandReply, -) +from koyeb.api.models.stream_result_of_exec_command_reply import StreamResultOfExecCommandReply from koyeb.api.api_client import ApiClient, RequestSerialized from koyeb.api.api_response import ApiResponse @@ -50,43 +41,25 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def exec_command( self, - id: Annotated[ - Optional[StrictStr], Field(description="ID of the resource to exec on.") - ] = None, - body_command: Annotated[ - Optional[List[StrictStr]], - Field(description="Command to exec. Mandatory in the first frame sent"), - ] = None, + id: Annotated[Optional[StrictStr], Field(description="ID of the resource to exec on.")] = None, + body_command: Annotated[Optional[List[StrictStr]], Field(description="Command to exec. Mandatory in the first frame sent")] = None, body_tty_size_height: Optional[StrictInt] = None, body_tty_size_width: Optional[StrictInt] = None, - body_stdin_data: Annotated[ - Optional[Union[StrictBytes, StrictStr]], - Field(description="Data is base64 encoded"), - ] = None, - body_stdin_close: Annotated[ - Optional[StrictBool], Field(description="Indicate last data frame") - ] = None, - body_disable_tty: Annotated[ - Optional[StrictBool], - Field( - description="Disable TTY. It's enough to specify it in the first frame" - ), - ] = None, - id_type: Annotated[ - Optional[StrictStr], - Field( - description="When specified, it is used to determine if the kind of resource the id refers to. If missing, defaults to the instance id." - ), - ] = None, + body_stdin_data: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="Data is base64 encoded")] = None, + body_stdin_close: Annotated[Optional[StrictBool], Field(description="Indicate last data frame")] = None, + body_disable_tty: Annotated[Optional[StrictBool], Field(description="Disable TTY. It's enough to specify it in the first frame")] = None, + id_type: Annotated[Optional[StrictStr], Field(description="When specified, it is used to determine if the kind of resource the id refers to. If missing, defaults to the instance id.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -133,7 +106,7 @@ def exec_command( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._exec_command_serialize( id=id, @@ -147,21 +120,22 @@ def exec_command( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "StreamResultOfExecCommandReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "StreamResultOfExecCommandReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -169,43 +143,25 @@ def exec_command( response_types_map=_response_types_map, ).data + @validate_call def exec_command_with_http_info( self, - id: Annotated[ - Optional[StrictStr], Field(description="ID of the resource to exec on.") - ] = None, - body_command: Annotated[ - Optional[List[StrictStr]], - Field(description="Command to exec. Mandatory in the first frame sent"), - ] = None, + id: Annotated[Optional[StrictStr], Field(description="ID of the resource to exec on.")] = None, + body_command: Annotated[Optional[List[StrictStr]], Field(description="Command to exec. Mandatory in the first frame sent")] = None, body_tty_size_height: Optional[StrictInt] = None, body_tty_size_width: Optional[StrictInt] = None, - body_stdin_data: Annotated[ - Optional[Union[StrictBytes, StrictStr]], - Field(description="Data is base64 encoded"), - ] = None, - body_stdin_close: Annotated[ - Optional[StrictBool], Field(description="Indicate last data frame") - ] = None, - body_disable_tty: Annotated[ - Optional[StrictBool], - Field( - description="Disable TTY. It's enough to specify it in the first frame" - ), - ] = None, - id_type: Annotated[ - Optional[StrictStr], - Field( - description="When specified, it is used to determine if the kind of resource the id refers to. If missing, defaults to the instance id." - ), - ] = None, + body_stdin_data: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="Data is base64 encoded")] = None, + body_stdin_close: Annotated[Optional[StrictBool], Field(description="Indicate last data frame")] = None, + body_disable_tty: Annotated[Optional[StrictBool], Field(description="Disable TTY. It's enough to specify it in the first frame")] = None, + id_type: Annotated[Optional[StrictStr], Field(description="When specified, it is used to determine if the kind of resource the id refers to. If missing, defaults to the instance id.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -252,7 +208,7 @@ def exec_command_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._exec_command_serialize( id=id, @@ -266,21 +222,22 @@ def exec_command_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "StreamResultOfExecCommandReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "StreamResultOfExecCommandReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -288,43 +245,25 @@ def exec_command_with_http_info( response_types_map=_response_types_map, ) + @validate_call def exec_command_without_preload_content( self, - id: Annotated[ - Optional[StrictStr], Field(description="ID of the resource to exec on.") - ] = None, - body_command: Annotated[ - Optional[List[StrictStr]], - Field(description="Command to exec. Mandatory in the first frame sent"), - ] = None, + id: Annotated[Optional[StrictStr], Field(description="ID of the resource to exec on.")] = None, + body_command: Annotated[Optional[List[StrictStr]], Field(description="Command to exec. Mandatory in the first frame sent")] = None, body_tty_size_height: Optional[StrictInt] = None, body_tty_size_width: Optional[StrictInt] = None, - body_stdin_data: Annotated[ - Optional[Union[StrictBytes, StrictStr]], - Field(description="Data is base64 encoded"), - ] = None, - body_stdin_close: Annotated[ - Optional[StrictBool], Field(description="Indicate last data frame") - ] = None, - body_disable_tty: Annotated[ - Optional[StrictBool], - Field( - description="Disable TTY. It's enough to specify it in the first frame" - ), - ] = None, - id_type: Annotated[ - Optional[StrictStr], - Field( - description="When specified, it is used to determine if the kind of resource the id refers to. If missing, defaults to the instance id." - ), - ] = None, + body_stdin_data: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="Data is base64 encoded")] = None, + body_stdin_close: Annotated[Optional[StrictBool], Field(description="Indicate last data frame")] = None, + body_disable_tty: Annotated[Optional[StrictBool], Field(description="Disable TTY. It's enough to specify it in the first frame")] = None, + id_type: Annotated[Optional[StrictStr], Field(description="When specified, it is used to determine if the kind of resource the id refers to. If missing, defaults to the instance id.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -371,7 +310,7 @@ def exec_command_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._exec_command_serialize( id=id, @@ -385,24 +324,26 @@ def exec_command_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "StreamResultOfExecCommandReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "StreamResultOfExecCommandReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _exec_command_serialize( self, id, @@ -418,10 +359,11 @@ def _exec_command_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "body.command": "multi", + 'body.command': 'multi', } _path_params: Dict[str, str] = {} @@ -436,43 +378,59 @@ def _exec_command_serialize( # process the path parameters # process the query parameters if id is not None: - _query_params.append(("id", id)) - + + _query_params.append(('id', id)) + if body_command is not None: - _query_params.append(("body.command", body_command)) - + + _query_params.append(('body.command', body_command)) + if body_tty_size_height is not None: - _query_params.append(("body.tty_size.height", body_tty_size_height)) - + + _query_params.append(('body.tty_size.height', body_tty_size_height)) + if body_tty_size_width is not None: - _query_params.append(("body.tty_size.width", body_tty_size_width)) - + + _query_params.append(('body.tty_size.width', body_tty_size_width)) + if body_stdin_data is not None: - _query_params.append(("body.stdin.data", body_stdin_data)) - + + _query_params.append(('body.stdin.data', body_stdin_data)) + if body_stdin_close is not None: - _query_params.append(("body.stdin.close", body_stdin_close)) - + + _query_params.append(('body.stdin.close', body_stdin_close)) + if body_disable_tty is not None: - _query_params.append(("body.disableTty", body_disable_tty)) - + + _query_params.append(('body.disableTty', body_disable_tty)) + if id_type is not None: - _query_params.append(("id_type", id_type)) - + + _query_params.append(('id_type', id_type)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/streams/instances/exec", + method='GET', + resource_path='/v1/streams/instances/exec', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -482,9 +440,12 @@ def _exec_command_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_instance( self, @@ -493,8 +454,9 @@ def get_instance( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -526,28 +488,29 @@ def get_instance( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_instance_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetInstanceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetInstanceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -555,6 +518,7 @@ def get_instance( response_types_map=_response_types_map, ).data + @validate_call def get_instance_with_http_info( self, @@ -563,8 +527,9 @@ def get_instance_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -596,28 +561,29 @@ def get_instance_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_instance_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetInstanceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetInstanceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -625,6 +591,7 @@ def get_instance_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_instance_without_preload_content( self, @@ -633,8 +600,9 @@ def get_instance_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -666,31 +634,33 @@ def get_instance_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_instance_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetInstanceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetInstanceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_instance_serialize( self, id, @@ -699,9 +669,11 @@ def _get_instance_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -714,22 +686,30 @@ def _get_instance_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/instances/{id}", + method='GET', + resource_path='/v1/instances/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -739,40 +719,27 @@ def _get_instance_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_instance_events( self, - instance_ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on list of instance id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + instance_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on list of instance id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -812,7 +779,7 @@ def list_instance_events( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instance_events_serialize( instance_ids=instance_ids, @@ -823,21 +790,22 @@ def list_instance_events( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstanceEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstanceEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -845,37 +813,22 @@ def list_instance_events( response_types_map=_response_types_map, ).data + @validate_call def list_instance_events_with_http_info( self, - instance_ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on list of instance id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + instance_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on list of instance id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -915,7 +868,7 @@ def list_instance_events_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instance_events_serialize( instance_ids=instance_ids, @@ -926,21 +879,22 @@ def list_instance_events_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstanceEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstanceEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -948,37 +902,22 @@ def list_instance_events_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_instance_events_without_preload_content( self, - instance_ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on list of instance id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + instance_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on list of instance id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1018,7 +957,7 @@ def list_instance_events_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instance_events_serialize( instance_ids=instance_ids, @@ -1029,24 +968,26 @@ def list_instance_events_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstanceEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstanceEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_instance_events_serialize( self, instance_ids, @@ -1059,11 +1000,12 @@ def _list_instance_events_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "instance_ids": "multi", - "types": "multi", + 'instance_ids': 'multi', + 'types': 'multi', } _path_params: Dict[str, str] = {} @@ -1078,34 +1020,47 @@ def _list_instance_events_serialize( # process the path parameters # process the query parameters if instance_ids is not None: - _query_params.append(("instance_ids", instance_ids)) - + + _query_params.append(('instance_ids', instance_ids)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/instance_events", + method='GET', + resource_path='/v1/instance_events', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1115,72 +1070,35 @@ def _list_instance_events_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_instances( self, - app_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on application id"), - ] = None, - service_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on service id") - ] = None, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on deployment id") - ] = None, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on regional deployment id"), - ] = None, - allocation_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on allocation id") - ] = None, - replica_index: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on replica index") - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance statuses"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, - starting_time: Annotated[ - Optional[datetime], - Field( - description="(Optional) The starting time of the period of running instance" - ), - ] = None, - ending_time: Annotated[ - Optional[datetime], - Field( - description="(Optional) The ending time of the period of running instance" - ), - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance ids"), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on application id")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on service id")] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on deployment id")] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on regional deployment id")] = None, + allocation_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on allocation id")] = None, + replica_index: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on replica index")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance statuses")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + starting_time: Annotated[Optional[datetime], Field(description="(Optional) The starting time of the period of running instance")] = None, + ending_time: Annotated[Optional[datetime], Field(description="(Optional) The ending time of the period of running instance")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1236,7 +1154,7 @@ def list_instances( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instances_serialize( app_id=app_id, @@ -1255,21 +1173,22 @@ def list_instances( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstancesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstancesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1277,69 +1196,30 @@ def list_instances( response_types_map=_response_types_map, ).data + @validate_call def list_instances_with_http_info( self, - app_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on application id"), - ] = None, - service_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on service id") - ] = None, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on deployment id") - ] = None, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on regional deployment id"), - ] = None, - allocation_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on allocation id") - ] = None, - replica_index: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on replica index") - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance statuses"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, - starting_time: Annotated[ - Optional[datetime], - Field( - description="(Optional) The starting time of the period of running instance" - ), - ] = None, - ending_time: Annotated[ - Optional[datetime], - Field( - description="(Optional) The ending time of the period of running instance" - ), - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance ids"), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on application id")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on service id")] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on deployment id")] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on regional deployment id")] = None, + allocation_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on allocation id")] = None, + replica_index: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on replica index")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance statuses")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + starting_time: Annotated[Optional[datetime], Field(description="(Optional) The starting time of the period of running instance")] = None, + ending_time: Annotated[Optional[datetime], Field(description="(Optional) The ending time of the period of running instance")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1395,7 +1275,7 @@ def list_instances_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instances_serialize( app_id=app_id, @@ -1414,21 +1294,22 @@ def list_instances_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstancesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstancesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1436,69 +1317,30 @@ def list_instances_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_instances_without_preload_content( self, - app_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on application id"), - ] = None, - service_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on service id") - ] = None, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on deployment id") - ] = None, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on regional deployment id"), - ] = None, - allocation_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on allocation id") - ] = None, - replica_index: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on replica index") - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance statuses"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, - starting_time: Annotated[ - Optional[datetime], - Field( - description="(Optional) The starting time of the period of running instance" - ), - ] = None, - ending_time: Annotated[ - Optional[datetime], - Field( - description="(Optional) The ending time of the period of running instance" - ), - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance ids"), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on application id")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on service id")] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on deployment id")] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on regional deployment id")] = None, + allocation_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on allocation id")] = None, + replica_index: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on replica index")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance statuses")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + starting_time: Annotated[Optional[datetime], Field(description="(Optional) The starting time of the period of running instance")] = None, + ending_time: Annotated[Optional[datetime], Field(description="(Optional) The ending time of the period of running instance")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1554,7 +1396,7 @@ def list_instances_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instances_serialize( app_id=app_id, @@ -1573,24 +1415,26 @@ def list_instances_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstancesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstancesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_instances_serialize( self, app_id, @@ -1611,11 +1455,12 @@ def _list_instances_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "statuses": "multi", - "ids": "multi", + 'statuses': 'multi', + 'ids': 'multi', } _path_params: Dict[str, str] = {} @@ -1630,78 +1475,97 @@ def _list_instances_serialize( # process the path parameters # process the query parameters if app_id is not None: - _query_params.append(("app_id", app_id)) - + + _query_params.append(('app_id', app_id)) + if service_id is not None: - _query_params.append(("service_id", service_id)) - + + _query_params.append(('service_id', service_id)) + if deployment_id is not None: - _query_params.append(("deployment_id", deployment_id)) - + + _query_params.append(('deployment_id', deployment_id)) + if regional_deployment_id is not None: - _query_params.append(("regional_deployment_id", regional_deployment_id)) - + + _query_params.append(('regional_deployment_id', regional_deployment_id)) + if allocation_id is not None: - _query_params.append(("allocation_id", allocation_id)) - + + _query_params.append(('allocation_id', allocation_id)) + if replica_index is not None: - _query_params.append(("replica_index", replica_index)) - + + _query_params.append(('replica_index', replica_index)) + if statuses is not None: - _query_params.append(("statuses", statuses)) - + + _query_params.append(('statuses', statuses)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + if starting_time is not None: if isinstance(starting_time, datetime): _query_params.append( ( - "starting_time", + 'starting_time', starting_time.strftime( self.api_client.configuration.datetime_format - ), + ) ) ) else: - _query_params.append(("starting_time", starting_time)) - + _query_params.append(('starting_time', starting_time)) + if ending_time is not None: if isinstance(ending_time, datetime): _query_params.append( ( - "ending_time", + 'ending_time', ending_time.strftime( self.api_client.configuration.datetime_format - ), + ) ) ) else: - _query_params.append(("ending_time", ending_time)) - + _query_params.append(('ending_time', ending_time)) + if ids is not None: - _query_params.append(("ids", ids)) - + + _query_params.append(('ids', ids)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/instances", + method='GET', + resource_path='/v1/instances', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1711,5 +1575,7 @@ def _list_instances_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/intercom_api.py b/koyeb/api/api/intercom_api.py index 8e5e123c..5568951f 100644 --- a/koyeb/api/api/intercom_api.py +++ b/koyeb/api/api/intercom_api.py @@ -34,6 +34,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def get_intercom_profile( self, @@ -41,8 +42,9 @@ def get_intercom_profile( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -72,27 +74,28 @@ def get_intercom_profile( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_intercom_profile_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetIntercomProfileReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetIntercomProfileReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -100,6 +103,7 @@ def get_intercom_profile( response_types_map=_response_types_map, ).data + @validate_call def get_intercom_profile_with_http_info( self, @@ -107,8 +111,9 @@ def get_intercom_profile_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -138,27 +143,28 @@ def get_intercom_profile_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_intercom_profile_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetIntercomProfileReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetIntercomProfileReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -166,6 +172,7 @@ def get_intercom_profile_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_intercom_profile_without_preload_content( self, @@ -173,8 +180,9 @@ def get_intercom_profile_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -204,30 +212,32 @@ def get_intercom_profile_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_intercom_profile_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetIntercomProfileReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetIntercomProfileReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_intercom_profile_serialize( self, _request_auth, @@ -235,9 +245,11 @@ def _get_intercom_profile_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -254,16 +266,24 @@ def _get_intercom_profile_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/intercom/profile", + method='GET', + resource_path='/v1/intercom/profile', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -273,5 +293,7 @@ def _get_intercom_profile_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/invite_api.py b/koyeb/api/api/invite_api.py index d0f5b74c..c5c6773d 100644 --- a/koyeb/api/api/invite_api.py +++ b/koyeb/api/api/invite_api.py @@ -35,6 +35,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def create_invite( self, @@ -43,8 +44,9 @@ def create_invite( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -76,28 +78,29 @@ def create_invite( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_invite_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -105,6 +108,7 @@ def create_invite( response_types_map=_response_types_map, ).data + @validate_call def create_invite_with_http_info( self, @@ -113,8 +117,9 @@ def create_invite_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -146,28 +151,29 @@ def create_invite_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_invite_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -175,6 +181,7 @@ def create_invite_with_http_info( response_types_map=_response_types_map, ) + @validate_call def create_invite_without_preload_content( self, @@ -183,8 +190,9 @@ def create_invite_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -216,31 +224,33 @@ def create_invite_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_invite_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_invite_serialize( self, body, @@ -249,9 +259,11 @@ def _create_invite_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -270,16 +282,24 @@ def _create_invite_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/invite", + method='POST', + resource_path='/v1/account/invite', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -289,5 +309,7 @@ def _create_invite_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/logs_api.py b/koyeb/api/api/logs_api.py index a25db643..3013c141 100644 --- a/koyeb/api/api/logs_api.py +++ b/koyeb/api/api/logs_api.py @@ -39,103 +39,33 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def query_logs( self, - type: Annotated[ - Optional[StrictStr], - Field( - description='Type of logs to retrieve, either "build" or "runtime". Defaults to "runtime".' - ), - ] = None, - app_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - service_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - instance_id: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using instance_ids instead."), - ] = None, - instance_ids: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - stream: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using streams instead."), - ] = None, - streams: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on stream: either "stdout", "stderr" or "koyeb" (for system logs).' - ), - ] = None, - start: Annotated[ - Optional[datetime], - Field( - description="(Optional) Must always be before `end`. Defaults to 15 minutes ago." - ), - ] = None, - end: Annotated[ - Optional[datetime], - Field( - description="(Optional) Must always be after `start`. Defaults to now." - ), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field(description="(Optional) `asc` or `desc`. Defaults to `desc`."), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Defaults to 100. Maximum of 1000."), - ] = None, - regex: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Apply a regex to filter logs. Can't be used with `text`." - ), - ] = None, - text: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Looks for this string in logs. Can't be used with `regex`." - ), - ] = None, - regions: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on the provided regions (e.g. ["fra", "was"]).' - ), - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Type of logs to retrieve, either \"build\" or \"runtime\". Defaults to \"runtime\".")] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using instance_ids instead.")] = None, + instance_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + stream: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using streams instead.")] = None, + streams: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on stream: either \"stdout\", \"stderr\" or \"koyeb\" (for system logs).")] = None, + start: Annotated[Optional[datetime], Field(description="(Optional) Must always be before `end`. Defaults to 15 minutes ago.")] = None, + end: Annotated[Optional[datetime], Field(description="(Optional) Must always be after `start`. Defaults to now.")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) `asc` or `desc`. Defaults to `desc`.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) Defaults to 100. Maximum of 1000.")] = None, + regex: Annotated[Optional[StrictStr], Field(description="(Optional) Apply a regex to filter logs. Can't be used with `text`.")] = None, + text: Annotated[Optional[StrictStr], Field(description="(Optional) Looks for this string in logs. Can't be used with `regex`.")] = None, + regions: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided regions (e.g. [\"fra\", \"was\"]).")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -197,7 +127,7 @@ def query_logs( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._query_logs_serialize( type=type, @@ -219,21 +149,22 @@ def query_logs( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "QueryLogsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "QueryLogsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -241,103 +172,33 @@ def query_logs( response_types_map=_response_types_map, ).data + @validate_call def query_logs_with_http_info( self, - type: Annotated[ - Optional[StrictStr], - Field( - description='Type of logs to retrieve, either "build" or "runtime". Defaults to "runtime".' - ), - ] = None, - app_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - service_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - instance_id: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using instance_ids instead."), - ] = None, - instance_ids: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - stream: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using streams instead."), - ] = None, - streams: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on stream: either "stdout", "stderr" or "koyeb" (for system logs).' - ), - ] = None, - start: Annotated[ - Optional[datetime], - Field( - description="(Optional) Must always be before `end`. Defaults to 15 minutes ago." - ), - ] = None, - end: Annotated[ - Optional[datetime], - Field( - description="(Optional) Must always be after `start`. Defaults to now." - ), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field(description="(Optional) `asc` or `desc`. Defaults to `desc`."), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Defaults to 100. Maximum of 1000."), - ] = None, - regex: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Apply a regex to filter logs. Can't be used with `text`." - ), - ] = None, - text: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Looks for this string in logs. Can't be used with `regex`." - ), - ] = None, - regions: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on the provided regions (e.g. ["fra", "was"]).' - ), - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Type of logs to retrieve, either \"build\" or \"runtime\". Defaults to \"runtime\".")] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using instance_ids instead.")] = None, + instance_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + stream: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using streams instead.")] = None, + streams: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on stream: either \"stdout\", \"stderr\" or \"koyeb\" (for system logs).")] = None, + start: Annotated[Optional[datetime], Field(description="(Optional) Must always be before `end`. Defaults to 15 minutes ago.")] = None, + end: Annotated[Optional[datetime], Field(description="(Optional) Must always be after `start`. Defaults to now.")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) `asc` or `desc`. Defaults to `desc`.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) Defaults to 100. Maximum of 1000.")] = None, + regex: Annotated[Optional[StrictStr], Field(description="(Optional) Apply a regex to filter logs. Can't be used with `text`.")] = None, + text: Annotated[Optional[StrictStr], Field(description="(Optional) Looks for this string in logs. Can't be used with `regex`.")] = None, + regions: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided regions (e.g. [\"fra\", \"was\"]).")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -399,7 +260,7 @@ def query_logs_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._query_logs_serialize( type=type, @@ -421,21 +282,22 @@ def query_logs_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "QueryLogsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "QueryLogsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -443,103 +305,33 @@ def query_logs_with_http_info( response_types_map=_response_types_map, ) + @validate_call def query_logs_without_preload_content( self, - type: Annotated[ - Optional[StrictStr], - Field( - description='Type of logs to retrieve, either "build" or "runtime". Defaults to "runtime".' - ), - ] = None, - app_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - service_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - instance_id: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using instance_ids instead."), - ] = None, - instance_ids: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - stream: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using streams instead."), - ] = None, - streams: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on stream: either "stdout", "stderr" or "koyeb" (for system logs).' - ), - ] = None, - start: Annotated[ - Optional[datetime], - Field( - description="(Optional) Must always be before `end`. Defaults to 15 minutes ago." - ), - ] = None, - end: Annotated[ - Optional[datetime], - Field( - description="(Optional) Must always be after `start`. Defaults to now." - ), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field(description="(Optional) `asc` or `desc`. Defaults to `desc`."), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Defaults to 100. Maximum of 1000."), - ] = None, - regex: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Apply a regex to filter logs. Can't be used with `text`." - ), - ] = None, - text: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Looks for this string in logs. Can't be used with `regex`." - ), - ] = None, - regions: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on the provided regions (e.g. ["fra", "was"]).' - ), - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Type of logs to retrieve, either \"build\" or \"runtime\". Defaults to \"runtime\".")] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using instance_ids instead.")] = None, + instance_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + stream: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using streams instead.")] = None, + streams: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on stream: either \"stdout\", \"stderr\" or \"koyeb\" (for system logs).")] = None, + start: Annotated[Optional[datetime], Field(description="(Optional) Must always be before `end`. Defaults to 15 minutes ago.")] = None, + end: Annotated[Optional[datetime], Field(description="(Optional) Must always be after `start`. Defaults to now.")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) `asc` or `desc`. Defaults to `desc`.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) Defaults to 100. Maximum of 1000.")] = None, + regex: Annotated[Optional[StrictStr], Field(description="(Optional) Apply a regex to filter logs. Can't be used with `text`.")] = None, + text: Annotated[Optional[StrictStr], Field(description="(Optional) Looks for this string in logs. Can't be used with `regex`.")] = None, + regions: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided regions (e.g. [\"fra\", \"was\"]).")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -601,7 +393,7 @@ def query_logs_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._query_logs_serialize( type=type, @@ -623,24 +415,26 @@ def query_logs_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "QueryLogsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "QueryLogsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _query_logs_serialize( self, type, @@ -664,12 +458,13 @@ def _query_logs_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "instance_ids": "multi", - "streams": "multi", - "regions": "multi", + 'instance_ids': 'multi', + 'streams': 'multi', + 'regions': 'multi', } _path_params: Dict[str, str] = {} @@ -684,80 +479,109 @@ def _query_logs_serialize( # process the path parameters # process the query parameters if type is not None: - _query_params.append(("type", type)) - + + _query_params.append(('type', type)) + if app_id is not None: - _query_params.append(("app_id", app_id)) - + + _query_params.append(('app_id', app_id)) + if service_id is not None: - _query_params.append(("service_id", service_id)) - + + _query_params.append(('service_id', service_id)) + if deployment_id is not None: - _query_params.append(("deployment_id", deployment_id)) - + + _query_params.append(('deployment_id', deployment_id)) + if regional_deployment_id is not None: - _query_params.append(("regional_deployment_id", regional_deployment_id)) - + + _query_params.append(('regional_deployment_id', regional_deployment_id)) + if instance_id is not None: - _query_params.append(("instance_id", instance_id)) - + + _query_params.append(('instance_id', instance_id)) + if instance_ids is not None: - _query_params.append(("instance_ids", instance_ids)) - + + _query_params.append(('instance_ids', instance_ids)) + if stream is not None: - _query_params.append(("stream", stream)) - + + _query_params.append(('stream', stream)) + if streams is not None: - _query_params.append(("streams", streams)) - + + _query_params.append(('streams', streams)) + if start is not None: if isinstance(start, datetime): _query_params.append( ( - "start", - start.strftime(self.api_client.configuration.datetime_format), + 'start', + start.strftime( + self.api_client.configuration.datetime_format + ) ) ) else: - _query_params.append(("start", start)) - + _query_params.append(('start', start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ("end", end.strftime(self.api_client.configuration.datetime_format)) + ( + 'end', + end.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("end", end)) - + _query_params.append(('end', end)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if regex is not None: - _query_params.append(("regex", regex)) - + + _query_params.append(('regex', regex)) + if text is not None: - _query_params.append(("text", text)) - + + _query_params.append(('text', text)) + if regions is not None: - _query_params.append(("regions", regions)) - + + _query_params.append(('regions', regions)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/streams/logs/query", + method='GET', + resource_path='/v1/streams/logs/query', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -767,94 +591,36 @@ def _query_logs_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def tail_logs( self, - type: Annotated[ - Optional[StrictStr], - Field( - description='Type of logs to retrieve, either "build" or "runtime". Defaults to "runtime".' - ), - ] = None, - app_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - service_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - instance_id: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using instance_ids instead."), - ] = None, - instance_ids: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - stream: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using streams instead."), - ] = None, - streams: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on stream: either "stdout", "stderr" or "koyeb" (for system logs).' - ), - ] = None, - start: Annotated[ - Optional[datetime], - Field(description="(Optional) Defaults to 24 hours ago."), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Defaults to 1000. Maximum of 1000."), - ] = None, - regex: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Apply a regex to filter logs. Can't be used with `text`." - ), - ] = None, - text: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Looks for this string in logs. Can't be used with `regex`." - ), - ] = None, - regions: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on the provided regions (e.g. ["fra", "was"]).' - ), - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Type of logs to retrieve, either \"build\" or \"runtime\". Defaults to \"runtime\".")] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using instance_ids instead.")] = None, + instance_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + stream: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using streams instead.")] = None, + streams: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on stream: either \"stdout\", \"stderr\" or \"koyeb\" (for system logs).")] = None, + start: Annotated[Optional[datetime], Field(description="(Optional) Defaults to 24 hours ago.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) Defaults to 1000. Maximum of 1000.")] = None, + regex: Annotated[Optional[StrictStr], Field(description="(Optional) Apply a regex to filter logs. Can't be used with `text`.")] = None, + text: Annotated[Optional[StrictStr], Field(description="(Optional) Looks for this string in logs. Can't be used with `regex`.")] = None, + regions: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided regions (e.g. [\"fra\", \"was\"]).")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -912,7 +678,7 @@ def tail_logs( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._tail_logs_serialize( type=type, @@ -932,21 +698,22 @@ def tail_logs( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "StreamResultOfLogEntry", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "StreamResultOfLogEntry", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -954,91 +721,31 @@ def tail_logs( response_types_map=_response_types_map, ).data + @validate_call def tail_logs_with_http_info( self, - type: Annotated[ - Optional[StrictStr], - Field( - description='Type of logs to retrieve, either "build" or "runtime". Defaults to "runtime".' - ), - ] = None, - app_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - service_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - instance_id: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using instance_ids instead."), - ] = None, - instance_ids: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - stream: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using streams instead."), - ] = None, - streams: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on stream: either "stdout", "stderr" or "koyeb" (for system logs).' - ), - ] = None, - start: Annotated[ - Optional[datetime], - Field(description="(Optional) Defaults to 24 hours ago."), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Defaults to 1000. Maximum of 1000."), - ] = None, - regex: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Apply a regex to filter logs. Can't be used with `text`." - ), - ] = None, - text: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Looks for this string in logs. Can't be used with `regex`." - ), - ] = None, - regions: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on the provided regions (e.g. ["fra", "was"]).' - ), - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Type of logs to retrieve, either \"build\" or \"runtime\". Defaults to \"runtime\".")] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using instance_ids instead.")] = None, + instance_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + stream: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using streams instead.")] = None, + streams: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on stream: either \"stdout\", \"stderr\" or \"koyeb\" (for system logs).")] = None, + start: Annotated[Optional[datetime], Field(description="(Optional) Defaults to 24 hours ago.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) Defaults to 1000. Maximum of 1000.")] = None, + regex: Annotated[Optional[StrictStr], Field(description="(Optional) Apply a regex to filter logs. Can't be used with `text`.")] = None, + text: Annotated[Optional[StrictStr], Field(description="(Optional) Looks for this string in logs. Can't be used with `regex`.")] = None, + regions: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided regions (e.g. [\"fra\", \"was\"]).")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1096,7 +803,7 @@ def tail_logs_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._tail_logs_serialize( type=type, @@ -1116,21 +823,22 @@ def tail_logs_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "StreamResultOfLogEntry", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "StreamResultOfLogEntry", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1138,91 +846,31 @@ def tail_logs_with_http_info( response_types_map=_response_types_map, ) + @validate_call def tail_logs_without_preload_content( self, - type: Annotated[ - Optional[StrictStr], - Field( - description='Type of logs to retrieve, either "build" or "runtime". Defaults to "runtime".' - ), - ] = None, - app_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - service_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - instance_id: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using instance_ids instead."), - ] = None, - instance_ids: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - stream: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using streams instead."), - ] = None, - streams: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on stream: either "stdout", "stderr" or "koyeb" (for system logs).' - ), - ] = None, - start: Annotated[ - Optional[datetime], - Field(description="(Optional) Defaults to 24 hours ago."), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Defaults to 1000. Maximum of 1000."), - ] = None, - regex: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Apply a regex to filter logs. Can't be used with `text`." - ), - ] = None, - text: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Looks for this string in logs. Can't be used with `regex`." - ), - ] = None, - regions: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on the provided regions (e.g. ["fra", "was"]).' - ), - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Type of logs to retrieve, either \"build\" or \"runtime\". Defaults to \"runtime\".")] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using instance_ids instead.")] = None, + instance_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + stream: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using streams instead.")] = None, + streams: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on stream: either \"stdout\", \"stderr\" or \"koyeb\" (for system logs).")] = None, + start: Annotated[Optional[datetime], Field(description="(Optional) Defaults to 24 hours ago.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) Defaults to 1000. Maximum of 1000.")] = None, + regex: Annotated[Optional[StrictStr], Field(description="(Optional) Apply a regex to filter logs. Can't be used with `text`.")] = None, + text: Annotated[Optional[StrictStr], Field(description="(Optional) Looks for this string in logs. Can't be used with `regex`.")] = None, + regions: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided regions (e.g. [\"fra\", \"was\"]).")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1280,7 +928,7 @@ def tail_logs_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._tail_logs_serialize( type=type, @@ -1300,24 +948,26 @@ def tail_logs_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "StreamResultOfLogEntry", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "StreamResultOfLogEntry", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _tail_logs_serialize( self, type, @@ -1339,12 +989,13 @@ def _tail_logs_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "instance_ids": "multi", - "streams": "multi", - "regions": "multi", + 'instance_ids': 'multi', + 'streams': 'multi', + 'regions': 'multi', } _path_params: Dict[str, str] = {} @@ -1359,69 +1010,92 @@ def _tail_logs_serialize( # process the path parameters # process the query parameters if type is not None: - _query_params.append(("type", type)) - + + _query_params.append(('type', type)) + if app_id is not None: - _query_params.append(("app_id", app_id)) - + + _query_params.append(('app_id', app_id)) + if service_id is not None: - _query_params.append(("service_id", service_id)) - + + _query_params.append(('service_id', service_id)) + if deployment_id is not None: - _query_params.append(("deployment_id", deployment_id)) - + + _query_params.append(('deployment_id', deployment_id)) + if regional_deployment_id is not None: - _query_params.append(("regional_deployment_id", regional_deployment_id)) - + + _query_params.append(('regional_deployment_id', regional_deployment_id)) + if instance_id is not None: - _query_params.append(("instance_id", instance_id)) - + + _query_params.append(('instance_id', instance_id)) + if instance_ids is not None: - _query_params.append(("instance_ids", instance_ids)) - + + _query_params.append(('instance_ids', instance_ids)) + if stream is not None: - _query_params.append(("stream", stream)) - + + _query_params.append(('stream', stream)) + if streams is not None: - _query_params.append(("streams", streams)) - + + _query_params.append(('streams', streams)) + if start is not None: if isinstance(start, datetime): _query_params.append( ( - "start", - start.strftime(self.api_client.configuration.datetime_format), + 'start', + start.strftime( + self.api_client.configuration.datetime_format + ) ) ) else: - _query_params.append(("start", start)) - + _query_params.append(('start', start)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if regex is not None: - _query_params.append(("regex", regex)) - + + _query_params.append(('regex', regex)) + if text is not None: - _query_params.append(("text", text)) - + + _query_params.append(('text', text)) + if regions is not None: - _query_params.append(("regions", regions)) - + + _query_params.append(('regions', regions)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/streams/logs/tail", + method='GET', + resource_path='/v1/streams/logs/tail', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1431,5 +1105,7 @@ def _tail_logs_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/metrics_api.py b/koyeb/api/api/metrics_api.py index 6d48b36b..1378b4de 100644 --- a/koyeb/api/api/metrics_api.py +++ b/koyeb/api/api/metrics_api.py @@ -38,41 +38,23 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def get_metrics( self, - service_id: Annotated[ - Optional[StrictStr], - Field( - description="ID of the service to query instances metrics for. Ignored if instance_id is set." - ), - ] = None, - instance_id: Annotated[ - Optional[StrictStr], - Field(description="ID of the instance to query metrics for."), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="Metric to query.") - ] = None, - start: Annotated[ - Optional[datetime], - Field(description="(Optional) Defaults to an hour prior to end."), - ] = None, - end: Annotated[ - Optional[datetime], Field(description="(Optional) Defaults to now.") - ] = None, - step: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Must be a valid duration in hours (h) or minutes (m). Defaulst to 5m." - ), - ] = None, + service_id: Annotated[Optional[StrictStr], Field(description="ID of the service to query instances metrics for. Ignored if instance_id is set.")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="ID of the instance to query metrics for.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Metric to query.")] = None, + start: Annotated[Optional[datetime], Field(description="(Optional) Defaults to an hour prior to end.")] = None, + end: Annotated[Optional[datetime], Field(description="(Optional) Defaults to now.")] = None, + step: Annotated[Optional[StrictStr], Field(description="(Optional) Must be a valid duration in hours (h) or minutes (m). Defaulst to 5m.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -114,7 +96,7 @@ def get_metrics( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( service_id=service_id, @@ -126,21 +108,22 @@ def get_metrics( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetMetricsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetMetricsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -148,41 +131,23 @@ def get_metrics( response_types_map=_response_types_map, ).data + @validate_call def get_metrics_with_http_info( self, - service_id: Annotated[ - Optional[StrictStr], - Field( - description="ID of the service to query instances metrics for. Ignored if instance_id is set." - ), - ] = None, - instance_id: Annotated[ - Optional[StrictStr], - Field(description="ID of the instance to query metrics for."), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="Metric to query.") - ] = None, - start: Annotated[ - Optional[datetime], - Field(description="(Optional) Defaults to an hour prior to end."), - ] = None, - end: Annotated[ - Optional[datetime], Field(description="(Optional) Defaults to now.") - ] = None, - step: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Must be a valid duration in hours (h) or minutes (m). Defaulst to 5m." - ), - ] = None, + service_id: Annotated[Optional[StrictStr], Field(description="ID of the service to query instances metrics for. Ignored if instance_id is set.")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="ID of the instance to query metrics for.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Metric to query.")] = None, + start: Annotated[Optional[datetime], Field(description="(Optional) Defaults to an hour prior to end.")] = None, + end: Annotated[Optional[datetime], Field(description="(Optional) Defaults to now.")] = None, + step: Annotated[Optional[StrictStr], Field(description="(Optional) Must be a valid duration in hours (h) or minutes (m). Defaulst to 5m.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -224,7 +189,7 @@ def get_metrics_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( service_id=service_id, @@ -236,21 +201,22 @@ def get_metrics_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetMetricsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetMetricsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -258,41 +224,23 @@ def get_metrics_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_metrics_without_preload_content( self, - service_id: Annotated[ - Optional[StrictStr], - Field( - description="ID of the service to query instances metrics for. Ignored if instance_id is set." - ), - ] = None, - instance_id: Annotated[ - Optional[StrictStr], - Field(description="ID of the instance to query metrics for."), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="Metric to query.") - ] = None, - start: Annotated[ - Optional[datetime], - Field(description="(Optional) Defaults to an hour prior to end."), - ] = None, - end: Annotated[ - Optional[datetime], Field(description="(Optional) Defaults to now.") - ] = None, - step: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Must be a valid duration in hours (h) or minutes (m). Defaulst to 5m." - ), - ] = None, + service_id: Annotated[Optional[StrictStr], Field(description="ID of the service to query instances metrics for. Ignored if instance_id is set.")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="ID of the instance to query metrics for.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Metric to query.")] = None, + start: Annotated[Optional[datetime], Field(description="(Optional) Defaults to an hour prior to end.")] = None, + end: Annotated[Optional[datetime], Field(description="(Optional) Defaults to now.")] = None, + step: Annotated[Optional[StrictStr], Field(description="(Optional) Must be a valid duration in hours (h) or minutes (m). Defaulst to 5m.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -334,7 +282,7 @@ def get_metrics_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( service_id=service_id, @@ -346,24 +294,26 @@ def get_metrics_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetMetricsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetMetricsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_metrics_serialize( self, service_id, @@ -377,9 +327,11 @@ def _get_metrics_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -393,50 +345,69 @@ def _get_metrics_serialize( # process the path parameters # process the query parameters if service_id is not None: - _query_params.append(("service_id", service_id)) - + + _query_params.append(('service_id', service_id)) + if instance_id is not None: - _query_params.append(("instance_id", instance_id)) - + + _query_params.append(('instance_id', instance_id)) + if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if start is not None: if isinstance(start, datetime): _query_params.append( ( - "start", - start.strftime(self.api_client.configuration.datetime_format), + 'start', + start.strftime( + self.api_client.configuration.datetime_format + ) ) ) else: - _query_params.append(("start", start)) - + _query_params.append(('start', start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ("end", end.strftime(self.api_client.configuration.datetime_format)) + ( + 'end', + end.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("end", end)) - + _query_params.append(('end', end)) + if step is not None: - _query_params.append(("step", step)) - + + _query_params.append(('step', step)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/streams/metrics", + method='GET', + resource_path='/v1/streams/metrics', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -446,5 +417,7 @@ def _get_metrics_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/organization_api.py b/koyeb/api/api/organization_api.py index 7232670a..af0b4f1c 100644 --- a/koyeb/api/api/organization_api.py +++ b/koyeb/api/api/organization_api.py @@ -24,9 +24,7 @@ from koyeb.api.models.create_organization_reply import CreateOrganizationReply from koyeb.api.models.create_organization_request import CreateOrganizationRequest from koyeb.api.models.deactivate_organization_reply import DeactivateOrganizationReply -from koyeb.api.models.deactivate_organization_request import ( - DeactivateOrganizationRequest, -) +from koyeb.api.models.deactivate_organization_request import DeactivateOrganizationRequest from koyeb.api.models.delete_organization_reply import DeleteOrganizationReply from koyeb.api.models.get_budget_reply import GetBudgetReply from koyeb.api.models.get_github_installation_reply import GetGithubInstallationReply @@ -38,27 +36,15 @@ from koyeb.api.models.reactivate_organization_reply import ReactivateOrganizationReply from koyeb.api.models.update_budget_reply import UpdateBudgetReply from koyeb.api.models.update_budget_request import UpdateBudgetRequest -from koyeb.api.models.update_organization_default_project_reply import ( - UpdateOrganizationDefaultProjectReply, -) -from koyeb.api.models.update_organization_default_project_request import ( - UpdateOrganizationDefaultProjectRequest, -) +from koyeb.api.models.update_organization_default_project_reply import UpdateOrganizationDefaultProjectReply +from koyeb.api.models.update_organization_default_project_request import UpdateOrganizationDefaultProjectRequest from koyeb.api.models.update_organization_name_reply import UpdateOrganizationNameReply -from koyeb.api.models.update_organization_name_request import ( - UpdateOrganizationNameRequest, -) +from koyeb.api.models.update_organization_name_request import UpdateOrganizationNameRequest from koyeb.api.models.update_organization_plan_reply import UpdateOrganizationPlanReply -from koyeb.api.models.update_organization_plan_request import ( - UpdateOrganizationPlanRequest, -) +from koyeb.api.models.update_organization_plan_request import UpdateOrganizationPlanRequest from koyeb.api.models.update_organization_reply import UpdateOrganizationReply -from koyeb.api.models.upsert_signup_qualification_reply import ( - UpsertSignupQualificationReply, -) -from koyeb.api.models.upsert_signup_qualification_request import ( - UpsertSignupQualificationRequest, -) +from koyeb.api.models.upsert_signup_qualification_reply import UpsertSignupQualificationReply +from koyeb.api.models.upsert_signup_qualification_request import UpsertSignupQualificationRequest from koyeb.api.api_client import ApiClient, RequestSerialized from koyeb.api.api_response import ApiResponse @@ -77,19 +63,19 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def create_access_token( self, - id: Annotated[ - StrictStr, Field(description="Organization id for ephemeral credential") - ], + id: Annotated[StrictStr, Field(description="Organization id for ephemeral credential")], body: CreateAccessTokenRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -124,7 +110,7 @@ def create_access_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_access_token_serialize( id=id, @@ -132,21 +118,22 @@ def create_access_token( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateAccessTokenReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateAccessTokenReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -154,19 +141,19 @@ def create_access_token( response_types_map=_response_types_map, ).data + @validate_call def create_access_token_with_http_info( self, - id: Annotated[ - StrictStr, Field(description="Organization id for ephemeral credential") - ], + id: Annotated[StrictStr, Field(description="Organization id for ephemeral credential")], body: CreateAccessTokenRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -201,7 +188,7 @@ def create_access_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_access_token_serialize( id=id, @@ -209,21 +196,22 @@ def create_access_token_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateAccessTokenReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateAccessTokenReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -231,19 +219,19 @@ def create_access_token_with_http_info( response_types_map=_response_types_map, ) + @validate_call def create_access_token_without_preload_content( self, - id: Annotated[ - StrictStr, Field(description="Organization id for ephemeral credential") - ], + id: Annotated[StrictStr, Field(description="Organization id for ephemeral credential")], body: CreateAccessTokenRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -278,7 +266,7 @@ def create_access_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_access_token_serialize( id=id, @@ -286,24 +274,26 @@ def create_access_token_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateAccessTokenReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateAccessTokenReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_access_token_serialize( self, id, @@ -313,9 +303,11 @@ def _create_access_token_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -328,7 +320,7 @@ def _create_access_token_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -336,16 +328,24 @@ def _create_access_token_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organizations/{id}/access_token", + method='POST', + resource_path='/v1/organizations/{id}/access_token', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -355,9 +355,12 @@ def _create_access_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def create_budget( self, @@ -367,8 +370,9 @@ def create_budget( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -402,7 +406,7 @@ def create_budget( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_budget_serialize( organization_id=organization_id, @@ -410,21 +414,22 @@ def create_budget( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateBudgetReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateBudgetReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -432,6 +437,7 @@ def create_budget( response_types_map=_response_types_map, ).data + @validate_call def create_budget_with_http_info( self, @@ -441,8 +447,9 @@ def create_budget_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -476,7 +483,7 @@ def create_budget_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_budget_serialize( organization_id=organization_id, @@ -484,21 +491,22 @@ def create_budget_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateBudgetReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateBudgetReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -506,6 +514,7 @@ def create_budget_with_http_info( response_types_map=_response_types_map, ) + @validate_call def create_budget_without_preload_content( self, @@ -515,8 +524,9 @@ def create_budget_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -550,7 +560,7 @@ def create_budget_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_budget_serialize( organization_id=organization_id, @@ -558,24 +568,26 @@ def create_budget_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateBudgetReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateBudgetReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_budget_serialize( self, organization_id, @@ -585,9 +597,11 @@ def _create_budget_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -600,7 +614,7 @@ def _create_budget_serialize( # process the path parameters if organization_id is not None: - _path_params["organization_id"] = organization_id + _path_params['organization_id'] = organization_id # process the query parameters # process the header parameters # process the form parameters @@ -608,16 +622,24 @@ def _create_budget_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organizations/{organization_id}/budget", + method='POST', + resource_path='/v1/organizations/{organization_id}/budget', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -627,9 +649,12 @@ def _create_budget_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def create_organization( self, @@ -638,8 +663,9 @@ def create_organization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -671,28 +697,29 @@ def create_organization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_organization_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -700,6 +727,7 @@ def create_organization( response_types_map=_response_types_map, ).data + @validate_call def create_organization_with_http_info( self, @@ -708,8 +736,9 @@ def create_organization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -741,28 +770,29 @@ def create_organization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_organization_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -770,6 +800,7 @@ def create_organization_with_http_info( response_types_map=_response_types_map, ) + @validate_call def create_organization_without_preload_content( self, @@ -778,8 +809,9 @@ def create_organization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -811,31 +843,33 @@ def create_organization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_organization_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_organization_serialize( self, body, @@ -844,9 +878,11 @@ def _create_organization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -865,16 +901,24 @@ def _create_organization_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organizations", + method='POST', + resource_path='/v1/organizations', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -884,9 +928,12 @@ def _create_organization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def deactivate_organization( self, @@ -896,8 +943,9 @@ def deactivate_organization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -931,7 +979,7 @@ def deactivate_organization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._deactivate_organization_serialize( id=id, @@ -939,21 +987,22 @@ def deactivate_organization( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeactivateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeactivateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -961,6 +1010,7 @@ def deactivate_organization( response_types_map=_response_types_map, ).data + @validate_call def deactivate_organization_with_http_info( self, @@ -970,8 +1020,9 @@ def deactivate_organization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1005,7 +1056,7 @@ def deactivate_organization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._deactivate_organization_serialize( id=id, @@ -1013,21 +1064,22 @@ def deactivate_organization_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeactivateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeactivateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1035,6 +1087,7 @@ def deactivate_organization_with_http_info( response_types_map=_response_types_map, ) + @validate_call def deactivate_organization_without_preload_content( self, @@ -1044,8 +1097,9 @@ def deactivate_organization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1079,7 +1133,7 @@ def deactivate_organization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._deactivate_organization_serialize( id=id, @@ -1087,24 +1141,26 @@ def deactivate_organization_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeactivateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeactivateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _deactivate_organization_serialize( self, id, @@ -1114,9 +1170,11 @@ def _deactivate_organization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1129,7 +1187,7 @@ def _deactivate_organization_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -1137,16 +1195,24 @@ def _deactivate_organization_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organizations/{id}/deactivate", + method='POST', + resource_path='/v1/organizations/{id}/deactivate', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1156,9 +1222,12 @@ def _deactivate_organization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def delete_budget( self, @@ -1167,8 +1236,9 @@ def delete_budget( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1200,28 +1270,29 @@ def delete_budget( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_budget_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1229,6 +1300,7 @@ def delete_budget( response_types_map=_response_types_map, ).data + @validate_call def delete_budget_with_http_info( self, @@ -1237,8 +1309,9 @@ def delete_budget_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1270,28 +1343,29 @@ def delete_budget_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_budget_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1299,6 +1373,7 @@ def delete_budget_with_http_info( response_types_map=_response_types_map, ) + @validate_call def delete_budget_without_preload_content( self, @@ -1307,8 +1382,9 @@ def delete_budget_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1340,31 +1416,33 @@ def delete_budget_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_budget_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_budget_serialize( self, organization_id, @@ -1373,9 +1451,11 @@ def _delete_budget_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1388,22 +1468,30 @@ def _delete_budget_serialize( # process the path parameters if organization_id is not None: - _path_params["organization_id"] = organization_id + _path_params['organization_id'] = organization_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/organizations/{organization_id}/budget", + method='DELETE', + resource_path='/v1/organizations/{organization_id}/budget', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1413,9 +1501,12 @@ def _delete_budget_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def delete_organization( self, @@ -1424,8 +1515,9 @@ def delete_organization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1457,28 +1549,29 @@ def delete_organization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_organization_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1486,6 +1579,7 @@ def delete_organization( response_types_map=_response_types_map, ).data + @validate_call def delete_organization_with_http_info( self, @@ -1494,8 +1588,9 @@ def delete_organization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1527,28 +1622,29 @@ def delete_organization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_organization_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1556,6 +1652,7 @@ def delete_organization_with_http_info( response_types_map=_response_types_map, ) + @validate_call def delete_organization_without_preload_content( self, @@ -1564,8 +1661,9 @@ def delete_organization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1597,31 +1695,33 @@ def delete_organization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_organization_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_organization_serialize( self, id, @@ -1630,9 +1730,11 @@ def _delete_organization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1645,22 +1747,30 @@ def _delete_organization_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/organizations/{id}", + method='DELETE', + resource_path='/v1/organizations/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1670,9 +1780,12 @@ def _delete_organization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_budget( self, @@ -1681,8 +1794,9 @@ def get_budget( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1714,28 +1828,29 @@ def get_budget( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_budget_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetBudgetReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetBudgetReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1743,6 +1858,7 @@ def get_budget( response_types_map=_response_types_map, ).data + @validate_call def get_budget_with_http_info( self, @@ -1751,8 +1867,9 @@ def get_budget_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1784,28 +1901,29 @@ def get_budget_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_budget_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetBudgetReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetBudgetReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1813,6 +1931,7 @@ def get_budget_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_budget_without_preload_content( self, @@ -1821,8 +1940,9 @@ def get_budget_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1854,31 +1974,33 @@ def get_budget_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_budget_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetBudgetReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetBudgetReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_budget_serialize( self, organization_id, @@ -1887,9 +2009,11 @@ def _get_budget_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1902,22 +2026,30 @@ def _get_budget_serialize( # process the path parameters if organization_id is not None: - _path_params["organization_id"] = organization_id + _path_params['organization_id'] = organization_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/organizations/{organization_id}/budget", + method='GET', + resource_path='/v1/organizations/{organization_id}/budget', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1927,9 +2059,12 @@ def _get_budget_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_github_installation( self, @@ -1937,8 +2072,9 @@ def get_github_installation( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1968,27 +2104,28 @@ def get_github_installation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_github_installation_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetGithubInstallationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetGithubInstallationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1996,6 +2133,7 @@ def get_github_installation( response_types_map=_response_types_map, ).data + @validate_call def get_github_installation_with_http_info( self, @@ -2003,8 +2141,9 @@ def get_github_installation_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2034,27 +2173,28 @@ def get_github_installation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_github_installation_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetGithubInstallationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetGithubInstallationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2062,6 +2202,7 @@ def get_github_installation_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_github_installation_without_preload_content( self, @@ -2069,8 +2210,9 @@ def get_github_installation_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2100,30 +2242,32 @@ def get_github_installation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_github_installation_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetGithubInstallationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetGithubInstallationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_github_installation_serialize( self, _request_auth, @@ -2131,9 +2275,11 @@ def _get_github_installation_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2150,16 +2296,24 @@ def _get_github_installation_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/github/installation", + method='GET', + resource_path='/v1/github/installation', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2169,9 +2323,12 @@ def _get_github_installation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_organization( self, @@ -2180,8 +2337,9 @@ def get_organization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2213,28 +2371,29 @@ def get_organization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2242,6 +2401,7 @@ def get_organization( response_types_map=_response_types_map, ).data + @validate_call def get_organization_with_http_info( self, @@ -2250,8 +2410,9 @@ def get_organization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2283,28 +2444,29 @@ def get_organization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2312,6 +2474,7 @@ def get_organization_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_organization_without_preload_content( self, @@ -2320,8 +2483,9 @@ def get_organization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2353,31 +2517,33 @@ def get_organization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_organization_serialize( self, id, @@ -2386,9 +2552,11 @@ def _get_organization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2401,22 +2569,30 @@ def _get_organization_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/organizations/{id}", + method='GET', + resource_path='/v1/organizations/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2426,9 +2602,12 @@ def _get_organization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def github_installation( self, @@ -2437,8 +2616,9 @@ def github_installation( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2470,28 +2650,29 @@ def github_installation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._github_installation_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GithubInstallationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GithubInstallationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2499,6 +2680,7 @@ def github_installation( response_types_map=_response_types_map, ).data + @validate_call def github_installation_with_http_info( self, @@ -2507,8 +2689,9 @@ def github_installation_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2540,28 +2723,29 @@ def github_installation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._github_installation_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GithubInstallationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GithubInstallationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2569,6 +2753,7 @@ def github_installation_with_http_info( response_types_map=_response_types_map, ) + @validate_call def github_installation_without_preload_content( self, @@ -2577,8 +2762,9 @@ def github_installation_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2610,31 +2796,33 @@ def github_installation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._github_installation_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GithubInstallationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GithubInstallationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _github_installation_serialize( self, body, @@ -2643,9 +2831,11 @@ def _github_installation_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2664,16 +2854,24 @@ def _github_installation_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/github/installation", + method='POST', + resource_path='/v1/github/installation', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2683,9 +2881,12 @@ def _github_installation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def reactivate_organization( self, @@ -2695,8 +2896,9 @@ def reactivate_organization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2730,7 +2932,7 @@ def reactivate_organization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._reactivate_organization_serialize( id=id, @@ -2738,21 +2940,22 @@ def reactivate_organization( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ReactivateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ReactivateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2760,6 +2963,7 @@ def reactivate_organization( response_types_map=_response_types_map, ).data + @validate_call def reactivate_organization_with_http_info( self, @@ -2769,8 +2973,9 @@ def reactivate_organization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2804,7 +3009,7 @@ def reactivate_organization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._reactivate_organization_serialize( id=id, @@ -2812,21 +3017,22 @@ def reactivate_organization_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ReactivateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ReactivateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2834,6 +3040,7 @@ def reactivate_organization_with_http_info( response_types_map=_response_types_map, ) + @validate_call def reactivate_organization_without_preload_content( self, @@ -2843,8 +3050,9 @@ def reactivate_organization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2878,7 +3086,7 @@ def reactivate_organization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._reactivate_organization_serialize( id=id, @@ -2886,24 +3094,26 @@ def reactivate_organization_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ReactivateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ReactivateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _reactivate_organization_serialize( self, id, @@ -2913,9 +3123,11 @@ def _reactivate_organization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2928,7 +3140,7 @@ def _reactivate_organization_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -2936,16 +3148,24 @@ def _reactivate_organization_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organizations/{id}/reactivate", + method='POST', + resource_path='/v1/organizations/{id}/reactivate', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2955,23 +3175,25 @@ def _reactivate_organization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def switch_organization( self, id: StrictStr, body: Dict[str, Any], - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3007,7 +3229,7 @@ def switch_organization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._switch_organization_serialize( id=id, @@ -3016,21 +3238,22 @@ def switch_organization( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3038,20 +3261,20 @@ def switch_organization( response_types_map=_response_types_map, ).data + @validate_call def switch_organization_with_http_info( self, id: StrictStr, body: Dict[str, Any], - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3087,7 +3310,7 @@ def switch_organization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._switch_organization_serialize( id=id, @@ -3096,21 +3319,22 @@ def switch_organization_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3118,20 +3342,20 @@ def switch_organization_with_http_info( response_types_map=_response_types_map, ) + @validate_call def switch_organization_without_preload_content( self, id: StrictStr, body: Dict[str, Any], - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3167,7 +3391,7 @@ def switch_organization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._switch_organization_serialize( id=id, @@ -3176,24 +3400,26 @@ def switch_organization_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _switch_organization_serialize( self, id, @@ -3204,9 +3430,11 @@ def _switch_organization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3219,26 +3447,34 @@ def _switch_organization_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters if seon_fp is not None: - _header_params["seon-fp"] = seon_fp + _header_params['seon-fp'] = seon_fp # process the form parameters # process the body parameter if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organizations/{id}/switch", + method='POST', + resource_path='/v1/organizations/{id}/switch', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3248,22 +3484,24 @@ def _switch_organization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def unscope_organization_token( self, body: Dict[str, Any], - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3298,7 +3536,7 @@ def unscope_organization_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unscope_organization_token_serialize( body=body, @@ -3306,21 +3544,22 @@ def unscope_organization_token( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3328,19 +3567,19 @@ def unscope_organization_token( response_types_map=_response_types_map, ).data + @validate_call def unscope_organization_token_with_http_info( self, body: Dict[str, Any], - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3375,7 +3614,7 @@ def unscope_organization_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unscope_organization_token_serialize( body=body, @@ -3383,21 +3622,22 @@ def unscope_organization_token_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3405,19 +3645,19 @@ def unscope_organization_token_with_http_info( response_types_map=_response_types_map, ) + @validate_call def unscope_organization_token_without_preload_content( self, body: Dict[str, Any], - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3452,7 +3692,7 @@ def unscope_organization_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unscope_organization_token_serialize( body=body, @@ -3460,24 +3700,26 @@ def unscope_organization_token_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _unscope_organization_token_serialize( self, body, @@ -3487,9 +3729,11 @@ def _unscope_organization_token_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3504,22 +3748,30 @@ def _unscope_organization_token_serialize( # process the query parameters # process the header parameters if seon_fp is not None: - _header_params["seon-fp"] = seon_fp + _header_params['seon-fp'] = seon_fp # process the form parameters # process the body parameter if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/unscope_organization_token", + method='POST', + resource_path='/v1/unscope_organization_token', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3529,9 +3781,12 @@ def _unscope_organization_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_budget( self, @@ -3541,8 +3796,9 @@ def update_budget( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3576,7 +3832,7 @@ def update_budget( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_budget_serialize( organization_id=organization_id, @@ -3584,21 +3840,22 @@ def update_budget( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateBudgetReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateBudgetReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3606,6 +3863,7 @@ def update_budget( response_types_map=_response_types_map, ).data + @validate_call def update_budget_with_http_info( self, @@ -3615,8 +3873,9 @@ def update_budget_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3650,7 +3909,7 @@ def update_budget_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_budget_serialize( organization_id=organization_id, @@ -3658,21 +3917,22 @@ def update_budget_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateBudgetReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateBudgetReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3680,6 +3940,7 @@ def update_budget_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_budget_without_preload_content( self, @@ -3689,8 +3950,9 @@ def update_budget_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3724,7 +3986,7 @@ def update_budget_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_budget_serialize( organization_id=organization_id, @@ -3732,24 +3994,26 @@ def update_budget_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateBudgetReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateBudgetReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_budget_serialize( self, organization_id, @@ -3759,9 +4023,11 @@ def _update_budget_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3774,7 +4040,7 @@ def _update_budget_serialize( # process the path parameters if organization_id is not None: - _path_params["organization_id"] = organization_id + _path_params['organization_id'] = organization_id # process the query parameters # process the header parameters # process the form parameters @@ -3782,16 +4048,24 @@ def _update_budget_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/organizations/{organization_id}/budget", + method='PUT', + resource_path='/v1/organizations/{organization_id}/budget', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3801,9 +4075,12 @@ def _update_budget_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_organization( self, @@ -3814,8 +4091,9 @@ def update_organization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3851,7 +4129,7 @@ def update_organization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_serialize( id=id, @@ -3860,21 +4138,22 @@ def update_organization( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3882,6 +4161,7 @@ def update_organization( response_types_map=_response_types_map, ).data + @validate_call def update_organization_with_http_info( self, @@ -3892,8 +4172,9 @@ def update_organization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3929,7 +4210,7 @@ def update_organization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_serialize( id=id, @@ -3938,21 +4219,22 @@ def update_organization_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3960,6 +4242,7 @@ def update_organization_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_organization_without_preload_content( self, @@ -3970,8 +4253,9 @@ def update_organization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4007,7 +4291,7 @@ def update_organization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_serialize( id=id, @@ -4016,24 +4300,26 @@ def update_organization_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_organization_serialize( self, id, @@ -4044,9 +4330,11 @@ def _update_organization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4059,27 +4347,36 @@ def _update_organization_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if organization is not None: _body_params = organization + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/organizations/{id}", + method='PUT', + resource_path='/v1/organizations/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4089,9 +4386,12 @@ def _update_organization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_organization2( self, @@ -4102,8 +4402,9 @@ def update_organization2( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4139,7 +4440,7 @@ def update_organization2( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization2_serialize( id=id, @@ -4148,21 +4449,22 @@ def update_organization2( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4170,6 +4472,7 @@ def update_organization2( response_types_map=_response_types_map, ).data + @validate_call def update_organization2_with_http_info( self, @@ -4180,8 +4483,9 @@ def update_organization2_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4217,7 +4521,7 @@ def update_organization2_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization2_serialize( id=id, @@ -4226,21 +4530,22 @@ def update_organization2_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4248,6 +4553,7 @@ def update_organization2_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_organization2_without_preload_content( self, @@ -4258,8 +4564,9 @@ def update_organization2_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4295,7 +4602,7 @@ def update_organization2_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization2_serialize( id=id, @@ -4304,24 +4611,26 @@ def update_organization2_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_organization2_serialize( self, id, @@ -4332,9 +4641,11 @@ def _update_organization2_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4347,27 +4658,36 @@ def _update_organization2_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if organization is not None: _body_params = organization + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/organizations/{id}", + method='PATCH', + resource_path='/v1/organizations/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4377,9 +4697,12 @@ def _update_organization2_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_organization_default_project( self, @@ -4389,8 +4712,9 @@ def update_organization_default_project( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4424,7 +4748,7 @@ def update_organization_default_project( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_default_project_serialize( id=id, @@ -4432,21 +4756,22 @@ def update_organization_default_project( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationDefaultProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationDefaultProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4454,6 +4779,7 @@ def update_organization_default_project( response_types_map=_response_types_map, ).data + @validate_call def update_organization_default_project_with_http_info( self, @@ -4463,8 +4789,9 @@ def update_organization_default_project_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4498,7 +4825,7 @@ def update_organization_default_project_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_default_project_serialize( id=id, @@ -4506,21 +4833,22 @@ def update_organization_default_project_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationDefaultProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationDefaultProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4528,6 +4856,7 @@ def update_organization_default_project_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_organization_default_project_without_preload_content( self, @@ -4537,8 +4866,9 @@ def update_organization_default_project_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4572,7 +4902,7 @@ def update_organization_default_project_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_default_project_serialize( id=id, @@ -4580,24 +4910,26 @@ def update_organization_default_project_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationDefaultProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationDefaultProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_organization_default_project_serialize( self, id, @@ -4607,9 +4939,11 @@ def _update_organization_default_project_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4622,7 +4956,7 @@ def _update_organization_default_project_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -4630,16 +4964,24 @@ def _update_organization_default_project_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/organizations/{id}/default_project", + method='PUT', + resource_path='/v1/organizations/{id}/default_project', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4649,9 +4991,12 @@ def _update_organization_default_project_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_organization_name( self, @@ -4661,8 +5006,9 @@ def update_organization_name( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4696,7 +5042,7 @@ def update_organization_name( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_name_serialize( id=id, @@ -4704,21 +5050,22 @@ def update_organization_name( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationNameReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationNameReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4726,6 +5073,7 @@ def update_organization_name( response_types_map=_response_types_map, ).data + @validate_call def update_organization_name_with_http_info( self, @@ -4735,8 +5083,9 @@ def update_organization_name_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4770,7 +5119,7 @@ def update_organization_name_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_name_serialize( id=id, @@ -4778,21 +5127,22 @@ def update_organization_name_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationNameReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationNameReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4800,6 +5150,7 @@ def update_organization_name_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_organization_name_without_preload_content( self, @@ -4809,8 +5160,9 @@ def update_organization_name_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4844,7 +5196,7 @@ def update_organization_name_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_name_serialize( id=id, @@ -4852,24 +5204,26 @@ def update_organization_name_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationNameReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationNameReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_organization_name_serialize( self, id, @@ -4879,9 +5233,11 @@ def _update_organization_name_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4894,7 +5250,7 @@ def _update_organization_name_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -4902,16 +5258,24 @@ def _update_organization_name_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/organizations/{id}/name", + method='PUT', + resource_path='/v1/organizations/{id}/name', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4921,9 +5285,12 @@ def _update_organization_name_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_organization_plan( self, @@ -4933,8 +5300,9 @@ def update_organization_plan( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4968,7 +5336,7 @@ def update_organization_plan( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_plan_serialize( id=id, @@ -4976,21 +5344,22 @@ def update_organization_plan( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationPlanReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationPlanReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4998,6 +5367,7 @@ def update_organization_plan( response_types_map=_response_types_map, ).data + @validate_call def update_organization_plan_with_http_info( self, @@ -5007,8 +5377,9 @@ def update_organization_plan_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5042,7 +5413,7 @@ def update_organization_plan_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_plan_serialize( id=id, @@ -5050,21 +5421,22 @@ def update_organization_plan_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationPlanReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationPlanReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -5072,6 +5444,7 @@ def update_organization_plan_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_organization_plan_without_preload_content( self, @@ -5081,8 +5454,9 @@ def update_organization_plan_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5116,7 +5490,7 @@ def update_organization_plan_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_plan_serialize( id=id, @@ -5124,24 +5498,26 @@ def update_organization_plan_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationPlanReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationPlanReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_organization_plan_serialize( self, id, @@ -5151,9 +5527,11 @@ def _update_organization_plan_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -5166,7 +5544,7 @@ def _update_organization_plan_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -5174,16 +5552,24 @@ def _update_organization_plan_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organizations/{id}/plan", + method='POST', + resource_path='/v1/organizations/{id}/plan', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5193,9 +5579,12 @@ def _update_organization_plan_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def upsert_signup_qualification( self, @@ -5205,8 +5594,9 @@ def upsert_signup_qualification( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5240,7 +5630,7 @@ def upsert_signup_qualification( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._upsert_signup_qualification_serialize( id=id, @@ -5248,21 +5638,22 @@ def upsert_signup_qualification( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpsertSignupQualificationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpsertSignupQualificationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -5270,6 +5661,7 @@ def upsert_signup_qualification( response_types_map=_response_types_map, ).data + @validate_call def upsert_signup_qualification_with_http_info( self, @@ -5279,8 +5671,9 @@ def upsert_signup_qualification_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5314,7 +5707,7 @@ def upsert_signup_qualification_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._upsert_signup_qualification_serialize( id=id, @@ -5322,21 +5715,22 @@ def upsert_signup_qualification_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpsertSignupQualificationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpsertSignupQualificationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -5344,6 +5738,7 @@ def upsert_signup_qualification_with_http_info( response_types_map=_response_types_map, ) + @validate_call def upsert_signup_qualification_without_preload_content( self, @@ -5353,8 +5748,9 @@ def upsert_signup_qualification_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5388,7 +5784,7 @@ def upsert_signup_qualification_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._upsert_signup_qualification_serialize( id=id, @@ -5396,24 +5792,26 @@ def upsert_signup_qualification_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpsertSignupQualificationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpsertSignupQualificationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _upsert_signup_qualification_serialize( self, id, @@ -5423,9 +5821,11 @@ def _upsert_signup_qualification_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -5438,7 +5838,7 @@ def _upsert_signup_qualification_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -5446,16 +5846,24 @@ def _upsert_signup_qualification_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organizations/{id}/signup_qualification", + method='POST', + resource_path='/v1/organizations/{id}/signup_qualification', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5465,5 +5873,7 @@ def _upsert_signup_qualification_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/organization_confirmations_api.py b/koyeb/api/api/organization_confirmations_api.py index 98cce94a..f75c3b1d 100644 --- a/koyeb/api/api/organization_confirmations_api.py +++ b/koyeb/api/api/organization_confirmations_api.py @@ -35,6 +35,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def confirm_organization_action( self, @@ -43,8 +44,9 @@ def confirm_organization_action( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -76,28 +78,29 @@ def confirm_organization_action( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._confirm_organization_action_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -105,6 +108,7 @@ def confirm_organization_action( response_types_map=_response_types_map, ).data + @validate_call def confirm_organization_action_with_http_info( self, @@ -113,8 +117,9 @@ def confirm_organization_action_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -146,28 +151,29 @@ def confirm_organization_action_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._confirm_organization_action_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -175,6 +181,7 @@ def confirm_organization_action_with_http_info( response_types_map=_response_types_map, ) + @validate_call def confirm_organization_action_without_preload_content( self, @@ -183,8 +190,9 @@ def confirm_organization_action_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -216,31 +224,33 @@ def confirm_organization_action_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._confirm_organization_action_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _confirm_organization_action_serialize( self, id, @@ -249,9 +259,11 @@ def _confirm_organization_action_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -264,22 +276,30 @@ def _confirm_organization_action_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organization_confirmations/{id}", + method='POST', + resource_path='/v1/organization_confirmations/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -289,5 +309,7 @@ def _confirm_organization_action_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/organization_invitations_api.py b/koyeb/api/api/organization_invitations_api.py index 74961cd2..0045ee22 100644 --- a/koyeb/api/api/organization_invitations_api.py +++ b/koyeb/api/api/organization_invitations_api.py @@ -18,21 +18,11 @@ from pydantic import Field, StrictStr, field_validator from typing import Any, Dict, List, Optional from typing_extensions import Annotated -from koyeb.api.models.create_organization_invitation_reply import ( - CreateOrganizationInvitationReply, -) -from koyeb.api.models.create_organization_invitation_request import ( - CreateOrganizationInvitationRequest, -) -from koyeb.api.models.get_organization_invitation_reply import ( - GetOrganizationInvitationReply, -) -from koyeb.api.models.list_organization_invitations_reply import ( - ListOrganizationInvitationsReply, -) -from koyeb.api.models.resend_organization_invitation_reply import ( - ResendOrganizationInvitationReply, -) +from koyeb.api.models.create_organization_invitation_reply import CreateOrganizationInvitationReply +from koyeb.api.models.create_organization_invitation_request import CreateOrganizationInvitationRequest +from koyeb.api.models.get_organization_invitation_reply import GetOrganizationInvitationReply +from koyeb.api.models.list_organization_invitations_reply import ListOrganizationInvitationsReply +from koyeb.api.models.resend_organization_invitation_reply import ResendOrganizationInvitationReply from koyeb.api.api_client import ApiClient, RequestSerialized from koyeb.api.api_response import ApiResponse @@ -51,6 +41,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def create_organization_invitation( self, @@ -59,8 +50,9 @@ def create_organization_invitation( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -92,28 +84,29 @@ def create_organization_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_organization_invitation_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -121,6 +114,7 @@ def create_organization_invitation( response_types_map=_response_types_map, ).data + @validate_call def create_organization_invitation_with_http_info( self, @@ -129,8 +123,9 @@ def create_organization_invitation_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -162,28 +157,29 @@ def create_organization_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_organization_invitation_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -191,6 +187,7 @@ def create_organization_invitation_with_http_info( response_types_map=_response_types_map, ) + @validate_call def create_organization_invitation_without_preload_content( self, @@ -199,8 +196,9 @@ def create_organization_invitation_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -232,31 +230,33 @@ def create_organization_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_organization_invitation_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_organization_invitation_serialize( self, body, @@ -265,9 +265,11 @@ def _create_organization_invitation_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -286,16 +288,24 @@ def _create_organization_invitation_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organization_invitations", + method='POST', + resource_path='/v1/organization_invitations', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -305,22 +315,23 @@ def _create_organization_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def delete_organization_invitation( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to delete"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to delete")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -352,28 +363,29 @@ def delete_organization_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_organization_invitation_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -381,19 +393,18 @@ def delete_organization_invitation( response_types_map=_response_types_map, ).data + @validate_call def delete_organization_invitation_with_http_info( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to delete"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to delete")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -425,28 +436,29 @@ def delete_organization_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_organization_invitation_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -454,19 +466,18 @@ def delete_organization_invitation_with_http_info( response_types_map=_response_types_map, ) + @validate_call def delete_organization_invitation_without_preload_content( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to delete"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to delete")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -498,31 +509,33 @@ def delete_organization_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_organization_invitation_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_organization_invitation_serialize( self, id, @@ -531,9 +544,11 @@ def _delete_organization_invitation_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -546,22 +561,30 @@ def _delete_organization_invitation_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/organization_invitations/{id}", + method='DELETE', + resource_path='/v1/organization_invitations/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -571,9 +594,12 @@ def _delete_organization_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_organization_invitation( self, @@ -582,8 +608,9 @@ def get_organization_invitation( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -615,28 +642,29 @@ def get_organization_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_invitation_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -644,6 +672,7 @@ def get_organization_invitation( response_types_map=_response_types_map, ).data + @validate_call def get_organization_invitation_with_http_info( self, @@ -652,8 +681,9 @@ def get_organization_invitation_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -685,28 +715,29 @@ def get_organization_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_invitation_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -714,6 +745,7 @@ def get_organization_invitation_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_organization_invitation_without_preload_content( self, @@ -722,8 +754,9 @@ def get_organization_invitation_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -755,31 +788,33 @@ def get_organization_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_invitation_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_organization_invitation_serialize( self, id, @@ -788,9 +823,11 @@ def _get_organization_invitation_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -803,22 +840,30 @@ def _get_organization_invitation_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/organization_invitations/{id}", + method='GET', + resource_path='/v1/organization_invitations/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -828,36 +873,26 @@ def _get_organization_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_organization_invitations( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on organization invitation statuses"), - ] = None, - user_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on invitee ID. Will match both invitations sent to that user_id and invitations sent to the email of that user_id. The only valid value is the requester's user_id" - ), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on organization invitation statuses")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on invitee ID. Will match both invitations sent to that user_id and invitations sent to the email of that user_id. The only valid value is the requester's user_id")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -895,7 +930,7 @@ def list_organization_invitations( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_organization_invitations_serialize( limit=limit, @@ -905,21 +940,22 @@ def list_organization_invitations( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListOrganizationInvitationsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListOrganizationInvitationsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -927,33 +963,21 @@ def list_organization_invitations( response_types_map=_response_types_map, ).data + @validate_call def list_organization_invitations_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on organization invitation statuses"), - ] = None, - user_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on invitee ID. Will match both invitations sent to that user_id and invitations sent to the email of that user_id. The only valid value is the requester's user_id" - ), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on organization invitation statuses")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on invitee ID. Will match both invitations sent to that user_id and invitations sent to the email of that user_id. The only valid value is the requester's user_id")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -991,7 +1015,7 @@ def list_organization_invitations_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_organization_invitations_serialize( limit=limit, @@ -1001,21 +1025,22 @@ def list_organization_invitations_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListOrganizationInvitationsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListOrganizationInvitationsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1023,33 +1048,21 @@ def list_organization_invitations_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_organization_invitations_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on organization invitation statuses"), - ] = None, - user_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on invitee ID. Will match both invitations sent to that user_id and invitations sent to the email of that user_id. The only valid value is the requester's user_id" - ), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on organization invitation statuses")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on invitee ID. Will match both invitations sent to that user_id and invitations sent to the email of that user_id. The only valid value is the requester's user_id")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1087,7 +1100,7 @@ def list_organization_invitations_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_organization_invitations_serialize( limit=limit, @@ -1097,24 +1110,26 @@ def list_organization_invitations_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListOrganizationInvitationsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListOrganizationInvitationsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_organization_invitations_serialize( self, limit, @@ -1126,10 +1141,11 @@ def _list_organization_invitations_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "statuses": "multi", + 'statuses': 'multi', } _path_params: Dict[str, str] = {} @@ -1144,31 +1160,43 @@ def _list_organization_invitations_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if statuses is not None: - _query_params.append(("statuses", statuses)) - + + _query_params.append(('statuses', statuses)) + if user_id is not None: - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/organization_invitations", + method='GET', + resource_path='/v1/organization_invitations', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1178,23 +1206,24 @@ def _list_organization_invitations_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def resend_organization_invitation( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to resend"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to resend")], body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1228,7 +1257,7 @@ def resend_organization_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resend_organization_invitation_serialize( id=id, @@ -1236,21 +1265,22 @@ def resend_organization_invitation( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResendOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ResendOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1258,20 +1288,19 @@ def resend_organization_invitation( response_types_map=_response_types_map, ).data + @validate_call def resend_organization_invitation_with_http_info( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to resend"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to resend")], body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1305,7 +1334,7 @@ def resend_organization_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resend_organization_invitation_serialize( id=id, @@ -1313,21 +1342,22 @@ def resend_organization_invitation_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResendOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ResendOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1335,20 +1365,19 @@ def resend_organization_invitation_with_http_info( response_types_map=_response_types_map, ) + @validate_call def resend_organization_invitation_without_preload_content( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to resend"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to resend")], body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1382,7 +1411,7 @@ def resend_organization_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resend_organization_invitation_serialize( id=id, @@ -1390,24 +1419,26 @@ def resend_organization_invitation_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResendOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ResendOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _resend_organization_invitation_serialize( self, id, @@ -1417,9 +1448,11 @@ def _resend_organization_invitation_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1432,7 +1465,7 @@ def _resend_organization_invitation_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -1440,16 +1473,24 @@ def _resend_organization_invitation_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organization_invitations/{id}/resend", + method='POST', + resource_path='/v1/organization_invitations/{id}/resend', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1459,5 +1500,7 @@ def _resend_organization_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/organization_members_api.py b/koyeb/api/api/organization_members_api.py index a82a1b3c..03704686 100644 --- a/koyeb/api/api/organization_members_api.py +++ b/koyeb/api/api/organization_members_api.py @@ -18,12 +18,8 @@ from pydantic import Field, StrictStr, field_validator from typing import List, Optional from typing_extensions import Annotated -from koyeb.api.models.list_organization_members_reply import ( - ListOrganizationMembersReply, -) -from koyeb.api.models.remove_organization_member_reply import ( - RemoveOrganizationMemberReply, -) +from koyeb.api.models.list_organization_members_reply import ListOrganizationMembersReply +from koyeb.api.models.remove_organization_member_reply import RemoveOrganizationMemberReply from koyeb.api.api_client import ApiClient, RequestSerialized from koyeb.api.api_response import ApiResponse @@ -42,34 +38,22 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def list_organization_members( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - organization_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter for an organization"), - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter for an user") - ] = None, - organization_statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter for organization statuses"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + organization_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an organization")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an user")] = None, + organization_statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter for organization statuses")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -109,7 +93,7 @@ def list_organization_members( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_organization_members_serialize( limit=limit, @@ -120,21 +104,22 @@ def list_organization_members( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListOrganizationMembersReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListOrganizationMembersReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -142,34 +127,22 @@ def list_organization_members( response_types_map=_response_types_map, ).data + @validate_call def list_organization_members_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - organization_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter for an organization"), - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter for an user") - ] = None, - organization_statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter for organization statuses"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + organization_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an organization")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an user")] = None, + organization_statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter for organization statuses")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -209,7 +182,7 @@ def list_organization_members_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_organization_members_serialize( limit=limit, @@ -220,21 +193,22 @@ def list_organization_members_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListOrganizationMembersReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListOrganizationMembersReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -242,34 +216,22 @@ def list_organization_members_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_organization_members_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - organization_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter for an organization"), - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter for an user") - ] = None, - organization_statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter for organization statuses"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + organization_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an organization")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an user")] = None, + organization_statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter for organization statuses")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -309,7 +271,7 @@ def list_organization_members_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_organization_members_serialize( limit=limit, @@ -320,24 +282,26 @@ def list_organization_members_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListOrganizationMembersReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListOrganizationMembersReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_organization_members_serialize( self, limit, @@ -350,10 +314,11 @@ def _list_organization_members_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "organization_statuses": "multi", + 'organization_statuses': 'multi', } _path_params: Dict[str, str] = {} @@ -368,34 +333,47 @@ def _list_organization_members_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if organization_id is not None: - _query_params.append(("organization_id", organization_id)) - + + _query_params.append(('organization_id', organization_id)) + if user_id is not None: - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if organization_statuses is not None: - _query_params.append(("organization_statuses", organization_statuses)) - + + _query_params.append(('organization_statuses', organization_statuses)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/organization_members", + method='GET', + resource_path='/v1/organization_members', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -405,9 +383,12 @@ def _list_organization_members_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def remove_organization_member( self, @@ -416,8 +397,9 @@ def remove_organization_member( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -449,28 +431,29 @@ def remove_organization_member( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._remove_organization_member_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RemoveOrganizationMemberReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "RemoveOrganizationMemberReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -478,6 +461,7 @@ def remove_organization_member( response_types_map=_response_types_map, ).data + @validate_call def remove_organization_member_with_http_info( self, @@ -486,8 +470,9 @@ def remove_organization_member_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -519,28 +504,29 @@ def remove_organization_member_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._remove_organization_member_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RemoveOrganizationMemberReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "RemoveOrganizationMemberReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -548,6 +534,7 @@ def remove_organization_member_with_http_info( response_types_map=_response_types_map, ) + @validate_call def remove_organization_member_without_preload_content( self, @@ -556,8 +543,9 @@ def remove_organization_member_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -589,31 +577,33 @@ def remove_organization_member_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._remove_organization_member_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RemoveOrganizationMemberReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "RemoveOrganizationMemberReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _remove_organization_member_serialize( self, id, @@ -622,9 +612,11 @@ def _remove_organization_member_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -637,22 +629,30 @@ def _remove_organization_member_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/organization_members/{id}", + method='DELETE', + resource_path='/v1/organization_members/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -662,5 +662,7 @@ def _remove_organization_member_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/organization_quotas_api.py b/koyeb/api/api/organization_quotas_api.py index c2b7b2da..9f422d8f 100644 --- a/koyeb/api/api/organization_quotas_api.py +++ b/koyeb/api/api/organization_quotas_api.py @@ -35,6 +35,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def get_quotas( self, @@ -43,8 +44,9 @@ def get_quotas( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -76,28 +78,29 @@ def get_quotas( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_quotas_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetQuotasReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetQuotasReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -105,6 +108,7 @@ def get_quotas( response_types_map=_response_types_map, ).data + @validate_call def get_quotas_with_http_info( self, @@ -113,8 +117,9 @@ def get_quotas_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -146,28 +151,29 @@ def get_quotas_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_quotas_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetQuotasReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetQuotasReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -175,6 +181,7 @@ def get_quotas_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_quotas_without_preload_content( self, @@ -183,8 +190,9 @@ def get_quotas_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -216,31 +224,33 @@ def get_quotas_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_quotas_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetQuotasReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetQuotasReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_quotas_serialize( self, organization_id, @@ -249,9 +259,11 @@ def _get_quotas_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -264,22 +276,30 @@ def _get_quotas_serialize( # process the path parameters if organization_id is not None: - _path_params["organization_id"] = organization_id + _path_params['organization_id'] = organization_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/organizations/{organization_id}/quotas", + method='GET', + resource_path='/v1/organizations/{organization_id}/quotas', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -289,5 +309,7 @@ def _get_quotas_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/payment_methods_api.py b/koyeb/api/api/payment_methods_api.py index 9f49ad27..98a94276 100644 --- a/koyeb/api/api/payment_methods_api.py +++ b/koyeb/api/api/payment_methods_api.py @@ -18,12 +18,8 @@ from pydantic import Field, StrictStr, field_validator from typing import Any, Dict, List, Optional from typing_extensions import Annotated -from koyeb.api.models.confirm_payment_authorization_reply import ( - ConfirmPaymentAuthorizationReply, -) -from koyeb.api.models.create_payment_authorization_reply import ( - CreatePaymentAuthorizationReply, -) +from koyeb.api.models.confirm_payment_authorization_reply import ConfirmPaymentAuthorizationReply +from koyeb.api.models.create_payment_authorization_reply import CreatePaymentAuthorizationReply from koyeb.api.models.get_payment_method_reply import GetPaymentMethodReply from koyeb.api.models.list_payment_methods_reply import ListPaymentMethodsReply @@ -44,6 +40,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def confirm_payment_authorization( self, @@ -53,8 +50,9 @@ def confirm_payment_authorization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -88,7 +86,7 @@ def confirm_payment_authorization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._confirm_payment_authorization_serialize( id=id, @@ -96,21 +94,22 @@ def confirm_payment_authorization( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ConfirmPaymentAuthorizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ConfirmPaymentAuthorizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -118,6 +117,7 @@ def confirm_payment_authorization( response_types_map=_response_types_map, ).data + @validate_call def confirm_payment_authorization_with_http_info( self, @@ -127,8 +127,9 @@ def confirm_payment_authorization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -162,7 +163,7 @@ def confirm_payment_authorization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._confirm_payment_authorization_serialize( id=id, @@ -170,21 +171,22 @@ def confirm_payment_authorization_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ConfirmPaymentAuthorizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ConfirmPaymentAuthorizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -192,6 +194,7 @@ def confirm_payment_authorization_with_http_info( response_types_map=_response_types_map, ) + @validate_call def confirm_payment_authorization_without_preload_content( self, @@ -201,8 +204,9 @@ def confirm_payment_authorization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -236,7 +240,7 @@ def confirm_payment_authorization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._confirm_payment_authorization_serialize( id=id, @@ -244,24 +248,26 @@ def confirm_payment_authorization_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ConfirmPaymentAuthorizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ConfirmPaymentAuthorizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _confirm_payment_authorization_serialize( self, id, @@ -271,9 +277,11 @@ def _confirm_payment_authorization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -286,7 +294,7 @@ def _confirm_payment_authorization_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -294,16 +302,24 @@ def _confirm_payment_authorization_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/payment_methods/{id}/confirm", + method='POST', + resource_path='/v1/payment_methods/{id}/confirm', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -313,9 +329,12 @@ def _confirm_payment_authorization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def create_payment_authorization( self, @@ -324,8 +343,9 @@ def create_payment_authorization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -357,28 +377,29 @@ def create_payment_authorization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_payment_authorization_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreatePaymentAuthorizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreatePaymentAuthorizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -386,6 +407,7 @@ def create_payment_authorization( response_types_map=_response_types_map, ).data + @validate_call def create_payment_authorization_with_http_info( self, @@ -394,8 +416,9 @@ def create_payment_authorization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -427,28 +450,29 @@ def create_payment_authorization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_payment_authorization_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreatePaymentAuthorizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreatePaymentAuthorizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -456,6 +480,7 @@ def create_payment_authorization_with_http_info( response_types_map=_response_types_map, ) + @validate_call def create_payment_authorization_without_preload_content( self, @@ -464,8 +489,9 @@ def create_payment_authorization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -497,31 +523,33 @@ def create_payment_authorization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_payment_authorization_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreatePaymentAuthorizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreatePaymentAuthorizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_payment_authorization_serialize( self, body, @@ -530,9 +558,11 @@ def _create_payment_authorization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -551,16 +581,24 @@ def _create_payment_authorization_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/payment_methods", + method='POST', + resource_path='/v1/payment_methods', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -570,9 +608,12 @@ def _create_payment_authorization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def delete_payment_method( self, @@ -581,8 +622,9 @@ def delete_payment_method( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -614,28 +656,29 @@ def delete_payment_method( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_payment_method_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -643,6 +686,7 @@ def delete_payment_method( response_types_map=_response_types_map, ).data + @validate_call def delete_payment_method_with_http_info( self, @@ -651,8 +695,9 @@ def delete_payment_method_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -684,28 +729,29 @@ def delete_payment_method_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_payment_method_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -713,6 +759,7 @@ def delete_payment_method_with_http_info( response_types_map=_response_types_map, ) + @validate_call def delete_payment_method_without_preload_content( self, @@ -721,8 +768,9 @@ def delete_payment_method_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -754,31 +802,33 @@ def delete_payment_method_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_payment_method_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_payment_method_serialize( self, id, @@ -787,9 +837,11 @@ def _delete_payment_method_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -802,22 +854,30 @@ def _delete_payment_method_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/payment_methods/{id}", + method='DELETE', + resource_path='/v1/payment_methods/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -827,9 +887,12 @@ def _delete_payment_method_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_payment_method( self, @@ -838,8 +901,9 @@ def get_payment_method( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -871,28 +935,29 @@ def get_payment_method( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_payment_method_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetPaymentMethodReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetPaymentMethodReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -900,6 +965,7 @@ def get_payment_method( response_types_map=_response_types_map, ).data + @validate_call def get_payment_method_with_http_info( self, @@ -908,8 +974,9 @@ def get_payment_method_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -941,28 +1008,29 @@ def get_payment_method_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_payment_method_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetPaymentMethodReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetPaymentMethodReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -970,6 +1038,7 @@ def get_payment_method_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_payment_method_without_preload_content( self, @@ -978,8 +1047,9 @@ def get_payment_method_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1011,31 +1081,33 @@ def get_payment_method_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_payment_method_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetPaymentMethodReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetPaymentMethodReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_payment_method_serialize( self, id, @@ -1044,9 +1116,11 @@ def _get_payment_method_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1059,22 +1133,30 @@ def _get_payment_method_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/payment_methods/{id}", + method='GET', + resource_path='/v1/payment_methods/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1084,30 +1166,25 @@ def _get_payment_method_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_payment_methods( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on payment method statuses"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on payment method statuses")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1143,7 +1220,7 @@ def list_payment_methods( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_payment_methods_serialize( limit=limit, @@ -1152,21 +1229,22 @@ def list_payment_methods( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPaymentMethodsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPaymentMethodsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1174,27 +1252,20 @@ def list_payment_methods( response_types_map=_response_types_map, ).data + @validate_call def list_payment_methods_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on payment method statuses"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on payment method statuses")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1230,7 +1301,7 @@ def list_payment_methods_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_payment_methods_serialize( limit=limit, @@ -1239,21 +1310,22 @@ def list_payment_methods_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPaymentMethodsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPaymentMethodsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1261,27 +1333,20 @@ def list_payment_methods_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_payment_methods_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on payment method statuses"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on payment method statuses")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1317,7 +1382,7 @@ def list_payment_methods_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_payment_methods_serialize( limit=limit, @@ -1326,24 +1391,26 @@ def list_payment_methods_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPaymentMethodsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPaymentMethodsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_payment_methods_serialize( self, limit, @@ -1354,10 +1421,11 @@ def _list_payment_methods_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "statuses": "multi", + 'statuses': 'multi', } _path_params: Dict[str, str] = {} @@ -1372,28 +1440,39 @@ def _list_payment_methods_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if statuses is not None: - _query_params.append(("statuses", statuses)) - + + _query_params.append(('statuses', statuses)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/payment_methods", + method='GET', + resource_path='/v1/payment_methods', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1403,5 +1482,7 @@ def _list_payment_methods_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/persistent_volumes_api.py b/koyeb/api/api/persistent_volumes_api.py index 114e03a9..ecf8114c 100644 --- a/koyeb/api/api/persistent_volumes_api.py +++ b/koyeb/api/api/persistent_volumes_api.py @@ -19,19 +19,13 @@ from typing import List, Optional from typing_extensions import Annotated from koyeb.api.models.create_persistent_volume_reply import CreatePersistentVolumeReply -from koyeb.api.models.create_persistent_volume_request import ( - CreatePersistentVolumeRequest, -) +from koyeb.api.models.create_persistent_volume_request import CreatePersistentVolumeRequest from koyeb.api.models.delete_persistent_volume_reply import DeletePersistentVolumeReply from koyeb.api.models.get_persistent_volume_reply import GetPersistentVolumeReply -from koyeb.api.models.list_persistent_volume_events_reply import ( - ListPersistentVolumeEventsReply, -) +from koyeb.api.models.list_persistent_volume_events_reply import ListPersistentVolumeEventsReply from koyeb.api.models.list_persistent_volumes_reply import ListPersistentVolumesReply from koyeb.api.models.update_persistent_volume_reply import UpdatePersistentVolumeReply -from koyeb.api.models.update_persistent_volume_request import ( - UpdatePersistentVolumeRequest, -) +from koyeb.api.models.update_persistent_volume_request import UpdatePersistentVolumeRequest from koyeb.api.api_client import ApiClient, RequestSerialized from koyeb.api.api_response import ApiResponse @@ -50,6 +44,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def create_persistent_volume( self, @@ -58,8 +53,9 @@ def create_persistent_volume( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -91,28 +87,29 @@ def create_persistent_volume( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_persistent_volume_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreatePersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreatePersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -120,6 +117,7 @@ def create_persistent_volume( response_types_map=_response_types_map, ).data + @validate_call def create_persistent_volume_with_http_info( self, @@ -128,8 +126,9 @@ def create_persistent_volume_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -161,28 +160,29 @@ def create_persistent_volume_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_persistent_volume_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreatePersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreatePersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -190,6 +190,7 @@ def create_persistent_volume_with_http_info( response_types_map=_response_types_map, ) + @validate_call def create_persistent_volume_without_preload_content( self, @@ -198,8 +199,9 @@ def create_persistent_volume_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -231,31 +233,33 @@ def create_persistent_volume_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_persistent_volume_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreatePersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreatePersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_persistent_volume_serialize( self, body, @@ -264,9 +268,11 @@ def _create_persistent_volume_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -285,16 +291,24 @@ def _create_persistent_volume_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/volumes", + method='POST', + resource_path='/v1/volumes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -304,9 +318,12 @@ def _create_persistent_volume_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def delete_persistent_volume( self, @@ -315,8 +332,9 @@ def delete_persistent_volume( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -348,28 +366,29 @@ def delete_persistent_volume( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_persistent_volume_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeletePersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeletePersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -377,6 +396,7 @@ def delete_persistent_volume( response_types_map=_response_types_map, ).data + @validate_call def delete_persistent_volume_with_http_info( self, @@ -385,8 +405,9 @@ def delete_persistent_volume_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -418,28 +439,29 @@ def delete_persistent_volume_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_persistent_volume_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeletePersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeletePersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -447,6 +469,7 @@ def delete_persistent_volume_with_http_info( response_types_map=_response_types_map, ) + @validate_call def delete_persistent_volume_without_preload_content( self, @@ -455,8 +478,9 @@ def delete_persistent_volume_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -488,31 +512,33 @@ def delete_persistent_volume_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_persistent_volume_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeletePersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeletePersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_persistent_volume_serialize( self, id, @@ -521,9 +547,11 @@ def _delete_persistent_volume_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -536,22 +564,30 @@ def _delete_persistent_volume_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/volumes/{id}", + method='DELETE', + resource_path='/v1/volumes/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -561,9 +597,12 @@ def _delete_persistent_volume_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_persistent_volume( self, @@ -572,8 +611,9 @@ def get_persistent_volume( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -605,28 +645,29 @@ def get_persistent_volume( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_persistent_volume_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetPersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetPersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -634,6 +675,7 @@ def get_persistent_volume( response_types_map=_response_types_map, ).data + @validate_call def get_persistent_volume_with_http_info( self, @@ -642,8 +684,9 @@ def get_persistent_volume_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -675,28 +718,29 @@ def get_persistent_volume_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_persistent_volume_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetPersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetPersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -704,6 +748,7 @@ def get_persistent_volume_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_persistent_volume_without_preload_content( self, @@ -712,8 +757,9 @@ def get_persistent_volume_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -745,31 +791,33 @@ def get_persistent_volume_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_persistent_volume_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetPersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetPersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_persistent_volume_serialize( self, id, @@ -778,9 +826,11 @@ def _get_persistent_volume_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -793,22 +843,30 @@ def _get_persistent_volume_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/volumes/{id}", + method='GET', + resource_path='/v1/volumes/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -818,40 +876,27 @@ def _get_persistent_volume_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_persistent_volume_events( self, - persistent_volume_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on persistent volume id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on persistent volume event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + persistent_volume_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on persistent volume id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on persistent volume event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -891,7 +936,7 @@ def list_persistent_volume_events( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_persistent_volume_events_serialize( persistent_volume_id=persistent_volume_id, @@ -902,21 +947,22 @@ def list_persistent_volume_events( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPersistentVolumeEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPersistentVolumeEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -924,37 +970,22 @@ def list_persistent_volume_events( response_types_map=_response_types_map, ).data + @validate_call def list_persistent_volume_events_with_http_info( self, - persistent_volume_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on persistent volume id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on persistent volume event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + persistent_volume_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on persistent volume id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on persistent volume event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -994,7 +1025,7 @@ def list_persistent_volume_events_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_persistent_volume_events_serialize( persistent_volume_id=persistent_volume_id, @@ -1005,21 +1036,22 @@ def list_persistent_volume_events_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPersistentVolumeEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPersistentVolumeEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1027,37 +1059,22 @@ def list_persistent_volume_events_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_persistent_volume_events_without_preload_content( self, - persistent_volume_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on persistent volume id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on persistent volume event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + persistent_volume_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on persistent volume id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on persistent volume event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1097,7 +1114,7 @@ def list_persistent_volume_events_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_persistent_volume_events_serialize( persistent_volume_id=persistent_volume_id, @@ -1108,24 +1125,26 @@ def list_persistent_volume_events_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPersistentVolumeEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPersistentVolumeEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_persistent_volume_events_serialize( self, persistent_volume_id, @@ -1138,10 +1157,11 @@ def _list_persistent_volume_events_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "types": "multi", + 'types': 'multi', } _path_params: Dict[str, str] = {} @@ -1156,34 +1176,47 @@ def _list_persistent_volume_events_serialize( # process the path parameters # process the query parameters if persistent_volume_id is not None: - _query_params.append(("persistent_volume_id", persistent_volume_id)) - + + _query_params.append(('persistent_volume_id', persistent_volume_id)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/volume_events", + method='GET', + resource_path='/v1/volume_events', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1193,40 +1226,28 @@ def _list_persistent_volume_events_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_persistent_volumes( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - service_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the service id"), - ] = None, - region: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for the region") - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for the name") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on volume ids"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the service id")] = None, + region: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the region")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the name")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on volume ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1268,7 +1289,7 @@ def list_persistent_volumes( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_persistent_volumes_serialize( limit=limit, @@ -1280,21 +1301,22 @@ def list_persistent_volumes( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPersistentVolumesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPersistentVolumesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1302,37 +1324,23 @@ def list_persistent_volumes( response_types_map=_response_types_map, ).data + @validate_call def list_persistent_volumes_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - service_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the service id"), - ] = None, - region: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for the region") - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for the name") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on volume ids"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the service id")] = None, + region: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the region")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the name")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on volume ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1374,7 +1382,7 @@ def list_persistent_volumes_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_persistent_volumes_serialize( limit=limit, @@ -1386,21 +1394,22 @@ def list_persistent_volumes_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPersistentVolumesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPersistentVolumesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1408,37 +1417,23 @@ def list_persistent_volumes_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_persistent_volumes_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - service_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the service id"), - ] = None, - region: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for the region") - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for the name") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on volume ids"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the service id")] = None, + region: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the region")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the name")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on volume ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1480,7 +1475,7 @@ def list_persistent_volumes_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_persistent_volumes_serialize( limit=limit, @@ -1492,24 +1487,26 @@ def list_persistent_volumes_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPersistentVolumesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPersistentVolumesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_persistent_volumes_serialize( self, limit, @@ -1523,10 +1520,11 @@ def _list_persistent_volumes_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "ids": "multi", + 'ids': 'multi', } _path_params: Dict[str, str] = {} @@ -1541,37 +1539,51 @@ def _list_persistent_volumes_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if service_id is not None: - _query_params.append(("service_id", service_id)) - + + _query_params.append(('service_id', service_id)) + if region is not None: - _query_params.append(("region", region)) - + + _query_params.append(('region', region)) + if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if ids is not None: - _query_params.append(("ids", ids)) - + + _query_params.append(('ids', ids)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/volumes", + method='GET', + resource_path='/v1/volumes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1581,9 +1593,12 @@ def _list_persistent_volumes_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_persistent_volume( self, @@ -1593,8 +1608,9 @@ def update_persistent_volume( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1628,7 +1644,7 @@ def update_persistent_volume( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_persistent_volume_serialize( id=id, @@ -1636,21 +1652,22 @@ def update_persistent_volume( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdatePersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdatePersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1658,6 +1675,7 @@ def update_persistent_volume( response_types_map=_response_types_map, ).data + @validate_call def update_persistent_volume_with_http_info( self, @@ -1667,8 +1685,9 @@ def update_persistent_volume_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1702,7 +1721,7 @@ def update_persistent_volume_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_persistent_volume_serialize( id=id, @@ -1710,21 +1729,22 @@ def update_persistent_volume_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdatePersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdatePersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1732,6 +1752,7 @@ def update_persistent_volume_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_persistent_volume_without_preload_content( self, @@ -1741,8 +1762,9 @@ def update_persistent_volume_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1776,7 +1798,7 @@ def update_persistent_volume_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_persistent_volume_serialize( id=id, @@ -1784,24 +1806,26 @@ def update_persistent_volume_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdatePersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdatePersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_persistent_volume_serialize( self, id, @@ -1811,9 +1835,11 @@ def _update_persistent_volume_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1826,7 +1852,7 @@ def _update_persistent_volume_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -1834,16 +1860,24 @@ def _update_persistent_volume_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/volumes/{id}", + method='POST', + resource_path='/v1/volumes/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1853,5 +1887,7 @@ def _update_persistent_volume_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/pool_claims_api.py b/koyeb/api/api/pool_claims_api.py index ab2e87f2..f5159db0 100644 --- a/koyeb/api/api/pool_claims_api.py +++ b/koyeb/api/api/pool_claims_api.py @@ -39,6 +39,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def claim( self, @@ -47,8 +48,9 @@ def claim( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -80,28 +82,29 @@ def claim( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._claim_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PoolClaimReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "PoolClaimReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -109,6 +112,7 @@ def claim( response_types_map=_response_types_map, ).data + @validate_call def claim_with_http_info( self, @@ -117,8 +121,9 @@ def claim_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -150,28 +155,29 @@ def claim_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._claim_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PoolClaimReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "PoolClaimReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -179,6 +185,7 @@ def claim_with_http_info( response_types_map=_response_types_map, ) + @validate_call def claim_without_preload_content( self, @@ -187,8 +194,9 @@ def claim_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -220,31 +228,33 @@ def claim_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._claim_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PoolClaimReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "PoolClaimReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _claim_serialize( self, body, @@ -253,9 +263,11 @@ def _claim_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -274,16 +286,24 @@ def _claim_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/claim", + method='POST', + resource_path='/v1/claim', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -293,19 +313,24 @@ def _claim_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_claim( self, claim_id: StrictStr, + request_id: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -317,6 +342,8 @@ def get_claim( :param claim_id: (required) :type claim_id: str + :param request_id: + :type request_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -337,28 +364,30 @@ def get_claim( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_claim_serialize( claim_id=claim_id, + request_id=request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetPoolClaimReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetPoolClaimReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -366,16 +395,19 @@ def get_claim( response_types_map=_response_types_map, ).data + @validate_call def get_claim_with_http_info( self, claim_id: StrictStr, + request_id: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -387,6 +419,8 @@ def get_claim_with_http_info( :param claim_id: (required) :type claim_id: str + :param request_id: + :type request_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -407,28 +441,30 @@ def get_claim_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_claim_serialize( claim_id=claim_id, + request_id=request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetPoolClaimReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetPoolClaimReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -436,16 +472,19 @@ def get_claim_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_claim_without_preload_content( self, claim_id: StrictStr, + request_id: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -457,6 +496,8 @@ def get_claim_without_preload_content( :param claim_id: (required) :type claim_id: str + :param request_id: + :type request_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -477,42 +518,48 @@ def get_claim_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_claim_serialize( claim_id=claim_id, + request_id=request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetPoolClaimReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetPoolClaimReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_claim_serialize( self, claim_id, + request_id, _request_auth, _content_type, _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -525,22 +572,34 @@ def _get_claim_serialize( # process the path parameters if claim_id is not None: - _path_params["claim_id"] = claim_id + _path_params['claim_id'] = claim_id # process the query parameters + if request_id is not None: + + _query_params.append(('request_id', request_id)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/claims/{claim_id}", + method='GET', + resource_path='/v1/claims/{claim_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -550,9 +609,12 @@ def _get_claim_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_claim( self, @@ -564,8 +626,9 @@ def list_claim( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -603,7 +666,7 @@ def list_claim( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_claim_serialize( pool_id=pool_id, @@ -613,21 +676,22 @@ def list_claim( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPoolClaimReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPoolClaimReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -635,6 +699,7 @@ def list_claim( response_types_map=_response_types_map, ).data + @validate_call def list_claim_with_http_info( self, @@ -646,8 +711,9 @@ def list_claim_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -685,7 +751,7 @@ def list_claim_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_claim_serialize( pool_id=pool_id, @@ -695,21 +761,22 @@ def list_claim_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPoolClaimReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPoolClaimReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -717,6 +784,7 @@ def list_claim_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_claim_without_preload_content( self, @@ -728,8 +796,9 @@ def list_claim_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -767,7 +836,7 @@ def list_claim_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_claim_serialize( pool_id=pool_id, @@ -777,24 +846,26 @@ def list_claim_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPoolClaimReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPoolClaimReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_claim_serialize( self, pool_id, @@ -806,9 +877,11 @@ def _list_claim_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -821,31 +894,42 @@ def _list_claim_serialize( # process the path parameters if pool_id is not None: - _path_params["pool_id"] = pool_id + _path_params['pool_id'] = pool_id # process the query parameters if status is not None: - _query_params.append(("status", status)) - + + _query_params.append(('status', status)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/service_pools/{pool_id}/claims", + method='GET', + resource_path='/v1/service_pools/{pool_id}/claims', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -855,5 +939,7 @@ def _list_claim_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/profile_api.py b/koyeb/api/api/profile_api.py index f5d61993..d13ba479 100644 --- a/koyeb/api/api/profile_api.py +++ b/koyeb/api/api/profile_api.py @@ -18,26 +18,16 @@ from pydantic import Field, StrictStr, field_validator from typing import Any, Dict, List, Optional from typing_extensions import Annotated -from koyeb.api.models.accept_organization_invitation_reply import ( - AcceptOrganizationInvitationReply, -) -from koyeb.api.models.clear_idenfy_verification_result_request import ( - ClearIdenfyVerificationResultRequest, -) +from koyeb.api.models.accept_organization_invitation_reply import AcceptOrganizationInvitationReply +from koyeb.api.models.clear_idenfy_verification_result_request import ClearIdenfyVerificationResultRequest from koyeb.api.models.create_account_request import CreateAccountRequest -from koyeb.api.models.decline_organization_invitation_reply import ( - DeclineOrganizationInvitationReply, -) +from koyeb.api.models.decline_organization_invitation_reply import DeclineOrganizationInvitationReply from koyeb.api.models.get_idenfy_token_reply import GetIdenfyTokenReply from koyeb.api.models.get_o_auth_options_reply import GetOAuthOptionsReply from koyeb.api.models.get_organization_reply import GetOrganizationReply -from koyeb.api.models.get_user_organization_invitation_reply import ( - GetUserOrganizationInvitationReply, -) +from koyeb.api.models.get_user_organization_invitation_reply import GetUserOrganizationInvitationReply from koyeb.api.models.get_user_settings_reply import GetUserSettingsReply -from koyeb.api.models.list_user_organization_invitations_reply import ( - ListUserOrganizationInvitationsReply, -) +from koyeb.api.models.list_user_organization_invitations_reply import ListUserOrganizationInvitationsReply from koyeb.api.models.list_user_organizations_reply import ListUserOrganizationsReply from koyeb.api.models.login_method_reply import LoginMethodReply from koyeb.api.models.login_reply import LoginReply @@ -45,9 +35,7 @@ from koyeb.api.models.o_auth_callback_request import OAuthCallbackRequest from koyeb.api.models.reset_password_request import ResetPasswordRequest from koyeb.api.models.update_password_request import UpdatePasswordRequest -from koyeb.api.models.update_user_request_user_update_body import ( - UpdateUserRequestUserUpdateBody, -) +from koyeb.api.models.update_user_request_user_update_body import UpdateUserRequestUserUpdateBody from koyeb.api.models.update_user_settings_reply import UpdateUserSettingsReply from koyeb.api.models.update_user_settings_request import UpdateUserSettingsRequest from koyeb.api.models.user_reply import UserReply @@ -69,20 +57,19 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def accept_organization_invitation( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to accept"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to accept")], body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -116,7 +103,7 @@ def accept_organization_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._accept_organization_invitation_serialize( id=id, @@ -124,21 +111,22 @@ def accept_organization_invitation( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AcceptOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "AcceptOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -146,20 +134,19 @@ def accept_organization_invitation( response_types_map=_response_types_map, ).data + @validate_call def accept_organization_invitation_with_http_info( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to accept"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to accept")], body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -193,7 +180,7 @@ def accept_organization_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._accept_organization_invitation_serialize( id=id, @@ -201,21 +188,22 @@ def accept_organization_invitation_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AcceptOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "AcceptOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -223,20 +211,19 @@ def accept_organization_invitation_with_http_info( response_types_map=_response_types_map, ) + @validate_call def accept_organization_invitation_without_preload_content( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to accept"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to accept")], body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -270,7 +257,7 @@ def accept_organization_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._accept_organization_invitation_serialize( id=id, @@ -278,24 +265,26 @@ def accept_organization_invitation_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AcceptOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "AcceptOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _accept_organization_invitation_serialize( self, id, @@ -305,9 +294,11 @@ def _accept_organization_invitation_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -320,7 +311,7 @@ def _accept_organization_invitation_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -328,16 +319,24 @@ def _accept_organization_invitation_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/organization_invitations/{id}/accept", + method='POST', + resource_path='/v1/account/organization_invitations/{id}/accept', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -347,9 +346,12 @@ def _accept_organization_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def clear_idenfy_verification_result( self, @@ -358,8 +360,9 @@ def clear_idenfy_verification_result( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -391,28 +394,29 @@ def clear_idenfy_verification_result( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._clear_idenfy_verification_result_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -420,6 +424,7 @@ def clear_idenfy_verification_result( response_types_map=_response_types_map, ).data + @validate_call def clear_idenfy_verification_result_with_http_info( self, @@ -428,8 +433,9 @@ def clear_idenfy_verification_result_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -461,28 +467,29 @@ def clear_idenfy_verification_result_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._clear_idenfy_verification_result_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -490,6 +497,7 @@ def clear_idenfy_verification_result_with_http_info( response_types_map=_response_types_map, ) + @validate_call def clear_idenfy_verification_result_without_preload_content( self, @@ -498,8 +506,9 @@ def clear_idenfy_verification_result_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -531,31 +540,33 @@ def clear_idenfy_verification_result_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._clear_idenfy_verification_result_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _clear_idenfy_verification_result_serialize( self, body, @@ -564,9 +575,11 @@ def _clear_idenfy_verification_result_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -585,16 +598,24 @@ def _clear_idenfy_verification_result_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/idenfy", + method='POST', + resource_path='/v1/account/idenfy', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -604,23 +625,24 @@ def _clear_idenfy_verification_result_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def decline_organization_invitation( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to decline"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to decline")], body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -654,7 +676,7 @@ def decline_organization_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._decline_organization_invitation_serialize( id=id, @@ -662,21 +684,22 @@ def decline_organization_invitation( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeclineOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeclineOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -684,20 +707,19 @@ def decline_organization_invitation( response_types_map=_response_types_map, ).data + @validate_call def decline_organization_invitation_with_http_info( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to decline"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to decline")], body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -731,7 +753,7 @@ def decline_organization_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._decline_organization_invitation_serialize( id=id, @@ -739,21 +761,22 @@ def decline_organization_invitation_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeclineOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeclineOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -761,20 +784,19 @@ def decline_organization_invitation_with_http_info( response_types_map=_response_types_map, ) + @validate_call def decline_organization_invitation_without_preload_content( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to decline"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to decline")], body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -808,7 +830,7 @@ def decline_organization_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._decline_organization_invitation_serialize( id=id, @@ -816,24 +838,26 @@ def decline_organization_invitation_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeclineOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeclineOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _decline_organization_invitation_serialize( self, id, @@ -843,9 +867,11 @@ def _decline_organization_invitation_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -858,7 +884,7 @@ def _decline_organization_invitation_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -866,16 +892,24 @@ def _decline_organization_invitation_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/organization_invitations/{id}/decline", + method='POST', + resource_path='/v1/account/organization_invitations/{id}/decline', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -885,9 +919,12 @@ def _decline_organization_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_current_organization( self, @@ -895,8 +932,9 @@ def get_current_organization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -926,27 +964,28 @@ def get_current_organization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_current_organization_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -954,6 +993,7 @@ def get_current_organization( response_types_map=_response_types_map, ).data + @validate_call def get_current_organization_with_http_info( self, @@ -961,8 +1001,9 @@ def get_current_organization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -992,27 +1033,28 @@ def get_current_organization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_current_organization_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1020,6 +1062,7 @@ def get_current_organization_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_current_organization_without_preload_content( self, @@ -1027,8 +1070,9 @@ def get_current_organization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1058,30 +1102,32 @@ def get_current_organization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_current_organization_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_current_organization_serialize( self, _request_auth, @@ -1089,9 +1135,11 @@ def _get_current_organization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1108,16 +1156,24 @@ def _get_current_organization_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/account/organization", + method='GET', + resource_path='/v1/account/organization', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1127,21 +1183,23 @@ def _get_current_organization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_current_user( self, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1173,28 +1231,29 @@ def get_current_user( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_current_user_serialize( seon_fp=seon_fp, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1202,18 +1261,18 @@ def get_current_user( response_types_map=_response_types_map, ).data + @validate_call def get_current_user_with_http_info( self, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1245,28 +1304,29 @@ def get_current_user_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_current_user_serialize( seon_fp=seon_fp, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1274,18 +1334,18 @@ def get_current_user_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_current_user_without_preload_content( self, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1317,31 +1377,33 @@ def get_current_user_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_current_user_serialize( seon_fp=seon_fp, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_current_user_serialize( self, seon_fp, @@ -1350,9 +1412,11 @@ def _get_current_user_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1367,20 +1431,28 @@ def _get_current_user_serialize( # process the query parameters # process the header parameters if seon_fp is not None: - _header_params["seon-fp"] = seon_fp + _header_params['seon-fp'] = seon_fp # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/account/profile", + method='GET', + resource_path='/v1/account/profile', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1390,9 +1462,12 @@ def _get_current_user_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_idenfy_token( self, @@ -1400,8 +1475,9 @@ def get_idenfy_token( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1431,27 +1507,28 @@ def get_idenfy_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_idenfy_token_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetIdenfyTokenReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetIdenfyTokenReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1459,6 +1536,7 @@ def get_idenfy_token( response_types_map=_response_types_map, ).data + @validate_call def get_idenfy_token_with_http_info( self, @@ -1466,8 +1544,9 @@ def get_idenfy_token_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1497,27 +1576,28 @@ def get_idenfy_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_idenfy_token_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetIdenfyTokenReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetIdenfyTokenReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1525,6 +1605,7 @@ def get_idenfy_token_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_idenfy_token_without_preload_content( self, @@ -1532,8 +1613,9 @@ def get_idenfy_token_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1563,30 +1645,32 @@ def get_idenfy_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_idenfy_token_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetIdenfyTokenReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetIdenfyTokenReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_idenfy_token_serialize( self, _request_auth, @@ -1594,9 +1678,11 @@ def _get_idenfy_token_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1613,16 +1699,24 @@ def _get_idenfy_token_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/account/idenfy", + method='GET', + resource_path='/v1/account/idenfy', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1632,28 +1726,24 @@ def _get_idenfy_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_o_auth_options( self, - action: Annotated[ - Optional[StrictStr], - Field(description="Which authentication flow is being initiated"), - ] = None, - metadata: Annotated[ - Optional[StrictStr], - Field( - description="A small (limited to 400 characters) string of arbitrary metadata which will be encoded in the state" - ), - ] = None, + action: Annotated[Optional[StrictStr], Field(description="Which authentication flow is being initiated")] = None, + metadata: Annotated[Optional[StrictStr], Field(description="A small (limited to 400 characters) string of arbitrary metadata which will be encoded in the state")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1687,7 +1777,7 @@ def get_o_auth_options( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_o_auth_options_serialize( action=action, @@ -1695,21 +1785,22 @@ def get_o_auth_options( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOAuthOptionsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOAuthOptionsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1717,25 +1808,19 @@ def get_o_auth_options( response_types_map=_response_types_map, ).data + @validate_call def get_o_auth_options_with_http_info( self, - action: Annotated[ - Optional[StrictStr], - Field(description="Which authentication flow is being initiated"), - ] = None, - metadata: Annotated[ - Optional[StrictStr], - Field( - description="A small (limited to 400 characters) string of arbitrary metadata which will be encoded in the state" - ), - ] = None, + action: Annotated[Optional[StrictStr], Field(description="Which authentication flow is being initiated")] = None, + metadata: Annotated[Optional[StrictStr], Field(description="A small (limited to 400 characters) string of arbitrary metadata which will be encoded in the state")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1769,7 +1854,7 @@ def get_o_auth_options_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_o_auth_options_serialize( action=action, @@ -1777,21 +1862,22 @@ def get_o_auth_options_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOAuthOptionsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOAuthOptionsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1799,25 +1885,19 @@ def get_o_auth_options_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_o_auth_options_without_preload_content( self, - action: Annotated[ - Optional[StrictStr], - Field(description="Which authentication flow is being initiated"), - ] = None, - metadata: Annotated[ - Optional[StrictStr], - Field( - description="A small (limited to 400 characters) string of arbitrary metadata which will be encoded in the state" - ), - ] = None, + action: Annotated[Optional[StrictStr], Field(description="Which authentication flow is being initiated")] = None, + metadata: Annotated[Optional[StrictStr], Field(description="A small (limited to 400 characters) string of arbitrary metadata which will be encoded in the state")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1851,7 +1931,7 @@ def get_o_auth_options_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_o_auth_options_serialize( action=action, @@ -1859,24 +1939,26 @@ def get_o_auth_options_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOAuthOptionsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOAuthOptionsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_o_auth_options_serialize( self, action, @@ -1886,9 +1968,11 @@ def _get_o_auth_options_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1902,25 +1986,35 @@ def _get_o_auth_options_serialize( # process the path parameters # process the query parameters if action is not None: - _query_params.append(("action", action)) - + + _query_params.append(('action', action)) + if metadata is not None: - _query_params.append(("metadata", metadata)) - + + _query_params.append(('metadata', metadata)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/account/oauth", + method='GET', + resource_path='/v1/account/oauth', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1930,21 +2024,23 @@ def _get_o_auth_options_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_user_organization_invitation( self, - id: Annotated[ - StrictStr, Field(description="The id of the organization invitation to get") - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to get")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1976,28 +2072,29 @@ def get_user_organization_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_user_organization_invitation_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetUserOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetUserOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2005,18 +2102,18 @@ def get_user_organization_invitation( response_types_map=_response_types_map, ).data + @validate_call def get_user_organization_invitation_with_http_info( self, - id: Annotated[ - StrictStr, Field(description="The id of the organization invitation to get") - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to get")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2048,28 +2145,29 @@ def get_user_organization_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_user_organization_invitation_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetUserOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetUserOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2077,18 +2175,18 @@ def get_user_organization_invitation_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_user_organization_invitation_without_preload_content( self, - id: Annotated[ - StrictStr, Field(description="The id of the organization invitation to get") - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to get")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2120,31 +2218,33 @@ def get_user_organization_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_user_organization_invitation_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetUserOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetUserOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_user_organization_invitation_serialize( self, id, @@ -2153,9 +2253,11 @@ def _get_user_organization_invitation_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2168,22 +2270,30 @@ def _get_user_organization_invitation_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/account/organization_invitations/{id}", + method='GET', + resource_path='/v1/account/organization_invitations/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2193,9 +2303,12 @@ def _get_user_organization_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_user_settings( self, @@ -2203,8 +2316,9 @@ def get_user_settings( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2234,27 +2348,28 @@ def get_user_settings( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_user_settings_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetUserSettingsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetUserSettingsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2262,6 +2377,7 @@ def get_user_settings( response_types_map=_response_types_map, ).data + @validate_call def get_user_settings_with_http_info( self, @@ -2269,8 +2385,9 @@ def get_user_settings_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2300,27 +2417,28 @@ def get_user_settings_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_user_settings_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetUserSettingsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetUserSettingsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2328,6 +2446,7 @@ def get_user_settings_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_user_settings_without_preload_content( self, @@ -2335,8 +2454,9 @@ def get_user_settings_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2366,30 +2486,32 @@ def get_user_settings_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_user_settings_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetUserSettingsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetUserSettingsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_user_settings_serialize( self, _request_auth, @@ -2397,9 +2519,11 @@ def _get_user_settings_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2416,16 +2540,24 @@ def _get_user_settings_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/account/settings", + method='GET', + resource_path='/v1/account/settings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2435,30 +2567,25 @@ def _get_user_settings_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_user_organization_invitations( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on organization invitation statuses"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on organization invitation statuses")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2494,7 +2621,7 @@ def list_user_organization_invitations( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_user_organization_invitations_serialize( limit=limit, @@ -2503,21 +2630,22 @@ def list_user_organization_invitations( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUserOrganizationInvitationsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListUserOrganizationInvitationsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2525,27 +2653,20 @@ def list_user_organization_invitations( response_types_map=_response_types_map, ).data + @validate_call def list_user_organization_invitations_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on organization invitation statuses"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on organization invitation statuses")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2581,7 +2702,7 @@ def list_user_organization_invitations_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_user_organization_invitations_serialize( limit=limit, @@ -2590,21 +2711,22 @@ def list_user_organization_invitations_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUserOrganizationInvitationsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListUserOrganizationInvitationsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2612,27 +2734,20 @@ def list_user_organization_invitations_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_user_organization_invitations_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on organization invitation statuses"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on organization invitation statuses")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2668,7 +2783,7 @@ def list_user_organization_invitations_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_user_organization_invitations_serialize( limit=limit, @@ -2677,24 +2792,26 @@ def list_user_organization_invitations_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUserOrganizationInvitationsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListUserOrganizationInvitationsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_user_organization_invitations_serialize( self, limit, @@ -2705,10 +2822,11 @@ def _list_user_organization_invitations_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "statuses": "multi", + 'statuses': 'multi', } _path_params: Dict[str, str] = {} @@ -2723,28 +2841,39 @@ def _list_user_organization_invitations_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if statuses is not None: - _query_params.append(("statuses", statuses)) - + + _query_params.append(('statuses', statuses)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/account/organization_invitations", + method='GET', + resource_path='/v1/account/organization_invitations', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2754,43 +2883,27 @@ def _list_user_organization_invitations_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_user_organizations( self, - limit: Annotated[ - Optional[StrictStr], Field(description="(Optional) Define pagination limit") - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Define pagination offset"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, - search: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Fuzzy case-insensitive search based on organization name or organization id" - ), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Only return organizations which status match one in the list" - ), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) Define pagination limit")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) Define pagination offset")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + search: Annotated[Optional[StrictStr], Field(description="(Optional) Fuzzy case-insensitive search based on organization name or organization id")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Only return organizations which status match one in the list")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2831,7 +2944,7 @@ def list_user_organizations( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_user_organizations_serialize( limit=limit, @@ -2842,21 +2955,22 @@ def list_user_organizations( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUserOrganizationsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListUserOrganizationsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2864,40 +2978,22 @@ def list_user_organizations( response_types_map=_response_types_map, ).data + @validate_call def list_user_organizations_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], Field(description="(Optional) Define pagination limit") - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Define pagination offset"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, - search: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Fuzzy case-insensitive search based on organization name or organization id" - ), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Only return organizations which status match one in the list" - ), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) Define pagination limit")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) Define pagination offset")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + search: Annotated[Optional[StrictStr], Field(description="(Optional) Fuzzy case-insensitive search based on organization name or organization id")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Only return organizations which status match one in the list")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2938,7 +3034,7 @@ def list_user_organizations_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_user_organizations_serialize( limit=limit, @@ -2949,21 +3045,22 @@ def list_user_organizations_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUserOrganizationsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListUserOrganizationsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2971,40 +3068,22 @@ def list_user_organizations_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_user_organizations_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], Field(description="(Optional) Define pagination limit") - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Define pagination offset"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, - search: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Fuzzy case-insensitive search based on organization name or organization id" - ), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Only return organizations which status match one in the list" - ), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) Define pagination limit")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) Define pagination offset")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + search: Annotated[Optional[StrictStr], Field(description="(Optional) Fuzzy case-insensitive search based on organization name or organization id")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Only return organizations which status match one in the list")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3045,7 +3124,7 @@ def list_user_organizations_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_user_organizations_serialize( limit=limit, @@ -3056,24 +3135,26 @@ def list_user_organizations_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUserOrganizationsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListUserOrganizationsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_user_organizations_serialize( self, limit, @@ -3086,10 +3167,11 @@ def _list_user_organizations_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "statuses": "multi", + 'statuses': 'multi', } _path_params: Dict[str, str] = {} @@ -3104,34 +3186,47 @@ def _list_user_organizations_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + if search is not None: - _query_params.append(("search", search)) - + + _query_params.append(('search', search)) + if statuses is not None: - _query_params.append(("statuses", statuses)) - + + _query_params.append(('statuses', statuses)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/account/organizations", + method='GET', + resource_path='/v1/account/organizations', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3141,9 +3236,12 @@ def _list_user_organizations_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def login_method( self, @@ -3152,8 +3250,9 @@ def login_method( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3185,28 +3284,29 @@ def login_method( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._login_method_serialize( email=email, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginMethodReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginMethodReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3214,6 +3314,7 @@ def login_method( response_types_map=_response_types_map, ).data + @validate_call def login_method_with_http_info( self, @@ -3222,8 +3323,9 @@ def login_method_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3255,28 +3357,29 @@ def login_method_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._login_method_serialize( email=email, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginMethodReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginMethodReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3284,6 +3387,7 @@ def login_method_with_http_info( response_types_map=_response_types_map, ) + @validate_call def login_method_without_preload_content( self, @@ -3292,8 +3396,9 @@ def login_method_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3325,31 +3430,33 @@ def login_method_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._login_method_serialize( email=email, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginMethodReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginMethodReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _login_method_serialize( self, email, @@ -3358,9 +3465,11 @@ def _login_method_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3374,22 +3483,31 @@ def _login_method_serialize( # process the path parameters # process the query parameters if email is not None: - _query_params.append(("email", email)) - + + _query_params.append(('email', email)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/account/login_method", + method='GET', + resource_path='/v1/account/login_method', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3399,22 +3517,24 @@ def _login_method_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def o_auth_callback( self, body: OAuthCallbackRequest, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3448,7 +3568,7 @@ def o_auth_callback( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._o_auth_callback_serialize( body=body, @@ -3456,21 +3576,22 @@ def o_auth_callback( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OAuthCallbackReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "OAuthCallbackReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3478,19 +3599,19 @@ def o_auth_callback( response_types_map=_response_types_map, ).data + @validate_call def o_auth_callback_with_http_info( self, body: OAuthCallbackRequest, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3524,7 +3645,7 @@ def o_auth_callback_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._o_auth_callback_serialize( body=body, @@ -3532,21 +3653,22 @@ def o_auth_callback_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OAuthCallbackReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "OAuthCallbackReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3554,19 +3676,19 @@ def o_auth_callback_with_http_info( response_types_map=_response_types_map, ) + @validate_call def o_auth_callback_without_preload_content( self, body: OAuthCallbackRequest, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3600,7 +3722,7 @@ def o_auth_callback_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._o_auth_callback_serialize( body=body, @@ -3608,24 +3730,26 @@ def o_auth_callback_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OAuthCallbackReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "OAuthCallbackReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _o_auth_callback_serialize( self, body, @@ -3635,9 +3759,11 @@ def _o_auth_callback_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3652,22 +3778,30 @@ def _o_auth_callback_serialize( # process the query parameters # process the header parameters if seon_fp is not None: - _header_params["seon-fp"] = seon_fp + _header_params['seon-fp'] = seon_fp # process the form parameters # process the body parameter if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/oauth", + method='POST', + resource_path='/v1/account/oauth', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3677,9 +3811,12 @@ def _o_auth_callback_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def resend_email_validation( self, @@ -3688,8 +3825,9 @@ def resend_email_validation( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3721,28 +3859,29 @@ def resend_email_validation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resend_email_validation_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3750,6 +3889,7 @@ def resend_email_validation( response_types_map=_response_types_map, ).data + @validate_call def resend_email_validation_with_http_info( self, @@ -3758,8 +3898,9 @@ def resend_email_validation_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3791,28 +3932,29 @@ def resend_email_validation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resend_email_validation_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3820,6 +3962,7 @@ def resend_email_validation_with_http_info( response_types_map=_response_types_map, ) + @validate_call def resend_email_validation_without_preload_content( self, @@ -3828,8 +3971,9 @@ def resend_email_validation_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3861,31 +4005,33 @@ def resend_email_validation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resend_email_validation_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _resend_email_validation_serialize( self, body, @@ -3894,9 +4040,11 @@ def _resend_email_validation_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3915,16 +4063,24 @@ def _resend_email_validation_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/resend_validation", + method='POST', + resource_path='/v1/account/resend_validation', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3934,9 +4090,12 @@ def _resend_email_validation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def reset_password( self, @@ -3945,8 +4104,9 @@ def reset_password( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3978,28 +4138,29 @@ def reset_password( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._reset_password_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4007,6 +4168,7 @@ def reset_password( response_types_map=_response_types_map, ).data + @validate_call def reset_password_with_http_info( self, @@ -4015,8 +4177,9 @@ def reset_password_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4048,28 +4211,29 @@ def reset_password_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._reset_password_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4077,6 +4241,7 @@ def reset_password_with_http_info( response_types_map=_response_types_map, ) + @validate_call def reset_password_without_preload_content( self, @@ -4085,8 +4250,9 @@ def reset_password_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4118,31 +4284,33 @@ def reset_password_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._reset_password_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _reset_password_serialize( self, body, @@ -4151,9 +4319,11 @@ def _reset_password_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4172,16 +4342,24 @@ def _reset_password_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/reset_password", + method='POST', + resource_path='/v1/account/reset_password', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4191,22 +4369,24 @@ def _reset_password_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def signup( self, body: Annotated[CreateAccountRequest, Field(description="Create new account")], - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4240,7 +4420,7 @@ def signup( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signup_serialize( body=body, @@ -4248,21 +4428,22 @@ def signup( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4270,19 +4451,19 @@ def signup( response_types_map=_response_types_map, ).data + @validate_call def signup_with_http_info( self, body: Annotated[CreateAccountRequest, Field(description="Create new account")], - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4316,7 +4497,7 @@ def signup_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signup_serialize( body=body, @@ -4324,21 +4505,22 @@ def signup_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4346,19 +4528,19 @@ def signup_with_http_info( response_types_map=_response_types_map, ) + @validate_call def signup_without_preload_content( self, body: Annotated[CreateAccountRequest, Field(description="Create new account")], - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4392,7 +4574,7 @@ def signup_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signup_serialize( body=body, @@ -4400,24 +4582,26 @@ def signup_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _signup_serialize( self, body, @@ -4427,9 +4611,11 @@ def _signup_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4444,22 +4630,30 @@ def _signup_serialize( # process the query parameters # process the header parameters if seon_fp is not None: - _header_params["seon-fp"] = seon_fp + _header_params['seon-fp'] = seon_fp # process the form parameters # process the body parameter if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/signup", + method='POST', + resource_path='/v1/account/signup', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4469,22 +4663,24 @@ def _signup_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_password( self, body: UpdatePasswordRequest, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4518,7 +4714,7 @@ def update_password( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_password_serialize( body=body, @@ -4526,21 +4722,22 @@ def update_password( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4548,19 +4745,19 @@ def update_password( response_types_map=_response_types_map, ).data + @validate_call def update_password_with_http_info( self, body: UpdatePasswordRequest, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4594,7 +4791,7 @@ def update_password_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_password_serialize( body=body, @@ -4602,21 +4799,22 @@ def update_password_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4624,19 +4822,19 @@ def update_password_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_password_without_preload_content( self, body: UpdatePasswordRequest, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4670,7 +4868,7 @@ def update_password_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_password_serialize( body=body, @@ -4678,24 +4876,26 @@ def update_password_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_password_serialize( self, body, @@ -4705,9 +4905,11 @@ def _update_password_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4722,22 +4924,30 @@ def _update_password_serialize( # process the query parameters # process the header parameters if seon_fp is not None: - _header_params["seon-fp"] = seon_fp + _header_params['seon-fp'] = seon_fp # process the form parameters # process the body parameter if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/update_password", + method='POST', + resource_path='/v1/account/update_password', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4747,9 +4957,12 @@ def _update_password_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_user( self, @@ -4759,8 +4972,9 @@ def update_user( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4794,7 +5008,7 @@ def update_user( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_serialize( user=user, @@ -4802,21 +5016,22 @@ def update_user( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4824,6 +5039,7 @@ def update_user( response_types_map=_response_types_map, ).data + @validate_call def update_user_with_http_info( self, @@ -4833,8 +5049,9 @@ def update_user_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4868,7 +5085,7 @@ def update_user_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_serialize( user=user, @@ -4876,21 +5093,22 @@ def update_user_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4898,6 +5116,7 @@ def update_user_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_user_without_preload_content( self, @@ -4907,8 +5126,9 @@ def update_user_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4942,7 +5162,7 @@ def update_user_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_serialize( user=user, @@ -4950,24 +5170,26 @@ def update_user_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_user_serialize( self, user, @@ -4977,9 +5199,11 @@ def _update_user_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4993,24 +5217,33 @@ def _update_user_serialize( # process the path parameters # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if user is not None: _body_params = user + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/account/profile", + method='PUT', + resource_path='/v1/account/profile', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5020,9 +5253,12 @@ def _update_user_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_user2( self, @@ -5032,8 +5268,9 @@ def update_user2( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5067,7 +5304,7 @@ def update_user2( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user2_serialize( user=user, @@ -5075,21 +5312,22 @@ def update_user2( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -5097,6 +5335,7 @@ def update_user2( response_types_map=_response_types_map, ).data + @validate_call def update_user2_with_http_info( self, @@ -5106,8 +5345,9 @@ def update_user2_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5141,7 +5381,7 @@ def update_user2_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user2_serialize( user=user, @@ -5149,21 +5389,22 @@ def update_user2_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -5171,6 +5412,7 @@ def update_user2_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_user2_without_preload_content( self, @@ -5180,8 +5422,9 @@ def update_user2_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5215,7 +5458,7 @@ def update_user2_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user2_serialize( user=user, @@ -5223,24 +5466,26 @@ def update_user2_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_user2_serialize( self, user, @@ -5250,9 +5495,11 @@ def _update_user2_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -5266,24 +5513,33 @@ def _update_user2_serialize( # process the path parameters # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if user is not None: _body_params = user + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/account/profile", + method='PATCH', + resource_path='/v1/account/profile', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5293,9 +5549,12 @@ def _update_user2_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_user_settings( self, @@ -5304,8 +5563,9 @@ def update_user_settings( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5337,28 +5597,29 @@ def update_user_settings( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_settings_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateUserSettingsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateUserSettingsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -5366,6 +5627,7 @@ def update_user_settings( response_types_map=_response_types_map, ).data + @validate_call def update_user_settings_with_http_info( self, @@ -5374,8 +5636,9 @@ def update_user_settings_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5407,28 +5670,29 @@ def update_user_settings_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_settings_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateUserSettingsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateUserSettingsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -5436,6 +5700,7 @@ def update_user_settings_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_user_settings_without_preload_content( self, @@ -5444,8 +5709,9 @@ def update_user_settings_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5477,31 +5743,33 @@ def update_user_settings_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_settings_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateUserSettingsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateUserSettingsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_user_settings_serialize( self, body, @@ -5510,9 +5778,11 @@ def _update_user_settings_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -5531,16 +5801,24 @@ def _update_user_settings_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/account/settings", + method='PATCH', + resource_path='/v1/account/settings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5550,9 +5828,12 @@ def _update_user_settings_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_user_v2( self, @@ -5562,8 +5843,9 @@ def update_user_v2( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5597,7 +5879,7 @@ def update_user_v2( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_v2_serialize( user=user, @@ -5605,21 +5887,22 @@ def update_user_v2( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -5627,6 +5910,7 @@ def update_user_v2( response_types_map=_response_types_map, ).data + @validate_call def update_user_v2_with_http_info( self, @@ -5636,8 +5920,9 @@ def update_user_v2_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5671,7 +5956,7 @@ def update_user_v2_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_v2_serialize( user=user, @@ -5679,21 +5964,22 @@ def update_user_v2_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -5701,6 +5987,7 @@ def update_user_v2_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_user_v2_without_preload_content( self, @@ -5710,8 +5997,9 @@ def update_user_v2_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5745,7 +6033,7 @@ def update_user_v2_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_v2_serialize( user=user, @@ -5753,24 +6041,26 @@ def update_user_v2_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_user_v2_serialize( self, user, @@ -5780,9 +6070,11 @@ def _update_user_v2_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -5796,24 +6088,33 @@ def _update_user_v2_serialize( # process the path parameters # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if user is not None: _body_params = user + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v2/account/profile", + method='PUT', + resource_path='/v2/account/profile', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5823,9 +6124,12 @@ def _update_user_v2_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_user_v22( self, @@ -5835,8 +6139,9 @@ def update_user_v22( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5870,7 +6175,7 @@ def update_user_v22( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_v22_serialize( user=user, @@ -5878,21 +6183,22 @@ def update_user_v22( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -5900,6 +6206,7 @@ def update_user_v22( response_types_map=_response_types_map, ).data + @validate_call def update_user_v22_with_http_info( self, @@ -5909,8 +6216,9 @@ def update_user_v22_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5944,7 +6252,7 @@ def update_user_v22_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_v22_serialize( user=user, @@ -5952,21 +6260,22 @@ def update_user_v22_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -5974,6 +6283,7 @@ def update_user_v22_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_user_v22_without_preload_content( self, @@ -5983,8 +6293,9 @@ def update_user_v22_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6018,7 +6329,7 @@ def update_user_v22_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_v22_serialize( user=user, @@ -6026,24 +6337,26 @@ def update_user_v22_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_user_v22_serialize( self, user, @@ -6053,9 +6366,11 @@ def _update_user_v22_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -6069,24 +6384,33 @@ def _update_user_v22_serialize( # process the path parameters # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if user is not None: _body_params = user + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v2/account/profile", + method='PATCH', + resource_path='/v2/account/profile', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6096,22 +6420,24 @@ def _update_user_v22_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def validate( self, id: StrictStr, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6145,7 +6471,7 @@ def validate( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._validate_serialize( id=id, @@ -6153,21 +6479,22 @@ def validate( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -6175,19 +6502,19 @@ def validate( response_types_map=_response_types_map, ).data + @validate_call def validate_with_http_info( self, id: StrictStr, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6221,7 +6548,7 @@ def validate_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._validate_serialize( id=id, @@ -6229,21 +6556,22 @@ def validate_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -6251,19 +6579,19 @@ def validate_with_http_info( response_types_map=_response_types_map, ) + @validate_call def validate_without_preload_content( self, id: StrictStr, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6297,7 +6625,7 @@ def validate_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._validate_serialize( id=id, @@ -6305,24 +6633,26 @@ def validate_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _validate_serialize( self, id, @@ -6332,9 +6662,11 @@ def _validate_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -6347,24 +6679,32 @@ def _validate_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters if seon_fp is not None: - _header_params["seon-fp"] = seon_fp + _header_params['seon-fp'] = seon_fp # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/validate/{id}", + method='POST', + resource_path='/v1/account/validate/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6374,5 +6714,7 @@ def _validate_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/projects_api.py b/koyeb/api/api/projects_api.py index 19553df4..236b3a19 100644 --- a/koyeb/api/api/projects_api.py +++ b/koyeb/api/api/projects_api.py @@ -42,6 +42,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def create_project( self, @@ -50,8 +51,9 @@ def create_project( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -83,28 +85,29 @@ def create_project( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_project_serialize( project=project, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -112,6 +115,7 @@ def create_project( response_types_map=_response_types_map, ).data + @validate_call def create_project_with_http_info( self, @@ -120,8 +124,9 @@ def create_project_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -153,28 +158,29 @@ def create_project_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_project_serialize( project=project, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -182,6 +188,7 @@ def create_project_with_http_info( response_types_map=_response_types_map, ) + @validate_call def create_project_without_preload_content( self, @@ -190,8 +197,9 @@ def create_project_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -223,31 +231,33 @@ def create_project_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_project_serialize( project=project, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_project_serialize( self, project, @@ -256,9 +266,11 @@ def _create_project_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -277,16 +289,24 @@ def _create_project_serialize( if project is not None: _body_params = project + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/projects", + method='POST', + resource_path='/v1/projects', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -296,9 +316,12 @@ def _create_project_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def delete_project( self, @@ -307,8 +330,9 @@ def delete_project( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -340,28 +364,29 @@ def delete_project( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_project_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -369,6 +394,7 @@ def delete_project( response_types_map=_response_types_map, ).data + @validate_call def delete_project_with_http_info( self, @@ -377,8 +403,9 @@ def delete_project_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -410,28 +437,29 @@ def delete_project_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_project_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -439,6 +467,7 @@ def delete_project_with_http_info( response_types_map=_response_types_map, ) + @validate_call def delete_project_without_preload_content( self, @@ -447,8 +476,9 @@ def delete_project_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -480,31 +510,33 @@ def delete_project_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_project_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_project_serialize( self, id, @@ -513,9 +545,11 @@ def _delete_project_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -528,22 +562,30 @@ def _delete_project_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{id}", + method='DELETE', + resource_path='/v1/projects/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -553,9 +595,12 @@ def _delete_project_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_project( self, @@ -564,8 +609,9 @@ def get_project( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -597,28 +643,29 @@ def get_project( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_project_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -626,6 +673,7 @@ def get_project( response_types_map=_response_types_map, ).data + @validate_call def get_project_with_http_info( self, @@ -634,8 +682,9 @@ def get_project_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -667,28 +716,29 @@ def get_project_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_project_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -696,6 +746,7 @@ def get_project_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_project_without_preload_content( self, @@ -704,8 +755,9 @@ def get_project_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -737,31 +789,33 @@ def get_project_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_project_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_project_serialize( self, id, @@ -770,9 +824,11 @@ def _get_project_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -785,22 +841,30 @@ def _get_project_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/projects/{id}", + method='GET', + resource_path='/v1/projects/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -810,29 +874,25 @@ def _get_project_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_projects( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter by project name") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) Filter by project name")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -868,7 +928,7 @@ def list_projects( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_projects_serialize( limit=limit, @@ -877,21 +937,22 @@ def list_projects( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListProjectsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListProjectsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -899,26 +960,20 @@ def list_projects( response_types_map=_response_types_map, ).data + @validate_call def list_projects_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter by project name") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) Filter by project name")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -954,7 +1009,7 @@ def list_projects_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_projects_serialize( limit=limit, @@ -963,21 +1018,22 @@ def list_projects_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListProjectsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListProjectsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -985,26 +1041,20 @@ def list_projects_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_projects_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter by project name") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) Filter by project name")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1040,7 +1090,7 @@ def list_projects_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_projects_serialize( limit=limit, @@ -1049,24 +1099,26 @@ def list_projects_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListProjectsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListProjectsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_projects_serialize( self, limit, @@ -1077,9 +1129,11 @@ def _list_projects_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1093,28 +1147,39 @@ def _list_projects_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/projects", + method='GET', + resource_path='/v1/projects', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1124,9 +1189,12 @@ def _list_projects_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_project( self, @@ -1137,8 +1205,9 @@ def update_project( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1174,7 +1243,7 @@ def update_project( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_project_serialize( id=id, @@ -1183,21 +1252,22 @@ def update_project( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1205,6 +1275,7 @@ def update_project( response_types_map=_response_types_map, ).data + @validate_call def update_project_with_http_info( self, @@ -1215,8 +1286,9 @@ def update_project_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1252,7 +1324,7 @@ def update_project_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_project_serialize( id=id, @@ -1261,21 +1333,22 @@ def update_project_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1283,6 +1356,7 @@ def update_project_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_project_without_preload_content( self, @@ -1293,8 +1367,9 @@ def update_project_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1330,7 +1405,7 @@ def update_project_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_project_serialize( id=id, @@ -1339,24 +1414,26 @@ def update_project_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_project_serialize( self, id, @@ -1367,9 +1444,11 @@ def _update_project_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1382,27 +1461,36 @@ def _update_project_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if project is not None: _body_params = project + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/projects/{id}", + method='PUT', + resource_path='/v1/projects/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1412,9 +1500,12 @@ def _update_project_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_project2( self, @@ -1425,8 +1516,9 @@ def update_project2( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1462,7 +1554,7 @@ def update_project2( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_project2_serialize( id=id, @@ -1471,21 +1563,22 @@ def update_project2( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1493,6 +1586,7 @@ def update_project2( response_types_map=_response_types_map, ).data + @validate_call def update_project2_with_http_info( self, @@ -1503,8 +1597,9 @@ def update_project2_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1540,7 +1635,7 @@ def update_project2_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_project2_serialize( id=id, @@ -1549,21 +1644,22 @@ def update_project2_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1571,6 +1667,7 @@ def update_project2_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_project2_without_preload_content( self, @@ -1581,8 +1678,9 @@ def update_project2_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1618,7 +1716,7 @@ def update_project2_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_project2_serialize( id=id, @@ -1627,24 +1725,26 @@ def update_project2_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_project2_serialize( self, id, @@ -1655,9 +1755,11 @@ def _update_project2_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1670,27 +1772,36 @@ def _update_project2_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if project is not None: _body_params = project + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/projects/{id}", + method='PATCH', + resource_path='/v1/projects/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1700,5 +1811,7 @@ def _update_project2_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/provisioning_api.py b/koyeb/api/api/provisioning_api.py index 8dd0071b..abce6d42 100644 --- a/koyeb/api/api/provisioning_api.py +++ b/koyeb/api/api/provisioning_api.py @@ -38,6 +38,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def create_stage_attempt( self, @@ -49,8 +50,9 @@ def create_stage_attempt( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -88,7 +90,7 @@ def create_stage_attempt( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_stage_attempt_serialize( deployment_id=deployment_id, @@ -98,21 +100,22 @@ def create_stage_attempt( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -120,6 +123,7 @@ def create_stage_attempt( response_types_map=_response_types_map, ).data + @validate_call def create_stage_attempt_with_http_info( self, @@ -131,8 +135,9 @@ def create_stage_attempt_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -170,7 +175,7 @@ def create_stage_attempt_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_stage_attempt_serialize( deployment_id=deployment_id, @@ -180,21 +185,22 @@ def create_stage_attempt_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -202,6 +208,7 @@ def create_stage_attempt_with_http_info( response_types_map=_response_types_map, ) + @validate_call def create_stage_attempt_without_preload_content( self, @@ -213,8 +220,9 @@ def create_stage_attempt_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -252,7 +260,7 @@ def create_stage_attempt_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_stage_attempt_serialize( deployment_id=deployment_id, @@ -262,24 +270,26 @@ def create_stage_attempt_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_stage_attempt_serialize( self, deployment_id, @@ -291,9 +301,11 @@ def _create_stage_attempt_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -306,11 +318,11 @@ def _create_stage_attempt_serialize( # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id if stage is not None: - _path_params["stage"] = stage + _path_params['stage'] = stage if attempt is not None: - _path_params["attempt"] = attempt + _path_params['attempt'] = attempt # process the query parameters # process the header parameters # process the form parameters @@ -318,16 +330,24 @@ def _create_stage_attempt_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/provisioning/{deployment_id}/status/{stage}/{attempt}", + method='POST', + resource_path='/v1/provisioning/{deployment_id}/status/{stage}/{attempt}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -337,9 +357,12 @@ def _create_stage_attempt_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def declare_stage_progress( self, @@ -351,8 +374,9 @@ def declare_stage_progress( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -390,7 +414,7 @@ def declare_stage_progress( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._declare_stage_progress_serialize( deployment_id=deployment_id, @@ -400,21 +424,22 @@ def declare_stage_progress( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -422,6 +447,7 @@ def declare_stage_progress( response_types_map=_response_types_map, ).data + @validate_call def declare_stage_progress_with_http_info( self, @@ -433,8 +459,9 @@ def declare_stage_progress_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -472,7 +499,7 @@ def declare_stage_progress_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._declare_stage_progress_serialize( deployment_id=deployment_id, @@ -482,21 +509,22 @@ def declare_stage_progress_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -504,6 +532,7 @@ def declare_stage_progress_with_http_info( response_types_map=_response_types_map, ) + @validate_call def declare_stage_progress_without_preload_content( self, @@ -515,8 +544,9 @@ def declare_stage_progress_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -554,7 +584,7 @@ def declare_stage_progress_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._declare_stage_progress_serialize( deployment_id=deployment_id, @@ -564,24 +594,26 @@ def declare_stage_progress_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _declare_stage_progress_serialize( self, deployment_id, @@ -593,9 +625,11 @@ def _declare_stage_progress_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -608,11 +642,11 @@ def _declare_stage_progress_serialize( # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id if stage is not None: - _path_params["stage"] = stage + _path_params['stage'] = stage if attempt is not None: - _path_params["attempt"] = attempt + _path_params['attempt'] = attempt # process the query parameters # process the header parameters # process the form parameters @@ -620,16 +654,24 @@ def _declare_stage_progress_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/provisioning/{deployment_id}/status/{stage}/{attempt}", + method='PATCH', + resource_path='/v1/provisioning/{deployment_id}/status/{stage}/{attempt}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -639,9 +681,12 @@ def _declare_stage_progress_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def declare_step_progress( self, @@ -654,8 +699,9 @@ def declare_step_progress( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -695,7 +741,7 @@ def declare_step_progress( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._declare_step_progress_serialize( deployment_id=deployment_id, @@ -706,21 +752,22 @@ def declare_step_progress( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -728,6 +775,7 @@ def declare_step_progress( response_types_map=_response_types_map, ).data + @validate_call def declare_step_progress_with_http_info( self, @@ -740,8 +788,9 @@ def declare_step_progress_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -781,7 +830,7 @@ def declare_step_progress_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._declare_step_progress_serialize( deployment_id=deployment_id, @@ -792,21 +841,22 @@ def declare_step_progress_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -814,6 +864,7 @@ def declare_step_progress_with_http_info( response_types_map=_response_types_map, ) + @validate_call def declare_step_progress_without_preload_content( self, @@ -826,8 +877,9 @@ def declare_step_progress_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -867,7 +919,7 @@ def declare_step_progress_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._declare_step_progress_serialize( deployment_id=deployment_id, @@ -878,24 +930,26 @@ def declare_step_progress_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _declare_step_progress_serialize( self, deployment_id, @@ -908,9 +962,11 @@ def _declare_step_progress_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -923,13 +979,13 @@ def _declare_step_progress_serialize( # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id if stage is not None: - _path_params["stage"] = stage + _path_params['stage'] = stage if attempt is not None: - _path_params["attempt"] = attempt + _path_params['attempt'] = attempt if step is not None: - _path_params["step"] = step + _path_params['step'] = step # process the query parameters # process the header parameters # process the form parameters @@ -937,16 +993,24 @@ def _declare_step_progress_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/provisioning/{deployment_id}/status/{stage}/{attempt}/{step}", + method='PATCH', + resource_path='/v1/provisioning/{deployment_id}/status/{stage}/{attempt}/{step}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -956,5 +1020,7 @@ def _declare_step_progress_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/quotas_api.py b/koyeb/api/api/quotas_api.py index 5598d613..0260dae1 100644 --- a/koyeb/api/api/quotas_api.py +++ b/koyeb/api/api/quotas_api.py @@ -16,15 +16,9 @@ from typing_extensions import Annotated from pydantic import StrictStr -from koyeb.api.models.get_organization_quotas_usage_reply import ( - GetOrganizationQuotasUsageReply, -) -from koyeb.api.models.review_organization_capacity_reply import ( - ReviewOrganizationCapacityReply, -) -from koyeb.api.models.review_organization_capacity_request import ( - ReviewOrganizationCapacityRequest, -) +from koyeb.api.models.get_organization_quotas_usage_reply import GetOrganizationQuotasUsageReply +from koyeb.api.models.review_organization_capacity_reply import ReviewOrganizationCapacityReply +from koyeb.api.models.review_organization_capacity_request import ReviewOrganizationCapacityRequest from koyeb.api.api_client import ApiClient, RequestSerialized from koyeb.api.api_response import ApiResponse @@ -43,6 +37,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def get_organization_quotas_usage( self, @@ -51,8 +46,9 @@ def get_organization_quotas_usage( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,28 +80,29 @@ def get_organization_quotas_usage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_quotas_usage_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationQuotasUsageReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationQuotasUsageReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -113,6 +110,7 @@ def get_organization_quotas_usage( response_types_map=_response_types_map, ).data + @validate_call def get_organization_quotas_usage_with_http_info( self, @@ -121,8 +119,9 @@ def get_organization_quotas_usage_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -154,28 +153,29 @@ def get_organization_quotas_usage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_quotas_usage_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationQuotasUsageReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationQuotasUsageReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -183,6 +183,7 @@ def get_organization_quotas_usage_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_organization_quotas_usage_without_preload_content( self, @@ -191,8 +192,9 @@ def get_organization_quotas_usage_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -224,31 +226,33 @@ def get_organization_quotas_usage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_quotas_usage_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationQuotasUsageReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationQuotasUsageReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_organization_quotas_usage_serialize( self, organization_id, @@ -257,9 +261,11 @@ def _get_organization_quotas_usage_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -272,22 +278,30 @@ def _get_organization_quotas_usage_serialize( # process the path parameters if organization_id is not None: - _path_params["organization_id"] = organization_id + _path_params['organization_id'] = organization_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/quotas/organizations/{organization_id}/usage", + method='GET', + resource_path='/v1/quotas/organizations/{organization_id}/usage', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -297,9 +311,12 @@ def _get_organization_quotas_usage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def review_organization_capacity( self, @@ -308,8 +325,9 @@ def review_organization_capacity( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -341,28 +359,29 @@ def review_organization_capacity( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._review_organization_capacity_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ReviewOrganizationCapacityReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ReviewOrganizationCapacityReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -370,6 +389,7 @@ def review_organization_capacity( response_types_map=_response_types_map, ).data + @validate_call def review_organization_capacity_with_http_info( self, @@ -378,8 +398,9 @@ def review_organization_capacity_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -411,28 +432,29 @@ def review_organization_capacity_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._review_organization_capacity_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ReviewOrganizationCapacityReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ReviewOrganizationCapacityReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -440,6 +462,7 @@ def review_organization_capacity_with_http_info( response_types_map=_response_types_map, ) + @validate_call def review_organization_capacity_without_preload_content( self, @@ -448,8 +471,9 @@ def review_organization_capacity_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -481,31 +505,33 @@ def review_organization_capacity_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._review_organization_capacity_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ReviewOrganizationCapacityReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ReviewOrganizationCapacityReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _review_organization_capacity_serialize( self, body, @@ -514,9 +540,11 @@ def _review_organization_capacity_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -535,16 +563,24 @@ def _review_organization_capacity_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/quotas/capacity", + method='POST', + resource_path='/v1/quotas/capacity', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -554,5 +590,7 @@ def _review_organization_capacity_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/regional_deployments_api.py b/koyeb/api/api/regional_deployments_api.py index 8bc2a38b..5dca9db1 100644 --- a/koyeb/api/api/regional_deployments_api.py +++ b/koyeb/api/api/regional_deployments_api.py @@ -19,12 +19,8 @@ from typing import List, Optional from typing_extensions import Annotated from koyeb.api.models.get_regional_deployment_reply import GetRegionalDeploymentReply -from koyeb.api.models.list_regional_deployment_events_reply import ( - ListRegionalDeploymentEventsReply, -) -from koyeb.api.models.list_regional_deployments_reply import ( - ListRegionalDeploymentsReply, -) +from koyeb.api.models.list_regional_deployment_events_reply import ListRegionalDeploymentEventsReply +from koyeb.api.models.list_regional_deployments_reply import ListRegionalDeploymentsReply from koyeb.api.api_client import ApiClient, RequestSerialized from koyeb.api.api_response import ApiResponse @@ -43,18 +39,18 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def get_regional_deployment( self, - id: Annotated[ - StrictStr, Field(description="The id of the regional deployment") - ], + id: Annotated[StrictStr, Field(description="The id of the regional deployment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -87,28 +83,29 @@ def get_regional_deployment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_regional_deployment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetRegionalDeploymentReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetRegionalDeploymentReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -116,18 +113,18 @@ def get_regional_deployment( response_types_map=_response_types_map, ).data + @validate_call def get_regional_deployment_with_http_info( self, - id: Annotated[ - StrictStr, Field(description="The id of the regional deployment") - ], + id: Annotated[StrictStr, Field(description="The id of the regional deployment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -160,28 +157,29 @@ def get_regional_deployment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_regional_deployment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetRegionalDeploymentReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetRegionalDeploymentReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -189,18 +187,18 @@ def get_regional_deployment_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_regional_deployment_without_preload_content( self, - id: Annotated[ - StrictStr, Field(description="The id of the regional deployment") - ], + id: Annotated[StrictStr, Field(description="The id of the regional deployment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -233,31 +231,33 @@ def get_regional_deployment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_regional_deployment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetRegionalDeploymentReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetRegionalDeploymentReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_regional_deployment_serialize( self, id, @@ -266,9 +266,11 @@ def _get_regional_deployment_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -281,22 +283,30 @@ def _get_regional_deployment_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/regional_deployments/{id}", + method='GET', + resource_path='/v1/regional_deployments/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -306,40 +316,27 @@ def _get_regional_deployment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_regional_deployment_events( self, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on regional deployment id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on regional deployment event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on regional deployment id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on regional deployment event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -379,7 +376,7 @@ def list_regional_deployment_events( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_regional_deployment_events_serialize( regional_deployment_id=regional_deployment_id, @@ -390,21 +387,22 @@ def list_regional_deployment_events( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRegionalDeploymentEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListRegionalDeploymentEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -412,37 +410,22 @@ def list_regional_deployment_events( response_types_map=_response_types_map, ).data + @validate_call def list_regional_deployment_events_with_http_info( self, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on regional deployment id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on regional deployment event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on regional deployment id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on regional deployment event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -482,7 +465,7 @@ def list_regional_deployment_events_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_regional_deployment_events_serialize( regional_deployment_id=regional_deployment_id, @@ -493,21 +476,22 @@ def list_regional_deployment_events_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRegionalDeploymentEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListRegionalDeploymentEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -515,37 +499,22 @@ def list_regional_deployment_events_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_regional_deployment_events_without_preload_content( self, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on regional deployment id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on regional deployment event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on regional deployment id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on regional deployment event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -585,7 +554,7 @@ def list_regional_deployment_events_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_regional_deployment_events_serialize( regional_deployment_id=regional_deployment_id, @@ -596,24 +565,26 @@ def list_regional_deployment_events_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRegionalDeploymentEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListRegionalDeploymentEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_regional_deployment_events_serialize( self, regional_deployment_id, @@ -626,10 +597,11 @@ def _list_regional_deployment_events_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "types": "multi", + 'types': 'multi', } _path_params: Dict[str, str] = {} @@ -644,34 +616,47 @@ def _list_regional_deployment_events_serialize( # process the path parameters # process the query parameters if regional_deployment_id is not None: - _query_params.append(("regional_deployment_id", regional_deployment_id)) - + + _query_params.append(('regional_deployment_id', regional_deployment_id)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/regional_deployment_events", + method='GET', + resource_path='/v1/regional_deployment_events', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -681,33 +666,26 @@ def _list_regional_deployment_events_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_regional_deployments( self, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on deployment id") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on regional deployment ids"), - ] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on deployment id")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on regional deployment ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -746,7 +724,7 @@ def list_regional_deployments( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_regional_deployments_serialize( deployment_id=deployment_id, @@ -756,21 +734,22 @@ def list_regional_deployments( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRegionalDeploymentsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListRegionalDeploymentsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -778,30 +757,21 @@ def list_regional_deployments( response_types_map=_response_types_map, ).data + @validate_call def list_regional_deployments_with_http_info( self, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on deployment id") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on regional deployment ids"), - ] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on deployment id")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on regional deployment ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -840,7 +810,7 @@ def list_regional_deployments_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_regional_deployments_serialize( deployment_id=deployment_id, @@ -850,21 +820,22 @@ def list_regional_deployments_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRegionalDeploymentsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListRegionalDeploymentsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -872,30 +843,21 @@ def list_regional_deployments_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_regional_deployments_without_preload_content( self, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on deployment id") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on regional deployment ids"), - ] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on deployment id")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on regional deployment ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -934,7 +896,7 @@ def list_regional_deployments_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_regional_deployments_serialize( deployment_id=deployment_id, @@ -944,24 +906,26 @@ def list_regional_deployments_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRegionalDeploymentsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListRegionalDeploymentsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_regional_deployments_serialize( self, deployment_id, @@ -973,10 +937,11 @@ def _list_regional_deployments_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "ids": "multi", + 'ids': 'multi', } _path_params: Dict[str, str] = {} @@ -991,31 +956,43 @@ def _list_regional_deployments_serialize( # process the path parameters # process the query parameters if deployment_id is not None: - _query_params.append(("deployment_id", deployment_id)) - + + _query_params.append(('deployment_id', deployment_id)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if ids is not None: - _query_params.append(("ids", ids)) - + + _query_params.append(('ids', ids)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/regional_deployments", + method='GET', + resource_path='/v1/regional_deployments', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1025,5 +1002,7 @@ def _list_regional_deployments_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/repositories_api.py b/koyeb/api/api/repositories_api.py index ad025613..1fdaa40f 100644 --- a/koyeb/api/api/repositories_api.py +++ b/koyeb/api/api/repositories_api.py @@ -19,9 +19,7 @@ from typing import Any, Dict, Optional from typing_extensions import Annotated from koyeb.api.models.kgitproxy_list_branches_reply import KgitproxyListBranchesReply -from koyeb.api.models.kgitproxy_list_repositories_reply import ( - KgitproxyListRepositoriesReply, -) +from koyeb.api.models.kgitproxy_list_repositories_reply import KgitproxyListRepositoriesReply from koyeb.api.api_client import ApiClient, RequestSerialized from koyeb.api.api_response import ApiResponse @@ -40,33 +38,21 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def list_branches( self, - repository_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on one repository."), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on branch name using a fuzzy search. Repository filter is required to enable this filter." - ), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return."), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return."), - ] = None, + repository_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on one repository.")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on branch name using a fuzzy search. Repository filter is required to enable this filter.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return.")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -104,7 +90,7 @@ def list_branches( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_branches_serialize( repository_id=repository_id, @@ -114,21 +100,22 @@ def list_branches( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KgitproxyListBranchesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KgitproxyListBranchesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -136,33 +123,21 @@ def list_branches( response_types_map=_response_types_map, ).data + @validate_call def list_branches_with_http_info( self, - repository_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on one repository."), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on branch name using a fuzzy search. Repository filter is required to enable this filter." - ), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return."), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return."), - ] = None, + repository_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on one repository.")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on branch name using a fuzzy search. Repository filter is required to enable this filter.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return.")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -200,7 +175,7 @@ def list_branches_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_branches_serialize( repository_id=repository_id, @@ -210,21 +185,22 @@ def list_branches_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KgitproxyListBranchesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KgitproxyListBranchesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -232,33 +208,21 @@ def list_branches_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_branches_without_preload_content( self, - repository_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on one repository."), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on branch name using a fuzzy search. Repository filter is required to enable this filter." - ), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return."), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return."), - ] = None, + repository_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on one repository.")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on branch name using a fuzzy search. Repository filter is required to enable this filter.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return.")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -296,7 +260,7 @@ def list_branches_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_branches_serialize( repository_id=repository_id, @@ -306,24 +270,26 @@ def list_branches_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KgitproxyListBranchesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KgitproxyListBranchesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_branches_serialize( self, repository_id, @@ -335,9 +301,11 @@ def _list_branches_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -351,31 +319,43 @@ def _list_branches_serialize( # process the path parameters # process the query parameters if repository_id is not None: - _query_params.append(("repository_id", repository_id)) - + + _query_params.append(('repository_id', repository_id)) + if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/git/branches", + method='GET', + resource_path='/v1/git/branches', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -385,38 +365,26 @@ def _list_branches_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_repositories( self, - name: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on repository name using a fuzzy search." - ), - ] = None, - name_search_op: Annotated[ - Optional[StrictStr], - Field( - description='(Optional) Define search operation for repository name. Accept either "fuzzy" or "equality", use "fuzzy" by default.' - ), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return."), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return."), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on repository name using a fuzzy search.")] = None, + name_search_op: Annotated[Optional[StrictStr], Field(description="(Optional) Define search operation for repository name. Accept either \"fuzzy\" or \"equality\", use \"fuzzy\" by default.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return.")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -454,7 +422,7 @@ def list_repositories( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_repositories_serialize( name=name, @@ -464,21 +432,22 @@ def list_repositories( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KgitproxyListRepositoriesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KgitproxyListRepositoriesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -486,35 +455,21 @@ def list_repositories( response_types_map=_response_types_map, ).data + @validate_call def list_repositories_with_http_info( self, - name: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on repository name using a fuzzy search." - ), - ] = None, - name_search_op: Annotated[ - Optional[StrictStr], - Field( - description='(Optional) Define search operation for repository name. Accept either "fuzzy" or "equality", use "fuzzy" by default.' - ), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return."), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return."), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on repository name using a fuzzy search.")] = None, + name_search_op: Annotated[Optional[StrictStr], Field(description="(Optional) Define search operation for repository name. Accept either \"fuzzy\" or \"equality\", use \"fuzzy\" by default.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return.")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -552,7 +507,7 @@ def list_repositories_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_repositories_serialize( name=name, @@ -562,21 +517,22 @@ def list_repositories_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KgitproxyListRepositoriesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KgitproxyListRepositoriesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -584,35 +540,21 @@ def list_repositories_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_repositories_without_preload_content( self, - name: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on repository name using a fuzzy search." - ), - ] = None, - name_search_op: Annotated[ - Optional[StrictStr], - Field( - description='(Optional) Define search operation for repository name. Accept either "fuzzy" or "equality", use "fuzzy" by default.' - ), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return."), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return."), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on repository name using a fuzzy search.")] = None, + name_search_op: Annotated[Optional[StrictStr], Field(description="(Optional) Define search operation for repository name. Accept either \"fuzzy\" or \"equality\", use \"fuzzy\" by default.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return.")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -650,7 +592,7 @@ def list_repositories_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_repositories_serialize( name=name, @@ -660,24 +602,26 @@ def list_repositories_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KgitproxyListRepositoriesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KgitproxyListRepositoriesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_repositories_serialize( self, name, @@ -689,9 +633,11 @@ def _list_repositories_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -705,31 +651,43 @@ def _list_repositories_serialize( # process the path parameters # process the query parameters if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if name_search_op is not None: - _query_params.append(("name_search_op", name_search_op)) - + + _query_params.append(('name_search_op', name_search_op)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/git/repositories", + method='GET', + resource_path='/v1/git/repositories', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -739,9 +697,12 @@ def _list_repositories_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def resync_organization( self, @@ -750,8 +711,9 @@ def resync_organization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -783,28 +745,29 @@ def resync_organization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resync_organization_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -812,6 +775,7 @@ def resync_organization( response_types_map=_response_types_map, ).data + @validate_call def resync_organization_with_http_info( self, @@ -820,8 +784,9 @@ def resync_organization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -853,28 +818,29 @@ def resync_organization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resync_organization_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -882,6 +848,7 @@ def resync_organization_with_http_info( response_types_map=_response_types_map, ) + @validate_call def resync_organization_without_preload_content( self, @@ -890,8 +857,9 @@ def resync_organization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -923,31 +891,33 @@ def resync_organization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resync_organization_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _resync_organization_serialize( self, organization_id, @@ -956,9 +926,11 @@ def _resync_organization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -971,22 +943,30 @@ def _resync_organization_serialize( # process the path parameters if organization_id is not None: - _path_params["organization_id"] = organization_id + _path_params['organization_id'] = organization_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/git/sync/organization/{organization_id}", + method='POST', + resource_path='/v1/git/sync/organization/{organization_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -996,5 +976,7 @@ def _resync_organization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/search_api.py b/koyeb/api/api/search_api.py index a738b92f..9a762429 100644 --- a/koyeb/api/api/search_api.py +++ b/koyeb/api/api/search_api.py @@ -37,18 +37,18 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def search( self, - query: Annotated[ - Optional[StrictStr], Field(description="(Optional) Search query") - ] = None, + query: Annotated[Optional[StrictStr], Field(description="(Optional) Search query")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -80,28 +80,29 @@ def search( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._search_serialize( query=query, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KsearchSearchReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KsearchSearchReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -109,18 +110,18 @@ def search( response_types_map=_response_types_map, ).data + @validate_call def search_with_http_info( self, - query: Annotated[ - Optional[StrictStr], Field(description="(Optional) Search query") - ] = None, + query: Annotated[Optional[StrictStr], Field(description="(Optional) Search query")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -152,28 +153,29 @@ def search_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._search_serialize( query=query, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KsearchSearchReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KsearchSearchReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -181,18 +183,18 @@ def search_with_http_info( response_types_map=_response_types_map, ) + @validate_call def search_without_preload_content( self, - query: Annotated[ - Optional[StrictStr], Field(description="(Optional) Search query") - ] = None, + query: Annotated[Optional[StrictStr], Field(description="(Optional) Search query")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -224,31 +226,33 @@ def search_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._search_serialize( query=query, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KsearchSearchReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KsearchSearchReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _search_serialize( self, query, @@ -257,9 +261,11 @@ def _search_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -273,22 +279,31 @@ def _search_serialize( # process the path parameters # process the query parameters if query is not None: - _query_params.append(("query", query)) - + + _query_params.append(('query', query)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/search", + method='GET', + resource_path='/v1/search', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -298,5 +313,7 @@ def _search_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/secrets_api.py b/koyeb/api/api/secrets_api.py index 1b30797b..c43a520b 100644 --- a/koyeb/api/api/secrets_api.py +++ b/koyeb/api/api/secrets_api.py @@ -43,6 +43,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def create_secret( self, @@ -51,8 +52,9 @@ def create_secret( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,28 +86,29 @@ def create_secret( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_serialize( secret=secret, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -113,6 +116,7 @@ def create_secret( response_types_map=_response_types_map, ).data + @validate_call def create_secret_with_http_info( self, @@ -121,8 +125,9 @@ def create_secret_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -154,28 +159,29 @@ def create_secret_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_serialize( secret=secret, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -183,6 +189,7 @@ def create_secret_with_http_info( response_types_map=_response_types_map, ) + @validate_call def create_secret_without_preload_content( self, @@ -191,8 +198,9 @@ def create_secret_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -224,31 +232,33 @@ def create_secret_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_serialize( secret=secret, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_secret_serialize( self, secret, @@ -257,9 +267,11 @@ def _create_secret_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -278,16 +290,24 @@ def _create_secret_serialize( if secret is not None: _body_params = secret + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/secrets", + method='POST', + resource_path='/v1/secrets', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -297,9 +317,12 @@ def _create_secret_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def delete_secret( self, @@ -308,8 +331,9 @@ def delete_secret( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -341,28 +365,29 @@ def delete_secret( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -370,6 +395,7 @@ def delete_secret( response_types_map=_response_types_map, ).data + @validate_call def delete_secret_with_http_info( self, @@ -378,8 +404,9 @@ def delete_secret_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -411,28 +438,29 @@ def delete_secret_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -440,6 +468,7 @@ def delete_secret_with_http_info( response_types_map=_response_types_map, ) + @validate_call def delete_secret_without_preload_content( self, @@ -448,8 +477,9 @@ def delete_secret_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -481,31 +511,33 @@ def delete_secret_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_secret_serialize( self, id, @@ -514,9 +546,11 @@ def _delete_secret_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -529,22 +563,30 @@ def _delete_secret_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/secrets/{id}", + method='DELETE', + resource_path='/v1/secrets/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -554,9 +596,12 @@ def _delete_secret_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_secret( self, @@ -565,8 +610,9 @@ def get_secret( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -598,28 +644,29 @@ def get_secret( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -627,6 +674,7 @@ def get_secret( response_types_map=_response_types_map, ).data + @validate_call def get_secret_with_http_info( self, @@ -635,8 +683,9 @@ def get_secret_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -668,28 +717,29 @@ def get_secret_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -697,6 +747,7 @@ def get_secret_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_secret_without_preload_content( self, @@ -705,8 +756,9 @@ def get_secret_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -738,31 +790,33 @@ def get_secret_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_secret_serialize( self, id, @@ -771,9 +825,11 @@ def _get_secret_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -786,22 +842,30 @@ def _get_secret_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/secrets/{id}", + method='GET', + resource_path='/v1/secrets/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -811,28 +875,27 @@ def _get_secret_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_secrets( self, name: Optional[StrictStr] = None, limit: Optional[StrictStr] = None, offset: Optional[StrictStr] = None, - types: Annotated[ - Optional[List[StrictStr]], Field(description="Filter by secret types") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on secret ids"), - ] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="Filter by secret types")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on secret ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -872,7 +935,7 @@ def list_secrets( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secrets_serialize( name=name, @@ -883,21 +946,22 @@ def list_secrets( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListSecretsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListSecretsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -905,25 +969,22 @@ def list_secrets( response_types_map=_response_types_map, ).data + @validate_call def list_secrets_with_http_info( self, name: Optional[StrictStr] = None, limit: Optional[StrictStr] = None, offset: Optional[StrictStr] = None, - types: Annotated[ - Optional[List[StrictStr]], Field(description="Filter by secret types") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on secret ids"), - ] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="Filter by secret types")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on secret ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -963,7 +1024,7 @@ def list_secrets_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secrets_serialize( name=name, @@ -974,21 +1035,22 @@ def list_secrets_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListSecretsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListSecretsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -996,25 +1058,22 @@ def list_secrets_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_secrets_without_preload_content( self, name: Optional[StrictStr] = None, limit: Optional[StrictStr] = None, offset: Optional[StrictStr] = None, - types: Annotated[ - Optional[List[StrictStr]], Field(description="Filter by secret types") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on secret ids"), - ] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="Filter by secret types")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on secret ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1054,7 +1113,7 @@ def list_secrets_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secrets_serialize( name=name, @@ -1065,24 +1124,26 @@ def list_secrets_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListSecretsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListSecretsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_secrets_serialize( self, name, @@ -1095,11 +1156,12 @@ def _list_secrets_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "types": "multi", - "ids": "multi", + 'types': 'multi', + 'ids': 'multi', } _path_params: Dict[str, str] = {} @@ -1114,34 +1176,47 @@ def _list_secrets_serialize( # process the path parameters # process the query parameters if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + if ids is not None: - _query_params.append(("ids", ids)) - + + _query_params.append(('ids', ids)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/secrets", + method='GET', + resource_path='/v1/secrets', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1151,9 +1226,12 @@ def _list_secrets_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def reveal_secret( self, @@ -1163,8 +1241,9 @@ def reveal_secret( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1198,7 +1277,7 @@ def reveal_secret( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._reveal_secret_serialize( id=id, @@ -1206,21 +1285,22 @@ def reveal_secret( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RevealSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "RevealSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1228,6 +1308,7 @@ def reveal_secret( response_types_map=_response_types_map, ).data + @validate_call def reveal_secret_with_http_info( self, @@ -1237,8 +1318,9 @@ def reveal_secret_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1272,7 +1354,7 @@ def reveal_secret_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._reveal_secret_serialize( id=id, @@ -1280,21 +1362,22 @@ def reveal_secret_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RevealSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "RevealSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1302,6 +1385,7 @@ def reveal_secret_with_http_info( response_types_map=_response_types_map, ) + @validate_call def reveal_secret_without_preload_content( self, @@ -1311,8 +1395,9 @@ def reveal_secret_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1346,7 +1431,7 @@ def reveal_secret_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._reveal_secret_serialize( id=id, @@ -1354,24 +1439,26 @@ def reveal_secret_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RevealSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "RevealSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _reveal_secret_serialize( self, id, @@ -1381,9 +1468,11 @@ def _reveal_secret_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1396,7 +1485,7 @@ def _reveal_secret_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -1404,16 +1493,24 @@ def _reveal_secret_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/secrets/{id}/reveal", + method='POST', + resource_path='/v1/secrets/{id}/reveal', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1423,9 +1520,12 @@ def _reveal_secret_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_secret( self, @@ -1436,8 +1536,9 @@ def update_secret( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1473,7 +1574,7 @@ def update_secret( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_serialize( id=id, @@ -1482,21 +1583,22 @@ def update_secret( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1504,6 +1606,7 @@ def update_secret( response_types_map=_response_types_map, ).data + @validate_call def update_secret_with_http_info( self, @@ -1514,8 +1617,9 @@ def update_secret_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1551,7 +1655,7 @@ def update_secret_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_serialize( id=id, @@ -1560,21 +1664,22 @@ def update_secret_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1582,6 +1687,7 @@ def update_secret_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_secret_without_preload_content( self, @@ -1592,8 +1698,9 @@ def update_secret_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1629,7 +1736,7 @@ def update_secret_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_serialize( id=id, @@ -1638,24 +1745,26 @@ def update_secret_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_secret_serialize( self, id, @@ -1666,9 +1775,11 @@ def _update_secret_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1681,27 +1792,36 @@ def _update_secret_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if secret is not None: _body_params = secret + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/secrets/{id}", + method='PUT', + resource_path='/v1/secrets/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1711,9 +1831,12 @@ def _update_secret_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_secret2( self, @@ -1724,8 +1847,9 @@ def update_secret2( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1761,7 +1885,7 @@ def update_secret2( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret2_serialize( id=id, @@ -1770,21 +1894,22 @@ def update_secret2( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1792,6 +1917,7 @@ def update_secret2( response_types_map=_response_types_map, ).data + @validate_call def update_secret2_with_http_info( self, @@ -1802,8 +1928,9 @@ def update_secret2_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1839,7 +1966,7 @@ def update_secret2_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret2_serialize( id=id, @@ -1848,21 +1975,22 @@ def update_secret2_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1870,6 +1998,7 @@ def update_secret2_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_secret2_without_preload_content( self, @@ -1880,8 +2009,9 @@ def update_secret2_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1917,7 +2047,7 @@ def update_secret2_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret2_serialize( id=id, @@ -1926,24 +2056,26 @@ def update_secret2_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_secret2_serialize( self, id, @@ -1954,9 +2086,11 @@ def _update_secret2_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1969,27 +2103,36 @@ def _update_secret2_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if secret is not None: _body_params = secret + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/secrets/{id}", + method='PATCH', + resource_path='/v1/secrets/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1999,5 +2142,7 @@ def _update_secret2_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/service_pools_api.py b/koyeb/api/api/service_pools_api.py index 2fc093ee..600bbcd1 100644 --- a/koyeb/api/api/service_pools_api.py +++ b/koyeb/api/api/service_pools_api.py @@ -16,7 +16,7 @@ from typing_extensions import Annotated from pydantic import StrictStr -from typing import Optional +from typing import Any, Dict, Optional from koyeb.api.models.create_service_pool import CreateServicePool from koyeb.api.models.create_service_pool_reply import CreateServicePoolReply from koyeb.api.models.get_service_pool_reply import GetServicePoolReply @@ -41,6 +41,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def create_service_pool( self, @@ -49,8 +50,9 @@ def create_service_pool( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -82,28 +84,29 @@ def create_service_pool( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_pool_serialize( service_pool=service_pool, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateServicePoolReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateServicePoolReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -111,6 +114,7 @@ def create_service_pool( response_types_map=_response_types_map, ).data + @validate_call def create_service_pool_with_http_info( self, @@ -119,8 +123,9 @@ def create_service_pool_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -152,28 +157,29 @@ def create_service_pool_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_pool_serialize( service_pool=service_pool, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateServicePoolReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateServicePoolReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -181,6 +187,7 @@ def create_service_pool_with_http_info( response_types_map=_response_types_map, ) + @validate_call def create_service_pool_without_preload_content( self, @@ -189,8 +196,9 @@ def create_service_pool_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -222,31 +230,33 @@ def create_service_pool_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_pool_serialize( service_pool=service_pool, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateServicePoolReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateServicePoolReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_service_pool_serialize( self, service_pool, @@ -255,9 +265,11 @@ def _create_service_pool_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -276,16 +288,24 @@ def _create_service_pool_serialize( if service_pool is not None: _body_params = service_pool + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/service_pools", + method='POST', + resource_path='/v1/service_pools', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -295,8 +315,290 @@ def _create_service_pool_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def delete_service_pool( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Delete a ServicePool + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_service_pool_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def delete_service_pool_with_http_info( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Delete a ServicePool + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_service_pool_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def delete_service_pool_without_preload_content( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a ServicePool + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_service_pool_serialize( + id=id, _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) + return response_data.response + + + def _delete_service_pool_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _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, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'Bearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/service_pools/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + @validate_call def get_service_pool( @@ -306,8 +608,9 @@ def get_service_pool( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -339,28 +642,29 @@ def get_service_pool( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_pool_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServicePoolReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetServicePoolReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -368,6 +672,7 @@ def get_service_pool( response_types_map=_response_types_map, ).data + @validate_call def get_service_pool_with_http_info( self, @@ -376,8 +681,9 @@ def get_service_pool_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -409,28 +715,29 @@ def get_service_pool_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_pool_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServicePoolReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetServicePoolReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -438,6 +745,7 @@ def get_service_pool_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_service_pool_without_preload_content( self, @@ -446,8 +754,9 @@ def get_service_pool_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -479,31 +788,33 @@ def get_service_pool_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_pool_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServicePoolReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetServicePoolReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_service_pool_serialize( self, id, @@ -512,9 +823,11 @@ def _get_service_pool_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -527,22 +840,30 @@ def _get_service_pool_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/service_pools/{id}", + method='GET', + resource_path='/v1/service_pools/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -552,9 +873,12 @@ def _get_service_pool_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_service_pools( self, @@ -565,8 +889,9 @@ def list_service_pools( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -602,7 +927,7 @@ def list_service_pools( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_service_pools_serialize( name=name, @@ -611,21 +936,22 @@ def list_service_pools( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListServicePoolsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListServicePoolsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -633,6 +959,7 @@ def list_service_pools( response_types_map=_response_types_map, ).data + @validate_call def list_service_pools_with_http_info( self, @@ -643,8 +970,9 @@ def list_service_pools_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -680,7 +1008,7 @@ def list_service_pools_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_service_pools_serialize( name=name, @@ -689,21 +1017,22 @@ def list_service_pools_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListServicePoolsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListServicePoolsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -711,6 +1040,7 @@ def list_service_pools_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_service_pools_without_preload_content( self, @@ -721,8 +1051,9 @@ def list_service_pools_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -758,7 +1089,7 @@ def list_service_pools_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_service_pools_serialize( name=name, @@ -767,24 +1098,26 @@ def list_service_pools_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListServicePoolsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListServicePoolsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_service_pools_serialize( self, name, @@ -795,9 +1128,11 @@ def _list_service_pools_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -811,28 +1146,39 @@ def _list_service_pools_serialize( # process the path parameters # process the query parameters if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/service_pools", + method='GET', + resource_path='/v1/service_pools', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -842,9 +1188,12 @@ def _list_service_pools_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_service_pool( self, @@ -855,8 +1204,9 @@ def update_service_pool( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -892,7 +1242,7 @@ def update_service_pool( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service_pool_serialize( id=id, @@ -901,21 +1251,22 @@ def update_service_pool( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateServicePoolReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateServicePoolReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -923,6 +1274,7 @@ def update_service_pool( response_types_map=_response_types_map, ).data + @validate_call def update_service_pool_with_http_info( self, @@ -933,8 +1285,9 @@ def update_service_pool_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -970,7 +1323,7 @@ def update_service_pool_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service_pool_serialize( id=id, @@ -979,21 +1332,22 @@ def update_service_pool_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateServicePoolReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateServicePoolReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1001,6 +1355,7 @@ def update_service_pool_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_service_pool_without_preload_content( self, @@ -1011,8 +1366,9 @@ def update_service_pool_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1048,7 +1404,7 @@ def update_service_pool_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service_pool_serialize( id=id, @@ -1057,24 +1413,26 @@ def update_service_pool_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateServicePoolReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateServicePoolReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_service_pool_serialize( self, id, @@ -1085,9 +1443,11 @@ def _update_service_pool_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1100,27 +1460,36 @@ def _update_service_pool_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if service_pool is not None: _body_params = service_pool + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/service_pools/{id}", + method='PUT', + resource_path='/v1/service_pools/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1130,5 +1499,7 @@ def _update_service_pool_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/services_api.py b/koyeb/api/api/services_api.py index fc2671fb..a1ff1cd9 100644 --- a/koyeb/api/api/services_api.py +++ b/koyeb/api/api/services_api.py @@ -49,6 +49,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def autocomplete( self, @@ -57,8 +58,9 @@ def autocomplete( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -91,28 +93,29 @@ def autocomplete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._autocomplete_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AutocompleteReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "AutocompleteReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -120,6 +123,7 @@ def autocomplete( response_types_map=_response_types_map, ).data + @validate_call def autocomplete_with_http_info( self, @@ -128,8 +132,9 @@ def autocomplete_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -162,28 +167,29 @@ def autocomplete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._autocomplete_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AutocompleteReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "AutocompleteReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -191,6 +197,7 @@ def autocomplete_with_http_info( response_types_map=_response_types_map, ) + @validate_call def autocomplete_without_preload_content( self, @@ -199,8 +206,9 @@ def autocomplete_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -233,31 +241,33 @@ def autocomplete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._autocomplete_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AutocompleteReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "AutocompleteReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _autocomplete_serialize( self, body, @@ -266,9 +276,11 @@ def _autocomplete_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -287,16 +299,24 @@ def _autocomplete_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/services-autocomplete", + method='POST', + resource_path='/v1/services-autocomplete', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -306,22 +326,24 @@ def _autocomplete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def create_service( self, service: CreateService, - dry_run: Annotated[ - Optional[StrictBool], Field(description="If set only run validation") - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set only run validation")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -355,7 +377,7 @@ def create_service( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_serialize( service=service, @@ -363,21 +385,22 @@ def create_service( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -385,19 +408,19 @@ def create_service( response_types_map=_response_types_map, ).data + @validate_call def create_service_with_http_info( self, service: CreateService, - dry_run: Annotated[ - Optional[StrictBool], Field(description="If set only run validation") - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set only run validation")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -431,7 +454,7 @@ def create_service_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_serialize( service=service, @@ -439,21 +462,22 @@ def create_service_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -461,19 +485,19 @@ def create_service_with_http_info( response_types_map=_response_types_map, ) + @validate_call def create_service_without_preload_content( self, service: CreateService, - dry_run: Annotated[ - Optional[StrictBool], Field(description="If set only run validation") - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set only run validation")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -507,7 +531,7 @@ def create_service_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_serialize( service=service, @@ -515,24 +539,26 @@ def create_service_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_service_serialize( self, service, @@ -542,9 +568,11 @@ def _create_service_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -558,24 +586,33 @@ def _create_service_serialize( # process the path parameters # process the query parameters if dry_run is not None: - _query_params.append(("dry_run", dry_run)) - + + _query_params.append(('dry_run', dry_run)) + # process the header parameters # process the form parameters # process the body parameter if service is not None: _body_params = service + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/services", + method='POST', + resource_path='/v1/services', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -585,9 +622,12 @@ def _create_service_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def delete_service( self, @@ -596,8 +636,9 @@ def delete_service( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -630,28 +671,29 @@ def delete_service( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -659,6 +701,7 @@ def delete_service( response_types_map=_response_types_map, ).data + @validate_call def delete_service_with_http_info( self, @@ -667,8 +710,9 @@ def delete_service_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -701,28 +745,29 @@ def delete_service_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -730,6 +775,7 @@ def delete_service_with_http_info( response_types_map=_response_types_map, ) + @validate_call def delete_service_without_preload_content( self, @@ -738,8 +784,9 @@ def delete_service_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -772,31 +819,33 @@ def delete_service_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_service_serialize( self, id, @@ -805,9 +854,11 @@ def _delete_service_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -820,22 +871,30 @@ def _delete_service_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/services/{id}", + method='DELETE', + resource_path='/v1/services/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -845,9 +904,12 @@ def _delete_service_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def delete_service_scaling( self, @@ -856,8 +918,9 @@ def delete_service_scaling( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -890,28 +953,29 @@ def delete_service_scaling( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_scaling_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -919,6 +983,7 @@ def delete_service_scaling( response_types_map=_response_types_map, ).data + @validate_call def delete_service_scaling_with_http_info( self, @@ -927,8 +992,9 @@ def delete_service_scaling_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -961,28 +1027,29 @@ def delete_service_scaling_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_scaling_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -990,6 +1057,7 @@ def delete_service_scaling_with_http_info( response_types_map=_response_types_map, ) + @validate_call def delete_service_scaling_without_preload_content( self, @@ -998,8 +1066,9 @@ def delete_service_scaling_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1032,31 +1101,33 @@ def delete_service_scaling_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_scaling_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_service_scaling_serialize( self, id, @@ -1065,9 +1136,11 @@ def _delete_service_scaling_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1080,22 +1153,30 @@ def _delete_service_scaling_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/services/{id}/scale", + method='DELETE', + resource_path='/v1/services/{id}/scale', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1105,9 +1186,12 @@ def _delete_service_scaling_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_service( self, @@ -1116,8 +1200,9 @@ def get_service( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1149,28 +1234,29 @@ def get_service( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1178,6 +1264,7 @@ def get_service( response_types_map=_response_types_map, ).data + @validate_call def get_service_with_http_info( self, @@ -1186,8 +1273,9 @@ def get_service_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1219,28 +1307,29 @@ def get_service_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1248,6 +1337,7 @@ def get_service_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_service_without_preload_content( self, @@ -1256,8 +1346,9 @@ def get_service_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1289,31 +1380,33 @@ def get_service_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_service_serialize( self, id, @@ -1322,9 +1415,11 @@ def _get_service_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1337,22 +1432,30 @@ def _get_service_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/services/{id}", + method='GET', + resource_path='/v1/services/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1362,9 +1465,12 @@ def _get_service_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_service_scaling( self, @@ -1373,8 +1479,9 @@ def get_service_scaling( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1407,28 +1514,29 @@ def get_service_scaling( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_scaling_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServiceScalingReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetServiceScalingReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1436,6 +1544,7 @@ def get_service_scaling( response_types_map=_response_types_map, ).data + @validate_call def get_service_scaling_with_http_info( self, @@ -1444,8 +1553,9 @@ def get_service_scaling_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1478,28 +1588,29 @@ def get_service_scaling_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_scaling_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServiceScalingReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetServiceScalingReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1507,6 +1618,7 @@ def get_service_scaling_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_service_scaling_without_preload_content( self, @@ -1515,8 +1627,9 @@ def get_service_scaling_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1549,31 +1662,33 @@ def get_service_scaling_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_scaling_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServiceScalingReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetServiceScalingReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_service_scaling_serialize( self, id, @@ -1582,9 +1697,11 @@ def _get_service_scaling_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1597,22 +1714,30 @@ def _get_service_scaling_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/services/{id}/scale", + method='GET', + resource_path='/v1/services/{id}/scale', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1622,39 +1747,27 @@ def _get_service_scaling_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_service_events( self, - service_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on service id") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on service id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1694,7 +1807,7 @@ def list_service_events( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_service_events_serialize( service_id=service_id, @@ -1705,21 +1818,22 @@ def list_service_events( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListServiceEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListServiceEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1727,36 +1841,22 @@ def list_service_events( response_types_map=_response_types_map, ).data + @validate_call def list_service_events_with_http_info( self, - service_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on service id") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on service id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1796,7 +1896,7 @@ def list_service_events_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_service_events_serialize( service_id=service_id, @@ -1807,21 +1907,22 @@ def list_service_events_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListServiceEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListServiceEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1829,36 +1930,22 @@ def list_service_events_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_service_events_without_preload_content( self, - service_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on service id") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on service id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1898,7 +1985,7 @@ def list_service_events_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_service_events_serialize( service_id=service_id, @@ -1909,24 +1996,26 @@ def list_service_events_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListServiceEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListServiceEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_service_events_serialize( self, service_id, @@ -1939,10 +2028,11 @@ def _list_service_events_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "types": "multi", + 'types': 'multi', } _path_params: Dict[str, str] = {} @@ -1957,34 +2047,47 @@ def _list_service_events_serialize( # process the path parameters # process the query parameters if service_id is not None: - _query_params.append(("service_id", service_id)) - + + _query_params.append(('service_id', service_id)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/service_events", + method='GET', + resource_path='/v1/service_events', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1994,47 +2097,30 @@ def _list_service_events_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_services( self, - app_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) The id of the app") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service types"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service statuses"), - ] = None, - regions: Annotated[ - Optional[List[StrictStr]], Field(description="(Optional) Filter on regions") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service ids"), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) The id of the app")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service types")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service statuses")] = None, + regions: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on regions")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2080,7 +2166,7 @@ def list_services( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_services_serialize( app_id=app_id, @@ -2094,21 +2180,22 @@ def list_services( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListServicesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListServicesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2116,44 +2203,25 @@ def list_services( response_types_map=_response_types_map, ).data + @validate_call def list_services_with_http_info( self, - app_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) The id of the app") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service types"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service statuses"), - ] = None, - regions: Annotated[ - Optional[List[StrictStr]], Field(description="(Optional) Filter on regions") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service ids"), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) The id of the app")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service types")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service statuses")] = None, + regions: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on regions")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2199,7 +2267,7 @@ def list_services_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_services_serialize( app_id=app_id, @@ -2213,21 +2281,22 @@ def list_services_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListServicesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListServicesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2235,44 +2304,25 @@ def list_services_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_services_without_preload_content( self, - app_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) The id of the app") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service types"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service statuses"), - ] = None, - regions: Annotated[ - Optional[List[StrictStr]], Field(description="(Optional) Filter on regions") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service ids"), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) The id of the app")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service types")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service statuses")] = None, + regions: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on regions")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2318,7 +2368,7 @@ def list_services_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_services_serialize( app_id=app_id, @@ -2332,24 +2382,26 @@ def list_services_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListServicesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListServicesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_services_serialize( self, app_id, @@ -2365,13 +2417,14 @@ def _list_services_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "types": "multi", - "statuses": "multi", - "regions": "multi", - "ids": "multi", + 'types': 'multi', + 'statuses': 'multi', + 'regions': 'multi', + 'ids': 'multi', } _path_params: Dict[str, str] = {} @@ -2386,43 +2439,59 @@ def _list_services_serialize( # process the path parameters # process the query parameters if app_id is not None: - _query_params.append(("app_id", app_id)) - + + _query_params.append(('app_id', app_id)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + if statuses is not None: - _query_params.append(("statuses", statuses)) - + + _query_params.append(('statuses', statuses)) + if regions is not None: - _query_params.append(("regions", regions)) - + + _query_params.append(('regions', regions)) + if ids is not None: - _query_params.append(("ids", ids)) - + + _query_params.append(('ids', ids)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/services", + method='GET', + resource_path='/v1/services', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2432,9 +2501,12 @@ def _list_services_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def pause_service( self, @@ -2443,8 +2515,9 @@ def pause_service( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2477,28 +2550,29 @@ def pause_service( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._pause_service_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2506,6 +2580,7 @@ def pause_service( response_types_map=_response_types_map, ).data + @validate_call def pause_service_with_http_info( self, @@ -2514,8 +2589,9 @@ def pause_service_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2548,28 +2624,29 @@ def pause_service_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._pause_service_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2577,6 +2654,7 @@ def pause_service_with_http_info( response_types_map=_response_types_map, ) + @validate_call def pause_service_without_preload_content( self, @@ -2585,8 +2663,9 @@ def pause_service_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2619,31 +2698,33 @@ def pause_service_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._pause_service_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _pause_service_serialize( self, id, @@ -2652,9 +2733,11 @@ def _pause_service_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2667,22 +2750,30 @@ def _pause_service_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/services/{id}/pause", + method='POST', + resource_path='/v1/services/{id}/pause', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2692,9 +2783,12 @@ def _pause_service_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def re_deploy( self, @@ -2704,8 +2798,9 @@ def re_deploy( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2739,7 +2834,7 @@ def re_deploy( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._re_deploy_serialize( id=id, @@ -2747,21 +2842,22 @@ def re_deploy( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RedeployReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "RedeployReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2769,6 +2865,7 @@ def re_deploy( response_types_map=_response_types_map, ).data + @validate_call def re_deploy_with_http_info( self, @@ -2778,8 +2875,9 @@ def re_deploy_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2813,7 +2911,7 @@ def re_deploy_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._re_deploy_serialize( id=id, @@ -2821,21 +2919,22 @@ def re_deploy_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RedeployReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "RedeployReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -2843,6 +2942,7 @@ def re_deploy_with_http_info( response_types_map=_response_types_map, ) + @validate_call def re_deploy_without_preload_content( self, @@ -2852,8 +2952,9 @@ def re_deploy_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2887,7 +2988,7 @@ def re_deploy_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._re_deploy_serialize( id=id, @@ -2895,24 +2996,26 @@ def re_deploy_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RedeployReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "RedeployReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _re_deploy_serialize( self, id, @@ -2922,9 +3025,11 @@ def _re_deploy_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2937,7 +3042,7 @@ def _re_deploy_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -2945,16 +3050,24 @@ def _re_deploy_serialize( if info is not None: _body_params = info + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/services/{id}/redeploy", + method='POST', + resource_path='/v1/services/{id}/redeploy', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2964,26 +3077,25 @@ def _re_deploy_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def resume_service( self, id: Annotated[StrictStr, Field(description="The id of the service to pause.")], - skip_build: Annotated[ - Optional[StrictBool], - Field( - description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened." - ), - ] = None, + skip_build: Annotated[Optional[StrictBool], Field(description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened.")] = None, use_cache: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3020,7 +3132,7 @@ def resume_service( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resume_service_serialize( id=id, @@ -3029,21 +3141,22 @@ def resume_service( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3051,23 +3164,20 @@ def resume_service( response_types_map=_response_types_map, ).data + @validate_call def resume_service_with_http_info( self, id: Annotated[StrictStr, Field(description="The id of the service to pause.")], - skip_build: Annotated[ - Optional[StrictBool], - Field( - description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened." - ), - ] = None, + skip_build: Annotated[Optional[StrictBool], Field(description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened.")] = None, use_cache: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3104,7 +3214,7 @@ def resume_service_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resume_service_serialize( id=id, @@ -3113,21 +3223,22 @@ def resume_service_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3135,23 +3246,20 @@ def resume_service_with_http_info( response_types_map=_response_types_map, ) + @validate_call def resume_service_without_preload_content( self, id: Annotated[StrictStr, Field(description="The id of the service to pause.")], - skip_build: Annotated[ - Optional[StrictBool], - Field( - description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened." - ), - ] = None, + skip_build: Annotated[Optional[StrictBool], Field(description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened.")] = None, use_cache: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3188,7 +3296,7 @@ def resume_service_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resume_service_serialize( id=id, @@ -3197,24 +3305,26 @@ def resume_service_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _resume_service_serialize( self, id, @@ -3225,9 +3335,11 @@ def _resume_service_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3240,28 +3352,38 @@ def _resume_service_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if skip_build is not None: - _query_params.append(("skip_build", skip_build)) - + + _query_params.append(('skip_build', skip_build)) + if use_cache is not None: - _query_params.append(("use_cache", use_cache)) - + + _query_params.append(('use_cache', use_cache)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/services/{id}/resume", + method='POST', + resource_path='/v1/services/{id}/resume', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3271,27 +3393,26 @@ def _resume_service_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_service( self, id: Annotated[StrictStr, Field(description="The id of the entity to update")], service: UpdateService, update_mask: Optional[StrictStr] = None, - dry_run: Annotated[ - Optional[StrictBool], - Field( - description="If set, run validation and check that the service exists" - ), - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set, run validation and check that the service exists")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3329,7 +3450,7 @@ def update_service( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service_serialize( id=id, @@ -3339,21 +3460,22 @@ def update_service( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3361,24 +3483,21 @@ def update_service( response_types_map=_response_types_map, ).data + @validate_call def update_service_with_http_info( self, id: Annotated[StrictStr, Field(description="The id of the entity to update")], service: UpdateService, update_mask: Optional[StrictStr] = None, - dry_run: Annotated[ - Optional[StrictBool], - Field( - description="If set, run validation and check that the service exists" - ), - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set, run validation and check that the service exists")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3416,7 +3535,7 @@ def update_service_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service_serialize( id=id, @@ -3426,21 +3545,22 @@ def update_service_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3448,24 +3568,21 @@ def update_service_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_service_without_preload_content( self, id: Annotated[StrictStr, Field(description="The id of the entity to update")], service: UpdateService, update_mask: Optional[StrictStr] = None, - dry_run: Annotated[ - Optional[StrictBool], - Field( - description="If set, run validation and check that the service exists" - ), - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set, run validation and check that the service exists")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3503,7 +3620,7 @@ def update_service_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service_serialize( id=id, @@ -3513,24 +3630,26 @@ def update_service_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_service_serialize( self, id, @@ -3542,9 +3661,11 @@ def _update_service_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3557,30 +3678,40 @@ def _update_service_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + if dry_run is not None: - _query_params.append(("dry_run", dry_run)) - + + _query_params.append(('dry_run', dry_run)) + # process the header parameters # process the form parameters # process the body parameter if service is not None: _body_params = service + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/services/{id}", + method='PUT', + resource_path='/v1/services/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3590,27 +3721,26 @@ def _update_service_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_service2( self, id: Annotated[StrictStr, Field(description="The id of the entity to update")], service: UpdateService, update_mask: Optional[StrictStr] = None, - dry_run: Annotated[ - Optional[StrictBool], - Field( - description="If set, run validation and check that the service exists" - ), - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set, run validation and check that the service exists")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3648,7 +3778,7 @@ def update_service2( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service2_serialize( id=id, @@ -3658,21 +3788,22 @@ def update_service2( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3680,24 +3811,21 @@ def update_service2( response_types_map=_response_types_map, ).data + @validate_call def update_service2_with_http_info( self, id: Annotated[StrictStr, Field(description="The id of the entity to update")], service: UpdateService, update_mask: Optional[StrictStr] = None, - dry_run: Annotated[ - Optional[StrictBool], - Field( - description="If set, run validation and check that the service exists" - ), - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set, run validation and check that the service exists")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3735,7 +3863,7 @@ def update_service2_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service2_serialize( id=id, @@ -3745,21 +3873,22 @@ def update_service2_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3767,24 +3896,21 @@ def update_service2_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_service2_without_preload_content( self, id: Annotated[StrictStr, Field(description="The id of the entity to update")], service: UpdateService, update_mask: Optional[StrictStr] = None, - dry_run: Annotated[ - Optional[StrictBool], - Field( - description="If set, run validation and check that the service exists" - ), - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set, run validation and check that the service exists")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3822,7 +3948,7 @@ def update_service2_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service2_serialize( id=id, @@ -3832,24 +3958,26 @@ def update_service2_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_service2_serialize( self, id, @@ -3861,9 +3989,11 @@ def _update_service2_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3876,30 +4006,40 @@ def _update_service2_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + if dry_run is not None: - _query_params.append(("dry_run", dry_run)) - + + _query_params.append(('dry_run', dry_run)) + # process the header parameters # process the form parameters # process the body parameter if service is not None: _body_params = service + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/services/{id}", + method='PATCH', + resource_path='/v1/services/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3909,9 +4049,12 @@ def _update_service2_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_service_scaling( self, @@ -3921,8 +4064,9 @@ def update_service_scaling( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3957,7 +4101,7 @@ def update_service_scaling( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service_scaling_serialize( id=id, @@ -3965,21 +4109,22 @@ def update_service_scaling( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -3987,6 +4132,7 @@ def update_service_scaling( response_types_map=_response_types_map, ).data + @validate_call def update_service_scaling_with_http_info( self, @@ -3996,8 +4142,9 @@ def update_service_scaling_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4032,7 +4179,7 @@ def update_service_scaling_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service_scaling_serialize( id=id, @@ -4040,21 +4187,22 @@ def update_service_scaling_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -4062,6 +4210,7 @@ def update_service_scaling_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_service_scaling_without_preload_content( self, @@ -4071,8 +4220,9 @@ def update_service_scaling_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4107,7 +4257,7 @@ def update_service_scaling_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service_scaling_serialize( id=id, @@ -4115,24 +4265,26 @@ def update_service_scaling_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_service_scaling_serialize( self, id, @@ -4142,9 +4294,11 @@ def _update_service_scaling_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4157,7 +4311,7 @@ def _update_service_scaling_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -4165,16 +4319,24 @@ def _update_service_scaling_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/services/{id}/scale", + method='PUT', + resource_path='/v1/services/{id}/scale', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4184,5 +4346,7 @@ def _update_service_scaling_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/sessions_api.py b/koyeb/api/api/sessions_api.py index f4b1ad24..6fd763b3 100644 --- a/koyeb/api/api/sessions_api.py +++ b/koyeb/api/api/sessions_api.py @@ -38,19 +38,19 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def login( self, body: LoginRequest, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,7 +84,7 @@ def login( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._login_serialize( body=body, @@ -92,21 +92,22 @@ def login( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -114,19 +115,19 @@ def login( response_types_map=_response_types_map, ).data + @validate_call def login_with_http_info( self, body: LoginRequest, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -160,7 +161,7 @@ def login_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._login_serialize( body=body, @@ -168,21 +169,22 @@ def login_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -190,19 +192,19 @@ def login_with_http_info( response_types_map=_response_types_map, ) + @validate_call def login_without_preload_content( self, body: LoginRequest, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -236,7 +238,7 @@ def login_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._login_serialize( body=body, @@ -244,24 +246,26 @@ def login_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _login_serialize( self, body, @@ -271,9 +275,11 @@ def _login_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -288,22 +294,30 @@ def _login_serialize( # process the query parameters # process the header parameters if seon_fp is not None: - _header_params["seon-fp"] = seon_fp + _header_params['seon-fp'] = seon_fp # process the form parameters # process the body parameter if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/login", + method='POST', + resource_path='/v1/account/login', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -313,9 +327,12 @@ def _login_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def logout( self, @@ -323,8 +340,9 @@ def logout( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -354,27 +372,28 @@ def logout( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._logout_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -382,6 +401,7 @@ def logout( response_types_map=_response_types_map, ).data + @validate_call def logout_with_http_info( self, @@ -389,8 +409,9 @@ def logout_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -420,27 +441,28 @@ def logout_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._logout_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -448,6 +470,7 @@ def logout_with_http_info( response_types_map=_response_types_map, ) + @validate_call def logout_without_preload_content( self, @@ -455,8 +478,9 @@ def logout_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -486,30 +510,32 @@ def logout_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._logout_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _logout_serialize( self, _request_auth, @@ -517,9 +543,11 @@ def _logout_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -536,16 +564,24 @@ def _logout_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/account/logout", + method='DELETE', + resource_path='/v1/account/logout', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -555,9 +591,12 @@ def _logout_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def new_session( self, @@ -565,8 +604,9 @@ def new_session( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -597,27 +637,28 @@ def new_session( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._new_session_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -625,6 +666,7 @@ def new_session( response_types_map=_response_types_map, ).data + @validate_call def new_session_with_http_info( self, @@ -632,8 +674,9 @@ def new_session_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -664,27 +707,28 @@ def new_session_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._new_session_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -692,6 +736,7 @@ def new_session_with_http_info( response_types_map=_response_types_map, ) + @validate_call def new_session_without_preload_content( self, @@ -699,8 +744,9 @@ def new_session_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -731,30 +777,32 @@ def new_session_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._new_session_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _new_session_serialize( self, _request_auth, @@ -762,9 +810,11 @@ def _new_session_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -781,16 +831,24 @@ def _new_session_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/session", + method='POST', + resource_path='/v1/account/session', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -800,9 +858,12 @@ def _new_session_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def refresh_token( self, @@ -810,8 +871,9 @@ def refresh_token( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -841,27 +903,28 @@ def refresh_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._refresh_token_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -869,6 +932,7 @@ def refresh_token( response_types_map=_response_types_map, ).data + @validate_call def refresh_token_with_http_info( self, @@ -876,8 +940,9 @@ def refresh_token_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -907,27 +972,28 @@ def refresh_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._refresh_token_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -935,6 +1001,7 @@ def refresh_token_with_http_info( response_types_map=_response_types_map, ) + @validate_call def refresh_token_without_preload_content( self, @@ -942,8 +1009,9 @@ def refresh_token_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -973,30 +1041,32 @@ def refresh_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._refresh_token_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _refresh_token_serialize( self, _request_auth, @@ -1004,9 +1074,11 @@ def _refresh_token_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1023,16 +1095,24 @@ def _refresh_token_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/account/refresh", + method='PUT', + resource_path='/v1/account/refresh', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1042,5 +1122,7 @@ def _refresh_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/snapshots_api.py b/koyeb/api/api/snapshots_api.py index c20c9ba5..e2452143 100644 --- a/koyeb/api/api/snapshots_api.py +++ b/koyeb/api/api/snapshots_api.py @@ -43,6 +43,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def create_snapshot( self, @@ -51,8 +52,9 @@ def create_snapshot( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,28 +86,29 @@ def create_snapshot( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_snapshot_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -113,6 +116,7 @@ def create_snapshot( response_types_map=_response_types_map, ).data + @validate_call def create_snapshot_with_http_info( self, @@ -121,8 +125,9 @@ def create_snapshot_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -154,28 +159,29 @@ def create_snapshot_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_snapshot_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -183,6 +189,7 @@ def create_snapshot_with_http_info( response_types_map=_response_types_map, ) + @validate_call def create_snapshot_without_preload_content( self, @@ -191,8 +198,9 @@ def create_snapshot_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -224,31 +232,33 @@ def create_snapshot_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_snapshot_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_snapshot_serialize( self, body, @@ -257,9 +267,11 @@ def _create_snapshot_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -278,16 +290,24 @@ def _create_snapshot_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/snapshots", + method='POST', + resource_path='/v1/snapshots', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -297,9 +317,12 @@ def _create_snapshot_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def delete_snapshot( self, @@ -308,8 +331,9 @@ def delete_snapshot( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -341,28 +365,29 @@ def delete_snapshot( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -370,6 +395,7 @@ def delete_snapshot( response_types_map=_response_types_map, ).data + @validate_call def delete_snapshot_with_http_info( self, @@ -378,8 +404,9 @@ def delete_snapshot_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -411,28 +438,29 @@ def delete_snapshot_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -440,6 +468,7 @@ def delete_snapshot_with_http_info( response_types_map=_response_types_map, ) + @validate_call def delete_snapshot_without_preload_content( self, @@ -448,8 +477,9 @@ def delete_snapshot_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -481,31 +511,33 @@ def delete_snapshot_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_snapshot_serialize( self, id, @@ -514,9 +546,11 @@ def _delete_snapshot_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -529,22 +563,30 @@ def _delete_snapshot_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/snapshots/{id}", + method='DELETE', + resource_path='/v1/snapshots/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -554,9 +596,12 @@ def _delete_snapshot_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_snapshot( self, @@ -565,8 +610,9 @@ def get_snapshot( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -598,28 +644,29 @@ def get_snapshot( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -627,6 +674,7 @@ def get_snapshot( response_types_map=_response_types_map, ).data + @validate_call def get_snapshot_with_http_info( self, @@ -635,8 +683,9 @@ def get_snapshot_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -668,28 +717,29 @@ def get_snapshot_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -697,6 +747,7 @@ def get_snapshot_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_snapshot_without_preload_content( self, @@ -705,8 +756,9 @@ def get_snapshot_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -738,31 +790,33 @@ def get_snapshot_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_snapshot_serialize( self, id, @@ -771,9 +825,11 @@ def _get_snapshot_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -786,22 +842,30 @@ def _get_snapshot_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/snapshots/{id}", + method='GET', + resource_path='/v1/snapshots/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -811,43 +875,28 @@ def _get_snapshot_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def list_snapshots( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - organization_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter by organization_id"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Filter by status - SNAPSHOT_STATUS_INVALID: zero value, invalid - SNAPSHOT_STATUS_CREATING: the snapshot is being created - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted - SNAPSHOT_STATUS_DELETED: the snapshot is deleted" - ), - ] = None, - region: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for the region") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on snapshot ids"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + organization_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter by organization_id")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter by status - SNAPSHOT_STATUS_INVALID: zero value, invalid - SNAPSHOT_STATUS_CREATING: the snapshot is being created - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted - SNAPSHOT_STATUS_DELETED: the snapshot is deleted")] = None, + region: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the region")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on snapshot ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -889,7 +938,7 @@ def list_snapshots( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_snapshots_serialize( limit=limit, @@ -901,21 +950,22 @@ def list_snapshots( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListSnapshotsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListSnapshotsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -923,40 +973,23 @@ def list_snapshots( response_types_map=_response_types_map, ).data + @validate_call def list_snapshots_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - organization_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter by organization_id"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Filter by status - SNAPSHOT_STATUS_INVALID: zero value, invalid - SNAPSHOT_STATUS_CREATING: the snapshot is being created - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted - SNAPSHOT_STATUS_DELETED: the snapshot is deleted" - ), - ] = None, - region: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for the region") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on snapshot ids"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + organization_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter by organization_id")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter by status - SNAPSHOT_STATUS_INVALID: zero value, invalid - SNAPSHOT_STATUS_CREATING: the snapshot is being created - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted - SNAPSHOT_STATUS_DELETED: the snapshot is deleted")] = None, + region: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the region")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on snapshot ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -998,7 +1031,7 @@ def list_snapshots_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_snapshots_serialize( limit=limit, @@ -1010,21 +1043,22 @@ def list_snapshots_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListSnapshotsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListSnapshotsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1032,40 +1066,23 @@ def list_snapshots_with_http_info( response_types_map=_response_types_map, ) + @validate_call def list_snapshots_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - organization_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter by organization_id"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Filter by status - SNAPSHOT_STATUS_INVALID: zero value, invalid - SNAPSHOT_STATUS_CREATING: the snapshot is being created - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted - SNAPSHOT_STATUS_DELETED: the snapshot is deleted" - ), - ] = None, - region: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for the region") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on snapshot ids"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + organization_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter by organization_id")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter by status - SNAPSHOT_STATUS_INVALID: zero value, invalid - SNAPSHOT_STATUS_CREATING: the snapshot is being created - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted - SNAPSHOT_STATUS_DELETED: the snapshot is deleted")] = None, + region: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the region")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on snapshot ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1107,7 +1124,7 @@ def list_snapshots_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_snapshots_serialize( limit=limit, @@ -1119,24 +1136,26 @@ def list_snapshots_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListSnapshotsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListSnapshotsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_snapshots_serialize( self, limit, @@ -1150,11 +1169,12 @@ def _list_snapshots_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "statuses": "multi", - "ids": "multi", + 'statuses': 'multi', + 'ids': 'multi', } _path_params: Dict[str, str] = {} @@ -1169,37 +1189,51 @@ def _list_snapshots_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if organization_id is not None: - _query_params.append(("organization_id", organization_id)) - + + _query_params.append(('organization_id', organization_id)) + if statuses is not None: - _query_params.append(("statuses", statuses)) - + + _query_params.append(('statuses', statuses)) + if region is not None: - _query_params.append(("region", region)) - + + _query_params.append(('region', region)) + if ids is not None: - _query_params.append(("ids", ids)) - + + _query_params.append(('ids', ids)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/snapshots", + method='GET', + resource_path='/v1/snapshots', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1209,9 +1243,12 @@ def _list_snapshots_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def update_snapshot( self, @@ -1221,8 +1258,9 @@ def update_snapshot( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1256,7 +1294,7 @@ def update_snapshot( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_snapshot_serialize( id=id, @@ -1264,21 +1302,22 @@ def update_snapshot( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1286,6 +1325,7 @@ def update_snapshot( response_types_map=_response_types_map, ).data + @validate_call def update_snapshot_with_http_info( self, @@ -1295,8 +1335,9 @@ def update_snapshot_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1330,7 +1371,7 @@ def update_snapshot_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_snapshot_serialize( id=id, @@ -1338,21 +1379,22 @@ def update_snapshot_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -1360,6 +1402,7 @@ def update_snapshot_with_http_info( response_types_map=_response_types_map, ) + @validate_call def update_snapshot_without_preload_content( self, @@ -1369,8 +1412,9 @@ def update_snapshot_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1404,7 +1448,7 @@ def update_snapshot_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_snapshot_serialize( id=id, @@ -1412,24 +1456,26 @@ def update_snapshot_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_snapshot_serialize( self, id, @@ -1439,9 +1485,11 @@ def _update_snapshot_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1454,7 +1502,7 @@ def _update_snapshot_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -1462,16 +1510,24 @@ def _update_snapshot_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/snapshots/{id}", + method='POST', + resource_path='/v1/snapshots/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1481,5 +1537,7 @@ def _update_snapshot_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/sso_api.py b/koyeb/api/api/sso_api.py index 3bcb10af..a291c5e6 100644 --- a/koyeb/api/api/sso_api.py +++ b/koyeb/api/api/sso_api.py @@ -37,6 +37,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def canny_auth( self, @@ -45,8 +46,9 @@ def canny_auth( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -78,28 +80,29 @@ def canny_auth( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._canny_auth_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CannyAuthReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CannyAuthReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -107,6 +110,7 @@ def canny_auth( response_types_map=_response_types_map, ).data + @validate_call def canny_auth_with_http_info( self, @@ -115,8 +119,9 @@ def canny_auth_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -148,28 +153,29 @@ def canny_auth_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._canny_auth_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CannyAuthReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CannyAuthReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -177,6 +183,7 @@ def canny_auth_with_http_info( response_types_map=_response_types_map, ) + @validate_call def canny_auth_without_preload_content( self, @@ -185,8 +192,9 @@ def canny_auth_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -218,31 +226,33 @@ def canny_auth_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._canny_auth_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CannyAuthReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CannyAuthReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _canny_auth_serialize( self, body, @@ -251,9 +261,11 @@ def _canny_auth_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -272,16 +284,24 @@ def _canny_auth_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/sso/canny", + method='POST', + resource_path='/v1/sso/canny', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -291,9 +311,12 @@ def _canny_auth_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def discourse_auth( self, @@ -302,8 +325,9 @@ def discourse_auth( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -335,28 +359,29 @@ def discourse_auth( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._discourse_auth_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DiscourseAuthReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DiscourseAuthReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -364,6 +389,7 @@ def discourse_auth( response_types_map=_response_types_map, ).data + @validate_call def discourse_auth_with_http_info( self, @@ -372,8 +398,9 @@ def discourse_auth_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -405,28 +432,29 @@ def discourse_auth_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._discourse_auth_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DiscourseAuthReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DiscourseAuthReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -434,6 +462,7 @@ def discourse_auth_with_http_info( response_types_map=_response_types_map, ) + @validate_call def discourse_auth_without_preload_content( self, @@ -442,8 +471,9 @@ def discourse_auth_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -475,31 +505,33 @@ def discourse_auth_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._discourse_auth_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DiscourseAuthReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DiscourseAuthReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _discourse_auth_serialize( self, body, @@ -508,9 +540,11 @@ def _discourse_auth_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -529,16 +563,24 @@ def _discourse_auth_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/sso/discourse", + method='POST', + resource_path='/v1/sso/discourse', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -548,5 +590,7 @@ def _discourse_auth_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/subscriptions_api.py b/koyeb/api/api/subscriptions_api.py index 57a14699..b8f84bb5 100644 --- a/koyeb/api/api/subscriptions_api.py +++ b/koyeb/api/api/subscriptions_api.py @@ -36,6 +36,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def get_subscription( self, @@ -44,8 +45,9 @@ def get_subscription( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -77,28 +79,29 @@ def get_subscription( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_subscription_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetSubscriptionReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetSubscriptionReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -106,6 +109,7 @@ def get_subscription( response_types_map=_response_types_map, ).data + @validate_call def get_subscription_with_http_info( self, @@ -114,8 +118,9 @@ def get_subscription_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -147,28 +152,29 @@ def get_subscription_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_subscription_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetSubscriptionReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetSubscriptionReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -176,6 +182,7 @@ def get_subscription_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_subscription_without_preload_content( self, @@ -184,8 +191,9 @@ def get_subscription_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -217,31 +225,33 @@ def get_subscription_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_subscription_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetSubscriptionReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetSubscriptionReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_subscription_serialize( self, id, @@ -250,9 +260,11 @@ def _get_subscription_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -265,22 +277,30 @@ def _get_subscription_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/subscriptions/{id}", + method='GET', + resource_path='/v1/subscriptions/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -290,5 +310,7 @@ def _get_subscription_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/summary_api.py b/koyeb/api/api/summary_api.py index 8a5bd1d8..6a8247c3 100644 --- a/koyeb/api/api/summary_api.py +++ b/koyeb/api/api/summary_api.py @@ -36,6 +36,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def get_organization_summary( self, @@ -44,8 +45,9 @@ def get_organization_summary( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -77,28 +79,29 @@ def get_organization_summary( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_summary_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationSummaryReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationSummaryReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -106,6 +109,7 @@ def get_organization_summary( response_types_map=_response_types_map, ).data + @validate_call def get_organization_summary_with_http_info( self, @@ -114,8 +118,9 @@ def get_organization_summary_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -147,28 +152,29 @@ def get_organization_summary_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_summary_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationSummaryReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationSummaryReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -176,6 +182,7 @@ def get_organization_summary_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_organization_summary_without_preload_content( self, @@ -184,8 +191,9 @@ def get_organization_summary_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -217,31 +225,33 @@ def get_organization_summary_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_summary_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationSummaryReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationSummaryReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_organization_summary_serialize( self, organization_id, @@ -250,9 +260,11 @@ def _get_organization_summary_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -265,22 +277,30 @@ def _get_organization_summary_serialize( # process the path parameters if organization_id is not None: - _path_params["organization_id"] = organization_id + _path_params['organization_id'] = organization_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/organizations/{organization_id}/summary", + method='GET', + resource_path='/v1/organizations/{organization_id}/summary', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -290,5 +310,7 @@ def _get_organization_summary_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/test_api.py b/koyeb/api/api/test_api.py index 7da66d65..1f992f72 100644 --- a/koyeb/api/api/test_api.py +++ b/koyeb/api/api/test_api.py @@ -36,6 +36,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def test_anon( self, @@ -43,8 +44,9 @@ def test_anon( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -74,27 +76,28 @@ def test_anon( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._test_anon_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -102,6 +105,7 @@ def test_anon( response_types_map=_response_types_map, ).data + @validate_call def test_anon_with_http_info( self, @@ -109,8 +113,9 @@ def test_anon_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -140,27 +145,28 @@ def test_anon_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._test_anon_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -168,6 +174,7 @@ def test_anon_with_http_info( response_types_map=_response_types_map, ) + @validate_call def test_anon_without_preload_content( self, @@ -175,8 +182,9 @@ def test_anon_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -206,30 +214,32 @@ def test_anon_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._test_anon_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _test_anon_serialize( self, _request_auth, @@ -237,9 +247,11 @@ def _test_anon_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -256,16 +268,24 @@ def _test_anon_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/test/anon", + method='GET', + resource_path='/v1/test/anon', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -275,9 +295,12 @@ def _test_anon_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def test_auth( self, @@ -286,8 +309,9 @@ def test_auth( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -319,28 +343,29 @@ def test_auth( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._test_auth_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KtestTestAuthReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KtestTestAuthReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -348,6 +373,7 @@ def test_auth( response_types_map=_response_types_map, ).data + @validate_call def test_auth_with_http_info( self, @@ -356,8 +382,9 @@ def test_auth_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -389,28 +416,29 @@ def test_auth_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._test_auth_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KtestTestAuthReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KtestTestAuthReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -418,6 +446,7 @@ def test_auth_with_http_info( response_types_map=_response_types_map, ) + @validate_call def test_auth_without_preload_content( self, @@ -426,8 +455,9 @@ def test_auth_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -459,31 +489,33 @@ def test_auth_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._test_auth_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KtestTestAuthReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KtestTestAuthReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _test_auth_serialize( self, body, @@ -492,9 +524,11 @@ def _test_auth_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -513,16 +547,24 @@ def _test_auth_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/test/auth", + method='POST', + resource_path='/v1/test/auth', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -532,5 +574,7 @@ def _test_auth_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/usages_api.py b/koyeb/api/api/usages_api.py index 7e8c6fb0..9020bafb 100644 --- a/koyeb/api/api/usages_api.py +++ b/koyeb/api/api/usages_api.py @@ -19,9 +19,7 @@ from pydantic import Field, StrictStr from typing import Optional from typing_extensions import Annotated -from koyeb.api.models.get_organization_usage_details_reply import ( - GetOrganizationUsageDetailsReply, -) +from koyeb.api.models.get_organization_usage_details_reply import GetOrganizationUsageDetailsReply from koyeb.api.models.get_organization_usage_reply import GetOrganizationUsageReply from koyeb.api.api_client import ApiClient, RequestSerialized @@ -41,23 +39,19 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def get_organization_usage( self, - starting_time: Annotated[ - Optional[datetime], - Field(description="The starting time of the period to get data from"), - ] = None, - ending_time: Annotated[ - Optional[datetime], - Field(description="The ending time of the period to get data from"), - ] = None, + starting_time: Annotated[Optional[datetime], Field(description="The starting time of the period to get data from")] = None, + ending_time: Annotated[Optional[datetime], Field(description="The ending time of the period to get data from")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -91,7 +85,7 @@ def get_organization_usage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_usage_serialize( starting_time=starting_time, @@ -99,15 +93,16 @@ def get_organization_usage( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationUsageReply", - "default": "GoogleRpcStatus", + '200': "GetOrganizationUsageReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -115,23 +110,19 @@ def get_organization_usage( response_types_map=_response_types_map, ).data + @validate_call def get_organization_usage_with_http_info( self, - starting_time: Annotated[ - Optional[datetime], - Field(description="The starting time of the period to get data from"), - ] = None, - ending_time: Annotated[ - Optional[datetime], - Field(description="The ending time of the period to get data from"), - ] = None, + starting_time: Annotated[Optional[datetime], Field(description="The starting time of the period to get data from")] = None, + ending_time: Annotated[Optional[datetime], Field(description="The ending time of the period to get data from")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -165,7 +156,7 @@ def get_organization_usage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_usage_serialize( starting_time=starting_time, @@ -173,15 +164,16 @@ def get_organization_usage_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationUsageReply", - "default": "GoogleRpcStatus", + '200': "GetOrganizationUsageReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -189,23 +181,19 @@ def get_organization_usage_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_organization_usage_without_preload_content( self, - starting_time: Annotated[ - Optional[datetime], - Field(description="The starting time of the period to get data from"), - ] = None, - ending_time: Annotated[ - Optional[datetime], - Field(description="The ending time of the period to get data from"), - ] = None, + starting_time: Annotated[Optional[datetime], Field(description="The starting time of the period to get data from")] = None, + ending_time: Annotated[Optional[datetime], Field(description="The ending time of the period to get data from")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -239,7 +227,7 @@ def get_organization_usage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_usage_serialize( starting_time=starting_time, @@ -247,18 +235,20 @@ def get_organization_usage_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationUsageReply", - "default": "GoogleRpcStatus", + '200': "GetOrganizationUsageReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_organization_usage_serialize( self, starting_time, @@ -268,9 +258,11 @@ def _get_organization_usage_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -287,42 +279,50 @@ def _get_organization_usage_serialize( if isinstance(starting_time, datetime): _query_params.append( ( - "starting_time", + 'starting_time', starting_time.strftime( self.api_client.configuration.datetime_format - ), + ) ) ) else: - _query_params.append(("starting_time", starting_time)) - + _query_params.append(('starting_time', starting_time)) + if ending_time is not None: if isinstance(ending_time, datetime): _query_params.append( ( - "ending_time", + 'ending_time', ending_time.strftime( self.api_client.configuration.datetime_format - ), + ) ) ) else: - _query_params.append(("ending_time", ending_time)) - + _query_params.append(('ending_time', ending_time)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/usages", + method='GET', + resource_path='/v1/usages', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -332,46 +332,28 @@ def _get_organization_usage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def get_organization_usage_details( self, - starting_time: Annotated[ - Optional[datetime], - Field(description="The starting time of the period to get data from"), - ] = None, - ending_time: Annotated[ - Optional[datetime], - Field(description="The ending time of the period to get data from"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, - accept: Annotated[ - Optional[StrictStr], - Field( - description="If defined with the value 'text/csv', a csv file is returned" - ), - ] = None, + starting_time: Annotated[Optional[datetime], Field(description="The starting time of the period to get data from")] = None, + ending_time: Annotated[Optional[datetime], Field(description="The ending time of the period to get data from")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + accept: Annotated[Optional[StrictStr], Field(description="If defined with the value 'text/csv', a csv file is returned")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -413,7 +395,7 @@ def get_organization_usage_details( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_usage_details_serialize( starting_time=starting_time, @@ -425,15 +407,16 @@ def get_organization_usage_details( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationUsageDetailsReply", - "default": "GoogleRpcStatus", + '200': "GetOrganizationUsageDetailsReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -441,43 +424,23 @@ def get_organization_usage_details( response_types_map=_response_types_map, ).data + @validate_call def get_organization_usage_details_with_http_info( self, - starting_time: Annotated[ - Optional[datetime], - Field(description="The starting time of the period to get data from"), - ] = None, - ending_time: Annotated[ - Optional[datetime], - Field(description="The ending time of the period to get data from"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, - accept: Annotated[ - Optional[StrictStr], - Field( - description="If defined with the value 'text/csv', a csv file is returned" - ), - ] = None, + starting_time: Annotated[Optional[datetime], Field(description="The starting time of the period to get data from")] = None, + ending_time: Annotated[Optional[datetime], Field(description="The ending time of the period to get data from")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + accept: Annotated[Optional[StrictStr], Field(description="If defined with the value 'text/csv', a csv file is returned")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -519,7 +482,7 @@ def get_organization_usage_details_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_usage_details_serialize( starting_time=starting_time, @@ -531,15 +494,16 @@ def get_organization_usage_details_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationUsageDetailsReply", - "default": "GoogleRpcStatus", + '200': "GetOrganizationUsageDetailsReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -547,43 +511,23 @@ def get_organization_usage_details_with_http_info( response_types_map=_response_types_map, ) + @validate_call def get_organization_usage_details_without_preload_content( self, - starting_time: Annotated[ - Optional[datetime], - Field(description="The starting time of the period to get data from"), - ] = None, - ending_time: Annotated[ - Optional[datetime], - Field(description="The ending time of the period to get data from"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, - accept: Annotated[ - Optional[StrictStr], - Field( - description="If defined with the value 'text/csv', a csv file is returned" - ), - ] = None, + starting_time: Annotated[Optional[datetime], Field(description="The starting time of the period to get data from")] = None, + ending_time: Annotated[Optional[datetime], Field(description="The ending time of the period to get data from")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + accept: Annotated[Optional[StrictStr], Field(description="If defined with the value 'text/csv', a csv file is returned")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -625,7 +569,7 @@ def get_organization_usage_details_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_usage_details_serialize( starting_time=starting_time, @@ -637,18 +581,20 @@ def get_organization_usage_details_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationUsageDetailsReply", - "default": "GoogleRpcStatus", + '200': "GetOrganizationUsageDetailsReply", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_organization_usage_details_serialize( self, starting_time, @@ -662,9 +608,11 @@ def _get_organization_usage_details_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -681,53 +629,64 @@ def _get_organization_usage_details_serialize( if isinstance(starting_time, datetime): _query_params.append( ( - "starting_time", + 'starting_time', starting_time.strftime( self.api_client.configuration.datetime_format - ), + ) ) ) else: - _query_params.append(("starting_time", starting_time)) - + _query_params.append(('starting_time', starting_time)) + if ending_time is not None: if isinstance(ending_time, datetime): _query_params.append( ( - "ending_time", + 'ending_time', ending_time.strftime( self.api_client.configuration.datetime_format - ), + ) ) ) else: - _query_params.append(("ending_time", ending_time)) - + _query_params.append(('ending_time', ending_time)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + # process the header parameters if accept is not None: - _header_params["Accept"] = accept + _header_params['Accept'] = accept # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/usages/details", + method='GET', + resource_path='/v1/usages/details', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -737,5 +696,7 @@ def _get_organization_usage_details_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api/users_api.py b/koyeb/api/api/users_api.py index ed5ce9f2..f388bcdc 100644 --- a/koyeb/api/api/users_api.py +++ b/koyeb/api/api/users_api.py @@ -36,6 +36,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call def delete_user( self, @@ -44,8 +45,9 @@ def delete_user( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -77,28 +79,29 @@ def delete_user( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_user_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteUserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteUserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -106,6 +109,7 @@ def delete_user( response_types_map=_response_types_map, ).data + @validate_call def delete_user_with_http_info( self, @@ -114,8 +118,9 @@ def delete_user_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -147,28 +152,29 @@ def delete_user_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_user_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteUserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteUserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -176,6 +182,7 @@ def delete_user_with_http_info( response_types_map=_response_types_map, ) + @validate_call def delete_user_without_preload_content( self, @@ -184,8 +191,9 @@ def delete_user_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -217,31 +225,33 @@ def delete_user_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_user_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteUserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteUserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_user_serialize( self, id, @@ -250,9 +260,11 @@ def _delete_user_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -265,22 +277,30 @@ def _delete_user_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/users/{id}", + method='DELETE', + resource_path='/v1/users/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -290,9 +310,12 @@ def _delete_user_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call def delete_user_v2( self, @@ -301,8 +324,9 @@ def delete_user_v2( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -334,28 +358,29 @@ def delete_user_v2( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_user_v2_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteUserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteUserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -363,6 +388,7 @@ def delete_user_v2( response_types_map=_response_types_map, ).data + @validate_call def delete_user_v2_with_http_info( self, @@ -371,8 +397,9 @@ def delete_user_v2_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -404,28 +431,29 @@ def delete_user_v2_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_user_v2_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteUserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteUserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) response_data.read() return self.api_client.response_deserialize( @@ -433,6 +461,7 @@ def delete_user_v2_with_http_info( response_types_map=_response_types_map, ) + @validate_call def delete_user_v2_without_preload_content( self, @@ -441,8 +470,9 @@ def delete_user_v2_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -474,31 +504,33 @@ def delete_user_v2_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_user_v2_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteUserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteUserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_user_v2_serialize( self, id, @@ -507,9 +539,11 @@ def _delete_user_v2_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -522,22 +556,30 @@ def _delete_user_v2_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v2/users/{id}", + method='DELETE', + resource_path='/v2/users/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -547,5 +589,7 @@ def _delete_user_v2_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api/api_client.py b/koyeb/api/api_client.py index 022554a1..e49af34a 100644 --- a/koyeb/api/api_client.py +++ b/koyeb/api/api_client.py @@ -10,6 +10,7 @@ """ # noqa: E501 + import datetime from dateutil.parser import parse from enum import Enum @@ -36,12 +37,11 @@ UnauthorizedException, ForbiddenException, NotFoundException, - ServiceException, + ServiceException ) RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] - class ApiClient: """Generic API client for OpenAPI client library builds. @@ -60,21 +60,25 @@ class ApiClient: PRIMITIVE_TYPES = (float, bool, bytes, str, int) NATIVE_TYPES_MAPPING = { - "int": int, - "long": int, # TODO remove as only py3 is supported? - "float": float, - "str": str, - "bool": bool, - "date": datetime.date, - "datetime": datetime.datetime, - "decimal": decimal.Decimal, - "UUID": uuid.UUID, - "object": object, + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'decimal': decimal.Decimal, + 'UUID': uuid.UUID, + 'object': object, } _pool = None def __init__( - self, configuration=None, header_name=None, header_value=None, cookie=None + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None ) -> None: # use default configuration if none is provided if configuration is None: @@ -87,33 +91,34 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "OpenAPI-Generator/1.5.3/python" + self.user_agent = 'OpenAPI-Generator/1.5.3/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): return self def __exit__(self, exc_type, exc_value, traceback): - if self.rest_client is not None and hasattr(self.rest_client, "pool_manager"): + if self.rest_client is not None and hasattr(self.rest_client, 'pool_manager'): self.rest_client.pool_manager.clear() async def close(self): """Close the underlying HTTP connection pool.""" - if self.rest_client is not None and hasattr(self.rest_client, "pool_manager"): + if self.rest_client is not None and hasattr(self.rest_client, 'pool_manager'): self.rest_client.pool_manager.clear() @property def user_agent(self): """User agent for this API client""" - return self.default_headers["User-Agent"] + return self.default_headers['User-Agent'] @user_agent.setter def user_agent(self, value): - self.default_headers["User-Agent"] = value + self.default_headers['User-Agent'] = value def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value + _default = None @classmethod @@ -149,12 +154,12 @@ def param_serialize( header_params=None, body=None, post_params=None, - files=None, - auth_settings=None, + files=None, auth_settings=None, collection_formats=None, _host=None, - _request_auth=None, + _request_auth=None ) -> RequestSerialized: + """Builds the HTTP request params needed by the request. :param method: Method to call. :param resource_path: Path to method endpoint. @@ -183,28 +188,35 @@ def param_serialize( header_params = header_params or {} header_params.update(self.default_headers) if self.cookie: - header_params["Cookie"] = self.cookie + header_params['Cookie'] = self.cookie if header_params: header_params = self.sanitize_for_serialization(header_params) header_params = dict( - self.parameters_to_tuples(header_params, collection_formats) + self.parameters_to_tuples(header_params,collection_formats) ) # path parameters if path_params: path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, collection_formats) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) for k, v in path_params: # specified safe chars, encode everything resource_path = resource_path.replace( - "{%s}" % k, quote(str(v), safe=config.safe_chars_for_path_param) + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) ) # post parameters if post_params or files: post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, collection_formats) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) if files: post_params.extend(self.files_parameters(files)) @@ -216,7 +228,7 @@ def param_serialize( resource_path, method, body, - request_auth=_request_auth, + request_auth=_request_auth ) # body @@ -233,11 +245,15 @@ def param_serialize( # query parameters if query_params: query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query(query_params, collection_formats) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) url += "?" + url_query return method, url, header_params, body, post_params + def call_api( self, method, @@ -245,7 +261,7 @@ def call_api( header_params=None, body=None, post_params=None, - _request_timeout=None, + _request_timeout=None ) -> rest.RESTResponse: """Makes the HTTP request (synchronous) :param method: Method to call. @@ -262,12 +278,10 @@ def call_api( try: # perform request and return response response_data = self.rest_client.request( - method, - url, + method, url, headers=header_params, - body=body, - post_params=post_params, - _request_timeout=_request_timeout, + body=body, post_params=post_params, + _request_timeout=_request_timeout ) except ApiException as e: @@ -278,7 +292,7 @@ def call_api( def response_deserialize( self, response_data: rest.RESTResponse, - response_types_map: Optional[Dict[str, ApiResponseT]] = None, + response_types_map: Optional[Dict[str, ApiResponseT]]=None ) -> ApiResponse[ApiResponseT]: """Deserializes response into an object. :param response_data: RESTResponse object to be deserialized. @@ -290,28 +304,15 @@ def response_deserialize( assert response_data.data is not None, msg response_type = response_types_map.get(str(response_data.status), None) - if ( - not response_type - and isinstance(response_data.status, int) - and 100 <= response_data.status <= 599 - ): + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get( - str(response_data.status)[0] + "XX", None - ) + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) # If the response_type has not matched (eg. did not match the previous if statements) and the default response is available, use it. - if ( - response_type is None - and str(response_data.status) not in response_types_map - and ( - not isinstance(response_data.status, int) - or not 100 <= response_data.status <= 599 - or str(response_data.status)[0] + "XX" not in response_types_map - ) - and "default" in response_types_map - ): - response_type = response_types_map["default"] + if response_type is None and str(response_data.status) not in response_types_map \ + and (not isinstance(response_data.status, int) or not 100 <= response_data.status <= 599 or str(response_data.status)[0] + "XX" not in response_types_map) \ + and 'default' in response_types_map: + response_type = response_types_map['default'] # deserialize response data response_text = None @@ -323,14 +324,12 @@ def response_deserialize( return_data = self.__deserialize_file(response_data) elif response_type is not None: match = None - content_type = response_data.headers.get("content-type") + content_type = response_data.headers.get('content-type') if content_type is not None: match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) encoding = match.group(1) if match else "utf-8" response_text = response_data.data.decode(encoding) - return_data = self.deserialize( - response_text, response_type, content_type - ) + return_data = self.deserialize(response_text, response_type, content_type) finally: if not 200 <= response_data.status <= 299: raise ApiException.from_response( @@ -340,10 +339,10 @@ def response_deserialize( ) return ApiResponse( - status_code=response_data.status, - data=return_data, - headers=response_data.headers, - raw_data=response_data.data, + status_code = response_data.status, + data = return_data, + headers = response_data.headers, + raw_data = response_data.data ) def sanitize_for_serialization(self, obj): @@ -373,16 +372,21 @@ def sanitize_for_serialization(self, obj): elif isinstance(obj, uuid.UUID): return str(obj) elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj] + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() elif isinstance(obj, decimal.Decimal): return str(obj) elif isinstance(obj, dict): return { - key: self.sanitize_for_serialization(val) for key, val in obj.items() + key: self.sanitize_for_serialization(val) + for key, val in obj.items() } # Convert model obj to dict except @@ -390,16 +394,15 @@ def sanitize_for_serialization(self, obj): # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. - if hasattr(obj, "to_dict") and callable(getattr(obj, "to_dict")): + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): obj_dict = obj.to_dict() else: obj_dict = obj.__dict__ return self.sanitize_for_serialization(obj_dict) - def deserialize( - self, response_text: str, response_type: str, content_type: Optional[str] - ): + + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. @@ -416,20 +419,17 @@ def deserialize( data = json.loads(response_text) except ValueError: data = response_text - elif re.match( - r"^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)", - content_type, - re.IGNORECASE, - ): + elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): if response_text == "": data = "" else: data = json.loads(response_text) - elif re.match(r"^text\/[a-z.+-]+\s*(;|$)", content_type, re.IGNORECASE): + 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) + status=0, + reason="Unsupported content type: {0}".format(content_type) ) return self.__deserialize(data, response_type) @@ -446,23 +446,19 @@ def __deserialize(self, data, klass): return None if isinstance(klass, str): - if klass.startswith("Optional["): - m = re.match(r"Optional\[(.*)]", klass) - assert m is not None, "Malformed Optional type definition" - # data is not None here, so the optionality is already resolved - return self.__deserialize(data, m.group(1)) - - if klass.startswith("List["): - m = re.match(r"List\[(.*)]", klass) + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) assert m is not None, "Malformed List type definition" sub_kls = m.group(1) - return [self.__deserialize(sub_data, sub_kls) for sub_data in data] + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] - if klass.startswith("Dict["): - m = re.match(r"Dict\[([^,]*), (.*)]", klass) + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) assert m is not None, "Malformed Dict type definition" sub_kls = m.group(2) - return {k: self.__deserialize(v, sub_kls) for k, v in data.items()} + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} # convert str to class if klass in self.NATIVE_TYPES_MAPPING: @@ -498,35 +494,21 @@ def parameters_to_tuples(self, params, collection_formats): if collection_formats is None: collection_formats = {} for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() if k in collection_formats: collection_format = collection_formats[k] - if collection_format == "multi": - new_params.extend( - (k, str(value).lower() if isinstance(value, bool) else value) - for value in v - ) + if collection_format == 'multi': + new_params.extend((k, value) for value in v) else: - if collection_format == "ssv": - delimiter = " " - elif collection_format == "tsv": - delimiter = "\t" - elif collection_format == "pipes": - delimiter = "|" + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' else: # csv is the default - delimiter = "," + delimiter = ',' new_params.append( - ( - k, - delimiter.join( - str(value).lower() - if isinstance(value, bool) - else str(value) - for value in v - ), - ) - ) + (k, delimiter.join(str(value) for value in v))) else: new_params.append((k, v)) return new_params @@ -551,39 +533,19 @@ 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, - quote( - str(value).lower() - if isinstance(value, bool) - else str(value) - ), - ) - for value in v - ) + if collection_format == 'multi': + new_params.extend((k, quote(str(value))) for value in v) else: - if collection_format == "ssv": - delimiter = " " - elif collection_format == "tsv": - delimiter = "\t" - elif collection_format == "pipes": - delimiter = "|" + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' else: # csv is the default - delimiter = "," + delimiter = ',' new_params.append( - ( - k, - delimiter.join( - quote( - str(value).lower() - if isinstance(value, bool) - else str(value) - ) - for value in v - ), - ) + (k, delimiter.join(quote(str(value)) for value in v)) ) else: new_params.append((k, quote(str(v)))) @@ -602,7 +564,7 @@ def files_parameters( params = [] for k, v in files.items(): if isinstance(v, str): - with open(v, "rb") as f: + with open(v, 'rb') as f: filename = os.path.basename(f.name) filedata = f.read() elif isinstance(v, bytes): @@ -616,8 +578,13 @@ def files_parameters( continue else: raise ValueError("Unsupported file value") - mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream" - params.append(tuple([k, tuple([filename, filedata, mimetype])])) + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) return params def select_header_accept(self, accepts: List[str]) -> Optional[str]: @@ -630,7 +597,7 @@ def select_header_accept(self, accepts: List[str]) -> Optional[str]: return None for accept in accepts: - if re.search("json", accept, re.IGNORECASE): + if re.search('json', accept, re.IGNORECASE): return accept return accepts[0] @@ -645,7 +612,7 @@ def select_header_content_type(self, content_types): return None for content_type in content_types: - if re.search("json", content_type, re.IGNORECASE): + if re.search('json', content_type, re.IGNORECASE): return content_type return content_types[0] @@ -658,7 +625,7 @@ def update_params_for_auth( resource_path, method, body, - request_auth=None, + request_auth=None ) -> None: """Updates header and query params based on authentication setting. @@ -677,18 +644,34 @@ def update_params_for_auth( if request_auth: self._apply_auth_params( - headers, queries, resource_path, method, body, request_auth + headers, + queries, + resource_path, + method, + body, + request_auth ) else: for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: self._apply_auth_params( - headers, queries, resource_path, method, body, auth_setting + headers, + queries, + resource_path, + method, + body, + auth_setting ) def _apply_auth_params( - self, headers, queries, resource_path, method, body, auth_setting + self, + headers, + queries, + resource_path, + method, + body, + auth_setting ) -> None: """Updates the request parameters based on a single auth_setting @@ -700,23 +683,26 @@ def _apply_auth_params( The object type is the return value of sanitize_for_serialization(). :param auth_setting: auth settings for the endpoint """ - if auth_setting["in"] == "cookie": - if not "Cookie" in headers: - headers["Cookie"] = "" + if auth_setting['in'] == 'cookie': + if not 'Cookie' in headers: + headers['Cookie'] = "" else: - headers["Cookie"] += "; " - # Account for cookie value containing spaces and special characters, excluding base64 delimiters - cookie_value = quote( - str(auth_setting["value"]), safe="!#$%&'()*+-./:<=>?@[]^_`{|}~%+/=" - ) - headers["Cookie"] += f"{auth_setting['key']}={cookie_value}" - elif auth_setting["in"] == "header": - if auth_setting["type"] != "http-signature": - headers[auth_setting["key"]] = auth_setting["value"] - elif auth_setting["in"] == "query": - queries.append((auth_setting["key"], auth_setting["value"])) + headers['Cookie'] += "; " + # Account for cookie value containing spaces and special characters + cookie_value = str(auth_setting['value']) + if not re.match("^\".*\"$", cookie_value): + cookie_value = cookie_value.replace("\"", "\\\"") + cookie_value = f"\"{cookie_value}\"" + headers['Cookie'] += f"{auth_setting['key']}={cookie_value}" + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) else: - raise ApiValueError("Authentication token must be in `query` or `header`") + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) def __deserialize_file(self, response): """Deserializes body to file @@ -736,7 +722,10 @@ def __deserialize_file(self, response): content_disposition = response.headers.get("Content-Disposition") if content_disposition: - m = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition) + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) assert m is not None, "Unexpected 'content-disposition' header value" filename = os.path.basename(m.group(1)) # Strip any directory traversal if filename in ("", ".", ".."): # fall back to tmp filename @@ -782,7 +771,8 @@ def __deserialize_date(self, string): return string except ValueError: raise rest.ApiException( - status=0, reason="Failed to parse `{0}` as date object".format(string) + status=0, + reason="Failed to parse `{0}` as date object".format(string) ) def __deserialize_datetime(self, string): @@ -800,7 +790,10 @@ def __deserialize_datetime(self, string): except ValueError: raise rest.ApiException( status=0, - reason=("Failed to parse `{0}` as datetime object".format(string)), + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) ) def __deserialize_enum(self, data, klass): @@ -814,7 +807,11 @@ def __deserialize_enum(self, data, klass): return klass(data) except ValueError: raise rest.ApiException( - status=0, reason=("Failed to parse `{0}` as `{1}`".format(data, klass)) + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) ) def __deserialize_model(self, data, klass): diff --git a/koyeb/api/api_response.py b/koyeb/api/api_response.py index 1ce13729..9bc7c11f 100644 --- a/koyeb/api/api_response.py +++ b/koyeb/api/api_response.py @@ -6,7 +6,6 @@ T = TypeVar("T") - class ApiResponse(BaseModel, Generic[T]): """ API response object @@ -17,4 +16,6 @@ class ApiResponse(BaseModel, Generic[T]): data: T = Field(description="Deserialized data given the data type") raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - model_config = {"arbitrary_types_allowed": True} + model_config = { + "arbitrary_types_allowed": True + } diff --git a/koyeb/api/configuration.py b/koyeb/api/configuration.py index a814c203..39cb21a0 100644 --- a/koyeb/api/configuration.py +++ b/koyeb/api/configuration.py @@ -15,7 +15,6 @@ import logging from logging import FileHandler import multiprocessing -import ssl import sys from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union from urllib.parse import urlparse @@ -26,16 +25,9 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = { - "multipleOf", - "maximum", - "exclusiveMaximum", - "minimum", - "exclusiveMinimum", - "maxLength", - "minLength", - "pattern", - "maxItems", - "minItems", + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' } ServerVariablesT = Dict[str, str] @@ -142,111 +134,110 @@ class HostSetting(TypedDict): class Configuration: """This class contains various settings of the API client. - :param host: Base url. - :param ignore_operation_servers - Boolean to ignore operation servers for the API client. - Config will use `host` as the base url regardless of the operation servers. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param verify_ssl: bool - Set this to false to skip verifying SSL certificate - when calling API from https server. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - :param retries: int | urllib3.util.retry.Retry - Retry configuration. - :param ca_cert_data: verify the peer using concatenated CA certificate data - in PEM (str) or DER (bytes) format. - :param cert_file: the path to a client certificate file, for mTLS. - :param key_file: the path to a client key file, for mTLS. - :param assert_hostname: Set this to True/False to enable/disable SSL hostname verification. - :param tls_server_name: SSL/TLS Server Name Indication (SNI). Set this to the SNI value expected by the server. - :param connection_pool_maxsize: Connection pool max size. None in the constructor is coerced to 100 for async and cpu_count * 5 for sync. - :param proxy: Proxy URL. - :param no_proxy: Comma-separated hosts that bypass the proxy. - :param proxy_headers: Proxy headers. - :param proxy_ssl_context: SSL context used only for the TLS handshake with the proxy itself, independent of the destination TLS settings. - :param safe_chars_for_path_param: Safe characters for path parameter encoding. - :param client_side_validation: Enable client-side validation. Default True. - :param socket_options: Options to pass down to the underlying urllib3 socket. - :param datetime_format: Datetime format string for serialization. - :param date_format: Date format string for serialization. - - :Example: - - API Key Authentication Example. - Given the following security scheme in the OpenAPI specification: - components: - securitySchemes: - cookieAuth: # name for the security scheme - type: apiKey - in: cookie - name: JSESSIONID # cookie name - - You can programmatically set the cookie: - - conf = koyeb.api.Configuration( - api_key={'cookieAuth': 'abc123'} - api_key_prefix={'cookieAuth': 'JSESSIONID'} - ) - - The following cookie will be added to the HTTP request: - Cookie: JSESSIONID abc123 + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param verify_ssl: bool - Set this to false to skip verifying SSL certificate + when calling API from https server. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + :param retries: int | urllib3.util.retry.Retry - Retry configuration. + :param ca_cert_data: verify the peer using concatenated CA certificate data + in PEM (str) or DER (bytes) format. + :param cert_file: the path to a client certificate file, for mTLS. + :param key_file: the path to a client key file, for mTLS. + :param assert_hostname: Set this to True/False to enable/disable SSL hostname verification. + :param tls_server_name: SSL/TLS Server Name Indication (SNI). Set this to the SNI value expected by the server. + :param connection_pool_maxsize: Connection pool max size. None in the constructor is coerced to 100 for async and cpu_count * 5 for sync. + :param proxy: Proxy URL. + :param no_proxy: Comma-separated hosts that bypass the proxy. + :param proxy_headers: Proxy headers. + :param safe_chars_for_path_param: Safe characters for path parameter encoding. + :param client_side_validation: Enable client-side validation. Default True. + :param socket_options: Options to pass down to the underlying urllib3 socket. + :param datetime_format: Datetime format string for serialization. + :param date_format: Date format string for serialization. + + :Example: + + API Key Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + +conf = koyeb.api.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} +) + + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 """ _default: ClassVar[Optional[Self]] = None def __init__( self, - host: Optional[str] = None, - api_key: Optional[Dict[str, str]] = None, - api_key_prefix: Optional[Dict[str, str]] = None, - username: Optional[str] = None, - password: Optional[str] = None, - access_token: Optional[str] = None, - server_index: Optional[int] = None, - server_variables: Optional[ServerVariablesT] = None, - server_operation_index: Optional[Dict[int, int]] = None, - server_operation_variables: Optional[Dict[int, ServerVariablesT]] = None, - ignore_operation_servers: bool = False, - ssl_ca_cert: Optional[str] = None, + host: Optional[str]=None, + api_key: Optional[Dict[str, str]]=None, + api_key_prefix: Optional[Dict[str, str]]=None, + username: Optional[str]=None, + password: Optional[str]=None, + access_token: Optional[str]=None, + server_index: Optional[int]=None, + server_variables: Optional[ServerVariablesT]=None, + server_operation_index: Optional[Dict[int, int]]=None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, + ignore_operation_servers: bool=False, + ssl_ca_cert: Optional[str]=None, retries: Optional[Union[int, urllib3.util.retry.Retry]] = None, ca_cert_data: Optional[Union[str, bytes]] = None, - cert_file: Optional[str] = None, - key_file: Optional[str] = None, - verify_ssl: bool = True, - assert_hostname: Optional[bool] = None, - tls_server_name: Optional[str] = None, - connection_pool_maxsize: Optional[int] = None, - proxy: Optional[str] = None, - no_proxy: Optional[str] = None, - proxy_headers: Optional[Any] = None, - proxy_ssl_context: Optional[ssl.SSLContext] = None, - safe_chars_for_path_param: str = "", - client_side_validation: bool = True, - socket_options: Optional[Any] = None, - datetime_format: str = "%Y-%m-%dT%H:%M:%S.%f%z", - date_format: str = "%Y-%m-%d", + cert_file: Optional[str]=None, + key_file: Optional[str]=None, + verify_ssl: bool=True, + assert_hostname: Optional[bool]=None, + tls_server_name: Optional[str]=None, + connection_pool_maxsize: Optional[int]=None, + proxy: Optional[str]=None, + no_proxy: Optional[str]=None, + proxy_headers: Optional[Any]=None, + safe_chars_for_path_param: str='', + client_side_validation: bool=True, + socket_options: Optional[Any]=None, + datetime_format: str="%Y-%m-%dT%H:%M:%S.%f%z", + date_format: str="%Y-%m-%d", *, debug: Optional[bool] = None, ) -> None: - """Constructor""" + """Constructor + """ self._base_path = "https://app.koyeb.com" if host is None else host """Default Base url """ @@ -292,7 +283,7 @@ def __init__( """ self.logger["package_logger"] = logging.getLogger("koyeb.api") self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = "%(asctime)s %(levelname)s %(message)s" + self.logger_format = '%(asctime)s %(levelname)s %(message)s' """Log format """ self.logger_stream_handler = None @@ -337,38 +328,29 @@ def __init__( Set this to the SNI value expected by the server. """ - self.connection_pool_maxsize = ( - connection_pool_maxsize - if connection_pool_maxsize is not None - else multiprocessing.cpu_count() * 5 - ) + self.connection_pool_maxsize = connection_pool_maxsize if connection_pool_maxsize is not None else multiprocessing.cpu_count() * 5 """urllib3 connection pool's maximum number of connections saved per pool. None in the constructor is coerced to cpu_count * 5. """ # urllib3 does not read proxy environment variables itself: # https://github.com/urllib3/urllib3/issues/1785 - # A proxy taken from the environment is re-resolved when the host is - # assigned; see the host setter. - self._proxy_from_env = proxy is None if proxy is None or no_proxy is None: proxies = getproxies() if proxy is None: - proxy = self._env_proxy(proxies, self.host) + scheme = urlparse(self.host).scheme + proxy = proxies.get(scheme) or proxies.get("all") if no_proxy is None: no_proxy = proxies.get("no") - self._proxy = proxy + self.proxy = proxy + """Proxy URL + """ self.no_proxy = no_proxy """Hosts that bypass the proxy """ self.proxy_headers = proxy_headers """Proxy headers """ - self.proxy_ssl_context = proxy_ssl_context - """SSL context used only for the TLS handshake with the proxy itself - (e.g. an HTTPS CONNECT tunnel), independent of the destination TLS - settings above. - """ self.safe_chars_for_path_param = safe_chars_for_path_param """Safe chars for path_param """ @@ -390,16 +372,12 @@ def __init__( """date format """ - def __deepcopy__(self, memo: Dict[int, Any]) -> Self: + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: cls = self.__class__ result = cls.__new__(cls) memo[id(self)] = result for k, v in self.__dict__.items(): - if k == "proxy_ssl_context": - # ssl.SSLContext holds unpicklable C state and can't be deepcopied. - setattr(result, k, v) - continue - if k not in ("logger", "logger_file_handler"): + if k not in ('logger', 'logger_file_handler'): setattr(result, k, copy.deepcopy(v, memo)) # shallow copy of loggers result.logger = copy.copy(self.logger) @@ -531,9 +509,7 @@ def logger_format(self, value: str) -> None: self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format) - def get_api_key_with_prefix( - self, identifier: str, alias: Optional[str] = None - ) -> Optional[str]: + def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. @@ -542,14 +518,10 @@ def get_api_key_with_prefix( """ if self.refresh_api_key_hook is not None: self.refresh_api_key_hook(self) - key = self.api_key.get( - identifier, self.api_key.get(alias) if alias is not None else None - ) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) if key: prefix = self.api_key_prefix.get( - identifier, - self.api_key_prefix.get(alias) if alias is not None else None, - ) + identifier, self.api_key_prefix.get(alias) if alias is not None else None) if prefix: return "%s %s" % (prefix, key) else: @@ -569,23 +541,23 @@ def get_basic_auth_token(self) -> Optional[str]: if self.password is not None: password = self.password - return urllib3.util.make_headers(basic_auth=username + ":" + password).get( - "authorization" - ) + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') - def auth_settings(self) -> AuthSettings: + def auth_settings(self)-> AuthSettings: """Gets Auth Settings dict for api client. :return: The Auth Settings information dict. """ auth: AuthSettings = {} - if "Bearer" in self.api_key: - auth["Bearer"] = { - "type": "api_key", - "in": "header", - "key": "Authorization", - "value": self.get_api_key_with_prefix( - "Bearer", + if 'Bearer' in self.api_key: + auth['Bearer'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_api_key_with_prefix( + 'Bearer', ), } return auth @@ -595,13 +567,12 @@ def to_debug_report(self) -> str: :return: The report for debugging. """ - return ( - "Python SDK Debug Report:\n" - "OS: {env}\n" - "Python Version: {pyversion}\n" - "Version of the API: 1.0.0\n" - "SDK Package Version: 1.5.3".format(env=sys.platform, pyversion=sys.version) - ) + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.5.3".\ + format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: """Gets an array of host settings @@ -610,16 +581,16 @@ def get_host_settings(self) -> List[HostSetting]: """ return [ { - "url": "https://app.koyeb.com", - "description": "No description provided", + 'url': "https://app.koyeb.com", + 'description': "No description provided", } ] def get_host_from_settings( self, index: Optional[int], - variables: Optional[ServerVariablesT] = None, - servers: Optional[List[HostSetting]] = None, + 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 @@ -638,26 +609,23 @@ def get_host_from_settings( except IndexError: raise ValueError( "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers)) - ) + "Must be less than {1}".format(index, len(servers))) - url = server["url"] + url = server['url'] # go through variables and replace placeholders - for variable_name, variable in server.get("variables", {}).items(): - used_value = variables.get(variable_name, variable["default_value"]) - - if ( - "enum_values" in variable - and variable["enum_values"] - and used_value not in variable["enum_values"] - ): + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and variable['enum_values'] \ + and used_value not in variable['enum_values']: raise ValueError( "The variable `{0}` in the host URL has invalid value " "{1}. Must be {2}.".format( - variable_name, variables[variable_name], variable["enum_values"] - ) - ) + variable_name, variables[variable_name], + variable['enum_values'])) url = url.replace("{" + variable_name + "}", used_value) @@ -666,31 +634,10 @@ def get_host_from_settings( @property def host(self) -> str: """Return generated host.""" - return self.get_host_from_settings( - self.server_index, variables=self.server_variables - ) + return self.get_host_from_settings(self.server_index, variables=self.server_variables) @host.setter def host(self, value: str) -> None: """Fix base path.""" self._base_path = value self.server_index = None - if self._proxy_from_env: - # the scheme-specific proxy depends on the host, which is - # commonly assigned after construction - self._proxy = self._env_proxy(getproxies(), value) - - @staticmethod - def _env_proxy(proxies: Dict[str, str], host: str) -> Optional[str]: - """Pick the environment proxy that applies to `host`.""" - return proxies.get(urlparse(host).scheme) or proxies.get("all") - - @property - def proxy(self) -> Optional[str]: - """Proxy URL""" - return self._proxy - - @proxy.setter - def proxy(self, value: Optional[str]) -> None: - self._proxy = value - self._proxy_from_env = False diff --git a/koyeb/api/docs/PoolClaimsApi.md b/koyeb/api/docs/PoolClaimsApi.md index 0a71361d..1087dd8b 100644 --- a/koyeb/api/docs/PoolClaimsApi.md +++ b/koyeb/api/docs/PoolClaimsApi.md @@ -95,7 +95,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_claim** -> GetPoolClaimReply get_claim(claim_id) +> GetPoolClaimReply get_claim(claim_id, request_id=request_id) Get a claim @@ -131,10 +131,11 @@ with koyeb.api.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = koyeb.api.PoolClaimsApi(api_client) claim_id = 'claim_id_example' # str | + request_id = 'request_id_example' # str | (optional) try: # Get a claim - api_response = api_instance.get_claim(claim_id) + api_response = api_instance.get_claim(claim_id, request_id=request_id) print("The response of PoolClaimsApi->get_claim:\n") pprint(api_response) except Exception as e: @@ -149,6 +150,7 @@ with koyeb.api.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **claim_id** | **str**| | + **request_id** | **str**| | [optional] ### Return type diff --git a/koyeb/api/docs/ServicePoolsApi.md b/koyeb/api/docs/ServicePoolsApi.md index 4c94fb83..3b2f6675 100644 --- a/koyeb/api/docs/ServicePoolsApi.md +++ b/koyeb/api/docs/ServicePoolsApi.md @@ -5,6 +5,7 @@ All URIs are relative to *https://app.koyeb.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_service_pool**](ServicePoolsApi.md#create_service_pool) | **POST** /v1/service_pools | Create a ServicePool +[**delete_service_pool**](ServicePoolsApi.md#delete_service_pool) | **DELETE** /v1/service_pools/{id} | Delete a ServicePool [**get_service_pool**](ServicePoolsApi.md#get_service_pool) | **GET** /v1/service_pools/{id} | Get a ServicePool [**list_service_pools**](ServicePoolsApi.md#list_service_pools) | **GET** /v1/service_pools | List ServicePools [**update_service_pool**](ServicePoolsApi.md#update_service_pool) | **PUT** /v1/service_pools/{id} | @@ -95,6 +96,89 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **delete_service_pool** +> object delete_service_pool(id) + +Delete a ServicePool + +### Example + +* Api Key Authentication (Bearer): + +```python +import koyeb.api +from koyeb.api.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.koyeb.com +# See configuration.py for a list of all supported configuration parameters. +configuration = koyeb.api.Configuration( + host = "https://app.koyeb.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration.api_key['Bearer'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer'] = 'Bearer' + +# Enter a context with an instance of the API client +with koyeb.api.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = koyeb.api.ServicePoolsApi(api_client) + id = 'id_example' # str | + + try: + # Delete a ServicePool + api_response = api_instance.delete_service_pool(id) + print("The response of ServicePoolsApi->delete_service_pool:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ServicePoolsApi->delete_service_pool: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +**object** + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**400** | Validation error | - | +**401** | Returned when the token is not valid. | - | +**403** | Returned when the user does not have permission to access the resource. | - | +**404** | Returned when the resource does not exist. | - | +**500** | Returned in case of server error. | - | +**503** | Service is unavailable. | - | +**0** | An unexpected error response. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_service_pool** > GetServicePoolReply get_service_pool(id) diff --git a/koyeb/api/exceptions.py b/koyeb/api/exceptions.py index 5e517cf3..1caa226e 100644 --- a/koyeb/api/exceptions.py +++ b/koyeb/api/exceptions.py @@ -13,16 +13,14 @@ from typing import Any, Optional from typing_extensions import Self - class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" class ApiTypeError(OpenApiException, TypeError): - def __init__( - self, msg, path_to_item=None, valid_classes=None, key_type=None - ) -> None: - """Raises an exception for TypeErrors + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors Args: msg (str): the exception message @@ -103,10 +101,11 @@ def __init__(self, msg, path_to_item=None) -> None: class ApiException(OpenApiException): + def __init__( - self, - status=None, - reason=None, + self, + status=None, + reason=None, http_resp=None, *, body: Optional[str] = None, @@ -125,17 +124,17 @@ def __init__( self.reason = http_resp.reason if self.body is None: try: - self.body = http_resp.data.decode("utf-8") + self.body = http_resp.data.decode('utf-8') except Exception: pass self.headers = http_resp.headers @classmethod def from_response( - cls, - *, - http_resp, - body: Optional[str], + cls, + *, + http_resp, + body: Optional[str], data: Optional[Any], ) -> Self: if http_resp.status == 400: @@ -155,9 +154,7 @@ def from_response( 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 - ) + 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) @@ -165,9 +162,11 @@ def from_response( def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n" "Reason: {1}\n".format(self.status, self.reason) + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) if self.headers: - error_message += "HTTP response headers: {0}\n".format(self.headers) + error_message += "HTTP response headers: {0}\n".format( + self.headers) if self.body: error_message += "HTTP response body: {0}\n".format(self.body) @@ -200,13 +199,11 @@ class ServiceException(ApiException): class ConflictException(ApiException): """Exception for HTTP 409 Conflict.""" - pass class UnprocessableEntityException(ApiException): """Exception for HTTP 422 Unprocessable Entity.""" - pass diff --git a/koyeb/api/models/__init__.py b/koyeb/api/models/__init__.py index b1687382..9cc63b6f 100644 --- a/koyeb/api/models/__init__.py +++ b/koyeb/api/models/__init__.py @@ -13,9 +13,7 @@ """ # noqa: E501 # import models into model package -from koyeb.api.models.accept_organization_invitation_reply import ( - AcceptOrganizationInvitationReply, -) +from koyeb.api.models.accept_organization_invitation_reply import AcceptOrganizationInvitationReply from koyeb.api.models.action import Action from koyeb.api.models.activity import Activity from koyeb.api.models.activity_list import ActivityList @@ -34,9 +32,7 @@ from koyeb.api.models.autocomplete_reply import AutocompleteReply from koyeb.api.models.autocomplete_request import AutocompleteRequest from koyeb.api.models.availability_level import AvailabilityLevel -from koyeb.api.models.azure_container_registry_configuration import ( - AzureContainerRegistryConfiguration, -) +from koyeb.api.models.azure_container_registry_configuration import AzureContainerRegistryConfiguration from koyeb.api.models.basic_auth_policy import BasicAuthPolicy from koyeb.api.models.budget import Budget from koyeb.api.models.buildpack_builder import BuildpackBuilder @@ -46,14 +42,10 @@ from koyeb.api.models.catalog_instance_list_item import CatalogInstanceListItem from koyeb.api.models.catalog_usage import CatalogUsage from koyeb.api.models.check_coupon_reply import CheckCouponReply -from koyeb.api.models.clear_idenfy_verification_result_request import ( - ClearIdenfyVerificationResultRequest, -) +from koyeb.api.models.clear_idenfy_verification_result_request import ClearIdenfyVerificationResultRequest from koyeb.api.models.compose_reply import ComposeReply from koyeb.api.models.config_file import ConfigFile -from koyeb.api.models.confirm_payment_authorization_reply import ( - ConfirmPaymentAuthorizationReply, -) +from koyeb.api.models.confirm_payment_authorization_reply import ConfirmPaymentAuthorizationReply from koyeb.api.models.create_access_token_reply import CreateAccessTokenReply from koyeb.api.models.create_access_token_request import CreateAccessTokenRequest from koyeb.api.models.create_account_request import CreateAccountRequest @@ -68,24 +60,14 @@ from koyeb.api.models.create_domain import CreateDomain from koyeb.api.models.create_domain_reply import CreateDomainReply from koyeb.api.models.create_instance_snapshot_reply import CreateInstanceSnapshotReply -from koyeb.api.models.create_instance_snapshot_request import ( - CreateInstanceSnapshotRequest, -) -from koyeb.api.models.create_organization_invitation_reply import ( - CreateOrganizationInvitationReply, -) -from koyeb.api.models.create_organization_invitation_request import ( - CreateOrganizationInvitationRequest, -) +from koyeb.api.models.create_instance_snapshot_request import CreateInstanceSnapshotRequest +from koyeb.api.models.create_organization_invitation_reply import CreateOrganizationInvitationReply +from koyeb.api.models.create_organization_invitation_request import CreateOrganizationInvitationRequest from koyeb.api.models.create_organization_reply import CreateOrganizationReply from koyeb.api.models.create_organization_request import CreateOrganizationRequest -from koyeb.api.models.create_payment_authorization_reply import ( - CreatePaymentAuthorizationReply, -) +from koyeb.api.models.create_payment_authorization_reply import CreatePaymentAuthorizationReply from koyeb.api.models.create_persistent_volume_reply import CreatePersistentVolumeReply -from koyeb.api.models.create_persistent_volume_request import ( - CreatePersistentVolumeRequest, -) +from koyeb.api.models.create_persistent_volume_request import CreatePersistentVolumeRequest from koyeb.api.models.create_project import CreateProject from koyeb.api.models.create_project_reply import CreateProjectReply from koyeb.api.models.create_secret import CreateSecret @@ -106,14 +88,10 @@ from koyeb.api.models.database_usage_details import DatabaseUsageDetails from koyeb.api.models.datacenter_list_item import DatacenterListItem from koyeb.api.models.deactivate_organization_reply import DeactivateOrganizationReply -from koyeb.api.models.deactivate_organization_request import ( - DeactivateOrganizationRequest, -) +from koyeb.api.models.deactivate_organization_request import DeactivateOrganizationRequest from koyeb.api.models.declare_stage_progress_request import DeclareStageProgressRequest from koyeb.api.models.declare_step_progress_request import DeclareStepProgressRequest -from koyeb.api.models.decline_organization_invitation_reply import ( - DeclineOrganizationInvitationReply, -) +from koyeb.api.models.decline_organization_invitation_reply import DeclineOrganizationInvitationReply from koyeb.api.models.delete_instance_snapshot_reply import DeleteInstanceSnapshotReply from koyeb.api.models.delete_organization_reply import DeleteOrganizationReply from koyeb.api.models.delete_persistent_volume_reply import DeletePersistentVolumeReply @@ -130,65 +108,37 @@ from koyeb.api.models.deployment_list_item import DeploymentListItem from koyeb.api.models.deployment_mesh import DeploymentMesh from koyeb.api.models.deployment_metadata import DeploymentMetadata -from koyeb.api.models.deployment_neon_postgres_database_info import ( - DeploymentNeonPostgresDatabaseInfo, -) -from koyeb.api.models.deployment_neon_postgres_database_info_role import ( - DeploymentNeonPostgresDatabaseInfoRole, -) +from koyeb.api.models.deployment_neon_postgres_database_info import DeploymentNeonPostgresDatabaseInfo +from koyeb.api.models.deployment_neon_postgres_database_info_role import DeploymentNeonPostgresDatabaseInfoRole from koyeb.api.models.deployment_port import DeploymentPort from koyeb.api.models.deployment_provisioning_info import DeploymentProvisioningInfo -from koyeb.api.models.deployment_provisioning_info_stage import ( - DeploymentProvisioningInfoStage, -) -from koyeb.api.models.deployment_provisioning_info_stage_build_attempt import ( - DeploymentProvisioningInfoStageBuildAttempt, -) -from koyeb.api.models.deployment_provisioning_info_stage_build_attempt_build_step import ( - DeploymentProvisioningInfoStageBuildAttemptBuildStep, -) -from koyeb.api.models.deployment_provisioning_info_stage_status import ( - DeploymentProvisioningInfoStageStatus, -) +from koyeb.api.models.deployment_provisioning_info_stage import DeploymentProvisioningInfoStage +from koyeb.api.models.deployment_provisioning_info_stage_build_attempt import DeploymentProvisioningInfoStageBuildAttempt +from koyeb.api.models.deployment_provisioning_info_stage_build_attempt_build_step import DeploymentProvisioningInfoStageBuildAttemptBuildStep +from koyeb.api.models.deployment_provisioning_info_stage_status import DeploymentProvisioningInfoStageStatus from koyeb.api.models.deployment_proxy_port import DeploymentProxyPort from koyeb.api.models.deployment_proxy_port_metadata import DeploymentProxyPortMetadata from koyeb.api.models.deployment_role import DeploymentRole from koyeb.api.models.deployment_route import DeploymentRoute from koyeb.api.models.deployment_scaling import DeploymentScaling from koyeb.api.models.deployment_scaling_target import DeploymentScalingTarget -from koyeb.api.models.deployment_scaling_target_average_cpu import ( - DeploymentScalingTargetAverageCPU, -) -from koyeb.api.models.deployment_scaling_target_average_mem import ( - DeploymentScalingTargetAverageMem, -) -from koyeb.api.models.deployment_scaling_target_concurrent_requests import ( - DeploymentScalingTargetConcurrentRequests, -) -from koyeb.api.models.deployment_scaling_target_requests_per_second import ( - DeploymentScalingTargetRequestsPerSecond, -) -from koyeb.api.models.deployment_scaling_target_requests_response_time import ( - DeploymentScalingTargetRequestsResponseTime, -) -from koyeb.api.models.deployment_scaling_target_sleep_idle_delay import ( - DeploymentScalingTargetSleepIdleDelay, -) +from koyeb.api.models.deployment_scaling_target_average_cpu import DeploymentScalingTargetAverageCPU +from koyeb.api.models.deployment_scaling_target_average_mem import DeploymentScalingTargetAverageMem +from koyeb.api.models.deployment_scaling_target_concurrent_requests import DeploymentScalingTargetConcurrentRequests +from koyeb.api.models.deployment_scaling_target_requests_per_second import DeploymentScalingTargetRequestsPerSecond +from koyeb.api.models.deployment_scaling_target_requests_response_time import DeploymentScalingTargetRequestsResponseTime +from koyeb.api.models.deployment_scaling_target_sleep_idle_delay import DeploymentScalingTargetSleepIdleDelay from koyeb.api.models.deployment_status import DeploymentStatus from koyeb.api.models.deployment_strategy import DeploymentStrategy from koyeb.api.models.deployment_strategy_type import DeploymentStrategyType from koyeb.api.models.deployment_volume import DeploymentVolume from koyeb.api.models.desired_deployment import DesiredDeployment from koyeb.api.models.desired_deployment_group import DesiredDeploymentGroup -from koyeb.api.models.digital_ocean_registry_configuration import ( - DigitalOceanRegistryConfiguration, -) +from koyeb.api.models.digital_ocean_registry_configuration import DigitalOceanRegistryConfiguration from koyeb.api.models.discourse_auth_reply import DiscourseAuthReply from koyeb.api.models.discourse_auth_request import DiscourseAuthRequest from koyeb.api.models.docker_builder import DockerBuilder -from koyeb.api.models.docker_hub_registry_configuration import ( - DockerHubRegistryConfiguration, -) +from koyeb.api.models.docker_hub_registry_configuration import DockerHubRegistryConfiguration from koyeb.api.models.docker_source import DockerSource from koyeb.api.models.domain import Domain from koyeb.api.models.domain_load_balancer_koyeb import DomainLoadBalancerKoyeb @@ -206,21 +156,15 @@ from koyeb.api.models.exec_command_reply import ExecCommandReply from koyeb.api.models.exec_command_request_body import ExecCommandRequestBody from koyeb.api.models.exec_command_request_id_type import ExecCommandRequestIdType -from koyeb.api.models.exec_command_request_terminal_size import ( - ExecCommandRequestTerminalSize, -) -from koyeb.api.models.gcp_container_registry_configuration import ( - GCPContainerRegistryConfiguration, -) +from koyeb.api.models.exec_command_request_terminal_size import ExecCommandRequestTerminalSize +from koyeb.api.models.gcp_container_registry_configuration import GCPContainerRegistryConfiguration from koyeb.api.models.get_app_reply import GetAppReply from koyeb.api.models.get_budget_reply import GetBudgetReply from koyeb.api.models.get_catalog_instance_reply import GetCatalogInstanceReply from koyeb.api.models.get_credential_reply import GetCredentialReply from koyeb.api.models.get_deployment_reply import GetDeploymentReply from koyeb.api.models.get_deployment_scaling_reply import GetDeploymentScalingReply -from koyeb.api.models.get_deployment_scaling_reply_item import ( - GetDeploymentScalingReplyItem, -) +from koyeb.api.models.get_deployment_scaling_reply_item import GetDeploymentScalingReplyItem from koyeb.api.models.get_domain_reply import GetDomainReply from koyeb.api.models.get_github_installation_reply import GetGithubInstallationReply from koyeb.api.models.get_idenfy_token_reply import GetIdenfyTokenReply @@ -230,17 +174,11 @@ from koyeb.api.models.get_metrics_reply import GetMetricsReply from koyeb.api.models.get_metrics_reply_metric import GetMetricsReplyMetric from koyeb.api.models.get_o_auth_options_reply import GetOAuthOptionsReply -from koyeb.api.models.get_organization_invitation_reply import ( - GetOrganizationInvitationReply, -) -from koyeb.api.models.get_organization_quotas_usage_reply import ( - GetOrganizationQuotasUsageReply, -) +from koyeb.api.models.get_organization_invitation_reply import GetOrganizationInvitationReply +from koyeb.api.models.get_organization_quotas_usage_reply import GetOrganizationQuotasUsageReply from koyeb.api.models.get_organization_reply import GetOrganizationReply from koyeb.api.models.get_organization_summary_reply import GetOrganizationSummaryReply -from koyeb.api.models.get_organization_usage_details_reply import ( - GetOrganizationUsageDetailsReply, -) +from koyeb.api.models.get_organization_usage_details_reply import GetOrganizationUsageDetailsReply from koyeb.api.models.get_organization_usage_reply import GetOrganizationUsageReply from koyeb.api.models.get_payment_method_reply import GetPaymentMethodReply from koyeb.api.models.get_persistent_volume_reply import GetPersistentVolumeReply @@ -255,9 +193,7 @@ from koyeb.api.models.get_service_scaling_reply import GetServiceScalingReply from koyeb.api.models.get_snapshot_reply import GetSnapshotReply from koyeb.api.models.get_subscription_reply import GetSubscriptionReply -from koyeb.api.models.get_user_organization_invitation_reply import ( - GetUserOrganizationInvitationReply, -) +from koyeb.api.models.get_user_organization_invitation_reply import GetUserOrganizationInvitationReply from koyeb.api.models.get_user_settings_reply import GetUserSettingsReply from koyeb.api.models.git_deployment_metadata import GitDeploymentMetadata from koyeb.api.models.git_env_deployment_metadata import GitEnvDeploymentMetadata @@ -289,14 +225,10 @@ from koyeb.api.models.invite_user_request import InviteUserRequest from koyeb.api.models.kgitproxy_branch import KgitproxyBranch from koyeb.api.models.kgitproxy_git_hub_repository import KgitproxyGitHubRepository -from koyeb.api.models.kgitproxy_github_installation_status import ( - KgitproxyGithubInstallationStatus, -) +from koyeb.api.models.kgitproxy_github_installation_status import KgitproxyGithubInstallationStatus from koyeb.api.models.kgitproxy_indexing_status import KgitproxyIndexingStatus from koyeb.api.models.kgitproxy_list_branches_reply import KgitproxyListBranchesReply -from koyeb.api.models.kgitproxy_list_repositories_reply import ( - KgitproxyListRepositoriesReply, -) +from koyeb.api.models.kgitproxy_list_repositories_reply import KgitproxyListRepositoriesReply from koyeb.api.models.kgitproxy_repository import KgitproxyRepository from koyeb.api.models.kgitproxy_repository_provider import KgitproxyRepositoryProvider from koyeb.api.models.ksearch_app import KsearchApp @@ -319,30 +251,18 @@ from koyeb.api.models.list_deployments_reply import ListDeploymentsReply from koyeb.api.models.list_domains_reply import ListDomainsReply from koyeb.api.models.list_instance_events_reply import ListInstanceEventsReply -from koyeb.api.models.list_instance_snapshot_events_reply import ( - ListInstanceSnapshotEventsReply, -) +from koyeb.api.models.list_instance_snapshot_events_reply import ListInstanceSnapshotEventsReply from koyeb.api.models.list_instance_snapshots_reply import ListInstanceSnapshotsReply from koyeb.api.models.list_instances_reply import ListInstancesReply -from koyeb.api.models.list_organization_invitations_reply import ( - ListOrganizationInvitationsReply, -) -from koyeb.api.models.list_organization_members_reply import ( - ListOrganizationMembersReply, -) +from koyeb.api.models.list_organization_invitations_reply import ListOrganizationInvitationsReply +from koyeb.api.models.list_organization_members_reply import ListOrganizationMembersReply from koyeb.api.models.list_payment_methods_reply import ListPaymentMethodsReply -from koyeb.api.models.list_persistent_volume_events_reply import ( - ListPersistentVolumeEventsReply, -) +from koyeb.api.models.list_persistent_volume_events_reply import ListPersistentVolumeEventsReply from koyeb.api.models.list_persistent_volumes_reply import ListPersistentVolumesReply from koyeb.api.models.list_pool_claim_reply import ListPoolClaimReply from koyeb.api.models.list_projects_reply import ListProjectsReply -from koyeb.api.models.list_regional_deployment_events_reply import ( - ListRegionalDeploymentEventsReply, -) -from koyeb.api.models.list_regional_deployments_reply import ( - ListRegionalDeploymentsReply, -) +from koyeb.api.models.list_regional_deployment_events_reply import ListRegionalDeploymentEventsReply +from koyeb.api.models.list_regional_deployments_reply import ListRegionalDeploymentsReply from koyeb.api.models.list_regions_reply import ListRegionsReply from koyeb.api.models.list_secrets_reply import ListSecretsReply from koyeb.api.models.list_service_events_reply import ListServiceEventsReply @@ -350,9 +270,7 @@ from koyeb.api.models.list_services_reply import ListServicesReply from koyeb.api.models.list_snapshots_reply import ListSnapshotsReply from koyeb.api.models.list_usage_reply import ListUsageReply -from koyeb.api.models.list_user_organization_invitations_reply import ( - ListUserOrganizationInvitationsReply, -) +from koyeb.api.models.list_user_organization_invitations_reply import ListUserOrganizationInvitationsReply from koyeb.api.models.list_user_organizations_reply import ListUserOrganizationsReply from koyeb.api.models.log_entry import LogEntry from koyeb.api.models.login_method_reply import LoginMethodReply @@ -366,23 +284,15 @@ from koyeb.api.models.mesh_scope import MeshScope from koyeb.api.models.metric_name import MetricName from koyeb.api.models.neon_postgres_database import NeonPostgresDatabase -from koyeb.api.models.neon_postgres_database_deployment_metadata import ( - NeonPostgresDatabaseDeploymentMetadata, -) -from koyeb.api.models.neon_postgres_database_neon_database import ( - NeonPostgresDatabaseNeonDatabase, -) -from koyeb.api.models.neon_postgres_database_neon_role import ( - NeonPostgresDatabaseNeonRole, -) +from koyeb.api.models.neon_postgres_database_deployment_metadata import NeonPostgresDatabaseDeploymentMetadata +from koyeb.api.models.neon_postgres_database_neon_database import NeonPostgresDatabaseNeonDatabase +from koyeb.api.models.neon_postgres_database_neon_role import NeonPostgresDatabaseNeonRole from koyeb.api.models.neon_postgres_summary import NeonPostgresSummary from koyeb.api.models.network_policy import NetworkPolicy from koyeb.api.models.network_policy_destination import NetworkPolicyDestination from koyeb.api.models.next_invoice_reply import NextInvoiceReply from koyeb.api.models.next_invoice_reply_discount import NextInvoiceReplyDiscount -from koyeb.api.models.next_invoice_reply_discount_type import ( - NextInvoiceReplyDiscountType, -) +from koyeb.api.models.next_invoice_reply_discount_type import NextInvoiceReplyDiscountType from koyeb.api.models.next_invoice_reply_line import NextInvoiceReplyLine from koyeb.api.models.next_invoice_reply_line_period import NextInvoiceReplyLinePeriod from koyeb.api.models.next_invoice_reply_line_price import NextInvoiceReplyLinePrice @@ -393,9 +303,7 @@ from koyeb.api.models.o_auth_provider import OAuthProvider from koyeb.api.models.object import Object from koyeb.api.models.organization import Organization -from koyeb.api.models.organization_deactivation_reason import ( - OrganizationDeactivationReason, -) +from koyeb.api.models.organization_deactivation_reason import OrganizationDeactivationReason from koyeb.api.models.organization_detailed_status import OrganizationDetailedStatus from koyeb.api.models.organization_invitation import OrganizationInvitation from koyeb.api.models.organization_invitation_status import OrganizationInvitationStatus @@ -407,9 +315,7 @@ from koyeb.api.models.payment_method_status import PaymentMethodStatus from koyeb.api.models.period_usage import PeriodUsage from koyeb.api.models.persistent_volume import PersistentVolume -from koyeb.api.models.persistent_volume_backing_store import ( - PersistentVolumeBackingStore, -) +from koyeb.api.models.persistent_volume_backing_store import PersistentVolumeBackingStore from koyeb.api.models.persistent_volume_event import PersistentVolumeEvent from koyeb.api.models.persistent_volume_quotas import PersistentVolumeQuotas from koyeb.api.models.persistent_volume_region_usage import PersistentVolumeRegionUsage @@ -439,29 +345,19 @@ from koyeb.api.models.region_usage import RegionUsage from koyeb.api.models.regional_deployment import RegionalDeployment from koyeb.api.models.regional_deployment_definition import RegionalDeploymentDefinition -from koyeb.api.models.regional_deployment_definition_type import ( - RegionalDeploymentDefinitionType, -) +from koyeb.api.models.regional_deployment_definition_type import RegionalDeploymentDefinitionType from koyeb.api.models.regional_deployment_event import RegionalDeploymentEvent from koyeb.api.models.regional_deployment_list_item import RegionalDeploymentListItem from koyeb.api.models.regional_deployment_mesh import RegionalDeploymentMesh from koyeb.api.models.regional_deployment_role import RegionalDeploymentRole from koyeb.api.models.regional_deployment_status import RegionalDeploymentStatus from koyeb.api.models.regional_deployment_volume import RegionalDeploymentVolume -from koyeb.api.models.remove_organization_member_reply import ( - RemoveOrganizationMemberReply, -) -from koyeb.api.models.resend_organization_invitation_reply import ( - ResendOrganizationInvitationReply, -) +from koyeb.api.models.remove_organization_member_reply import RemoveOrganizationMemberReply +from koyeb.api.models.resend_organization_invitation_reply import ResendOrganizationInvitationReply from koyeb.api.models.reset_password_request import ResetPasswordRequest from koyeb.api.models.reveal_secret_reply import RevealSecretReply -from koyeb.api.models.review_organization_capacity_reply import ( - ReviewOrganizationCapacityReply, -) -from koyeb.api.models.review_organization_capacity_request import ( - ReviewOrganizationCapacityRequest, -) +from koyeb.api.models.review_organization_capacity_reply import ReviewOrganizationCapacityReply +from koyeb.api.models.review_organization_capacity_request import ReviewOrganizationCapacityRequest from koyeb.api.models.route import Route from koyeb.api.models.sample import Sample from koyeb.api.models.sandbox_metadata import SandboxMetadata @@ -485,31 +381,19 @@ from koyeb.api.models.snapshot import Snapshot from koyeb.api.models.snapshot_status import SnapshotStatus from koyeb.api.models.snapshot_type import SnapshotType -from koyeb.api.models.stream_result_of_exec_command_reply import ( - StreamResultOfExecCommandReply, -) +from koyeb.api.models.stream_result_of_exec_command_reply import StreamResultOfExecCommandReply from koyeb.api.models.stream_result_of_log_entry import StreamResultOfLogEntry from koyeb.api.models.subscription import Subscription from koyeb.api.models.subscription_payment_failure import SubscriptionPaymentFailure -from koyeb.api.models.subscription_payment_failure_stripe_sdk import ( - SubscriptionPaymentFailureStripeSDK, -) +from koyeb.api.models.subscription_payment_failure_stripe_sdk import SubscriptionPaymentFailureStripeSDK from koyeb.api.models.subscription_status import SubscriptionStatus from koyeb.api.models.tcp_health_check import TCPHealthCheck from koyeb.api.models.token import Token from koyeb.api.models.trigger_deployment_metadata import TriggerDeploymentMetadata -from koyeb.api.models.trigger_deployment_metadata_actor_type import ( - TriggerDeploymentMetadataActorType, -) -from koyeb.api.models.trigger_deployment_metadata_trigger_type import ( - TriggerDeploymentMetadataTriggerType, -) -from koyeb.api.models.trigger_git_deployment_metadata import ( - TriggerGitDeploymentMetadata, -) -from koyeb.api.models.trigger_git_deployment_metadata_provider import ( - TriggerGitDeploymentMetadataProvider, -) +from koyeb.api.models.trigger_deployment_metadata_actor_type import TriggerDeploymentMetadataActorType +from koyeb.api.models.trigger_deployment_metadata_trigger_type import TriggerDeploymentMetadataTriggerType +from koyeb.api.models.trigger_git_deployment_metadata import TriggerGitDeploymentMetadata +from koyeb.api.models.trigger_git_deployment_metadata_provider import TriggerGitDeploymentMetadataProvider from koyeb.api.models.update_app import UpdateApp from koyeb.api.models.update_app_reply import UpdateAppReply from koyeb.api.models.update_budget_reply import UpdateBudgetReply @@ -517,26 +401,16 @@ from koyeb.api.models.update_credential_reply import UpdateCredentialReply from koyeb.api.models.update_domain import UpdateDomain from koyeb.api.models.update_domain_reply import UpdateDomainReply -from koyeb.api.models.update_organization_default_project_reply import ( - UpdateOrganizationDefaultProjectReply, -) -from koyeb.api.models.update_organization_default_project_request import ( - UpdateOrganizationDefaultProjectRequest, -) +from koyeb.api.models.update_organization_default_project_reply import UpdateOrganizationDefaultProjectReply +from koyeb.api.models.update_organization_default_project_request import UpdateOrganizationDefaultProjectRequest from koyeb.api.models.update_organization_name_reply import UpdateOrganizationNameReply -from koyeb.api.models.update_organization_name_request import ( - UpdateOrganizationNameRequest, -) +from koyeb.api.models.update_organization_name_request import UpdateOrganizationNameRequest from koyeb.api.models.update_organization_plan_reply import UpdateOrganizationPlanReply -from koyeb.api.models.update_organization_plan_request import ( - UpdateOrganizationPlanRequest, -) +from koyeb.api.models.update_organization_plan_request import UpdateOrganizationPlanRequest from koyeb.api.models.update_organization_reply import UpdateOrganizationReply from koyeb.api.models.update_password_request import UpdatePasswordRequest from koyeb.api.models.update_persistent_volume_reply import UpdatePersistentVolumeReply -from koyeb.api.models.update_persistent_volume_request import ( - UpdatePersistentVolumeRequest, -) +from koyeb.api.models.update_persistent_volume_request import UpdatePersistentVolumeRequest from koyeb.api.models.update_project_reply import UpdateProjectReply from koyeb.api.models.update_secret_reply import UpdateSecretReply from koyeb.api.models.update_service import UpdateService @@ -546,17 +420,11 @@ from koyeb.api.models.update_service_scaling_request import UpdateServiceScalingRequest from koyeb.api.models.update_snapshot_reply import UpdateSnapshotReply from koyeb.api.models.update_snapshot_request import UpdateSnapshotRequest -from koyeb.api.models.update_user_request_user_update_body import ( - UpdateUserRequestUserUpdateBody, -) +from koyeb.api.models.update_user_request_user_update_body import UpdateUserRequestUserUpdateBody from koyeb.api.models.update_user_settings_reply import UpdateUserSettingsReply from koyeb.api.models.update_user_settings_request import UpdateUserSettingsRequest -from koyeb.api.models.upsert_signup_qualification_reply import ( - UpsertSignupQualificationReply, -) -from koyeb.api.models.upsert_signup_qualification_request import ( - UpsertSignupQualificationRequest, -) +from koyeb.api.models.upsert_signup_qualification_reply import UpsertSignupQualificationReply +from koyeb.api.models.upsert_signup_qualification_request import UpsertSignupQualificationRequest from koyeb.api.models.usage import Usage from koyeb.api.models.usage_details import UsageDetails from koyeb.api.models.user import User @@ -565,6 +433,5 @@ from koyeb.api.models.user_role_role import UserRoleRole from koyeb.api.models.user_settings import UserSettings from koyeb.api.models.verify_docker_image_reply import VerifyDockerImageReply -from koyeb.api.models.verify_docker_image_reply_err_code import ( - VerifyDockerImageReplyErrCode, -) +from koyeb.api.models.verify_docker_image_reply_err_code import VerifyDockerImageReplyErrCode + diff --git a/koyeb/api/models/accept_organization_invitation_reply.py b/koyeb/api/models/accept_organization_invitation_reply.py index 753f68b4..b56cc686 100644 --- a/koyeb/api/models/accept_organization_invitation_reply.py +++ b/koyeb/api/models/accept_organization_invitation_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AcceptOrganizationInvitationReply(BaseModel): """ AcceptOrganizationInvitationReply - """ # noqa: E501 - + """ # noqa: E501 invitation: Optional[OrganizationInvitation] = None __properties: ClassVar[List[str]] = ["invitation"] @@ -40,6 +38,7 @@ class AcceptOrganizationInvitationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of invitation if self.invitation: - _dict["invitation"] = self.invitation.to_dict() + _dict['invitation'] = self.invitation.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "invitation": OrganizationInvitation.from_dict(obj["invitation"]) - if obj.get("invitation") is not None - else None - } - ) + _obj = cls.model_validate({ + "invitation": OrganizationInvitation.from_dict(obj["invitation"]) if obj.get("invitation") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/action.py b/koyeb/api/models/action.py index 56c31901..2c83db3f 100644 --- a/koyeb/api/models/action.py +++ b/koyeb/api/models/action.py @@ -26,11 +26,13 @@ class Action(str, Enum): """ allowed enum values """ - SIGNIN = "signin" - SIGNUP = "signup" - REGISTER = "register" + SIGNIN = 'signin' + SIGNUP = 'signup' + REGISTER = 'register' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of Action from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/activity.py b/koyeb/api/models/activity.py index 498526b6..310d123c 100644 --- a/koyeb/api/models/activity.py +++ b/koyeb/api/models/activity.py @@ -25,26 +25,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Activity(BaseModel): """ Activity - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None actor: Optional[Object] = None object: Optional[Object] = None verb: Optional[StrictStr] = None metadata: Optional[Dict[str, Any]] = None created_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = [ - "id", - "actor", - "object", - "verb", - "metadata", - "created_at", - ] + __properties: ClassVar[List[str]] = ["id", "actor", "object", "verb", "metadata", "created_at"] model_config = ConfigDict( validate_by_name=True, @@ -53,6 +44,7 @@ class Activity(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -76,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -85,10 +78,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of actor if self.actor: - _dict["actor"] = self.actor.to_dict() + _dict['actor'] = self.actor.to_dict() # override the default output from pydantic by calling `to_dict()` of object if self.object: - _dict["object"] = self.object.to_dict() + _dict['object'] = self.object.to_dict() return _dict @classmethod @@ -100,18 +93,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "actor": Object.from_dict(obj["actor"]) - if obj.get("actor") is not None - else None, - "object": Object.from_dict(obj["object"]) - if obj.get("object") is not None - else None, - "verb": obj.get("verb"), - "metadata": obj.get("metadata"), - "created_at": obj.get("created_at"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "actor": Object.from_dict(obj["actor"]) if obj.get("actor") is not None else None, + "object": Object.from_dict(obj["object"]) if obj.get("object") is not None else None, + "verb": obj.get("verb"), + "metadata": obj.get("metadata"), + "created_at": obj.get("created_at") + }) return _obj + + diff --git a/koyeb/api/models/activity_list.py b/koyeb/api/models/activity_list.py index e2c14126..d2b756cd 100644 --- a/koyeb/api/models/activity_list.py +++ b/koyeb/api/models/activity_list.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ActivityList(BaseModel): """ ActivityList - """ # noqa: E501 - + """ # noqa: E501 activities: Optional[List[Activity]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ActivityList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.activities: for _item_activities in self.activities: - _items.append( - _item_activities.to_dict() if _item_activities is not None else None - ) - _dict["activities"] = _items + if _item_activities: + _items.append(_item_activities.to_dict()) + _dict['activities'] = _items return _dict @classmethod @@ -92,14 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "activities": [Activity.from_dict(_item) for _item in obj["activities"]] - if obj.get("activities") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "activities": [Activity.from_dict(_item) for _item in obj["activities"]] if obj.get("activities") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api/models/app.py b/koyeb/api/models/app.py index 27784a79..030cfc24 100644 --- a/koyeb/api/models/app.py +++ b/koyeb/api/models/app.py @@ -27,12 +27,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class App(BaseModel): """ App - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None @@ -48,23 +46,7 @@ class App(BaseModel): version: Optional[StrictStr] = None domains: Optional[List[Domain]] = None life_cycle: Optional[AppLifeCycle] = None - __properties: ClassVar[List[str]] = [ - "id", - "name", - "organization_id", - "created_at", - "updated_at", - "started_at", - "succeeded_at", - "paused_at", - "resumed_at", - "terminated_at", - "status", - "messages", - "version", - "domains", - "life_cycle", - ] + __properties: ClassVar[List[str]] = ["id", "name", "organization_id", "created_at", "updated_at", "started_at", "succeeded_at", "paused_at", "resumed_at", "terminated_at", "status", "messages", "version", "domains", "life_cycle"] model_config = ConfigDict( validate_by_name=True, @@ -73,6 +55,7 @@ class App(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -96,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -107,13 +91,12 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.domains: for _item_domains in self.domains: - _items.append( - _item_domains.to_dict() if _item_domains is not None else None - ) - _dict["domains"] = _items + if _item_domains: + _items.append(_item_domains.to_dict()) + _dict['domains'] = _items # override the default output from pydantic by calling `to_dict()` of life_cycle if self.life_cycle: - _dict["life_cycle"] = self.life_cycle.to_dict() + _dict['life_cycle'] = self.life_cycle.to_dict() return _dict @classmethod @@ -125,29 +108,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "organization_id": obj.get("organization_id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "started_at": obj.get("started_at"), - "succeeded_at": obj.get("succeeded_at"), - "paused_at": obj.get("paused_at"), - "resumed_at": obj.get("resumed_at"), - "terminated_at": obj.get("terminated_at"), - "status": obj.get("status") - if obj.get("status") is not None - else AppStatus.STARTING, - "messages": obj.get("messages"), - "version": obj.get("version"), - "domains": [Domain.from_dict(_item) for _item in obj["domains"]] - if obj.get("domains") is not None - else None, - "life_cycle": AppLifeCycle.from_dict(obj["life_cycle"]) - if obj.get("life_cycle") is not None - else None, - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "organization_id": obj.get("organization_id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "started_at": obj.get("started_at"), + "succeeded_at": obj.get("succeeded_at"), + "paused_at": obj.get("paused_at"), + "resumed_at": obj.get("resumed_at"), + "terminated_at": obj.get("terminated_at"), + "status": obj.get("status") if obj.get("status") is not None else AppStatus.STARTING, + "messages": obj.get("messages"), + "version": obj.get("version"), + "domains": [Domain.from_dict(_item) for _item in obj["domains"]] if obj.get("domains") is not None else None, + "life_cycle": AppLifeCycle.from_dict(obj["life_cycle"]) if obj.get("life_cycle") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/app_event.py b/koyeb/api/models/app_event.py index 23a6b3cc..3337861a 100644 --- a/koyeb/api/models/app_event.py +++ b/koyeb/api/models/app_event.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AppEvent(BaseModel): """ AppEvent - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None when: Optional[datetime] = None organization_id: Optional[StrictStr] = None @@ -37,15 +35,7 @@ class AppEvent(BaseModel): type: Optional[StrictStr] = None message: Optional[StrictStr] = None metadata: Optional[Dict[str, Any]] = None - __properties: ClassVar[List[str]] = [ - "id", - "when", - "organization_id", - "app_id", - "type", - "message", - "metadata", - ] + __properties: ClassVar[List[str]] = ["id", "when", "organization_id", "app_id", "type", "message", "metadata"] model_config = ConfigDict( validate_by_name=True, @@ -54,6 +44,7 @@ class AppEvent(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -95,15 +87,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "when": obj.get("when"), - "organization_id": obj.get("organization_id"), - "app_id": obj.get("app_id"), - "type": obj.get("type"), - "message": obj.get("message"), - "metadata": obj.get("metadata"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "when": obj.get("when"), + "organization_id": obj.get("organization_id"), + "app_id": obj.get("app_id"), + "type": obj.get("type"), + "message": obj.get("message"), + "metadata": obj.get("metadata") + }) return _obj + + diff --git a/koyeb/api/models/app_life_cycle.py b/koyeb/api/models/app_life_cycle.py index b6610fa4..f5a8b149 100644 --- a/koyeb/api/models/app_life_cycle.py +++ b/koyeb/api/models/app_life_cycle.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AppLifeCycle(BaseModel): """ AppLifeCycle - """ # noqa: E501 - + """ # noqa: E501 delete_when_empty: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["delete_when_empty"] @@ -39,6 +37,7 @@ class AppLifeCycle(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"delete_when_empty": obj.get("delete_when_empty")}) + _obj = cls.model_validate({ + "delete_when_empty": obj.get("delete_when_empty") + }) return _obj + + diff --git a/koyeb/api/models/app_list_item.py b/koyeb/api/models/app_list_item.py index 5299d0c0..79157da0 100644 --- a/koyeb/api/models/app_list_item.py +++ b/koyeb/api/models/app_list_item.py @@ -26,12 +26,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AppListItem(BaseModel): """ AppListItem - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None @@ -40,16 +38,7 @@ class AppListItem(BaseModel): domains: Optional[List[Domain]] = None status: Optional[AppStatus] = AppStatus.STARTING messages: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = [ - "id", - "name", - "organization_id", - "updated_at", - "created_at", - "domains", - "status", - "messages", - ] + __properties: ClassVar[List[str]] = ["id", "name", "organization_id", "updated_at", "created_at", "domains", "status", "messages"] model_config = ConfigDict( validate_by_name=True, @@ -58,6 +47,7 @@ class AppListItem(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -81,7 +71,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -92,10 +83,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.domains: for _item_domains in self.domains: - _items.append( - _item_domains.to_dict() if _item_domains is not None else None - ) - _dict["domains"] = _items + if _item_domains: + _items.append(_item_domains.to_dict()) + _dict['domains'] = _items return _dict @classmethod @@ -107,20 +97,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "organization_id": obj.get("organization_id"), - "updated_at": obj.get("updated_at"), - "created_at": obj.get("created_at"), - "domains": [Domain.from_dict(_item) for _item in obj["domains"]] - if obj.get("domains") is not None - else None, - "status": obj.get("status") - if obj.get("status") is not None - else AppStatus.STARTING, - "messages": obj.get("messages"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "organization_id": obj.get("organization_id"), + "updated_at": obj.get("updated_at"), + "created_at": obj.get("created_at"), + "domains": [Domain.from_dict(_item) for _item in obj["domains"]] if obj.get("domains") is not None else None, + "status": obj.get("status") if obj.get("status") is not None else AppStatus.STARTING, + "messages": obj.get("messages") + }) return _obj + + diff --git a/koyeb/api/models/app_status.py b/koyeb/api/models/app_status.py index 73660fd3..3135ab25 100644 --- a/koyeb/api/models/app_status.py +++ b/koyeb/api/models/app_status.py @@ -26,17 +26,19 @@ class AppStatus(str, Enum): """ allowed enum values """ - STARTING = "STARTING" - HEALTHY = "HEALTHY" - DEGRADED = "DEGRADED" - UNHEALTHY = "UNHEALTHY" - DELETING = "DELETING" - DELETED = "DELETED" - PAUSING = "PAUSING" - PAUSED = "PAUSED" - RESUMING = "RESUMING" + STARTING = 'STARTING' + HEALTHY = 'HEALTHY' + DEGRADED = 'DEGRADED' + UNHEALTHY = 'UNHEALTHY' + DELETING = 'DELETING' + DELETED = 'DELETED' + PAUSING = 'PAUSING' + PAUSED = 'PAUSED' + RESUMING = 'RESUMING' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of AppStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/app_usage.py b/koyeb/api/models/app_usage.py index 0df87e48..3850b283 100644 --- a/koyeb/api/models/app_usage.py +++ b/koyeb/api/models/app_usage.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AppUsage(BaseModel): """ AppUsage - """ # noqa: E501 - + """ # noqa: E501 app_id: Optional[StrictStr] = None app_name: Optional[StrictStr] = None services: Optional[List[ServiceUsage]] = None @@ -44,6 +42,7 @@ class AppUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -78,18 +78,16 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.services: for _item_services in self.services: - _items.append( - _item_services.to_dict() if _item_services is not None else None - ) - _dict["services"] = _items + if _item_services: + _items.append(_item_services.to_dict()) + _dict['services'] = _items # override the default output from pydantic by calling `to_dict()` of each item in databases (list) _items = [] if self.databases: for _item_databases in self.databases: - _items.append( - _item_databases.to_dict() if _item_databases is not None else None - ) - _dict["databases"] = _items + if _item_databases: + _items.append(_item_databases.to_dict()) + _dict['databases'] = _items return _dict @classmethod @@ -101,18 +99,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "app_id": obj.get("app_id"), - "app_name": obj.get("app_name"), - "services": [ServiceUsage.from_dict(_item) for _item in obj["services"]] - if obj.get("services") is not None - else None, - "databases": [ - DatabaseUsage.from_dict(_item) for _item in obj["databases"] - ] - if obj.get("databases") is not None - else None, - } - ) + _obj = cls.model_validate({ + "app_id": obj.get("app_id"), + "app_name": obj.get("app_name"), + "services": [ServiceUsage.from_dict(_item) for _item in obj["services"]] if obj.get("services") is not None else None, + "databases": [DatabaseUsage.from_dict(_item) for _item in obj["databases"]] if obj.get("databases") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/apps_summary.py b/koyeb/api/models/apps_summary.py index 86f1abe0..711af28f 100644 --- a/koyeb/api/models/apps_summary.py +++ b/koyeb/api/models/apps_summary.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AppsSummary(BaseModel): """ AppsSummary - """ # noqa: E501 - + """ # noqa: E501 total: Optional[StrictStr] = None by_status: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["total", "by_status"] @@ -40,6 +38,7 @@ class AppsSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"total": obj.get("total"), "by_status": obj.get("by_status")} - ) + _obj = cls.model_validate({ + "total": obj.get("total"), + "by_status": obj.get("by_status") + }) return _obj + + diff --git a/koyeb/api/models/archive.py b/koyeb/api/models/archive.py index 098f9484..0ff4272d 100644 --- a/koyeb/api/models/archive.py +++ b/koyeb/api/models/archive.py @@ -24,41 +24,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Archive(BaseModel): """ Archive - """ # noqa: E501 - - id: Optional[StrictStr] = Field( - default=None, - description="The archive id, that can be referenced when creating or updating a service.", - ) - organization_id: Optional[StrictStr] = Field( - default=None, description="Organization owning the archive." - ) - upload_url: Optional[StrictStr] = Field( - default=None, - description="The URL where to upload the archive. This URL is signed and can only be used to upload the archive until `valid_until`.", - ) - size: Optional[StrictStr] = Field( - default=None, description="The provisioned space for the archive." - ) - created_at: Optional[datetime] = Field( - default=None, description="Date of creation of the archive." - ) - deleted_at: Optional[datetime] = Field( - default=None, - description="This field is automatically set by Koyeb when the archive is garbage collected.", - ) - __properties: ClassVar[List[str]] = [ - "id", - "organization_id", - "upload_url", - "size", - "created_at", - "deleted_at", - ] + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The archive id, that can be referenced when creating or updating a service.") + organization_id: Optional[StrictStr] = Field(default=None, description="Organization owning the archive.") + upload_url: Optional[StrictStr] = Field(default=None, description="The URL where to upload the archive. This URL is signed and can only be used to upload the archive until `valid_until`.") + size: Optional[StrictStr] = Field(default=None, description="The provisioned space for the archive.") + created_at: Optional[datetime] = Field(default=None, description="Date of creation of the archive.") + deleted_at: Optional[datetime] = Field(default=None, description="This field is automatically set by Koyeb when the archive is garbage collected.") + __properties: ClassVar[List[str]] = ["id", "organization_id", "upload_url", "size", "created_at", "deleted_at"] model_config = ConfigDict( validate_by_name=True, @@ -67,6 +43,7 @@ class Archive(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -90,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -108,14 +86,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "organization_id": obj.get("organization_id"), - "upload_url": obj.get("upload_url"), - "size": obj.get("size"), - "created_at": obj.get("created_at"), - "deleted_at": obj.get("deleted_at"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "upload_url": obj.get("upload_url"), + "size": obj.get("size"), + "created_at": obj.get("created_at"), + "deleted_at": obj.get("deleted_at") + }) return _obj + + diff --git a/koyeb/api/models/archive_deployment_metadata.py b/koyeb/api/models/archive_deployment_metadata.py index 2ea27ec8..a0e92d47 100644 --- a/koyeb/api/models/archive_deployment_metadata.py +++ b/koyeb/api/models/archive_deployment_metadata.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ArchiveDeploymentMetadata(BaseModel): """ ArchiveDeploymentMetadata - """ # noqa: E501 - + """ # noqa: E501 last_provisioned_deployment_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["last_provisioned_deployment_id"] @@ -39,6 +37,7 @@ class ArchiveDeploymentMetadata(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,11 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "last_provisioned_deployment_id": obj.get( - "last_provisioned_deployment_id" - ) - } - ) + _obj = cls.model_validate({ + "last_provisioned_deployment_id": obj.get("last_provisioned_deployment_id") + }) return _obj + + diff --git a/koyeb/api/models/archive_source.py b/koyeb/api/models/archive_source.py index 82ac1acb..4eca733c 100644 --- a/koyeb/api/models/archive_source.py +++ b/koyeb/api/models/archive_source.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ArchiveSource(BaseModel): """ ArchiveSource - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None buildpack: Optional[BuildpackBuilder] = None docker: Optional[DockerBuilder] = None @@ -43,6 +41,7 @@ class ArchiveSource(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -75,10 +75,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of buildpack if self.buildpack: - _dict["buildpack"] = self.buildpack.to_dict() + _dict['buildpack'] = self.buildpack.to_dict() # override the default output from pydantic by calling `to_dict()` of docker if self.docker: - _dict["docker"] = self.docker.to_dict() + _dict['docker'] = self.docker.to_dict() return _dict @classmethod @@ -90,15 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "buildpack": BuildpackBuilder.from_dict(obj["buildpack"]) - if obj.get("buildpack") is not None - else None, - "docker": DockerBuilder.from_dict(obj["docker"]) - if obj.get("docker") is not None - else None, - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "buildpack": BuildpackBuilder.from_dict(obj["buildpack"]) if obj.get("buildpack") is not None else None, + "docker": DockerBuilder.from_dict(obj["docker"]) if obj.get("docker") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/auto_release.py b/koyeb/api/models/auto_release.py index 8ca1705e..b61e45f3 100644 --- a/koyeb/api/models/auto_release.py +++ b/koyeb/api/models/auto_release.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AutoRelease(BaseModel): """ AutoRelease - """ # noqa: E501 - + """ # noqa: E501 groups: Optional[List[AutoReleaseGroup]] = None __properties: ClassVar[List[str]] = ["groups"] @@ -40,6 +38,7 @@ class AutoRelease(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,10 +74,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.groups: for _item_groups in self.groups: - _items.append( - _item_groups.to_dict() if _item_groups is not None else None - ) - _dict["groups"] = _items + if _item_groups: + _items.append(_item_groups.to_dict()) + _dict['groups'] = _items return _dict @classmethod @@ -89,11 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "groups": [AutoReleaseGroup.from_dict(_item) for _item in obj["groups"]] - if obj.get("groups") is not None - else None - } - ) + _obj = cls.model_validate({ + "groups": [AutoReleaseGroup.from_dict(_item) for _item in obj["groups"]] if obj.get("groups") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/auto_release_group.py b/koyeb/api/models/auto_release_group.py index 72aa4e3a..ec0bb0b4 100644 --- a/koyeb/api/models/auto_release_group.py +++ b/koyeb/api/models/auto_release_group.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AutoReleaseGroup(BaseModel): """ AutoReleaseGroup - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None repository: Optional[StrictStr] = None git_ref: Optional[StrictStr] = None @@ -42,6 +40,7 @@ class AutoReleaseGroup(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "repository": obj.get("repository"), - "git_ref": obj.get("git_ref"), - "latest_sha": obj.get("latest_sha"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "repository": obj.get("repository"), + "git_ref": obj.get("git_ref"), + "latest_sha": obj.get("latest_sha") + }) return _obj + + diff --git a/koyeb/api/models/autocomplete_reply.py b/koyeb/api/models/autocomplete_reply.py index d34a31c5..d43bd098 100644 --- a/koyeb/api/models/autocomplete_reply.py +++ b/koyeb/api/models/autocomplete_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AutocompleteReply(BaseModel): """ AutocompleteReply - """ # noqa: E501 - + """ # noqa: E501 secrets: Optional[List[StrictStr]] = None user_env: Optional[List[StrictStr]] = None system_env: Optional[List[StrictStr]] = None @@ -41,6 +39,7 @@ class AutocompleteReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "secrets": obj.get("secrets"), - "user_env": obj.get("user_env"), - "system_env": obj.get("system_env"), - } - ) + _obj = cls.model_validate({ + "secrets": obj.get("secrets"), + "user_env": obj.get("user_env"), + "system_env": obj.get("system_env") + }) return _obj + + diff --git a/koyeb/api/models/autocomplete_request.py b/koyeb/api/models/autocomplete_request.py index 309b7775..12f88813 100644 --- a/koyeb/api/models/autocomplete_request.py +++ b/koyeb/api/models/autocomplete_request.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AutocompleteRequest(BaseModel): """ AutocompleteRequest - """ # noqa: E501 - + """ # noqa: E501 definition: Optional[DeploymentDefinition] = None __properties: ClassVar[List[str]] = ["definition"] @@ -40,6 +38,7 @@ class AutocompleteRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of definition if self.definition: - _dict["definition"] = self.definition.to_dict() + _dict['definition'] = self.definition.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "definition": DeploymentDefinition.from_dict(obj["definition"]) - if obj.get("definition") is not None - else None - } - ) + _obj = cls.model_validate({ + "definition": DeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/availability_level.py b/koyeb/api/models/availability_level.py index dcda535b..b3af7346 100644 --- a/koyeb/api/models/availability_level.py +++ b/koyeb/api/models/availability_level.py @@ -26,12 +26,14 @@ class AvailabilityLevel(str, Enum): """ allowed enum values """ - UNKNOWN = "UNKNOWN" - LOW = "LOW" - MEDIUM = "MEDIUM" - HIGH = "HIGH" + UNKNOWN = 'UNKNOWN' + LOW = 'LOW' + MEDIUM = 'MEDIUM' + HIGH = 'HIGH' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of AvailabilityLevel from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/azure_container_registry_configuration.py b/koyeb/api/models/azure_container_registry_configuration.py index 4c23b323..487232a6 100644 --- a/koyeb/api/models/azure_container_registry_configuration.py +++ b/koyeb/api/models/azure_container_registry_configuration.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AzureContainerRegistryConfiguration(BaseModel): """ AzureContainerRegistryConfiguration - """ # noqa: E501 - + """ # noqa: E501 registry_name: Optional[StrictStr] = None username: Optional[StrictStr] = None password: Optional[StrictStr] = None @@ -41,6 +39,7 @@ class AzureContainerRegistryConfiguration(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "registry_name": obj.get("registry_name"), - "username": obj.get("username"), - "password": obj.get("password"), - } - ) + _obj = cls.model_validate({ + "registry_name": obj.get("registry_name"), + "username": obj.get("username"), + "password": obj.get("password") + }) return _obj + + diff --git a/koyeb/api/models/basic_auth_policy.py b/koyeb/api/models/basic_auth_policy.py index 85eddef8..c280abe2 100644 --- a/koyeb/api/models/basic_auth_policy.py +++ b/koyeb/api/models/basic_auth_policy.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class BasicAuthPolicy(BaseModel): """ BasicAuthPolicy - """ # noqa: E501 - + """ # noqa: E501 username: Optional[StrictStr] = None password: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["username", "password"] @@ -40,6 +38,7 @@ class BasicAuthPolicy(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"username": obj.get("username"), "password": obj.get("password")} - ) + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password") + }) return _obj + + diff --git a/koyeb/api/models/budget.py b/koyeb/api/models/budget.py index d811b63a..824506f8 100644 --- a/koyeb/api/models/budget.py +++ b/koyeb/api/models/budget.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Budget(BaseModel): """ Budget - """ # noqa: E501 - + """ # noqa: E501 amount: Optional[StrictStr] = None thresholds: Optional[List[StrictStr]] = None __properties: ClassVar[List[str]] = ["amount", "thresholds"] @@ -40,6 +38,7 @@ class Budget(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"amount": obj.get("amount"), "thresholds": obj.get("thresholds")} - ) + _obj = cls.model_validate({ + "amount": obj.get("amount"), + "thresholds": obj.get("thresholds") + }) return _obj + + diff --git a/koyeb/api/models/buildpack_builder.py b/koyeb/api/models/buildpack_builder.py index 31d6f93f..4854af47 100644 --- a/koyeb/api/models/buildpack_builder.py +++ b/koyeb/api/models/buildpack_builder.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class BuildpackBuilder(BaseModel): """ BuildpackBuilder - """ # noqa: E501 - + """ # noqa: E501 build_command: Optional[StrictStr] = None run_command: Optional[StrictStr] = None privileged: Optional[StrictBool] = None @@ -41,6 +39,7 @@ class BuildpackBuilder(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "build_command": obj.get("build_command"), - "run_command": obj.get("run_command"), - "privileged": obj.get("privileged"), - } - ) + _obj = cls.model_validate({ + "build_command": obj.get("build_command"), + "run_command": obj.get("run_command"), + "privileged": obj.get("privileged") + }) return _obj + + diff --git a/koyeb/api/models/canny_auth_reply.py b/koyeb/api/models/canny_auth_reply.py index 5475250c..d3c71df3 100644 --- a/koyeb/api/models/canny_auth_reply.py +++ b/koyeb/api/models/canny_auth_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CannyAuthReply(BaseModel): """ CannyAuthReply - """ # noqa: E501 - + """ # noqa: E501 token: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["token"] @@ -39,6 +37,7 @@ class CannyAuthReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"token": obj.get("token")}) + _obj = cls.model_validate({ + "token": obj.get("token") + }) return _obj + + diff --git a/koyeb/api/models/catalog_gpu_details.py b/koyeb/api/models/catalog_gpu_details.py index 5a7321ae..4f7a7ad5 100644 --- a/koyeb/api/models/catalog_gpu_details.py +++ b/koyeb/api/models/catalog_gpu_details.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CatalogGPUDetails(BaseModel): """ CatalogGPUDetails - """ # noqa: E501 - + """ # noqa: E501 count: Optional[StrictInt] = None brand: Optional[StrictStr] = None memory: Optional[StrictStr] = None @@ -42,6 +40,7 @@ class CatalogGPUDetails(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "count": obj.get("count"), - "brand": obj.get("brand"), - "memory": obj.get("memory"), - "name": obj.get("name"), - } - ) + _obj = cls.model_validate({ + "count": obj.get("count"), + "brand": obj.get("brand"), + "memory": obj.get("memory"), + "name": obj.get("name") + }) return _obj + + diff --git a/koyeb/api/models/catalog_instance.py b/koyeb/api/models/catalog_instance.py index b9da6bca..628b3c7c 100644 --- a/koyeb/api/models/catalog_instance.py +++ b/koyeb/api/models/catalog_instance.py @@ -17,33 +17,20 @@ import re # noqa: F401 import json -from pydantic import ( - BaseModel, - ConfigDict, - Field, - StrictBool, - StrictFloat, - StrictInt, - StrictStr, -) +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from koyeb.api.models.catalog_gpu_details import CatalogGPUDetails from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class CatalogInstance(BaseModel): """ CatalogInstance - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None description: Optional[StrictStr] = None - vcpu: Optional[StrictInt] = Field( - default=None, - description="The number of cpus. Deprecated. Use vcpu_shares instead.", - ) + vcpu: Optional[StrictInt] = Field(default=None, description="The number of cpus. Deprecated. Use vcpu_shares instead.") memory: Optional[StrictStr] = None disk: Optional[StrictStr] = None price_per_second: Optional[StrictStr] = None @@ -52,9 +39,7 @@ class CatalogInstance(BaseModel): regions: Optional[List[StrictStr]] = None status: Optional[StrictStr] = None require_plan: Optional[List[StrictStr]] = None - vcpu_shares: Optional[Union[StrictFloat, StrictInt]] = Field( - default=None, description="The number of vcpu shares reserved for the instance." - ) + vcpu_shares: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of vcpu shares reserved for the instance.") display_name: Optional[StrictStr] = None aliases: Optional[List[StrictStr]] = None type: Optional[StrictStr] = None @@ -62,27 +47,7 @@ class CatalogInstance(BaseModel): service_types: Optional[List[StrictStr]] = None volumes_enabled: Optional[StrictBool] = None light_sleep_enabled: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "id", - "description", - "vcpu", - "memory", - "disk", - "price_per_second", - "price_hourly", - "price_monthly", - "regions", - "status", - "require_plan", - "vcpu_shares", - "display_name", - "aliases", - "type", - "gpu", - "service_types", - "volumes_enabled", - "light_sleep_enabled", - ] + __properties: ClassVar[List[str]] = ["id", "description", "vcpu", "memory", "disk", "price_per_second", "price_hourly", "price_monthly", "regions", "status", "require_plan", "vcpu_shares", "display_name", "aliases", "type", "gpu", "service_types", "volumes_enabled", "light_sleep_enabled"] model_config = ConfigDict( validate_by_name=True, @@ -91,6 +56,7 @@ class CatalogInstance(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -114,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -123,7 +90,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of gpu if self.gpu: - _dict["gpu"] = self.gpu.to_dict() + _dict['gpu'] = self.gpu.to_dict() return _dict @classmethod @@ -135,29 +102,27 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "description": obj.get("description"), - "vcpu": obj.get("vcpu"), - "memory": obj.get("memory"), - "disk": obj.get("disk"), - "price_per_second": obj.get("price_per_second"), - "price_hourly": obj.get("price_hourly"), - "price_monthly": obj.get("price_monthly"), - "regions": obj.get("regions"), - "status": obj.get("status"), - "require_plan": obj.get("require_plan"), - "vcpu_shares": obj.get("vcpu_shares"), - "display_name": obj.get("display_name"), - "aliases": obj.get("aliases"), - "type": obj.get("type"), - "gpu": CatalogGPUDetails.from_dict(obj["gpu"]) - if obj.get("gpu") is not None - else None, - "service_types": obj.get("service_types"), - "volumes_enabled": obj.get("volumes_enabled"), - "light_sleep_enabled": obj.get("light_sleep_enabled"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "description": obj.get("description"), + "vcpu": obj.get("vcpu"), + "memory": obj.get("memory"), + "disk": obj.get("disk"), + "price_per_second": obj.get("price_per_second"), + "price_hourly": obj.get("price_hourly"), + "price_monthly": obj.get("price_monthly"), + "regions": obj.get("regions"), + "status": obj.get("status"), + "require_plan": obj.get("require_plan"), + "vcpu_shares": obj.get("vcpu_shares"), + "display_name": obj.get("display_name"), + "aliases": obj.get("aliases"), + "type": obj.get("type"), + "gpu": CatalogGPUDetails.from_dict(obj["gpu"]) if obj.get("gpu") is not None else None, + "service_types": obj.get("service_types"), + "volumes_enabled": obj.get("volumes_enabled"), + "light_sleep_enabled": obj.get("light_sleep_enabled") + }) return _obj + + diff --git a/koyeb/api/models/catalog_instance_list_item.py b/koyeb/api/models/catalog_instance_list_item.py index e40dec16..657d0563 100644 --- a/koyeb/api/models/catalog_instance_list_item.py +++ b/koyeb/api/models/catalog_instance_list_item.py @@ -17,33 +17,20 @@ import re # noqa: F401 import json -from pydantic import ( - BaseModel, - ConfigDict, - Field, - StrictBool, - StrictFloat, - StrictInt, - StrictStr, -) +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from koyeb.api.models.catalog_gpu_details import CatalogGPUDetails from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class CatalogInstanceListItem(BaseModel): """ CatalogInstanceListItem - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None description: Optional[StrictStr] = None - vcpu: Optional[StrictInt] = Field( - default=None, - description="The number of cpus. Deprecated. Use vcpu_shares instead.", - ) + vcpu: Optional[StrictInt] = Field(default=None, description="The number of cpus. Deprecated. Use vcpu_shares instead.") memory: Optional[StrictStr] = None disk: Optional[StrictStr] = None price_per_second: Optional[StrictStr] = None @@ -52,9 +39,7 @@ class CatalogInstanceListItem(BaseModel): regions: Optional[List[StrictStr]] = None status: Optional[StrictStr] = None require_plan: Optional[List[StrictStr]] = None - vcpu_shares: Optional[Union[StrictFloat, StrictInt]] = Field( - default=None, description="The number of vcpu shares reserved for the instance." - ) + vcpu_shares: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of vcpu shares reserved for the instance.") display_name: Optional[StrictStr] = None aliases: Optional[List[StrictStr]] = None type: Optional[StrictStr] = None @@ -62,27 +47,7 @@ class CatalogInstanceListItem(BaseModel): service_types: Optional[List[StrictStr]] = None volumes_enabled: Optional[StrictBool] = None light_sleep_enabled: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "id", - "description", - "vcpu", - "memory", - "disk", - "price_per_second", - "price_hourly", - "price_monthly", - "regions", - "status", - "require_plan", - "vcpu_shares", - "display_name", - "aliases", - "type", - "gpu", - "service_types", - "volumes_enabled", - "light_sleep_enabled", - ] + __properties: ClassVar[List[str]] = ["id", "description", "vcpu", "memory", "disk", "price_per_second", "price_hourly", "price_monthly", "regions", "status", "require_plan", "vcpu_shares", "display_name", "aliases", "type", "gpu", "service_types", "volumes_enabled", "light_sleep_enabled"] model_config = ConfigDict( validate_by_name=True, @@ -91,6 +56,7 @@ class CatalogInstanceListItem(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -114,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -123,7 +90,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of gpu if self.gpu: - _dict["gpu"] = self.gpu.to_dict() + _dict['gpu'] = self.gpu.to_dict() return _dict @classmethod @@ -135,29 +102,27 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "description": obj.get("description"), - "vcpu": obj.get("vcpu"), - "memory": obj.get("memory"), - "disk": obj.get("disk"), - "price_per_second": obj.get("price_per_second"), - "price_hourly": obj.get("price_hourly"), - "price_monthly": obj.get("price_monthly"), - "regions": obj.get("regions"), - "status": obj.get("status"), - "require_plan": obj.get("require_plan"), - "vcpu_shares": obj.get("vcpu_shares"), - "display_name": obj.get("display_name"), - "aliases": obj.get("aliases"), - "type": obj.get("type"), - "gpu": CatalogGPUDetails.from_dict(obj["gpu"]) - if obj.get("gpu") is not None - else None, - "service_types": obj.get("service_types"), - "volumes_enabled": obj.get("volumes_enabled"), - "light_sleep_enabled": obj.get("light_sleep_enabled"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "description": obj.get("description"), + "vcpu": obj.get("vcpu"), + "memory": obj.get("memory"), + "disk": obj.get("disk"), + "price_per_second": obj.get("price_per_second"), + "price_hourly": obj.get("price_hourly"), + "price_monthly": obj.get("price_monthly"), + "regions": obj.get("regions"), + "status": obj.get("status"), + "require_plan": obj.get("require_plan"), + "vcpu_shares": obj.get("vcpu_shares"), + "display_name": obj.get("display_name"), + "aliases": obj.get("aliases"), + "type": obj.get("type"), + "gpu": CatalogGPUDetails.from_dict(obj["gpu"]) if obj.get("gpu") is not None else None, + "service_types": obj.get("service_types"), + "volumes_enabled": obj.get("volumes_enabled"), + "light_sleep_enabled": obj.get("light_sleep_enabled") + }) return _obj + + diff --git a/koyeb/api/models/catalog_usage.py b/koyeb/api/models/catalog_usage.py index 2eafbbae..e4e4c9f2 100644 --- a/koyeb/api/models/catalog_usage.py +++ b/koyeb/api/models/catalog_usage.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CatalogUsage(BaseModel): """ CatalogUsage - """ # noqa: E501 - + """ # noqa: E501 instances: Optional[Dict[str, InstanceAvailability]] = None __properties: ClassVar[List[str]] = ["instances"] @@ -40,6 +38,7 @@ class CatalogUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,12 +74,9 @@ def to_dict(self) -> Dict[str, Any]: _field_dict = {} if self.instances: for _key_instances in self.instances: - _field_dict[_key_instances] = ( - self.instances[_key_instances].to_dict() - if self.instances[_key_instances] is not None - else None - ) - _dict["instances"] = _field_dict + if self.instances[_key_instances]: + _field_dict[_key_instances] = self.instances[_key_instances].to_dict() + _dict['instances'] = _field_dict return _dict @classmethod @@ -91,14 +88,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instances": dict( - (_k, InstanceAvailability.from_dict(_v)) - for _k, _v in obj["instances"].items() - ) - if obj.get("instances") is not None - else None - } - ) + _obj = cls.model_validate({ + "instances": dict( + (_k, InstanceAvailability.from_dict(_v)) + for _k, _v in obj["instances"].items() + ) + if obj.get("instances") is not None + else None + }) return _obj + + diff --git a/koyeb/api/models/check_coupon_reply.py b/koyeb/api/models/check_coupon_reply.py index 57e0905c..2a13bd32 100644 --- a/koyeb/api/models/check_coupon_reply.py +++ b/koyeb/api/models/check_coupon_reply.py @@ -23,22 +23,15 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CheckCouponReply(BaseModel): """ CheckCouponReply - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None percent_off: Optional[Union[StrictFloat, StrictInt]] = None amount_off: Optional[StrictStr] = None currency: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "name", - "percent_off", - "amount_off", - "currency", - ] + __properties: ClassVar[List[str]] = ["name", "percent_off", "amount_off", "currency"] model_config = ConfigDict( validate_by_name=True, @@ -47,6 +40,7 @@ class CheckCouponReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -88,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "percent_off": obj.get("percent_off"), - "amount_off": obj.get("amount_off"), - "currency": obj.get("currency"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "percent_off": obj.get("percent_off"), + "amount_off": obj.get("amount_off"), + "currency": obj.get("currency") + }) return _obj + + diff --git a/koyeb/api/models/clear_idenfy_verification_result_request.py b/koyeb/api/models/clear_idenfy_verification_result_request.py index ad64d103..ebf9fd32 100644 --- a/koyeb/api/models/clear_idenfy_verification_result_request.py +++ b/koyeb/api/models/clear_idenfy_verification_result_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ClearIdenfyVerificationResultRequest(BaseModel): """ ClearIdenfyVerificationResultRequest - """ # noqa: E501 - + """ # noqa: E501 user_id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["user_id", "organization_id"] @@ -40,6 +38,7 @@ class ClearIdenfyVerificationResultRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,10 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "user_id": obj.get("user_id"), - "organization_id": obj.get("organization_id"), - } - ) + _obj = cls.model_validate({ + "user_id": obj.get("user_id"), + "organization_id": obj.get("organization_id") + }) return _obj + + diff --git a/koyeb/api/models/compose_reply.py b/koyeb/api/models/compose_reply.py index 2a51daf3..a7a8b20f 100644 --- a/koyeb/api/models/compose_reply.py +++ b/koyeb/api/models/compose_reply.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ComposeReply(BaseModel): """ ComposeReply - """ # noqa: E501 - + """ # noqa: E501 app: Optional[App] = None services: Optional[List[Service]] = None __properties: ClassVar[List[str]] = ["app", "services"] @@ -42,6 +40,7 @@ class ComposeReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,15 +74,14 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of app if self.app: - _dict["app"] = self.app.to_dict() + _dict['app'] = self.app.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in services (list) _items = [] if self.services: for _item_services in self.services: - _items.append( - _item_services.to_dict() if _item_services is not None else None - ) - _dict["services"] = _items + if _item_services: + _items.append(_item_services.to_dict()) + _dict['services'] = _items return _dict @classmethod @@ -94,14 +93,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "app": App.from_dict(obj["app"]) - if obj.get("app") is not None - else None, - "services": [Service.from_dict(_item) for _item in obj["services"]] - if obj.get("services") is not None - else None, - } - ) + _obj = cls.model_validate({ + "app": App.from_dict(obj["app"]) if obj.get("app") is not None else None, + "services": [Service.from_dict(_item) for _item in obj["services"]] if obj.get("services") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/config_file.py b/koyeb/api/models/config_file.py index 01300f05..b8e444e5 100644 --- a/koyeb/api/models/config_file.py +++ b/koyeb/api/models/config_file.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ConfigFile(BaseModel): """ ConfigFile - """ # noqa: E501 - + """ # noqa: E501 path: Optional[StrictStr] = None permissions: Optional[StrictStr] = None content: Optional[StrictStr] = None @@ -41,6 +39,7 @@ class ConfigFile(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "path": obj.get("path"), - "permissions": obj.get("permissions"), - "content": obj.get("content"), - } - ) + _obj = cls.model_validate({ + "path": obj.get("path"), + "permissions": obj.get("permissions"), + "content": obj.get("content") + }) return _obj + + diff --git a/koyeb/api/models/confirm_payment_authorization_reply.py b/koyeb/api/models/confirm_payment_authorization_reply.py index da711360..5faf5228 100644 --- a/koyeb/api/models/confirm_payment_authorization_reply.py +++ b/koyeb/api/models/confirm_payment_authorization_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ConfirmPaymentAuthorizationReply(BaseModel): """ ConfirmPaymentAuthorizationReply - """ # noqa: E501 - + """ # noqa: E501 payment_method: Optional[PaymentMethod] = None __properties: ClassVar[List[str]] = ["payment_method"] @@ -40,6 +38,7 @@ class ConfirmPaymentAuthorizationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of payment_method if self.payment_method: - _dict["payment_method"] = self.payment_method.to_dict() + _dict['payment_method'] = self.payment_method.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "payment_method": PaymentMethod.from_dict(obj["payment_method"]) - if obj.get("payment_method") is not None - else None - } - ) + _obj = cls.model_validate({ + "payment_method": PaymentMethod.from_dict(obj["payment_method"]) if obj.get("payment_method") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_access_token_reply.py b/koyeb/api/models/create_access_token_reply.py index 4e8d896b..23a91db2 100644 --- a/koyeb/api/models/create_access_token_reply.py +++ b/koyeb/api/models/create_access_token_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateAccessTokenReply(BaseModel): """ CreateAccessTokenReply - """ # noqa: E501 - + """ # noqa: E501 token: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["token"] @@ -39,6 +37,7 @@ class CreateAccessTokenReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"token": obj.get("token")}) + _obj = cls.model_validate({ + "token": obj.get("token") + }) return _obj + + diff --git a/koyeb/api/models/create_access_token_request.py b/koyeb/api/models/create_access_token_request.py index fc62077c..fa9b6d85 100644 --- a/koyeb/api/models/create_access_token_request.py +++ b/koyeb/api/models/create_access_token_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateAccessTokenRequest(BaseModel): """ CreateAccessTokenRequest - """ # noqa: E501 - + """ # noqa: E501 validity: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["validity"] @@ -39,6 +37,7 @@ class CreateAccessTokenRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"validity": obj.get("validity")}) + _obj = cls.model_validate({ + "validity": obj.get("validity") + }) return _obj + + diff --git a/koyeb/api/models/create_account_request.py b/koyeb/api/models/create_account_request.py index a3ebcf36..a076eec5 100644 --- a/koyeb/api/models/create_account_request.py +++ b/koyeb/api/models/create_account_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateAccountRequest(BaseModel): """ Create new account - """ # noqa: E501 - + """ # noqa: E501 email: StrictStr password: StrictStr name: Optional[StrictStr] = None @@ -42,6 +40,7 @@ class CreateAccountRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "email": obj.get("email"), - "password": obj.get("password"), - "name": obj.get("name"), - "captcha": obj.get("captcha"), - } - ) + _obj = cls.model_validate({ + "email": obj.get("email"), + "password": obj.get("password"), + "name": obj.get("name"), + "captcha": obj.get("captcha") + }) return _obj + + diff --git a/koyeb/api/models/create_app.py b/koyeb/api/models/create_app.py index 9e6b8fee..0f7ceb1c 100644 --- a/koyeb/api/models/create_app.py +++ b/koyeb/api/models/create_app.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateApp(BaseModel): """ CreateApp - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None life_cycle: Optional[AppLifeCycle] = None __properties: ClassVar[List[str]] = ["name", "life_cycle"] @@ -41,6 +39,7 @@ class CreateApp(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of life_cycle if self.life_cycle: - _dict["life_cycle"] = self.life_cycle.to_dict() + _dict['life_cycle'] = self.life_cycle.to_dict() return _dict @classmethod @@ -85,12 +85,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "life_cycle": AppLifeCycle.from_dict(obj["life_cycle"]) - if obj.get("life_cycle") is not None - else None, - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "life_cycle": AppLifeCycle.from_dict(obj["life_cycle"]) if obj.get("life_cycle") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_app_reply.py b/koyeb/api/models/create_app_reply.py index 66ac27e2..bd6c12e8 100644 --- a/koyeb/api/models/create_app_reply.py +++ b/koyeb/api/models/create_app_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateAppReply(BaseModel): """ CreateAppReply - """ # noqa: E501 - + """ # noqa: E501 app: Optional[App] = None __properties: ClassVar[List[str]] = ["app"] @@ -40,6 +38,7 @@ class CreateAppReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of app if self.app: - _dict["app"] = self.app.to_dict() + _dict['app'] = self.app.to_dict() return _dict @classmethod @@ -84,7 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"app": App.from_dict(obj["app"]) if obj.get("app") is not None else None} - ) + _obj = cls.model_validate({ + "app": App.from_dict(obj["app"]) if obj.get("app") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_archive.py b/koyeb/api/models/create_archive.py index 22f983d5..c8b6202e 100644 --- a/koyeb/api/models/create_archive.py +++ b/koyeb/api/models/create_archive.py @@ -23,16 +23,11 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateArchive(BaseModel): """ CreateArchive - """ # noqa: E501 - - size: Optional[StrictStr] = Field( - default=None, - description="How much space to provision for the archive, in bytes.", - ) + """ # noqa: E501 + size: Optional[StrictStr] = Field(default=None, description="How much space to provision for the archive, in bytes.") __properties: ClassVar[List[str]] = ["size"] model_config = ConfigDict( @@ -42,6 +37,7 @@ class CreateArchive(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"size": obj.get("size")}) + _obj = cls.model_validate({ + "size": obj.get("size") + }) return _obj + + diff --git a/koyeb/api/models/create_archive_reply.py b/koyeb/api/models/create_archive_reply.py index 71e472b9..609237b8 100644 --- a/koyeb/api/models/create_archive_reply.py +++ b/koyeb/api/models/create_archive_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateArchiveReply(BaseModel): """ CreateArchiveReply - """ # noqa: E501 - + """ # noqa: E501 archive: Optional[Archive] = None __properties: ClassVar[List[str]] = ["archive"] @@ -40,6 +38,7 @@ class CreateArchiveReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of archive if self.archive: - _dict["archive"] = self.archive.to_dict() + _dict['archive'] = self.archive.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "archive": Archive.from_dict(obj["archive"]) - if obj.get("archive") is not None - else None - } - ) + _obj = cls.model_validate({ + "archive": Archive.from_dict(obj["archive"]) if obj.get("archive") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_budget_reply.py b/koyeb/api/models/create_budget_reply.py index 7112cac4..d5fce515 100644 --- a/koyeb/api/models/create_budget_reply.py +++ b/koyeb/api/models/create_budget_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateBudgetReply(BaseModel): """ CreateBudgetReply - """ # noqa: E501 - + """ # noqa: E501 budget: Optional[Budget] = None __properties: ClassVar[List[str]] = ["budget"] @@ -40,6 +38,7 @@ class CreateBudgetReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of budget if self.budget: - _dict["budget"] = self.budget.to_dict() + _dict['budget'] = self.budget.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "budget": Budget.from_dict(obj["budget"]) - if obj.get("budget") is not None - else None - } - ) + _obj = cls.model_validate({ + "budget": Budget.from_dict(obj["budget"]) if obj.get("budget") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_compose.py b/koyeb/api/models/create_compose.py index 46e84a64..4505ad37 100644 --- a/koyeb/api/models/create_compose.py +++ b/koyeb/api/models/create_compose.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateCompose(BaseModel): """ CreateCompose - """ # noqa: E501 - + """ # noqa: E501 app: Optional[CreateApp] = None services: Optional[List[CreateService]] = None __properties: ClassVar[List[str]] = ["app", "services"] @@ -42,6 +40,7 @@ class CreateCompose(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,15 +74,14 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of app if self.app: - _dict["app"] = self.app.to_dict() + _dict['app'] = self.app.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in services (list) _items = [] if self.services: for _item_services in self.services: - _items.append( - _item_services.to_dict() if _item_services is not None else None - ) - _dict["services"] = _items + if _item_services: + _items.append(_item_services.to_dict()) + _dict['services'] = _items return _dict @classmethod @@ -94,16 +93,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "app": CreateApp.from_dict(obj["app"]) - if obj.get("app") is not None - else None, - "services": [ - CreateService.from_dict(_item) for _item in obj["services"] - ] - if obj.get("services") is not None - else None, - } - ) + _obj = cls.model_validate({ + "app": CreateApp.from_dict(obj["app"]) if obj.get("app") is not None else None, + "services": [CreateService.from_dict(_item) for _item in obj["services"]] if obj.get("services") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_credential.py b/koyeb/api/models/create_credential.py index 4355280b..c3c2a4c4 100644 --- a/koyeb/api/models/create_credential.py +++ b/koyeb/api/models/create_credential.py @@ -24,22 +24,15 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateCredential(BaseModel): """ CreateCredential - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None description: Optional[StrictStr] = None type: Optional[CredentialType] = CredentialType.INVALID organization_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "name", - "description", - "type", - "organization_id", - ] + __properties: ClassVar[List[str]] = ["name", "description", "type", "organization_id"] model_config = ConfigDict( validate_by_name=True, @@ -48,6 +41,7 @@ class CreateCredential(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -71,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -89,14 +84,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "description": obj.get("description"), - "type": obj.get("type") - if obj.get("type") is not None - else CredentialType.INVALID, - "organization_id": obj.get("organization_id"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "type": obj.get("type") if obj.get("type") is not None else CredentialType.INVALID, + "organization_id": obj.get("organization_id") + }) return _obj + + diff --git a/koyeb/api/models/create_credential_reply.py b/koyeb/api/models/create_credential_reply.py index 7b1cbbd0..15af8dd7 100644 --- a/koyeb/api/models/create_credential_reply.py +++ b/koyeb/api/models/create_credential_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateCredentialReply(BaseModel): """ CreateCredentialReply - """ # noqa: E501 - + """ # noqa: E501 credential: Optional[Credential] = None __properties: ClassVar[List[str]] = ["credential"] @@ -40,6 +38,7 @@ class CreateCredentialReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of credential if self.credential: - _dict["credential"] = self.credential.to_dict() + _dict['credential'] = self.credential.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "credential": Credential.from_dict(obj["credential"]) - if obj.get("credential") is not None - else None - } - ) + _obj = cls.model_validate({ + "credential": Credential.from_dict(obj["credential"]) if obj.get("credential") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_domain.py b/koyeb/api/models/create_domain.py index 84db053f..9825d037 100644 --- a/koyeb/api/models/create_domain.py +++ b/koyeb/api/models/create_domain.py @@ -25,24 +25,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateDomain(BaseModel): """ CreateDomain - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None type: Optional[DomainType] = DomainType.AUTOASSIGNED app_id: Optional[StrictStr] = None cloudflare: Optional[Dict[str, Any]] = None koyeb: Optional[DomainLoadBalancerKoyeb] = None - __properties: ClassVar[List[str]] = [ - "name", - "type", - "app_id", - "cloudflare", - "koyeb", - ] + __properties: ClassVar[List[str]] = ["name", "type", "app_id", "cloudflare", "koyeb"] model_config = ConfigDict( validate_by_name=True, @@ -51,6 +43,7 @@ class CreateDomain(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of koyeb if self.koyeb: - _dict["koyeb"] = self.koyeb.to_dict() + _dict['koyeb'] = self.koyeb.to_dict() return _dict @classmethod @@ -95,17 +89,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "type": obj.get("type") - if obj.get("type") is not None - else DomainType.AUTOASSIGNED, - "app_id": obj.get("app_id"), - "cloudflare": obj.get("cloudflare"), - "koyeb": DomainLoadBalancerKoyeb.from_dict(obj["koyeb"]) - if obj.get("koyeb") is not None - else None, - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "type": obj.get("type") if obj.get("type") is not None else DomainType.AUTOASSIGNED, + "app_id": obj.get("app_id"), + "cloudflare": obj.get("cloudflare"), + "koyeb": DomainLoadBalancerKoyeb.from_dict(obj["koyeb"]) if obj.get("koyeb") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_domain_reply.py b/koyeb/api/models/create_domain_reply.py index d8ce4cfd..34e523bb 100644 --- a/koyeb/api/models/create_domain_reply.py +++ b/koyeb/api/models/create_domain_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateDomainReply(BaseModel): """ CreateDomainReply - """ # noqa: E501 - + """ # noqa: E501 domain: Optional[Domain] = None __properties: ClassVar[List[str]] = ["domain"] @@ -40,6 +38,7 @@ class CreateDomainReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of domain if self.domain: - _dict["domain"] = self.domain.to_dict() + _dict['domain'] = self.domain.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "domain": Domain.from_dict(obj["domain"]) - if obj.get("domain") is not None - else None - } - ) + _obj = cls.model_validate({ + "domain": Domain.from_dict(obj["domain"]) if obj.get("domain") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_instance_snapshot_reply.py b/koyeb/api/models/create_instance_snapshot_reply.py index e73898dc..f7589938 100644 --- a/koyeb/api/models/create_instance_snapshot_reply.py +++ b/koyeb/api/models/create_instance_snapshot_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateInstanceSnapshotReply(BaseModel): """ CreateInstanceSnapshotReply - """ # noqa: E501 - + """ # noqa: E501 instance_snapshot: Optional[InstanceSnapshot] = None __properties: ClassVar[List[str]] = ["instance_snapshot"] @@ -40,6 +38,7 @@ class CreateInstanceSnapshotReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of instance_snapshot if self.instance_snapshot: - _dict["instance_snapshot"] = self.instance_snapshot.to_dict() + _dict['instance_snapshot'] = self.instance_snapshot.to_dict() return _dict @classmethod @@ -84,13 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instance_snapshot": InstanceSnapshot.from_dict( - obj["instance_snapshot"] - ) - if obj.get("instance_snapshot") is not None - else None - } - ) + _obj = cls.model_validate({ + "instance_snapshot": InstanceSnapshot.from_dict(obj["instance_snapshot"]) if obj.get("instance_snapshot") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_instance_snapshot_request.py b/koyeb/api/models/create_instance_snapshot_request.py index 47318514..126753cd 100644 --- a/koyeb/api/models/create_instance_snapshot_request.py +++ b/koyeb/api/models/create_instance_snapshot_request.py @@ -24,17 +24,13 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateInstanceSnapshotRequest(BaseModel): """ CreateInstanceSnapshotRequest - """ # noqa: E501 - + """ # noqa: E501 instance_id: Optional[StrictStr] = None name: Optional[StrictStr] = None - type: Optional[ - InstanceSnapshotType - ] = InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID + type: Optional[InstanceSnapshotType] = InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID __properties: ClassVar[List[str]] = ["instance_id", "name", "type"] model_config = ConfigDict( @@ -44,6 +40,7 @@ class CreateInstanceSnapshotRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -85,13 +83,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instance_id": obj.get("instance_id"), - "name": obj.get("name"), - "type": obj.get("type") - if obj.get("type") is not None - else InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID, - } - ) + _obj = cls.model_validate({ + "instance_id": obj.get("instance_id"), + "name": obj.get("name"), + "type": obj.get("type") if obj.get("type") is not None else InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID + }) return _obj + + diff --git a/koyeb/api/models/create_organization_invitation_reply.py b/koyeb/api/models/create_organization_invitation_reply.py index 10a44a76..ff8f32d0 100644 --- a/koyeb/api/models/create_organization_invitation_reply.py +++ b/koyeb/api/models/create_organization_invitation_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateOrganizationInvitationReply(BaseModel): """ CreateOrganizationInvitationReply - """ # noqa: E501 - + """ # noqa: E501 invitation: Optional[OrganizationInvitation] = None __properties: ClassVar[List[str]] = ["invitation"] @@ -40,6 +38,7 @@ class CreateOrganizationInvitationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of invitation if self.invitation: - _dict["invitation"] = self.invitation.to_dict() + _dict['invitation'] = self.invitation.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "invitation": OrganizationInvitation.from_dict(obj["invitation"]) - if obj.get("invitation") is not None - else None - } - ) + _obj = cls.model_validate({ + "invitation": OrganizationInvitation.from_dict(obj["invitation"]) if obj.get("invitation") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_organization_invitation_request.py b/koyeb/api/models/create_organization_invitation_request.py index 0bf58fc4..39fb4c12 100644 --- a/koyeb/api/models/create_organization_invitation_request.py +++ b/koyeb/api/models/create_organization_invitation_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateOrganizationInvitationRequest(BaseModel): """ CreateOrganizationInvitationRequest - """ # noqa: E501 - + """ # noqa: E501 email: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["email"] @@ -39,6 +37,7 @@ class CreateOrganizationInvitationRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"email": obj.get("email")}) + _obj = cls.model_validate({ + "email": obj.get("email") + }) return _obj + + diff --git a/koyeb/api/models/create_organization_reply.py b/koyeb/api/models/create_organization_reply.py index 510801f8..665f9984 100644 --- a/koyeb/api/models/create_organization_reply.py +++ b/koyeb/api/models/create_organization_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateOrganizationReply(BaseModel): """ CreateOrganizationReply - """ # noqa: E501 - + """ # noqa: E501 organization: Optional[Organization] = None __properties: ClassVar[List[str]] = ["organization"] @@ -40,6 +38,7 @@ class CreateOrganizationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization": Organization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None - } - ) + _obj = cls.model_validate({ + "organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_organization_request.py b/koyeb/api/models/create_organization_request.py index e56892d4..0714ddbb 100644 --- a/koyeb/api/models/create_organization_request.py +++ b/koyeb/api/models/create_organization_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateOrganizationRequest(BaseModel): """ CreateOrganizationRequest - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name"] @@ -39,6 +37,7 @@ class CreateOrganizationRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"name": obj.get("name")}) + _obj = cls.model_validate({ + "name": obj.get("name") + }) return _obj + + diff --git a/koyeb/api/models/create_payment_authorization_reply.py b/koyeb/api/models/create_payment_authorization_reply.py index 487a381c..f25023c0 100644 --- a/koyeb/api/models/create_payment_authorization_reply.py +++ b/koyeb/api/models/create_payment_authorization_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreatePaymentAuthorizationReply(BaseModel): """ CreatePaymentAuthorizationReply - """ # noqa: E501 - + """ # noqa: E501 payment_method: Optional[PaymentMethod] = None __properties: ClassVar[List[str]] = ["payment_method"] @@ -40,6 +38,7 @@ class CreatePaymentAuthorizationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of payment_method if self.payment_method: - _dict["payment_method"] = self.payment_method.to_dict() + _dict['payment_method'] = self.payment_method.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "payment_method": PaymentMethod.from_dict(obj["payment_method"]) - if obj.get("payment_method") is not None - else None - } - ) + _obj = cls.model_validate({ + "payment_method": PaymentMethod.from_dict(obj["payment_method"]) if obj.get("payment_method") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_persistent_volume_reply.py b/koyeb/api/models/create_persistent_volume_reply.py index a1b5b5cc..e5f909c2 100644 --- a/koyeb/api/models/create_persistent_volume_reply.py +++ b/koyeb/api/models/create_persistent_volume_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreatePersistentVolumeReply(BaseModel): """ CreatePersistentVolumeReply - """ # noqa: E501 - + """ # noqa: E501 volume: Optional[PersistentVolume] = None __properties: ClassVar[List[str]] = ["volume"] @@ -40,6 +38,7 @@ class CreatePersistentVolumeReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of volume if self.volume: - _dict["volume"] = self.volume.to_dict() + _dict['volume'] = self.volume.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "volume": PersistentVolume.from_dict(obj["volume"]) - if obj.get("volume") is not None - else None - } - ) + _obj = cls.model_validate({ + "volume": PersistentVolume.from_dict(obj["volume"]) if obj.get("volume") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_persistent_volume_request.py b/koyeb/api/models/create_persistent_volume_request.py index 5a4d17d3..a8bc9628 100644 --- a/koyeb/api/models/create_persistent_volume_request.py +++ b/koyeb/api/models/create_persistent_volume_request.py @@ -19,35 +19,22 @@ from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.persistent_volume_backing_store import ( - PersistentVolumeBackingStore, -) +from koyeb.api.models.persistent_volume_backing_store import PersistentVolumeBackingStore from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreatePersistentVolumeRequest(BaseModel): """ CreatePersistentVolumeRequest - """ # noqa: E501 - - volume_type: Optional[ - PersistentVolumeBackingStore - ] = PersistentVolumeBackingStore.PERSISTENT_VOLUME_BACKING_STORE_INVALID + """ # noqa: E501 + volume_type: Optional[PersistentVolumeBackingStore] = PersistentVolumeBackingStore.PERSISTENT_VOLUME_BACKING_STORE_INVALID name: Optional[StrictStr] = None region: Optional[StrictStr] = None read_only: Optional[StrictBool] = None max_size: Optional[StrictInt] = None snapshot_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "volume_type", - "name", - "region", - "read_only", - "max_size", - "snapshot_id", - ] + __properties: ClassVar[List[str]] = ["volume_type", "name", "region", "read_only", "max_size", "snapshot_id"] model_config = ConfigDict( validate_by_name=True, @@ -56,6 +43,7 @@ class CreatePersistentVolumeRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -79,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -97,16 +86,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "volume_type": obj.get("volume_type") - if obj.get("volume_type") is not None - else PersistentVolumeBackingStore.PERSISTENT_VOLUME_BACKING_STORE_INVALID, - "name": obj.get("name"), - "region": obj.get("region"), - "read_only": obj.get("read_only"), - "max_size": obj.get("max_size"), - "snapshot_id": obj.get("snapshot_id"), - } - ) + _obj = cls.model_validate({ + "volume_type": obj.get("volume_type") if obj.get("volume_type") is not None else PersistentVolumeBackingStore.PERSISTENT_VOLUME_BACKING_STORE_INVALID, + "name": obj.get("name"), + "region": obj.get("region"), + "read_only": obj.get("read_only"), + "max_size": obj.get("max_size"), + "snapshot_id": obj.get("snapshot_id") + }) return _obj + + diff --git a/koyeb/api/models/create_project.py b/koyeb/api/models/create_project.py index 0bde34b8..28484cb9 100644 --- a/koyeb/api/models/create_project.py +++ b/koyeb/api/models/create_project.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateProject(BaseModel): """ CreateProject - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None description: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name", "description"] @@ -40,6 +38,7 @@ class CreateProject(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"name": obj.get("name"), "description": obj.get("description")} - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description") + }) return _obj + + diff --git a/koyeb/api/models/create_project_reply.py b/koyeb/api/models/create_project_reply.py index 622501a4..80a851cb 100644 --- a/koyeb/api/models/create_project_reply.py +++ b/koyeb/api/models/create_project_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateProjectReply(BaseModel): """ CreateProjectReply - """ # noqa: E501 - + """ # noqa: E501 project: Optional[Project] = None __properties: ClassVar[List[str]] = ["project"] @@ -40,6 +38,7 @@ class CreateProjectReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of project if self.project: - _dict["project"] = self.project.to_dict() + _dict['project'] = self.project.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "project": Project.from_dict(obj["project"]) - if obj.get("project") is not None - else None - } - ) + _obj = cls.model_validate({ + "project": Project.from_dict(obj["project"]) if obj.get("project") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_secret.py b/koyeb/api/models/create_secret.py index 89a9253e..eda64f49 100644 --- a/koyeb/api/models/create_secret.py +++ b/koyeb/api/models/create_secret.py @@ -19,18 +19,10 @@ from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.azure_container_registry_configuration import ( - AzureContainerRegistryConfiguration, -) -from koyeb.api.models.digital_ocean_registry_configuration import ( - DigitalOceanRegistryConfiguration, -) -from koyeb.api.models.docker_hub_registry_configuration import ( - DockerHubRegistryConfiguration, -) -from koyeb.api.models.gcp_container_registry_configuration import ( - GCPContainerRegistryConfiguration, -) +from koyeb.api.models.azure_container_registry_configuration import AzureContainerRegistryConfiguration +from koyeb.api.models.digital_ocean_registry_configuration import DigitalOceanRegistryConfiguration +from koyeb.api.models.docker_hub_registry_configuration import DockerHubRegistryConfiguration +from koyeb.api.models.gcp_container_registry_configuration import GCPContainerRegistryConfiguration from koyeb.api.models.git_hub_registry_configuration import GitHubRegistryConfiguration from koyeb.api.models.git_lab_registry_configuration import GitLabRegistryConfiguration from koyeb.api.models.private_registry_configuration import PrivateRegistryConfiguration @@ -39,12 +31,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateSecret(BaseModel): """ CreateSecret - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None type: Optional[SecretType] = SecretType.SIMPLE value: Optional[StrictStr] = None @@ -55,18 +45,7 @@ class CreateSecret(BaseModel): gitlab_registry: Optional[GitLabRegistryConfiguration] = None gcp_container_registry: Optional[GCPContainerRegistryConfiguration] = None azure_container_registry: Optional[AzureContainerRegistryConfiguration] = None - __properties: ClassVar[List[str]] = [ - "name", - "type", - "value", - "docker_hub_registry", - "private_registry", - "digital_ocean_registry", - "github_registry", - "gitlab_registry", - "gcp_container_registry", - "azure_container_registry", - ] + __properties: ClassVar[List[str]] = ["name", "type", "value", "docker_hub_registry", "private_registry", "digital_ocean_registry", "github_registry", "gitlab_registry", "gcp_container_registry", "azure_container_registry"] model_config = ConfigDict( validate_by_name=True, @@ -75,6 +54,7 @@ class CreateSecret(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -98,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -107,25 +88,25 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of docker_hub_registry if self.docker_hub_registry: - _dict["docker_hub_registry"] = self.docker_hub_registry.to_dict() + _dict['docker_hub_registry'] = self.docker_hub_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of private_registry if self.private_registry: - _dict["private_registry"] = self.private_registry.to_dict() + _dict['private_registry'] = self.private_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of digital_ocean_registry if self.digital_ocean_registry: - _dict["digital_ocean_registry"] = self.digital_ocean_registry.to_dict() + _dict['digital_ocean_registry'] = self.digital_ocean_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of github_registry if self.github_registry: - _dict["github_registry"] = self.github_registry.to_dict() + _dict['github_registry'] = self.github_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of gitlab_registry if self.gitlab_registry: - _dict["gitlab_registry"] = self.gitlab_registry.to_dict() + _dict['gitlab_registry'] = self.gitlab_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of gcp_container_registry if self.gcp_container_registry: - _dict["gcp_container_registry"] = self.gcp_container_registry.to_dict() + _dict['gcp_container_registry'] = self.gcp_container_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of azure_container_registry if self.azure_container_registry: - _dict["azure_container_registry"] = self.azure_container_registry.to_dict() + _dict['azure_container_registry'] = self.azure_container_registry.to_dict() return _dict @classmethod @@ -137,48 +118,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "type": obj.get("type") - if obj.get("type") is not None - else SecretType.SIMPLE, - "value": obj.get("value"), - "docker_hub_registry": DockerHubRegistryConfiguration.from_dict( - obj["docker_hub_registry"] - ) - if obj.get("docker_hub_registry") is not None - else None, - "private_registry": PrivateRegistryConfiguration.from_dict( - obj["private_registry"] - ) - if obj.get("private_registry") is not None - else None, - "digital_ocean_registry": DigitalOceanRegistryConfiguration.from_dict( - obj["digital_ocean_registry"] - ) - if obj.get("digital_ocean_registry") is not None - else None, - "github_registry": GitHubRegistryConfiguration.from_dict( - obj["github_registry"] - ) - if obj.get("github_registry") is not None - else None, - "gitlab_registry": GitLabRegistryConfiguration.from_dict( - obj["gitlab_registry"] - ) - if obj.get("gitlab_registry") is not None - else None, - "gcp_container_registry": GCPContainerRegistryConfiguration.from_dict( - obj["gcp_container_registry"] - ) - if obj.get("gcp_container_registry") is not None - else None, - "azure_container_registry": AzureContainerRegistryConfiguration.from_dict( - obj["azure_container_registry"] - ) - if obj.get("azure_container_registry") is not None - else None, - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "type": obj.get("type") if obj.get("type") is not None else SecretType.SIMPLE, + "value": obj.get("value"), + "docker_hub_registry": DockerHubRegistryConfiguration.from_dict(obj["docker_hub_registry"]) if obj.get("docker_hub_registry") is not None else None, + "private_registry": PrivateRegistryConfiguration.from_dict(obj["private_registry"]) if obj.get("private_registry") is not None else None, + "digital_ocean_registry": DigitalOceanRegistryConfiguration.from_dict(obj["digital_ocean_registry"]) if obj.get("digital_ocean_registry") is not None else None, + "github_registry": GitHubRegistryConfiguration.from_dict(obj["github_registry"]) if obj.get("github_registry") is not None else None, + "gitlab_registry": GitLabRegistryConfiguration.from_dict(obj["gitlab_registry"]) if obj.get("gitlab_registry") is not None else None, + "gcp_container_registry": GCPContainerRegistryConfiguration.from_dict(obj["gcp_container_registry"]) if obj.get("gcp_container_registry") is not None else None, + "azure_container_registry": AzureContainerRegistryConfiguration.from_dict(obj["azure_container_registry"]) if obj.get("azure_container_registry") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_secret_reply.py b/koyeb/api/models/create_secret_reply.py index e1633360..0710a0b4 100644 --- a/koyeb/api/models/create_secret_reply.py +++ b/koyeb/api/models/create_secret_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateSecretReply(BaseModel): """ CreateSecretReply - """ # noqa: E501 - + """ # noqa: E501 secret: Optional[Secret] = None __properties: ClassVar[List[str]] = ["secret"] @@ -40,6 +38,7 @@ class CreateSecretReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of secret if self.secret: - _dict["secret"] = self.secret.to_dict() + _dict['secret'] = self.secret.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "secret": Secret.from_dict(obj["secret"]) - if obj.get("secret") is not None - else None - } - ) + _obj = cls.model_validate({ + "secret": Secret.from_dict(obj["secret"]) if obj.get("secret") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_service.py b/koyeb/api/models/create_service.py index ca29b476..466ba494 100644 --- a/koyeb/api/models/create_service.py +++ b/koyeb/api/models/create_service.py @@ -25,29 +25,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateService(BaseModel): """ CreateService - """ # noqa: E501 - + """ # noqa: E501 app_id: Optional[StrictStr] = None definition: Optional[DeploymentDefinition] = None life_cycle: Optional[ServiceLifeCycle] = None instance_snapshot_id: Optional[StrictStr] = None name: Optional[StrictStr] = None - service_account_id: Optional[StrictStr] = Field( - default=None, - description="(Optional) The Albe service account ID to associate with the service. Immutable after creation.", - ) - __properties: ClassVar[List[str]] = [ - "app_id", - "definition", - "life_cycle", - "instance_snapshot_id", - "name", - "service_account_id", - ] + service_account_id: Optional[StrictStr] = Field(default=None, description="(Optional) The Albe service account ID to associate with the service. Immutable after creation.") + __properties: ClassVar[List[str]] = ["app_id", "definition", "life_cycle", "instance_snapshot_id", "name", "service_account_id"] model_config = ConfigDict( validate_by_name=True, @@ -56,6 +44,7 @@ class CreateService(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -79,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -88,10 +78,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of definition if self.definition: - _dict["definition"] = self.definition.to_dict() + _dict['definition'] = self.definition.to_dict() # override the default output from pydantic by calling `to_dict()` of life_cycle if self.life_cycle: - _dict["life_cycle"] = self.life_cycle.to_dict() + _dict['life_cycle'] = self.life_cycle.to_dict() return _dict @classmethod @@ -103,18 +93,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "app_id": obj.get("app_id"), - "definition": DeploymentDefinition.from_dict(obj["definition"]) - if obj.get("definition") is not None - else None, - "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) - if obj.get("life_cycle") is not None - else None, - "instance_snapshot_id": obj.get("instance_snapshot_id"), - "name": obj.get("name"), - "service_account_id": obj.get("service_account_id"), - } - ) + _obj = cls.model_validate({ + "app_id": obj.get("app_id"), + "definition": DeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None, + "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) if obj.get("life_cycle") is not None else None, + "instance_snapshot_id": obj.get("instance_snapshot_id"), + "name": obj.get("name"), + "service_account_id": obj.get("service_account_id") + }) return _obj + + diff --git a/koyeb/api/models/create_service_pool.py b/koyeb/api/models/create_service_pool.py index c128942f..1655c4cd 100644 --- a/koyeb/api/models/create_service_pool.py +++ b/koyeb/api/models/create_service_pool.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateServicePool(BaseModel): """ CreateServicePool - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None size: Optional[StrictInt] = None definition: Optional[DeploymentDefinition] = None @@ -42,6 +40,7 @@ class CreateServicePool(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of definition if self.definition: - _dict["definition"] = self.definition.to_dict() + _dict['definition'] = self.definition.to_dict() return _dict @classmethod @@ -86,13 +86,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "size": obj.get("size"), - "definition": DeploymentDefinition.from_dict(obj["definition"]) - if obj.get("definition") is not None - else None, - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "size": obj.get("size"), + "definition": DeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_service_pool_reply.py b/koyeb/api/models/create_service_pool_reply.py index b5df058d..28eaebde 100644 --- a/koyeb/api/models/create_service_pool_reply.py +++ b/koyeb/api/models/create_service_pool_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateServicePoolReply(BaseModel): """ CreateServicePoolReply - """ # noqa: E501 - + """ # noqa: E501 service_pool: Optional[ServicePool] = None __properties: ClassVar[List[str]] = ["service_pool"] @@ -40,6 +38,7 @@ class CreateServicePoolReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of service_pool if self.service_pool: - _dict["service_pool"] = self.service_pool.to_dict() + _dict['service_pool'] = self.service_pool.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service_pool": ServicePool.from_dict(obj["service_pool"]) - if obj.get("service_pool") is not None - else None - } - ) + _obj = cls.model_validate({ + "service_pool": ServicePool.from_dict(obj["service_pool"]) if obj.get("service_pool") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_service_reply.py b/koyeb/api/models/create_service_reply.py index f1d6a659..bf9b50e2 100644 --- a/koyeb/api/models/create_service_reply.py +++ b/koyeb/api/models/create_service_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateServiceReply(BaseModel): """ CreateServiceReply - """ # noqa: E501 - + """ # noqa: E501 service: Optional[Service] = None __properties: ClassVar[List[str]] = ["service"] @@ -40,6 +38,7 @@ class CreateServiceReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of service if self.service: - _dict["service"] = self.service.to_dict() + _dict['service'] = self.service.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service": Service.from_dict(obj["service"]) - if obj.get("service") is not None - else None - } - ) + _obj = cls.model_validate({ + "service": Service.from_dict(obj["service"]) if obj.get("service") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_snapshot_reply.py b/koyeb/api/models/create_snapshot_reply.py index db0dc587..27b93b5c 100644 --- a/koyeb/api/models/create_snapshot_reply.py +++ b/koyeb/api/models/create_snapshot_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateSnapshotReply(BaseModel): """ CreateSnapshotReply - """ # noqa: E501 - + """ # noqa: E501 snapshot: Optional[Snapshot] = None __properties: ClassVar[List[str]] = ["snapshot"] @@ -40,6 +38,7 @@ class CreateSnapshotReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of snapshot if self.snapshot: - _dict["snapshot"] = self.snapshot.to_dict() + _dict['snapshot'] = self.snapshot.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "snapshot": Snapshot.from_dict(obj["snapshot"]) - if obj.get("snapshot") is not None - else None - } - ) + _obj = cls.model_validate({ + "snapshot": Snapshot.from_dict(obj["snapshot"]) if obj.get("snapshot") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/create_snapshot_request.py b/koyeb/api/models/create_snapshot_request.py index 7a73ac71..289f6da9 100644 --- a/koyeb/api/models/create_snapshot_request.py +++ b/koyeb/api/models/create_snapshot_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateSnapshotRequest(BaseModel): """ CreateSnapshotRequest - """ # noqa: E501 - + """ # noqa: E501 parent_volume_id: Optional[StrictStr] = None name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["parent_volume_id", "name"] @@ -40,6 +38,7 @@ class CreateSnapshotRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"parent_volume_id": obj.get("parent_volume_id"), "name": obj.get("name")} - ) + _obj = cls.model_validate({ + "parent_volume_id": obj.get("parent_volume_id"), + "name": obj.get("name") + }) return _obj + + diff --git a/koyeb/api/models/create_stage_attempt_request.py b/koyeb/api/models/create_stage_attempt_request.py index 8e8d1ef4..f46a7e81 100644 --- a/koyeb/api/models/create_stage_attempt_request.py +++ b/koyeb/api/models/create_stage_attempt_request.py @@ -20,33 +20,21 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.deployment_provisioning_info_stage_status import ( - DeploymentProvisioningInfoStageStatus, -) +from koyeb.api.models.deployment_provisioning_info_stage_status import DeploymentProvisioningInfoStageStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateStageAttemptRequest(BaseModel): """ CreateStageAttemptRequest - """ # noqa: E501 - + """ # noqa: E501 secret: Optional[StrictStr] = None - status: Optional[ - DeploymentProvisioningInfoStageStatus - ] = DeploymentProvisioningInfoStageStatus.UNKNOWN + status: Optional[DeploymentProvisioningInfoStageStatus] = DeploymentProvisioningInfoStageStatus.UNKNOWN started_at: Optional[datetime] = None messages: Optional[List[StrictStr]] = None steps: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = [ - "secret", - "status", - "started_at", - "messages", - "steps", - ] + __properties: ClassVar[List[str]] = ["secret", "status", "started_at", "messages", "steps"] model_config = ConfigDict( validate_by_name=True, @@ -55,6 +43,7 @@ class CreateStageAttemptRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -78,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -96,15 +86,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "secret": obj.get("secret"), - "status": obj.get("status") - if obj.get("status") is not None - else DeploymentProvisioningInfoStageStatus.UNKNOWN, - "started_at": obj.get("started_at"), - "messages": obj.get("messages"), - "steps": obj.get("steps"), - } - ) + _obj = cls.model_validate({ + "secret": obj.get("secret"), + "status": obj.get("status") if obj.get("status") is not None else DeploymentProvisioningInfoStageStatus.UNKNOWN, + "started_at": obj.get("started_at"), + "messages": obj.get("messages"), + "steps": obj.get("steps") + }) return _obj + + diff --git a/koyeb/api/models/credential.py b/koyeb/api/models/credential.py index 90a2452f..a9423d98 100644 --- a/koyeb/api/models/credential.py +++ b/koyeb/api/models/credential.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Credential(BaseModel): """ Credential - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None type: Optional[CredentialType] = CredentialType.INVALID name: Optional[StrictStr] = None @@ -41,18 +39,7 @@ class Credential(BaseModel): updated_at: Optional[datetime] = None created_at: Optional[datetime] = None expires_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = [ - "id", - "type", - "name", - "token", - "description", - "user_id", - "organization_id", - "updated_at", - "created_at", - "expires_at", - ] + __properties: ClassVar[List[str]] = ["id", "type", "name", "token", "description", "user_id", "organization_id", "updated_at", "created_at", "expires_at"] model_config = ConfigDict( validate_by_name=True, @@ -61,6 +48,7 @@ class Credential(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -84,7 +72,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -102,20 +91,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "type": obj.get("type") - if obj.get("type") is not None - else CredentialType.INVALID, - "name": obj.get("name"), - "token": obj.get("token"), - "description": obj.get("description"), - "user_id": obj.get("user_id"), - "organization_id": obj.get("organization_id"), - "updated_at": obj.get("updated_at"), - "created_at": obj.get("created_at"), - "expires_at": obj.get("expires_at"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type") if obj.get("type") is not None else CredentialType.INVALID, + "name": obj.get("name"), + "token": obj.get("token"), + "description": obj.get("description"), + "user_id": obj.get("user_id"), + "organization_id": obj.get("organization_id"), + "updated_at": obj.get("updated_at"), + "created_at": obj.get("created_at"), + "expires_at": obj.get("expires_at") + }) return _obj + + diff --git a/koyeb/api/models/credential_type.py b/koyeb/api/models/credential_type.py index 3d835bd3..bf4708ee 100644 --- a/koyeb/api/models/credential_type.py +++ b/koyeb/api/models/credential_type.py @@ -26,11 +26,13 @@ class CredentialType(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - USER = "USER" - ORGANIZATION = "ORGANIZATION" + INVALID = 'INVALID' + USER = 'USER' + ORGANIZATION = 'ORGANIZATION' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of CredentialType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/database_deployment_metadata.py b/koyeb/api/models/database_deployment_metadata.py index 81fadd5f..8cc12f56 100644 --- a/koyeb/api/models/database_deployment_metadata.py +++ b/koyeb/api/models/database_deployment_metadata.py @@ -19,19 +19,15 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.neon_postgres_database_deployment_metadata import ( - NeonPostgresDatabaseDeploymentMetadata, -) +from koyeb.api.models.neon_postgres_database_deployment_metadata import NeonPostgresDatabaseDeploymentMetadata from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DatabaseDeploymentMetadata(BaseModel): """ DatabaseDeploymentMetadata - """ # noqa: E501 - + """ # noqa: E501 neon_postgres: Optional[NeonPostgresDatabaseDeploymentMetadata] = None __properties: ClassVar[List[str]] = ["neon_postgres"] @@ -42,6 +38,7 @@ class DatabaseDeploymentMetadata(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of neon_postgres if self.neon_postgres: - _dict["neon_postgres"] = self.neon_postgres.to_dict() + _dict['neon_postgres'] = self.neon_postgres.to_dict() return _dict @classmethod @@ -86,13 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "neon_postgres": NeonPostgresDatabaseDeploymentMetadata.from_dict( - obj["neon_postgres"] - ) - if obj.get("neon_postgres") is not None - else None - } - ) + _obj = cls.model_validate({ + "neon_postgres": NeonPostgresDatabaseDeploymentMetadata.from_dict(obj["neon_postgres"]) if obj.get("neon_postgres") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/database_role_password.py b/koyeb/api/models/database_role_password.py index c5205862..c405a183 100644 --- a/koyeb/api/models/database_role_password.py +++ b/koyeb/api/models/database_role_password.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DatabaseRolePassword(BaseModel): """ DatabaseRolePassword - """ # noqa: E501 - + """ # noqa: E501 username: Optional[StrictStr] = None password: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["username", "password"] @@ -40,6 +38,7 @@ class DatabaseRolePassword(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"username": obj.get("username"), "password": obj.get("password")} - ) + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password") + }) return _obj + + diff --git a/koyeb/api/models/database_source.py b/koyeb/api/models/database_source.py index 22c3266d..1e02e2e3 100644 --- a/koyeb/api/models/database_source.py +++ b/koyeb/api/models/database_source.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DatabaseSource(BaseModel): """ DatabaseSource - """ # noqa: E501 - + """ # noqa: E501 neon_postgres: Optional[NeonPostgresDatabase] = None __properties: ClassVar[List[str]] = ["neon_postgres"] @@ -40,6 +38,7 @@ class DatabaseSource(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of neon_postgres if self.neon_postgres: - _dict["neon_postgres"] = self.neon_postgres.to_dict() + _dict['neon_postgres'] = self.neon_postgres.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "neon_postgres": NeonPostgresDatabase.from_dict(obj["neon_postgres"]) - if obj.get("neon_postgres") is not None - else None - } - ) + _obj = cls.model_validate({ + "neon_postgres": NeonPostgresDatabase.from_dict(obj["neon_postgres"]) if obj.get("neon_postgres") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/database_usage.py b/koyeb/api/models/database_usage.py index 67210716..7343bf59 100644 --- a/koyeb/api/models/database_usage.py +++ b/koyeb/api/models/database_usage.py @@ -23,22 +23,15 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DatabaseUsage(BaseModel): """ DatabaseUsage - """ # noqa: E501 - + """ # noqa: E501 service_id: Optional[StrictStr] = None service_name: Optional[StrictStr] = None compute_time_seconds: Optional[StrictInt] = None data_storage_megabytes_hours: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = [ - "service_id", - "service_name", - "compute_time_seconds", - "data_storage_megabytes_hours", - ] + __properties: ClassVar[List[str]] = ["service_id", "service_name", "compute_time_seconds", "data_storage_megabytes_hours"] model_config = ConfigDict( validate_by_name=True, @@ -47,6 +40,7 @@ class DatabaseUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -88,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service_id": obj.get("service_id"), - "service_name": obj.get("service_name"), - "compute_time_seconds": obj.get("compute_time_seconds"), - "data_storage_megabytes_hours": obj.get("data_storage_megabytes_hours"), - } - ) + _obj = cls.model_validate({ + "service_id": obj.get("service_id"), + "service_name": obj.get("service_name"), + "compute_time_seconds": obj.get("compute_time_seconds"), + "data_storage_megabytes_hours": obj.get("data_storage_megabytes_hours") + }) return _obj + + diff --git a/koyeb/api/models/database_usage_details.py b/koyeb/api/models/database_usage_details.py index 12ba6e3c..96eb3fcd 100644 --- a/koyeb/api/models/database_usage_details.py +++ b/koyeb/api/models/database_usage_details.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DatabaseUsageDetails(BaseModel): """ DatabaseUsageDetails - """ # noqa: E501 - + """ # noqa: E501 organization_id: Optional[StrictStr] = None app_id: Optional[StrictStr] = None app_name: Optional[StrictStr] = None @@ -39,17 +37,7 @@ class DatabaseUsageDetails(BaseModel): data_storage_megabytes_hour: Optional[StrictInt] = None started_at: Optional[datetime] = None terminated_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = [ - "organization_id", - "app_id", - "app_name", - "service_id", - "service_name", - "compute_time_seconds", - "data_storage_megabytes_hour", - "started_at", - "terminated_at", - ] + __properties: ClassVar[List[str]] = ["organization_id", "app_id", "app_name", "service_id", "service_name", "compute_time_seconds", "data_storage_megabytes_hour", "started_at", "terminated_at"] model_config = ConfigDict( validate_by_name=True, @@ -58,6 +46,7 @@ class DatabaseUsageDetails(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -81,7 +70,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -99,17 +89,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization_id": obj.get("organization_id"), - "app_id": obj.get("app_id"), - "app_name": obj.get("app_name"), - "service_id": obj.get("service_id"), - "service_name": obj.get("service_name"), - "compute_time_seconds": obj.get("compute_time_seconds"), - "data_storage_megabytes_hour": obj.get("data_storage_megabytes_hour"), - "started_at": obj.get("started_at"), - "terminated_at": obj.get("terminated_at"), - } - ) + _obj = cls.model_validate({ + "organization_id": obj.get("organization_id"), + "app_id": obj.get("app_id"), + "app_name": obj.get("app_name"), + "service_id": obj.get("service_id"), + "service_name": obj.get("service_name"), + "compute_time_seconds": obj.get("compute_time_seconds"), + "data_storage_megabytes_hour": obj.get("data_storage_megabytes_hour"), + "started_at": obj.get("started_at"), + "terminated_at": obj.get("terminated_at") + }) return _obj + + diff --git a/koyeb/api/models/datacenter_list_item.py b/koyeb/api/models/datacenter_list_item.py index 3b395b3b..f9806cc1 100644 --- a/koyeb/api/models/datacenter_list_item.py +++ b/koyeb/api/models/datacenter_list_item.py @@ -23,26 +23,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DatacenterListItem(BaseModel): """ DatacenterListItem - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None region_id: Optional[StrictStr] = None domain: Optional[StrictStr] = None coordinates: Optional[List[StrictStr]] = None use_gpu: Optional[StrictBool] = None regions: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = [ - "id", - "region_id", - "domain", - "coordinates", - "use_gpu", - "regions", - ] + __properties: ClassVar[List[str]] = ["id", "region_id", "domain", "coordinates", "use_gpu", "regions"] model_config = ConfigDict( validate_by_name=True, @@ -51,6 +42,7 @@ class DatacenterListItem(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -92,14 +85,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "region_id": obj.get("region_id"), - "domain": obj.get("domain"), - "coordinates": obj.get("coordinates"), - "use_gpu": obj.get("use_gpu"), - "regions": obj.get("regions"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "region_id": obj.get("region_id"), + "domain": obj.get("domain"), + "coordinates": obj.get("coordinates"), + "use_gpu": obj.get("use_gpu"), + "regions": obj.get("regions") + }) return _obj + + diff --git a/koyeb/api/models/deactivate_organization_reply.py b/koyeb/api/models/deactivate_organization_reply.py index 21598d56..8fd7daef 100644 --- a/koyeb/api/models/deactivate_organization_reply.py +++ b/koyeb/api/models/deactivate_organization_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeactivateOrganizationReply(BaseModel): """ DeactivateOrganizationReply - """ # noqa: E501 - + """ # noqa: E501 organization: Optional[Organization] = None __properties: ClassVar[List[str]] = ["organization"] @@ -40,6 +38,7 @@ class DeactivateOrganizationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization": Organization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None - } - ) + _obj = cls.model_validate({ + "organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/deactivate_organization_request.py b/koyeb/api/models/deactivate_organization_request.py index 14d6bbd5..74cd5765 100644 --- a/koyeb/api/models/deactivate_organization_request.py +++ b/koyeb/api/models/deactivate_organization_request.py @@ -23,16 +23,11 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeactivateOrganizationRequest(BaseModel): """ DeactivateOrganizationRequest - """ # noqa: E501 - - skip_confirmation: Optional[StrictBool] = Field( - default=None, - description="if set to true, skip_confirmation will directly start the deactivation process, without sending a confirmation email beforehand.", - ) + """ # noqa: E501 + skip_confirmation: Optional[StrictBool] = Field(default=None, description="if set to true, skip_confirmation will directly start the deactivation process, without sending a confirmation email beforehand.") __properties: ClassVar[List[str]] = ["skip_confirmation"] model_config = ConfigDict( @@ -42,6 +37,7 @@ class DeactivateOrganizationRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"skip_confirmation": obj.get("skip_confirmation")}) + _obj = cls.model_validate({ + "skip_confirmation": obj.get("skip_confirmation") + }) return _obj + + diff --git a/koyeb/api/models/declare_stage_progress_request.py b/koyeb/api/models/declare_stage_progress_request.py index a549ad10..50777c22 100644 --- a/koyeb/api/models/declare_stage_progress_request.py +++ b/koyeb/api/models/declare_stage_progress_request.py @@ -20,37 +20,23 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.deployment_provisioning_info_stage_status import ( - DeploymentProvisioningInfoStageStatus, -) +from koyeb.api.models.deployment_provisioning_info_stage_status import DeploymentProvisioningInfoStageStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeclareStageProgressRequest(BaseModel): """ DeclareStageProgressRequest - """ # noqa: E501 - + """ # noqa: E501 secret: Optional[StrictStr] = None - status: Optional[ - DeploymentProvisioningInfoStageStatus - ] = DeploymentProvisioningInfoStageStatus.UNKNOWN + status: Optional[DeploymentProvisioningInfoStageStatus] = DeploymentProvisioningInfoStageStatus.UNKNOWN finished_at: Optional[datetime] = None messages: Optional[List[StrictStr]] = None image_pushed: Optional[StrictBool] = None internal_failure: Optional[StrictBool] = None retryable_failure: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "secret", - "status", - "finished_at", - "messages", - "image_pushed", - "internal_failure", - "retryable_failure", - ] + __properties: ClassVar[List[str]] = ["secret", "status", "finished_at", "messages", "image_pushed", "internal_failure", "retryable_failure"] model_config = ConfigDict( validate_by_name=True, @@ -59,6 +45,7 @@ class DeclareStageProgressRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -82,7 +69,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -100,17 +88,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "secret": obj.get("secret"), - "status": obj.get("status") - if obj.get("status") is not None - else DeploymentProvisioningInfoStageStatus.UNKNOWN, - "finished_at": obj.get("finished_at"), - "messages": obj.get("messages"), - "image_pushed": obj.get("image_pushed"), - "internal_failure": obj.get("internal_failure"), - "retryable_failure": obj.get("retryable_failure"), - } - ) + _obj = cls.model_validate({ + "secret": obj.get("secret"), + "status": obj.get("status") if obj.get("status") is not None else DeploymentProvisioningInfoStageStatus.UNKNOWN, + "finished_at": obj.get("finished_at"), + "messages": obj.get("messages"), + "image_pushed": obj.get("image_pushed"), + "internal_failure": obj.get("internal_failure"), + "retryable_failure": obj.get("retryable_failure") + }) return _obj + + diff --git a/koyeb/api/models/declare_step_progress_request.py b/koyeb/api/models/declare_step_progress_request.py index 05404863..98034a21 100644 --- a/koyeb/api/models/declare_step_progress_request.py +++ b/koyeb/api/models/declare_step_progress_request.py @@ -20,33 +20,21 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.deployment_provisioning_info_stage_status import ( - DeploymentProvisioningInfoStageStatus, -) +from koyeb.api.models.deployment_provisioning_info_stage_status import DeploymentProvisioningInfoStageStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeclareStepProgressRequest(BaseModel): """ DeclareStepProgressRequest - """ # noqa: E501 - + """ # noqa: E501 secret: Optional[StrictStr] = None - status: Optional[ - DeploymentProvisioningInfoStageStatus - ] = DeploymentProvisioningInfoStageStatus.UNKNOWN + status: Optional[DeploymentProvisioningInfoStageStatus] = DeploymentProvisioningInfoStageStatus.UNKNOWN started_at: Optional[datetime] = None finished_at: Optional[datetime] = None messages: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = [ - "secret", - "status", - "started_at", - "finished_at", - "messages", - ] + __properties: ClassVar[List[str]] = ["secret", "status", "started_at", "finished_at", "messages"] model_config = ConfigDict( validate_by_name=True, @@ -55,6 +43,7 @@ class DeclareStepProgressRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -78,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -96,15 +86,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "secret": obj.get("secret"), - "status": obj.get("status") - if obj.get("status") is not None - else DeploymentProvisioningInfoStageStatus.UNKNOWN, - "started_at": obj.get("started_at"), - "finished_at": obj.get("finished_at"), - "messages": obj.get("messages"), - } - ) + _obj = cls.model_validate({ + "secret": obj.get("secret"), + "status": obj.get("status") if obj.get("status") is not None else DeploymentProvisioningInfoStageStatus.UNKNOWN, + "started_at": obj.get("started_at"), + "finished_at": obj.get("finished_at"), + "messages": obj.get("messages") + }) return _obj + + diff --git a/koyeb/api/models/decline_organization_invitation_reply.py b/koyeb/api/models/decline_organization_invitation_reply.py index 5444850f..3abfeaa3 100644 --- a/koyeb/api/models/decline_organization_invitation_reply.py +++ b/koyeb/api/models/decline_organization_invitation_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeclineOrganizationInvitationReply(BaseModel): """ DeclineOrganizationInvitationReply - """ # noqa: E501 - + """ # noqa: E501 invitation: Optional[OrganizationInvitation] = None __properties: ClassVar[List[str]] = ["invitation"] @@ -40,6 +38,7 @@ class DeclineOrganizationInvitationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of invitation if self.invitation: - _dict["invitation"] = self.invitation.to_dict() + _dict['invitation'] = self.invitation.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "invitation": OrganizationInvitation.from_dict(obj["invitation"]) - if obj.get("invitation") is not None - else None - } - ) + _obj = cls.model_validate({ + "invitation": OrganizationInvitation.from_dict(obj["invitation"]) if obj.get("invitation") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/delete_instance_snapshot_reply.py b/koyeb/api/models/delete_instance_snapshot_reply.py index 5b557d07..d7fbc380 100644 --- a/koyeb/api/models/delete_instance_snapshot_reply.py +++ b/koyeb/api/models/delete_instance_snapshot_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeleteInstanceSnapshotReply(BaseModel): """ DeleteInstanceSnapshotReply - """ # noqa: E501 - + """ # noqa: E501 instance_snapshot: Optional[InstanceSnapshot] = None __properties: ClassVar[List[str]] = ["instance_snapshot"] @@ -40,6 +38,7 @@ class DeleteInstanceSnapshotReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of instance_snapshot if self.instance_snapshot: - _dict["instance_snapshot"] = self.instance_snapshot.to_dict() + _dict['instance_snapshot'] = self.instance_snapshot.to_dict() return _dict @classmethod @@ -84,13 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instance_snapshot": InstanceSnapshot.from_dict( - obj["instance_snapshot"] - ) - if obj.get("instance_snapshot") is not None - else None - } - ) + _obj = cls.model_validate({ + "instance_snapshot": InstanceSnapshot.from_dict(obj["instance_snapshot"]) if obj.get("instance_snapshot") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/delete_organization_reply.py b/koyeb/api/models/delete_organization_reply.py index 9d68e378..608fca90 100644 --- a/koyeb/api/models/delete_organization_reply.py +++ b/koyeb/api/models/delete_organization_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeleteOrganizationReply(BaseModel): """ DeleteOrganizationReply - """ # noqa: E501 - + """ # noqa: E501 organization: Optional[Organization] = None __properties: ClassVar[List[str]] = ["organization"] @@ -40,6 +38,7 @@ class DeleteOrganizationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization": Organization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None - } - ) + _obj = cls.model_validate({ + "organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/delete_persistent_volume_reply.py b/koyeb/api/models/delete_persistent_volume_reply.py index 08d4ab67..5ac4389a 100644 --- a/koyeb/api/models/delete_persistent_volume_reply.py +++ b/koyeb/api/models/delete_persistent_volume_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeletePersistentVolumeReply(BaseModel): """ DeletePersistentVolumeReply - """ # noqa: E501 - + """ # noqa: E501 volume: Optional[PersistentVolume] = None __properties: ClassVar[List[str]] = ["volume"] @@ -40,6 +38,7 @@ class DeletePersistentVolumeReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of volume if self.volume: - _dict["volume"] = self.volume.to_dict() + _dict['volume'] = self.volume.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "volume": PersistentVolume.from_dict(obj["volume"]) - if obj.get("volume") is not None - else None - } - ) + _obj = cls.model_validate({ + "volume": PersistentVolume.from_dict(obj["volume"]) if obj.get("volume") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/delete_snapshot_reply.py b/koyeb/api/models/delete_snapshot_reply.py index 6e2ac1fd..9a365a63 100644 --- a/koyeb/api/models/delete_snapshot_reply.py +++ b/koyeb/api/models/delete_snapshot_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeleteSnapshotReply(BaseModel): """ DeleteSnapshotReply - """ # noqa: E501 - + """ # noqa: E501 snapshot: Optional[Snapshot] = None __properties: ClassVar[List[str]] = ["snapshot"] @@ -40,6 +38,7 @@ class DeleteSnapshotReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of snapshot if self.snapshot: - _dict["snapshot"] = self.snapshot.to_dict() + _dict['snapshot'] = self.snapshot.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "snapshot": Snapshot.from_dict(obj["snapshot"]) - if obj.get("snapshot") is not None - else None - } - ) + _obj = cls.model_validate({ + "snapshot": Snapshot.from_dict(obj["snapshot"]) if obj.get("snapshot") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/delete_user_reply.py b/koyeb/api/models/delete_user_reply.py index fd67f7ef..0bf3fac2 100644 --- a/koyeb/api/models/delete_user_reply.py +++ b/koyeb/api/models/delete_user_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeleteUserReply(BaseModel): """ DeleteUserReply - """ # noqa: E501 - + """ # noqa: E501 user: Optional[User] = None __properties: ClassVar[List[str]] = ["user"] @@ -40,6 +38,7 @@ class DeleteUserReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of user if self.user: - _dict["user"] = self.user.to_dict() + _dict['user'] = self.user.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "user": User.from_dict(obj["user"]) - if obj.get("user") is not None - else None - } - ) + _obj = cls.model_validate({ + "user": User.from_dict(obj["user"]) if obj.get("user") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/deployment.py b/koyeb/api/models/deployment.py index ee15826e..a1337c91 100644 --- a/koyeb/api/models/deployment.py +++ b/koyeb/api/models/deployment.py @@ -30,12 +30,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Deployment(BaseModel): """ Deployment - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -60,37 +58,8 @@ class Deployment(BaseModel): version: Optional[StrictStr] = None deployment_group: Optional[StrictStr] = None instance_snapshot_id: Optional[StrictStr] = None - created_by: Optional[StrictStr] = Field( - default=None, - description="CreatedBy is the user_id of the user that called CreateService or UpdateService. It's optional because CreateService or UpdateService can be called by a machine, using a token that's organization scoped, not user scoped.", - ) - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "updated_at", - "allocated_at", - "started_at", - "succeeded_at", - "terminated_at", - "organization_id", - "project_id", - "app_id", - "service_id", - "parent_id", - "child_id", - "status", - "metadata", - "definition", - "messages", - "provisioning_info", - "database_info", - "skip_build", - "role", - "version", - "deployment_group", - "instance_snapshot_id", - "created_by", - ] + created_by: Optional[StrictStr] = Field(default=None, description="CreatedBy is the user_id of the user that called CreateService or UpdateService. It's optional because CreateService or UpdateService can be called by a machine, using a token that's organization scoped, not user scoped.") + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "allocated_at", "started_at", "succeeded_at", "terminated_at", "organization_id", "project_id", "app_id", "service_id", "parent_id", "child_id", "status", "metadata", "definition", "messages", "provisioning_info", "database_info", "skip_build", "role", "version", "deployment_group", "instance_snapshot_id", "created_by"] model_config = ConfigDict( validate_by_name=True, @@ -99,6 +68,7 @@ class Deployment(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -122,7 +92,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -131,16 +102,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of metadata if self.metadata: - _dict["metadata"] = self.metadata.to_dict() + _dict['metadata'] = self.metadata.to_dict() # override the default output from pydantic by calling `to_dict()` of definition if self.definition: - _dict["definition"] = self.definition.to_dict() + _dict['definition'] = self.definition.to_dict() # override the default output from pydantic by calling `to_dict()` of provisioning_info if self.provisioning_info: - _dict["provisioning_info"] = self.provisioning_info.to_dict() + _dict['provisioning_info'] = self.provisioning_info.to_dict() # override the default output from pydantic by calling `to_dict()` of database_info if self.database_info: - _dict["database_info"] = self.database_info.to_dict() + _dict['database_info'] = self.database_info.to_dict() return _dict @classmethod @@ -152,47 +123,33 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "allocated_at": obj.get("allocated_at"), - "started_at": obj.get("started_at"), - "succeeded_at": obj.get("succeeded_at"), - "terminated_at": obj.get("terminated_at"), - "organization_id": obj.get("organization_id"), - "project_id": obj.get("project_id"), - "app_id": obj.get("app_id"), - "service_id": obj.get("service_id"), - "parent_id": obj.get("parent_id"), - "child_id": obj.get("child_id"), - "status": obj.get("status") - if obj.get("status") is not None - else DeploymentStatus.PENDING, - "metadata": DeploymentMetadata.from_dict(obj["metadata"]) - if obj.get("metadata") is not None - else None, - "definition": DeploymentDefinition.from_dict(obj["definition"]) - if obj.get("definition") is not None - else None, - "messages": obj.get("messages"), - "provisioning_info": DeploymentProvisioningInfo.from_dict( - obj["provisioning_info"] - ) - if obj.get("provisioning_info") is not None - else None, - "database_info": DeploymentDatabaseInfo.from_dict(obj["database_info"]) - if obj.get("database_info") is not None - else None, - "skip_build": obj.get("skip_build"), - "role": obj.get("role") - if obj.get("role") is not None - else DeploymentRole.INVALID, - "version": obj.get("version"), - "deployment_group": obj.get("deployment_group"), - "instance_snapshot_id": obj.get("instance_snapshot_id"), - "created_by": obj.get("created_by"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "allocated_at": obj.get("allocated_at"), + "started_at": obj.get("started_at"), + "succeeded_at": obj.get("succeeded_at"), + "terminated_at": obj.get("terminated_at"), + "organization_id": obj.get("organization_id"), + "project_id": obj.get("project_id"), + "app_id": obj.get("app_id"), + "service_id": obj.get("service_id"), + "parent_id": obj.get("parent_id"), + "child_id": obj.get("child_id"), + "status": obj.get("status") if obj.get("status") is not None else DeploymentStatus.PENDING, + "metadata": DeploymentMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "definition": DeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None, + "messages": obj.get("messages"), + "provisioning_info": DeploymentProvisioningInfo.from_dict(obj["provisioning_info"]) if obj.get("provisioning_info") is not None else None, + "database_info": DeploymentDatabaseInfo.from_dict(obj["database_info"]) if obj.get("database_info") is not None else None, + "skip_build": obj.get("skip_build"), + "role": obj.get("role") if obj.get("role") is not None else DeploymentRole.INVALID, + "version": obj.get("version"), + "deployment_group": obj.get("deployment_group"), + "instance_snapshot_id": obj.get("instance_snapshot_id"), + "created_by": obj.get("created_by") + }) return _obj + + diff --git a/koyeb/api/models/deployment_database_info.py b/koyeb/api/models/deployment_database_info.py index 4ee06612..ed47eb57 100644 --- a/koyeb/api/models/deployment_database_info.py +++ b/koyeb/api/models/deployment_database_info.py @@ -19,19 +19,15 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.deployment_neon_postgres_database_info import ( - DeploymentNeonPostgresDatabaseInfo, -) +from koyeb.api.models.deployment_neon_postgres_database_info import DeploymentNeonPostgresDatabaseInfo from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentDatabaseInfo(BaseModel): """ DeploymentDatabaseInfo - """ # noqa: E501 - + """ # noqa: E501 neon_postgres: Optional[DeploymentNeonPostgresDatabaseInfo] = None __properties: ClassVar[List[str]] = ["neon_postgres"] @@ -42,6 +38,7 @@ class DeploymentDatabaseInfo(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of neon_postgres if self.neon_postgres: - _dict["neon_postgres"] = self.neon_postgres.to_dict() + _dict['neon_postgres'] = self.neon_postgres.to_dict() return _dict @classmethod @@ -86,13 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "neon_postgres": DeploymentNeonPostgresDatabaseInfo.from_dict( - obj["neon_postgres"] - ) - if obj.get("neon_postgres") is not None - else None - } - ) + _obj = cls.model_validate({ + "neon_postgres": DeploymentNeonPostgresDatabaseInfo.from_dict(obj["neon_postgres"]) if obj.get("neon_postgres") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/deployment_definition.py b/koyeb/api/models/deployment_definition.py index 3c59ca21..531b022d 100644 --- a/koyeb/api/models/deployment_definition.py +++ b/koyeb/api/models/deployment_definition.py @@ -40,16 +40,11 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentDefinition(BaseModel): """ DeploymentDefinition - """ # noqa: E501 - - name: Optional[StrictStr] = Field( - default=None, - description="Service name. Deprecated, set it directly in the Service when creating it.", - ) + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Service name. Deprecated, set it directly in the Service when creating it.") type: Optional[DeploymentDefinitionType] = DeploymentDefinitionType.INVALID strategy: Optional[DeploymentStrategy] = None routes: Optional[List[DeploymentRoute]] = None @@ -69,28 +64,7 @@ class DeploymentDefinition(BaseModel): git: Optional[GitSource] = None database: Optional[DatabaseSource] = None archive: Optional[ArchiveSource] = None - __properties: ClassVar[List[str]] = [ - "name", - "type", - "strategy", - "routes", - "ports", - "proxy_ports", - "env", - "regions", - "scalings", - "instance_types", - "health_checks", - "volumes", - "config_files", - "skip_cache", - "mesh", - "network_policy", - "docker", - "git", - "database", - "archive", - ] + __properties: ClassVar[List[str]] = ["name", "type", "strategy", "routes", "ports", "proxy_ports", "env", "regions", "scalings", "instance_types", "health_checks", "volumes", "config_files", "skip_cache", "mesh", "network_policy", "docker", "git", "database", "archive"] model_config = ConfigDict( validate_by_name=True, @@ -99,6 +73,7 @@ class DeploymentDefinition(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -122,7 +97,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -131,100 +107,85 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of strategy if self.strategy: - _dict["strategy"] = self.strategy.to_dict() + _dict['strategy'] = self.strategy.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in routes (list) _items = [] if self.routes: for _item_routes in self.routes: - _items.append( - _item_routes.to_dict() if _item_routes is not None else None - ) - _dict["routes"] = _items + if _item_routes: + _items.append(_item_routes.to_dict()) + _dict['routes'] = _items # override the default output from pydantic by calling `to_dict()` of each item in ports (list) _items = [] if self.ports: for _item_ports in self.ports: - _items.append( - _item_ports.to_dict() if _item_ports is not None else None - ) - _dict["ports"] = _items + if _item_ports: + _items.append(_item_ports.to_dict()) + _dict['ports'] = _items # override the default output from pydantic by calling `to_dict()` of each item in proxy_ports (list) _items = [] if self.proxy_ports: for _item_proxy_ports in self.proxy_ports: - _items.append( - _item_proxy_ports.to_dict() - if _item_proxy_ports is not None - else None - ) - _dict["proxy_ports"] = _items + if _item_proxy_ports: + _items.append(_item_proxy_ports.to_dict()) + _dict['proxy_ports'] = _items # override the default output from pydantic by calling `to_dict()` of each item in env (list) _items = [] if self.env: for _item_env in self.env: - _items.append(_item_env.to_dict() if _item_env is not None else None) - _dict["env"] = _items + if _item_env: + _items.append(_item_env.to_dict()) + _dict['env'] = _items # override the default output from pydantic by calling `to_dict()` of each item in scalings (list) _items = [] if self.scalings: for _item_scalings in self.scalings: - _items.append( - _item_scalings.to_dict() if _item_scalings is not None else None - ) - _dict["scalings"] = _items + if _item_scalings: + _items.append(_item_scalings.to_dict()) + _dict['scalings'] = _items # override the default output from pydantic by calling `to_dict()` of each item in instance_types (list) _items = [] if self.instance_types: for _item_instance_types in self.instance_types: - _items.append( - _item_instance_types.to_dict() - if _item_instance_types is not None - else None - ) - _dict["instance_types"] = _items + if _item_instance_types: + _items.append(_item_instance_types.to_dict()) + _dict['instance_types'] = _items # override the default output from pydantic by calling `to_dict()` of each item in health_checks (list) _items = [] if self.health_checks: for _item_health_checks in self.health_checks: - _items.append( - _item_health_checks.to_dict() - if _item_health_checks is not None - else None - ) - _dict["health_checks"] = _items + if _item_health_checks: + _items.append(_item_health_checks.to_dict()) + _dict['health_checks'] = _items # override the default output from pydantic by calling `to_dict()` of each item in volumes (list) _items = [] if self.volumes: for _item_volumes in self.volumes: - _items.append( - _item_volumes.to_dict() if _item_volumes is not None else None - ) - _dict["volumes"] = _items + if _item_volumes: + _items.append(_item_volumes.to_dict()) + _dict['volumes'] = _items # override the default output from pydantic by calling `to_dict()` of each item in config_files (list) _items = [] if self.config_files: for _item_config_files in self.config_files: - _items.append( - _item_config_files.to_dict() - if _item_config_files is not None - else None - ) - _dict["config_files"] = _items + if _item_config_files: + _items.append(_item_config_files.to_dict()) + _dict['config_files'] = _items # override the default output from pydantic by calling `to_dict()` of network_policy if self.network_policy: - _dict["network_policy"] = self.network_policy.to_dict() + _dict['network_policy'] = self.network_policy.to_dict() # override the default output from pydantic by calling `to_dict()` of docker if self.docker: - _dict["docker"] = self.docker.to_dict() + _dict['docker'] = self.docker.to_dict() # override the default output from pydantic by calling `to_dict()` of git if self.git: - _dict["git"] = self.git.to_dict() + _dict['git'] = self.git.to_dict() # override the default output from pydantic by calling `to_dict()` of database if self.database: - _dict["database"] = self.database.to_dict() + _dict['database'] = self.database.to_dict() # override the default output from pydantic by calling `to_dict()` of archive if self.archive: - _dict["archive"] = self.archive.to_dict() + _dict['archive'] = self.archive.to_dict() return _dict @classmethod @@ -236,76 +197,28 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "type": obj.get("type") - if obj.get("type") is not None - else DeploymentDefinitionType.INVALID, - "strategy": DeploymentStrategy.from_dict(obj["strategy"]) - if obj.get("strategy") is not None - else None, - "routes": [DeploymentRoute.from_dict(_item) for _item in obj["routes"]] - if obj.get("routes") is not None - else None, - "ports": [DeploymentPort.from_dict(_item) for _item in obj["ports"]] - if obj.get("ports") is not None - else None, - "proxy_ports": [ - DeploymentProxyPort.from_dict(_item) for _item in obj["proxy_ports"] - ] - if obj.get("proxy_ports") is not None - else None, - "env": [DeploymentEnv.from_dict(_item) for _item in obj["env"]] - if obj.get("env") is not None - else None, - "regions": obj.get("regions"), - "scalings": [ - DeploymentScaling.from_dict(_item) for _item in obj["scalings"] - ] - if obj.get("scalings") is not None - else None, - "instance_types": [ - DeploymentInstanceType.from_dict(_item) - for _item in obj["instance_types"] - ] - if obj.get("instance_types") is not None - else None, - "health_checks": [ - DeploymentHealthCheck.from_dict(_item) - for _item in obj["health_checks"] - ] - if obj.get("health_checks") is not None - else None, - "volumes": [ - DeploymentVolume.from_dict(_item) for _item in obj["volumes"] - ] - if obj.get("volumes") is not None - else None, - "config_files": [ - ConfigFile.from_dict(_item) for _item in obj["config_files"] - ] - if obj.get("config_files") is not None - else None, - "skip_cache": obj.get("skip_cache"), - "mesh": obj.get("mesh") - if obj.get("mesh") is not None - else DeploymentMesh.DEPLOYMENT_MESH_AUTO, - "network_policy": NetworkPolicy.from_dict(obj["network_policy"]) - if obj.get("network_policy") is not None - else None, - "docker": DockerSource.from_dict(obj["docker"]) - if obj.get("docker") is not None - else None, - "git": GitSource.from_dict(obj["git"]) - if obj.get("git") is not None - else None, - "database": DatabaseSource.from_dict(obj["database"]) - if obj.get("database") is not None - else None, - "archive": ArchiveSource.from_dict(obj["archive"]) - if obj.get("archive") is not None - else None, - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "type": obj.get("type") if obj.get("type") is not None else DeploymentDefinitionType.INVALID, + "strategy": DeploymentStrategy.from_dict(obj["strategy"]) if obj.get("strategy") is not None else None, + "routes": [DeploymentRoute.from_dict(_item) for _item in obj["routes"]] if obj.get("routes") is not None else None, + "ports": [DeploymentPort.from_dict(_item) for _item in obj["ports"]] if obj.get("ports") is not None else None, + "proxy_ports": [DeploymentProxyPort.from_dict(_item) for _item in obj["proxy_ports"]] if obj.get("proxy_ports") is not None else None, + "env": [DeploymentEnv.from_dict(_item) for _item in obj["env"]] if obj.get("env") is not None else None, + "regions": obj.get("regions"), + "scalings": [DeploymentScaling.from_dict(_item) for _item in obj["scalings"]] if obj.get("scalings") is not None else None, + "instance_types": [DeploymentInstanceType.from_dict(_item) for _item in obj["instance_types"]] if obj.get("instance_types") is not None else None, + "health_checks": [DeploymentHealthCheck.from_dict(_item) for _item in obj["health_checks"]] if obj.get("health_checks") is not None else None, + "volumes": [DeploymentVolume.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None, + "config_files": [ConfigFile.from_dict(_item) for _item in obj["config_files"]] if obj.get("config_files") is not None else None, + "skip_cache": obj.get("skip_cache"), + "mesh": obj.get("mesh") if obj.get("mesh") is not None else DeploymentMesh.DEPLOYMENT_MESH_AUTO, + "network_policy": NetworkPolicy.from_dict(obj["network_policy"]) if obj.get("network_policy") is not None else None, + "docker": DockerSource.from_dict(obj["docker"]) if obj.get("docker") is not None else None, + "git": GitSource.from_dict(obj["git"]) if obj.get("git") is not None else None, + "database": DatabaseSource.from_dict(obj["database"]) if obj.get("database") is not None else None, + "archive": ArchiveSource.from_dict(obj["archive"]) if obj.get("archive") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/deployment_definition_type.py b/koyeb/api/models/deployment_definition_type.py index c3014a7e..4897cba4 100644 --- a/koyeb/api/models/deployment_definition_type.py +++ b/koyeb/api/models/deployment_definition_type.py @@ -26,13 +26,15 @@ class DeploymentDefinitionType(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - WEB = "WEB" - WORKER = "WORKER" - DATABASE = "DATABASE" - SANDBOX = "SANDBOX" + INVALID = 'INVALID' + WEB = 'WEB' + WORKER = 'WORKER' + DATABASE = 'DATABASE' + SANDBOX = 'SANDBOX' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DeploymentDefinitionType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/deployment_env.py b/koyeb/api/models/deployment_env.py index 1ecef1e5..98d50c71 100644 --- a/koyeb/api/models/deployment_env.py +++ b/koyeb/api/models/deployment_env.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentEnv(BaseModel): """ DeploymentEnv - """ # noqa: E501 - + """ # noqa: E501 scopes: Optional[List[StrictStr]] = None key: Optional[StrictStr] = None value: Optional[StrictStr] = None @@ -42,6 +40,7 @@ class DeploymentEnv(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "scopes": obj.get("scopes"), - "key": obj.get("key"), - "value": obj.get("value"), - "secret": obj.get("secret"), - } - ) + _obj = cls.model_validate({ + "scopes": obj.get("scopes"), + "key": obj.get("key"), + "value": obj.get("value"), + "secret": obj.get("secret") + }) return _obj + + diff --git a/koyeb/api/models/deployment_event.py b/koyeb/api/models/deployment_event.py index 00cd2493..c95f6fea 100644 --- a/koyeb/api/models/deployment_event.py +++ b/koyeb/api/models/deployment_event.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentEvent(BaseModel): """ DeploymentEvent - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None when: Optional[datetime] = None organization_id: Optional[StrictStr] = None @@ -37,15 +35,7 @@ class DeploymentEvent(BaseModel): type: Optional[StrictStr] = None message: Optional[StrictStr] = None metadata: Optional[Dict[str, Any]] = None - __properties: ClassVar[List[str]] = [ - "id", - "when", - "organization_id", - "deployment_id", - "type", - "message", - "metadata", - ] + __properties: ClassVar[List[str]] = ["id", "when", "organization_id", "deployment_id", "type", "message", "metadata"] model_config = ConfigDict( validate_by_name=True, @@ -54,6 +44,7 @@ class DeploymentEvent(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -95,15 +87,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "when": obj.get("when"), - "organization_id": obj.get("organization_id"), - "deployment_id": obj.get("deployment_id"), - "type": obj.get("type"), - "message": obj.get("message"), - "metadata": obj.get("metadata"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "when": obj.get("when"), + "organization_id": obj.get("organization_id"), + "deployment_id": obj.get("deployment_id"), + "type": obj.get("type"), + "message": obj.get("message"), + "metadata": obj.get("metadata") + }) return _obj + + diff --git a/koyeb/api/models/deployment_health_check.py b/koyeb/api/models/deployment_health_check.py index 8095eafe..18e63351 100644 --- a/koyeb/api/models/deployment_health_check.py +++ b/koyeb/api/models/deployment_health_check.py @@ -25,26 +25,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentHealthCheck(BaseModel): """ DeploymentHealthCheck - """ # noqa: E501 - + """ # noqa: E501 grace_period: Optional[StrictInt] = None interval: Optional[StrictInt] = None restart_limit: Optional[StrictInt] = None timeout: Optional[StrictInt] = None tcp: Optional[TCPHealthCheck] = None http: Optional[HTTPHealthCheck] = None - __properties: ClassVar[List[str]] = [ - "grace_period", - "interval", - "restart_limit", - "timeout", - "tcp", - "http", - ] + __properties: ClassVar[List[str]] = ["grace_period", "interval", "restart_limit", "timeout", "tcp", "http"] model_config = ConfigDict( validate_by_name=True, @@ -53,6 +44,7 @@ class DeploymentHealthCheck(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -76,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -85,10 +78,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of tcp if self.tcp: - _dict["tcp"] = self.tcp.to_dict() + _dict['tcp'] = self.tcp.to_dict() # override the default output from pydantic by calling `to_dict()` of http if self.http: - _dict["http"] = self.http.to_dict() + _dict['http'] = self.http.to_dict() return _dict @classmethod @@ -100,18 +93,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "grace_period": obj.get("grace_period"), - "interval": obj.get("interval"), - "restart_limit": obj.get("restart_limit"), - "timeout": obj.get("timeout"), - "tcp": TCPHealthCheck.from_dict(obj["tcp"]) - if obj.get("tcp") is not None - else None, - "http": HTTPHealthCheck.from_dict(obj["http"]) - if obj.get("http") is not None - else None, - } - ) + _obj = cls.model_validate({ + "grace_period": obj.get("grace_period"), + "interval": obj.get("interval"), + "restart_limit": obj.get("restart_limit"), + "timeout": obj.get("timeout"), + "tcp": TCPHealthCheck.from_dict(obj["tcp"]) if obj.get("tcp") is not None else None, + "http": HTTPHealthCheck.from_dict(obj["http"]) if obj.get("http") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/deployment_instance_type.py b/koyeb/api/models/deployment_instance_type.py index 9c9c866e..9ea41e65 100644 --- a/koyeb/api/models/deployment_instance_type.py +++ b/koyeb/api/models/deployment_instance_type.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentInstanceType(BaseModel): """ DeploymentInstanceType - """ # noqa: E501 - + """ # noqa: E501 scopes: Optional[List[StrictStr]] = None type: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["scopes", "type"] @@ -40,6 +38,7 @@ class DeploymentInstanceType(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"scopes": obj.get("scopes"), "type": obj.get("type")} - ) + _obj = cls.model_validate({ + "scopes": obj.get("scopes"), + "type": obj.get("type") + }) return _obj + + diff --git a/koyeb/api/models/deployment_list_item.py b/koyeb/api/models/deployment_list_item.py index 5b293b49..79ed87f6 100644 --- a/koyeb/api/models/deployment_list_item.py +++ b/koyeb/api/models/deployment_list_item.py @@ -29,12 +29,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentListItem(BaseModel): """ DeploymentListItem - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -55,37 +53,10 @@ class DeploymentListItem(BaseModel): provisioning_info: Optional[DeploymentProvisioningInfo] = None database_info: Optional[DeploymentDatabaseInfo] = None instance_snapshot_id: Optional[StrictStr] = None - created_by: Optional[StrictStr] = Field( - default=None, - description="CreatedBy is the user_id of the user that called CreateService or UpdateService. It's optional because CreateService or UpdateService can be called by a machine, using a token that's organization scoped, not user scoped.", - ) + created_by: Optional[StrictStr] = Field(default=None, description="CreatedBy is the user_id of the user that called CreateService or UpdateService. It's optional because CreateService or UpdateService can be called by a machine, using a token that's organization scoped, not user scoped.") version: Optional[StrictStr] = None deployment_group: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "updated_at", - "allocated_at", - "started_at", - "succeeded_at", - "terminated_at", - "organization_id", - "project_id", - "app_id", - "service_id", - "parent_id", - "child_id", - "status", - "metadata", - "definition", - "messages", - "provisioning_info", - "database_info", - "instance_snapshot_id", - "created_by", - "version", - "deployment_group", - ] + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "allocated_at", "started_at", "succeeded_at", "terminated_at", "organization_id", "project_id", "app_id", "service_id", "parent_id", "child_id", "status", "metadata", "definition", "messages", "provisioning_info", "database_info", "instance_snapshot_id", "created_by", "version", "deployment_group"] model_config = ConfigDict( validate_by_name=True, @@ -94,6 +65,7 @@ class DeploymentListItem(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -117,7 +89,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -126,16 +99,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of metadata if self.metadata: - _dict["metadata"] = self.metadata.to_dict() + _dict['metadata'] = self.metadata.to_dict() # override the default output from pydantic by calling `to_dict()` of definition if self.definition: - _dict["definition"] = self.definition.to_dict() + _dict['definition'] = self.definition.to_dict() # override the default output from pydantic by calling `to_dict()` of provisioning_info if self.provisioning_info: - _dict["provisioning_info"] = self.provisioning_info.to_dict() + _dict['provisioning_info'] = self.provisioning_info.to_dict() # override the default output from pydantic by calling `to_dict()` of database_info if self.database_info: - _dict["database_info"] = self.database_info.to_dict() + _dict['database_info'] = self.database_info.to_dict() return _dict @classmethod @@ -147,43 +120,31 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "allocated_at": obj.get("allocated_at"), - "started_at": obj.get("started_at"), - "succeeded_at": obj.get("succeeded_at"), - "terminated_at": obj.get("terminated_at"), - "organization_id": obj.get("organization_id"), - "project_id": obj.get("project_id"), - "app_id": obj.get("app_id"), - "service_id": obj.get("service_id"), - "parent_id": obj.get("parent_id"), - "child_id": obj.get("child_id"), - "status": obj.get("status") - if obj.get("status") is not None - else DeploymentStatus.PENDING, - "metadata": DeploymentMetadata.from_dict(obj["metadata"]) - if obj.get("metadata") is not None - else None, - "definition": DeploymentDefinition.from_dict(obj["definition"]) - if obj.get("definition") is not None - else None, - "messages": obj.get("messages"), - "provisioning_info": DeploymentProvisioningInfo.from_dict( - obj["provisioning_info"] - ) - if obj.get("provisioning_info") is not None - else None, - "database_info": DeploymentDatabaseInfo.from_dict(obj["database_info"]) - if obj.get("database_info") is not None - else None, - "instance_snapshot_id": obj.get("instance_snapshot_id"), - "created_by": obj.get("created_by"), - "version": obj.get("version"), - "deployment_group": obj.get("deployment_group"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "allocated_at": obj.get("allocated_at"), + "started_at": obj.get("started_at"), + "succeeded_at": obj.get("succeeded_at"), + "terminated_at": obj.get("terminated_at"), + "organization_id": obj.get("organization_id"), + "project_id": obj.get("project_id"), + "app_id": obj.get("app_id"), + "service_id": obj.get("service_id"), + "parent_id": obj.get("parent_id"), + "child_id": obj.get("child_id"), + "status": obj.get("status") if obj.get("status") is not None else DeploymentStatus.PENDING, + "metadata": DeploymentMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "definition": DeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None, + "messages": obj.get("messages"), + "provisioning_info": DeploymentProvisioningInfo.from_dict(obj["provisioning_info"]) if obj.get("provisioning_info") is not None else None, + "database_info": DeploymentDatabaseInfo.from_dict(obj["database_info"]) if obj.get("database_info") is not None else None, + "instance_snapshot_id": obj.get("instance_snapshot_id"), + "created_by": obj.get("created_by"), + "version": obj.get("version"), + "deployment_group": obj.get("deployment_group") + }) return _obj + + diff --git a/koyeb/api/models/deployment_mesh.py b/koyeb/api/models/deployment_mesh.py index 6b9ce078..5f04e72c 100644 --- a/koyeb/api/models/deployment_mesh.py +++ b/koyeb/api/models/deployment_mesh.py @@ -26,11 +26,13 @@ class DeploymentMesh(str, Enum): """ allowed enum values """ - DEPLOYMENT_MESH_AUTO = "DEPLOYMENT_MESH_AUTO" - DEPLOYMENT_MESH_ENABLED = "DEPLOYMENT_MESH_ENABLED" - DEPLOYMENT_MESH_DISABLED = "DEPLOYMENT_MESH_DISABLED" + DEPLOYMENT_MESH_AUTO = 'DEPLOYMENT_MESH_AUTO' + DEPLOYMENT_MESH_ENABLED = 'DEPLOYMENT_MESH_ENABLED' + DEPLOYMENT_MESH_DISABLED = 'DEPLOYMENT_MESH_DISABLED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DeploymentMesh from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/deployment_metadata.py b/koyeb/api/models/deployment_metadata.py index 962cfbd1..3b5d9cab 100644 --- a/koyeb/api/models/deployment_metadata.py +++ b/koyeb/api/models/deployment_metadata.py @@ -29,26 +29,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentMetadata(BaseModel): """ DeploymentMetadata - """ # noqa: E501 - + """ # noqa: E501 trigger: Optional[TriggerDeploymentMetadata] = None database: Optional[DatabaseDeploymentMetadata] = None git: Optional[GitDeploymentMetadata] = None archive: Optional[ArchiveDeploymentMetadata] = None proxy_ports: Optional[List[DeploymentProxyPortMetadata]] = None sandbox: Optional[SandboxMetadata] = None - __properties: ClassVar[List[str]] = [ - "trigger", - "database", - "git", - "archive", - "proxy_ports", - "sandbox", - ] + __properties: ClassVar[List[str]] = ["trigger", "database", "git", "archive", "proxy_ports", "sandbox"] model_config = ConfigDict( validate_by_name=True, @@ -57,6 +48,7 @@ class DeploymentMetadata(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -80,7 +72,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -89,29 +82,26 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of trigger if self.trigger: - _dict["trigger"] = self.trigger.to_dict() + _dict['trigger'] = self.trigger.to_dict() # override the default output from pydantic by calling `to_dict()` of database if self.database: - _dict["database"] = self.database.to_dict() + _dict['database'] = self.database.to_dict() # override the default output from pydantic by calling `to_dict()` of git if self.git: - _dict["git"] = self.git.to_dict() + _dict['git'] = self.git.to_dict() # override the default output from pydantic by calling `to_dict()` of archive if self.archive: - _dict["archive"] = self.archive.to_dict() + _dict['archive'] = self.archive.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in proxy_ports (list) _items = [] if self.proxy_ports: for _item_proxy_ports in self.proxy_ports: - _items.append( - _item_proxy_ports.to_dict() - if _item_proxy_ports is not None - else None - ) - _dict["proxy_ports"] = _items + if _item_proxy_ports: + _items.append(_item_proxy_ports.to_dict()) + _dict['proxy_ports'] = _items # override the default output from pydantic by calling `to_dict()` of sandbox if self.sandbox: - _dict["sandbox"] = self.sandbox.to_dict() + _dict['sandbox'] = self.sandbox.to_dict() return _dict @classmethod @@ -123,29 +113,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "trigger": TriggerDeploymentMetadata.from_dict(obj["trigger"]) - if obj.get("trigger") is not None - else None, - "database": DatabaseDeploymentMetadata.from_dict(obj["database"]) - if obj.get("database") is not None - else None, - "git": GitDeploymentMetadata.from_dict(obj["git"]) - if obj.get("git") is not None - else None, - "archive": ArchiveDeploymentMetadata.from_dict(obj["archive"]) - if obj.get("archive") is not None - else None, - "proxy_ports": [ - DeploymentProxyPortMetadata.from_dict(_item) - for _item in obj["proxy_ports"] - ] - if obj.get("proxy_ports") is not None - else None, - "sandbox": SandboxMetadata.from_dict(obj["sandbox"]) - if obj.get("sandbox") is not None - else None, - } - ) + _obj = cls.model_validate({ + "trigger": TriggerDeploymentMetadata.from_dict(obj["trigger"]) if obj.get("trigger") is not None else None, + "database": DatabaseDeploymentMetadata.from_dict(obj["database"]) if obj.get("database") is not None else None, + "git": GitDeploymentMetadata.from_dict(obj["git"]) if obj.get("git") is not None else None, + "archive": ArchiveDeploymentMetadata.from_dict(obj["archive"]) if obj.get("archive") is not None else None, + "proxy_ports": [DeploymentProxyPortMetadata.from_dict(_item) for _item in obj["proxy_ports"]] if obj.get("proxy_ports") is not None else None, + "sandbox": SandboxMetadata.from_dict(obj["sandbox"]) if obj.get("sandbox") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/deployment_neon_postgres_database_info.py b/koyeb/api/models/deployment_neon_postgres_database_info.py index 9ff82abd..a672cba5 100644 --- a/koyeb/api/models/deployment_neon_postgres_database_info.py +++ b/koyeb/api/models/deployment_neon_postgres_database_info.py @@ -20,19 +20,15 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.deployment_neon_postgres_database_info_role import ( - DeploymentNeonPostgresDatabaseInfoRole, -) +from koyeb.api.models.deployment_neon_postgres_database_info_role import DeploymentNeonPostgresDatabaseInfoRole from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentNeonPostgresDatabaseInfo(BaseModel): """ DeploymentNeonPostgresDatabaseInfo - """ # noqa: E501 - + """ # noqa: E501 active_time_seconds: Optional[StrictStr] = None compute_time_seconds: Optional[StrictStr] = None written_data_bytes: Optional[StrictStr] = None @@ -47,22 +43,7 @@ class DeploymentNeonPostgresDatabaseInfo(BaseModel): default_branch_state: Optional[StrictStr] = None default_branch_logical_size: Optional[StrictStr] = None roles: Optional[List[DeploymentNeonPostgresDatabaseInfoRole]] = None - __properties: ClassVar[List[str]] = [ - "active_time_seconds", - "compute_time_seconds", - "written_data_bytes", - "data_transfer_bytes", - "data_storage_bytes_hour", - "server_host", - "server_port", - "endpoint_state", - "endpoint_last_active", - "default_branch_id", - "default_branch_name", - "default_branch_state", - "default_branch_logical_size", - "roles", - ] + __properties: ClassVar[List[str]] = ["active_time_seconds", "compute_time_seconds", "written_data_bytes", "data_transfer_bytes", "data_storage_bytes_hour", "server_host", "server_port", "endpoint_state", "endpoint_last_active", "default_branch_id", "default_branch_name", "default_branch_state", "default_branch_logical_size", "roles"] model_config = ConfigDict( validate_by_name=True, @@ -71,6 +52,7 @@ class DeploymentNeonPostgresDatabaseInfo(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -94,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -105,10 +88,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.roles: for _item_roles in self.roles: - _items.append( - _item_roles.to_dict() if _item_roles is not None else None - ) - _dict["roles"] = _items + if _item_roles: + _items.append(_item_roles.to_dict()) + _dict['roles'] = _items return _dict @classmethod @@ -120,27 +102,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "active_time_seconds": obj.get("active_time_seconds"), - "compute_time_seconds": obj.get("compute_time_seconds"), - "written_data_bytes": obj.get("written_data_bytes"), - "data_transfer_bytes": obj.get("data_transfer_bytes"), - "data_storage_bytes_hour": obj.get("data_storage_bytes_hour"), - "server_host": obj.get("server_host"), - "server_port": obj.get("server_port"), - "endpoint_state": obj.get("endpoint_state"), - "endpoint_last_active": obj.get("endpoint_last_active"), - "default_branch_id": obj.get("default_branch_id"), - "default_branch_name": obj.get("default_branch_name"), - "default_branch_state": obj.get("default_branch_state"), - "default_branch_logical_size": obj.get("default_branch_logical_size"), - "roles": [ - DeploymentNeonPostgresDatabaseInfoRole.from_dict(_item) - for _item in obj["roles"] - ] - if obj.get("roles") is not None - else None, - } - ) + _obj = cls.model_validate({ + "active_time_seconds": obj.get("active_time_seconds"), + "compute_time_seconds": obj.get("compute_time_seconds"), + "written_data_bytes": obj.get("written_data_bytes"), + "data_transfer_bytes": obj.get("data_transfer_bytes"), + "data_storage_bytes_hour": obj.get("data_storage_bytes_hour"), + "server_host": obj.get("server_host"), + "server_port": obj.get("server_port"), + "endpoint_state": obj.get("endpoint_state"), + "endpoint_last_active": obj.get("endpoint_last_active"), + "default_branch_id": obj.get("default_branch_id"), + "default_branch_name": obj.get("default_branch_name"), + "default_branch_state": obj.get("default_branch_state"), + "default_branch_logical_size": obj.get("default_branch_logical_size"), + "roles": [DeploymentNeonPostgresDatabaseInfoRole.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/deployment_neon_postgres_database_info_role.py b/koyeb/api/models/deployment_neon_postgres_database_info_role.py index 3fb284df..e488eb0e 100644 --- a/koyeb/api/models/deployment_neon_postgres_database_info_role.py +++ b/koyeb/api/models/deployment_neon_postgres_database_info_role.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentNeonPostgresDatabaseInfoRole(BaseModel): """ DeploymentNeonPostgresDatabaseInfoRole - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None secret_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name", "secret_id"] @@ -40,6 +38,7 @@ class DeploymentNeonPostgresDatabaseInfoRole(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"name": obj.get("name"), "secret_id": obj.get("secret_id")} - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "secret_id": obj.get("secret_id") + }) return _obj + + diff --git a/koyeb/api/models/deployment_port.py b/koyeb/api/models/deployment_port.py index c3f06c05..9f2535d8 100644 --- a/koyeb/api/models/deployment_port.py +++ b/koyeb/api/models/deployment_port.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentPort(BaseModel): """ DeploymentPort - """ # noqa: E501 - + """ # noqa: E501 port: Optional[StrictInt] = None protocol: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["port", "protocol"] @@ -40,6 +38,7 @@ class DeploymentPort(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"port": obj.get("port"), "protocol": obj.get("protocol")} - ) + _obj = cls.model_validate({ + "port": obj.get("port"), + "protocol": obj.get("protocol") + }) return _obj + + diff --git a/koyeb/api/models/deployment_provisioning_info.py b/koyeb/api/models/deployment_provisioning_info.py index f5e9dd7c..1f752524 100644 --- a/koyeb/api/models/deployment_provisioning_info.py +++ b/koyeb/api/models/deployment_provisioning_info.py @@ -19,29 +19,18 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.deployment_provisioning_info_stage import ( - DeploymentProvisioningInfoStage, -) +from koyeb.api.models.deployment_provisioning_info_stage import DeploymentProvisioningInfoStage from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentProvisioningInfo(BaseModel): """ DeploymentProvisioningInfo - """ # noqa: E501 - - sha: Optional[StrictStr] = Field( - default=None, - description="The git sha for this build (we resolve the reference at the start of the build).", - ) - image: Optional[StrictStr] = Field( - default=None, description="The docker image built as a result of this build." - ) - stages: Optional[List[DeploymentProvisioningInfoStage]] = Field( - default=None, description="Some info about the build." - ) + """ # noqa: E501 + sha: Optional[StrictStr] = Field(default=None, description="The git sha for this build (we resolve the reference at the start of the build).") + image: Optional[StrictStr] = Field(default=None, description="The docker image built as a result of this build.") + stages: Optional[List[DeploymentProvisioningInfoStage]] = Field(default=None, description="Some info about the build.") __properties: ClassVar[List[str]] = ["sha", "image", "stages"] model_config = ConfigDict( @@ -51,6 +40,7 @@ class DeploymentProvisioningInfo(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -85,10 +76,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.stages: for _item_stages in self.stages: - _items.append( - _item_stages.to_dict() if _item_stages is not None else None - ) - _dict["stages"] = _items + if _item_stages: + _items.append(_item_stages.to_dict()) + _dict['stages'] = _items return _dict @classmethod @@ -100,16 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "sha": obj.get("sha"), - "image": obj.get("image"), - "stages": [ - DeploymentProvisioningInfoStage.from_dict(_item) - for _item in obj["stages"] - ] - if obj.get("stages") is not None - else None, - } - ) + _obj = cls.model_validate({ + "sha": obj.get("sha"), + "image": obj.get("image"), + "stages": [DeploymentProvisioningInfoStage.from_dict(_item) for _item in obj["stages"]] if obj.get("stages") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/deployment_provisioning_info_stage.py b/koyeb/api/models/deployment_provisioning_info_stage.py index cae93f70..b09a561c 100644 --- a/koyeb/api/models/deployment_provisioning_info_stage.py +++ b/koyeb/api/models/deployment_provisioning_info_stage.py @@ -20,38 +20,23 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.deployment_provisioning_info_stage_build_attempt import ( - DeploymentProvisioningInfoStageBuildAttempt, -) -from koyeb.api.models.deployment_provisioning_info_stage_status import ( - DeploymentProvisioningInfoStageStatus, -) +from koyeb.api.models.deployment_provisioning_info_stage_build_attempt import DeploymentProvisioningInfoStageBuildAttempt +from koyeb.api.models.deployment_provisioning_info_stage_status import DeploymentProvisioningInfoStageStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentProvisioningInfoStage(BaseModel): """ DeploymentProvisioningInfoStage - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None - status: Optional[ - DeploymentProvisioningInfoStageStatus - ] = DeploymentProvisioningInfoStageStatus.UNKNOWN + status: Optional[DeploymentProvisioningInfoStageStatus] = DeploymentProvisioningInfoStageStatus.UNKNOWN messages: Optional[List[StrictStr]] = None started_at: Optional[datetime] = None finished_at: Optional[datetime] = None build_attempts: Optional[List[DeploymentProvisioningInfoStageBuildAttempt]] = None - __properties: ClassVar[List[str]] = [ - "name", - "status", - "messages", - "started_at", - "finished_at", - "build_attempts", - ] + __properties: ClassVar[List[str]] = ["name", "status", "messages", "started_at", "finished_at", "build_attempts"] model_config = ConfigDict( validate_by_name=True, @@ -60,6 +45,7 @@ class DeploymentProvisioningInfoStage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -83,7 +69,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -94,12 +81,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.build_attempts: for _item_build_attempts in self.build_attempts: - _items.append( - _item_build_attempts.to_dict() - if _item_build_attempts is not None - else None - ) - _dict["build_attempts"] = _items + if _item_build_attempts: + _items.append(_item_build_attempts.to_dict()) + _dict['build_attempts'] = _items return _dict @classmethod @@ -111,21 +95,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "status": obj.get("status") - if obj.get("status") is not None - else DeploymentProvisioningInfoStageStatus.UNKNOWN, - "messages": obj.get("messages"), - "started_at": obj.get("started_at"), - "finished_at": obj.get("finished_at"), - "build_attempts": [ - DeploymentProvisioningInfoStageBuildAttempt.from_dict(_item) - for _item in obj["build_attempts"] - ] - if obj.get("build_attempts") is not None - else None, - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "status": obj.get("status") if obj.get("status") is not None else DeploymentProvisioningInfoStageStatus.UNKNOWN, + "messages": obj.get("messages"), + "started_at": obj.get("started_at"), + "finished_at": obj.get("finished_at"), + "build_attempts": [DeploymentProvisioningInfoStageBuildAttempt.from_dict(_item) for _item in obj["build_attempts"]] if obj.get("build_attempts") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/deployment_provisioning_info_stage_build_attempt.py b/koyeb/api/models/deployment_provisioning_info_stage_build_attempt.py index dbf0156b..9b67ba17 100644 --- a/koyeb/api/models/deployment_provisioning_info_stage_build_attempt.py +++ b/koyeb/api/models/deployment_provisioning_info_stage_build_attempt.py @@ -20,26 +20,18 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.deployment_provisioning_info_stage_build_attempt_build_step import ( - DeploymentProvisioningInfoStageBuildAttemptBuildStep, -) -from koyeb.api.models.deployment_provisioning_info_stage_status import ( - DeploymentProvisioningInfoStageStatus, -) +from koyeb.api.models.deployment_provisioning_info_stage_build_attempt_build_step import DeploymentProvisioningInfoStageBuildAttemptBuildStep +from koyeb.api.models.deployment_provisioning_info_stage_status import DeploymentProvisioningInfoStageStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentProvisioningInfoStageBuildAttempt(BaseModel): """ DeploymentProvisioningInfoStageBuildAttempt - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictInt] = None - status: Optional[ - DeploymentProvisioningInfoStageStatus - ] = DeploymentProvisioningInfoStageStatus.UNKNOWN + status: Optional[DeploymentProvisioningInfoStageStatus] = DeploymentProvisioningInfoStageStatus.UNKNOWN messages: Optional[List[StrictStr]] = None started_at: Optional[datetime] = None finished_at: Optional[datetime] = None @@ -47,22 +39,8 @@ class DeploymentProvisioningInfoStageBuildAttempt(BaseModel): image_pushed: Optional[StrictBool] = None internal_failure: Optional[StrictBool] = None retryable_failure: Optional[StrictBool] = None - wait_completion: Optional[StrictBool] = Field( - default=None, - description="This flag is used to finalize the build, and continue the deployment in case of success, or cancel and potentially retry the build in case of failure.", - ) - __properties: ClassVar[List[str]] = [ - "id", - "status", - "messages", - "started_at", - "finished_at", - "steps", - "image_pushed", - "internal_failure", - "retryable_failure", - "wait_completion", - ] + wait_completion: Optional[StrictBool] = Field(default=None, description="This flag is used to finalize the build, and continue the deployment in case of success, or cancel and potentially retry the build in case of failure.") + __properties: ClassVar[List[str]] = ["id", "status", "messages", "started_at", "finished_at", "steps", "image_pushed", "internal_failure", "retryable_failure", "wait_completion"] model_config = ConfigDict( validate_by_name=True, @@ -71,6 +49,7 @@ class DeploymentProvisioningInfoStageBuildAttempt(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -94,7 +73,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -105,10 +85,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.steps: for _item_steps in self.steps: - _items.append( - _item_steps.to_dict() if _item_steps is not None else None - ) - _dict["steps"] = _items + if _item_steps: + _items.append(_item_steps.to_dict()) + _dict['steps'] = _items return _dict @classmethod @@ -120,27 +99,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "status": obj.get("status") - if obj.get("status") is not None - else DeploymentProvisioningInfoStageStatus.UNKNOWN, - "messages": obj.get("messages"), - "started_at": obj.get("started_at"), - "finished_at": obj.get("finished_at"), - "steps": [ - DeploymentProvisioningInfoStageBuildAttemptBuildStep.from_dict( - _item - ) - for _item in obj["steps"] - ] - if obj.get("steps") is not None - else None, - "image_pushed": obj.get("image_pushed"), - "internal_failure": obj.get("internal_failure"), - "retryable_failure": obj.get("retryable_failure"), - "wait_completion": obj.get("wait_completion"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "status": obj.get("status") if obj.get("status") is not None else DeploymentProvisioningInfoStageStatus.UNKNOWN, + "messages": obj.get("messages"), + "started_at": obj.get("started_at"), + "finished_at": obj.get("finished_at"), + "steps": [DeploymentProvisioningInfoStageBuildAttemptBuildStep.from_dict(_item) for _item in obj["steps"]] if obj.get("steps") is not None else None, + "image_pushed": obj.get("image_pushed"), + "internal_failure": obj.get("internal_failure"), + "retryable_failure": obj.get("retryable_failure"), + "wait_completion": obj.get("wait_completion") + }) return _obj + + diff --git a/koyeb/api/models/deployment_provisioning_info_stage_build_attempt_build_step.py b/koyeb/api/models/deployment_provisioning_info_stage_build_attempt_build_step.py index d446f408..c6ab06b1 100644 --- a/koyeb/api/models/deployment_provisioning_info_stage_build_attempt_build_step.py +++ b/koyeb/api/models/deployment_provisioning_info_stage_build_attempt_build_step.py @@ -20,33 +20,21 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.deployment_provisioning_info_stage_status import ( - DeploymentProvisioningInfoStageStatus, -) +from koyeb.api.models.deployment_provisioning_info_stage_status import DeploymentProvisioningInfoStageStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentProvisioningInfoStageBuildAttemptBuildStep(BaseModel): """ DeploymentProvisioningInfoStageBuildAttemptBuildStep - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None - status: Optional[ - DeploymentProvisioningInfoStageStatus - ] = DeploymentProvisioningInfoStageStatus.UNKNOWN + status: Optional[DeploymentProvisioningInfoStageStatus] = DeploymentProvisioningInfoStageStatus.UNKNOWN messages: Optional[List[StrictStr]] = None started_at: Optional[datetime] = None finished_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = [ - "name", - "status", - "messages", - "started_at", - "finished_at", - ] + __properties: ClassVar[List[str]] = ["name", "status", "messages", "started_at", "finished_at"] model_config = ConfigDict( validate_by_name=True, @@ -55,6 +43,7 @@ class DeploymentProvisioningInfoStageBuildAttemptBuildStep(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -78,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -96,15 +86,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "status": obj.get("status") - if obj.get("status") is not None - else DeploymentProvisioningInfoStageStatus.UNKNOWN, - "messages": obj.get("messages"), - "started_at": obj.get("started_at"), - "finished_at": obj.get("finished_at"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "status": obj.get("status") if obj.get("status") is not None else DeploymentProvisioningInfoStageStatus.UNKNOWN, + "messages": obj.get("messages"), + "started_at": obj.get("started_at"), + "finished_at": obj.get("finished_at") + }) return _obj + + diff --git a/koyeb/api/models/deployment_provisioning_info_stage_status.py b/koyeb/api/models/deployment_provisioning_info_stage_status.py index 837e5851..38fe449d 100644 --- a/koyeb/api/models/deployment_provisioning_info_stage_status.py +++ b/koyeb/api/models/deployment_provisioning_info_stage_status.py @@ -26,14 +26,16 @@ class DeploymentProvisioningInfoStageStatus(str, Enum): """ allowed enum values """ - UNKNOWN = "UNKNOWN" - PENDING = "PENDING" - RUNNING = "RUNNING" - FAILED = "FAILED" - COMPLETED = "COMPLETED" - ABORTED = "ABORTED" + UNKNOWN = 'UNKNOWN' + PENDING = 'PENDING' + RUNNING = 'RUNNING' + FAILED = 'FAILED' + COMPLETED = 'COMPLETED' + ABORTED = 'ABORTED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DeploymentProvisioningInfoStageStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/deployment_proxy_port.py b/koyeb/api/models/deployment_proxy_port.py index 66deee92..a18ef578 100644 --- a/koyeb/api/models/deployment_proxy_port.py +++ b/koyeb/api/models/deployment_proxy_port.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentProxyPort(BaseModel): """ DeploymentProxyPort - """ # noqa: E501 - + """ # noqa: E501 port: Optional[StrictInt] = None protocol: Optional[ProxyPortProtocol] = ProxyPortProtocol.TCP __properties: ClassVar[List[str]] = ["port", "protocol"] @@ -41,6 +39,7 @@ class DeploymentProxyPort(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,12 +82,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "port": obj.get("port"), - "protocol": obj.get("protocol") - if obj.get("protocol") is not None - else ProxyPortProtocol.TCP, - } - ) + _obj = cls.model_validate({ + "port": obj.get("port"), + "protocol": obj.get("protocol") if obj.get("protocol") is not None else ProxyPortProtocol.TCP + }) return _obj + + diff --git a/koyeb/api/models/deployment_proxy_port_metadata.py b/koyeb/api/models/deployment_proxy_port_metadata.py index 3fab2d0d..9e675c64 100644 --- a/koyeb/api/models/deployment_proxy_port_metadata.py +++ b/koyeb/api/models/deployment_proxy_port_metadata.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentProxyPortMetadata(BaseModel): """ DeploymentProxyPortMetadata - """ # noqa: E501 - + """ # noqa: E501 host: Optional[StrictStr] = None public_port: Optional[StrictInt] = None port: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class DeploymentProxyPortMetadata(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,14 +84,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "host": obj.get("host"), - "public_port": obj.get("public_port"), - "port": obj.get("port"), - "protocol": obj.get("protocol") - if obj.get("protocol") is not None - else ProxyPortProtocol.TCP, - } - ) + _obj = cls.model_validate({ + "host": obj.get("host"), + "public_port": obj.get("public_port"), + "port": obj.get("port"), + "protocol": obj.get("protocol") if obj.get("protocol") is not None else ProxyPortProtocol.TCP + }) return _obj + + diff --git a/koyeb/api/models/deployment_role.py b/koyeb/api/models/deployment_role.py index 649f75f0..da8fe3d3 100644 --- a/koyeb/api/models/deployment_role.py +++ b/koyeb/api/models/deployment_role.py @@ -26,12 +26,14 @@ class DeploymentRole(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - ACTIVE = "ACTIVE" - UPCOMING = "UPCOMING" - CURRENT = "CURRENT" + INVALID = 'INVALID' + ACTIVE = 'ACTIVE' + UPCOMING = 'UPCOMING' + CURRENT = 'CURRENT' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DeploymentRole from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/deployment_route.py b/koyeb/api/models/deployment_route.py index 36472793..948fdf30 100644 --- a/koyeb/api/models/deployment_route.py +++ b/koyeb/api/models/deployment_route.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentRoute(BaseModel): """ DeploymentRoute - """ # noqa: E501 - + """ # noqa: E501 port: Optional[StrictInt] = None path: Optional[StrictStr] = None security_policies: Optional[SecurityPolicies] = None @@ -42,6 +40,7 @@ class DeploymentRoute(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of security_policies if self.security_policies: - _dict["security_policies"] = self.security_policies.to_dict() + _dict['security_policies'] = self.security_policies.to_dict() return _dict @classmethod @@ -86,15 +86,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "port": obj.get("port"), - "path": obj.get("path"), - "security_policies": SecurityPolicies.from_dict( - obj["security_policies"] - ) - if obj.get("security_policies") is not None - else None, - } - ) + _obj = cls.model_validate({ + "port": obj.get("port"), + "path": obj.get("path"), + "security_policies": SecurityPolicies.from_dict(obj["security_policies"]) if obj.get("security_policies") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/deployment_scaling.py b/koyeb/api/models/deployment_scaling.py index ff8db400..59729764 100644 --- a/koyeb/api/models/deployment_scaling.py +++ b/koyeb/api/models/deployment_scaling.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentScaling(BaseModel): """ DeploymentScaling - """ # noqa: E501 - + """ # noqa: E501 scopes: Optional[List[StrictStr]] = None min: Optional[StrictInt] = None max: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class DeploymentScaling(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.targets: for _item_targets in self.targets: - _items.append( - _item_targets.to_dict() if _item_targets is not None else None - ) - _dict["targets"] = _items + if _item_targets: + _items.append(_item_targets.to_dict()) + _dict['targets'] = _items return _dict @classmethod @@ -92,16 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "scopes": obj.get("scopes"), - "min": obj.get("min"), - "max": obj.get("max"), - "targets": [ - DeploymentScalingTarget.from_dict(_item) for _item in obj["targets"] - ] - if obj.get("targets") is not None - else None, - } - ) + _obj = cls.model_validate({ + "scopes": obj.get("scopes"), + "min": obj.get("min"), + "max": obj.get("max"), + "targets": [DeploymentScalingTarget.from_dict(_item) for _item in obj["targets"]] if obj.get("targets") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/deployment_scaling_target.py b/koyeb/api/models/deployment_scaling_target.py index d6536441..9c16b24a 100644 --- a/koyeb/api/models/deployment_scaling_target.py +++ b/koyeb/api/models/deployment_scaling_target.py @@ -19,48 +19,27 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.deployment_scaling_target_average_cpu import ( - DeploymentScalingTargetAverageCPU, -) -from koyeb.api.models.deployment_scaling_target_average_mem import ( - DeploymentScalingTargetAverageMem, -) -from koyeb.api.models.deployment_scaling_target_concurrent_requests import ( - DeploymentScalingTargetConcurrentRequests, -) -from koyeb.api.models.deployment_scaling_target_requests_per_second import ( - DeploymentScalingTargetRequestsPerSecond, -) -from koyeb.api.models.deployment_scaling_target_requests_response_time import ( - DeploymentScalingTargetRequestsResponseTime, -) -from koyeb.api.models.deployment_scaling_target_sleep_idle_delay import ( - DeploymentScalingTargetSleepIdleDelay, -) +from koyeb.api.models.deployment_scaling_target_average_cpu import DeploymentScalingTargetAverageCPU +from koyeb.api.models.deployment_scaling_target_average_mem import DeploymentScalingTargetAverageMem +from koyeb.api.models.deployment_scaling_target_concurrent_requests import DeploymentScalingTargetConcurrentRequests +from koyeb.api.models.deployment_scaling_target_requests_per_second import DeploymentScalingTargetRequestsPerSecond +from koyeb.api.models.deployment_scaling_target_requests_response_time import DeploymentScalingTargetRequestsResponseTime +from koyeb.api.models.deployment_scaling_target_sleep_idle_delay import DeploymentScalingTargetSleepIdleDelay from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentScalingTarget(BaseModel): """ DeploymentScalingTarget - """ # noqa: E501 - + """ # noqa: E501 average_cpu: Optional[DeploymentScalingTargetAverageCPU] = None average_mem: Optional[DeploymentScalingTargetAverageMem] = None requests_per_second: Optional[DeploymentScalingTargetRequestsPerSecond] = None concurrent_requests: Optional[DeploymentScalingTargetConcurrentRequests] = None requests_response_time: Optional[DeploymentScalingTargetRequestsResponseTime] = None sleep_idle_delay: Optional[DeploymentScalingTargetSleepIdleDelay] = None - __properties: ClassVar[List[str]] = [ - "average_cpu", - "average_mem", - "requests_per_second", - "concurrent_requests", - "requests_response_time", - "sleep_idle_delay", - ] + __properties: ClassVar[List[str]] = ["average_cpu", "average_mem", "requests_per_second", "concurrent_requests", "requests_response_time", "sleep_idle_delay"] model_config = ConfigDict( validate_by_name=True, @@ -69,6 +48,7 @@ class DeploymentScalingTarget(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -92,7 +72,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -101,22 +82,22 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of average_cpu if self.average_cpu: - _dict["average_cpu"] = self.average_cpu.to_dict() + _dict['average_cpu'] = self.average_cpu.to_dict() # override the default output from pydantic by calling `to_dict()` of average_mem if self.average_mem: - _dict["average_mem"] = self.average_mem.to_dict() + _dict['average_mem'] = self.average_mem.to_dict() # override the default output from pydantic by calling `to_dict()` of requests_per_second if self.requests_per_second: - _dict["requests_per_second"] = self.requests_per_second.to_dict() + _dict['requests_per_second'] = self.requests_per_second.to_dict() # override the default output from pydantic by calling `to_dict()` of concurrent_requests if self.concurrent_requests: - _dict["concurrent_requests"] = self.concurrent_requests.to_dict() + _dict['concurrent_requests'] = self.concurrent_requests.to_dict() # override the default output from pydantic by calling `to_dict()` of requests_response_time if self.requests_response_time: - _dict["requests_response_time"] = self.requests_response_time.to_dict() + _dict['requests_response_time'] = self.requests_response_time.to_dict() # override the default output from pydantic by calling `to_dict()` of sleep_idle_delay if self.sleep_idle_delay: - _dict["sleep_idle_delay"] = self.sleep_idle_delay.to_dict() + _dict['sleep_idle_delay'] = self.sleep_idle_delay.to_dict() return _dict @classmethod @@ -128,38 +109,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "average_cpu": DeploymentScalingTargetAverageCPU.from_dict( - obj["average_cpu"] - ) - if obj.get("average_cpu") is not None - else None, - "average_mem": DeploymentScalingTargetAverageMem.from_dict( - obj["average_mem"] - ) - if obj.get("average_mem") is not None - else None, - "requests_per_second": DeploymentScalingTargetRequestsPerSecond.from_dict( - obj["requests_per_second"] - ) - if obj.get("requests_per_second") is not None - else None, - "concurrent_requests": DeploymentScalingTargetConcurrentRequests.from_dict( - obj["concurrent_requests"] - ) - if obj.get("concurrent_requests") is not None - else None, - "requests_response_time": DeploymentScalingTargetRequestsResponseTime.from_dict( - obj["requests_response_time"] - ) - if obj.get("requests_response_time") is not None - else None, - "sleep_idle_delay": DeploymentScalingTargetSleepIdleDelay.from_dict( - obj["sleep_idle_delay"] - ) - if obj.get("sleep_idle_delay") is not None - else None, - } - ) + _obj = cls.model_validate({ + "average_cpu": DeploymentScalingTargetAverageCPU.from_dict(obj["average_cpu"]) if obj.get("average_cpu") is not None else None, + "average_mem": DeploymentScalingTargetAverageMem.from_dict(obj["average_mem"]) if obj.get("average_mem") is not None else None, + "requests_per_second": DeploymentScalingTargetRequestsPerSecond.from_dict(obj["requests_per_second"]) if obj.get("requests_per_second") is not None else None, + "concurrent_requests": DeploymentScalingTargetConcurrentRequests.from_dict(obj["concurrent_requests"]) if obj.get("concurrent_requests") is not None else None, + "requests_response_time": DeploymentScalingTargetRequestsResponseTime.from_dict(obj["requests_response_time"]) if obj.get("requests_response_time") is not None else None, + "sleep_idle_delay": DeploymentScalingTargetSleepIdleDelay.from_dict(obj["sleep_idle_delay"]) if obj.get("sleep_idle_delay") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/deployment_scaling_target_average_cpu.py b/koyeb/api/models/deployment_scaling_target_average_cpu.py index 21ce94ae..5dd9efdb 100644 --- a/koyeb/api/models/deployment_scaling_target_average_cpu.py +++ b/koyeb/api/models/deployment_scaling_target_average_cpu.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentScalingTargetAverageCPU(BaseModel): """ DeploymentScalingTargetAverageCPU - """ # noqa: E501 - + """ # noqa: E501 value: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["value"] @@ -39,6 +37,7 @@ class DeploymentScalingTargetAverageCPU(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"value": obj.get("value")}) + _obj = cls.model_validate({ + "value": obj.get("value") + }) return _obj + + diff --git a/koyeb/api/models/deployment_scaling_target_average_mem.py b/koyeb/api/models/deployment_scaling_target_average_mem.py index 0193838e..f5e1e36a 100644 --- a/koyeb/api/models/deployment_scaling_target_average_mem.py +++ b/koyeb/api/models/deployment_scaling_target_average_mem.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentScalingTargetAverageMem(BaseModel): """ DeploymentScalingTargetAverageMem - """ # noqa: E501 - + """ # noqa: E501 value: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["value"] @@ -39,6 +37,7 @@ class DeploymentScalingTargetAverageMem(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"value": obj.get("value")}) + _obj = cls.model_validate({ + "value": obj.get("value") + }) return _obj + + diff --git a/koyeb/api/models/deployment_scaling_target_concurrent_requests.py b/koyeb/api/models/deployment_scaling_target_concurrent_requests.py index a43c46e0..eb1e59a0 100644 --- a/koyeb/api/models/deployment_scaling_target_concurrent_requests.py +++ b/koyeb/api/models/deployment_scaling_target_concurrent_requests.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentScalingTargetConcurrentRequests(BaseModel): """ DeploymentScalingTargetConcurrentRequests - """ # noqa: E501 - + """ # noqa: E501 value: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["value"] @@ -39,6 +37,7 @@ class DeploymentScalingTargetConcurrentRequests(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"value": obj.get("value")}) + _obj = cls.model_validate({ + "value": obj.get("value") + }) return _obj + + diff --git a/koyeb/api/models/deployment_scaling_target_requests_per_second.py b/koyeb/api/models/deployment_scaling_target_requests_per_second.py index 5d74a068..d2e602ef 100644 --- a/koyeb/api/models/deployment_scaling_target_requests_per_second.py +++ b/koyeb/api/models/deployment_scaling_target_requests_per_second.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentScalingTargetRequestsPerSecond(BaseModel): """ DeploymentScalingTargetRequestsPerSecond - """ # noqa: E501 - + """ # noqa: E501 value: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["value"] @@ -39,6 +37,7 @@ class DeploymentScalingTargetRequestsPerSecond(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"value": obj.get("value")}) + _obj = cls.model_validate({ + "value": obj.get("value") + }) return _obj + + diff --git a/koyeb/api/models/deployment_scaling_target_requests_response_time.py b/koyeb/api/models/deployment_scaling_target_requests_response_time.py index 2865cfd1..f1c78121 100644 --- a/koyeb/api/models/deployment_scaling_target_requests_response_time.py +++ b/koyeb/api/models/deployment_scaling_target_requests_response_time.py @@ -23,17 +23,12 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentScalingTargetRequestsResponseTime(BaseModel): """ DeploymentScalingTargetRequestsResponseTime - """ # noqa: E501 - + """ # noqa: E501 value: Optional[StrictInt] = None - quantile: Optional[StrictInt] = Field( - default=None, - description="The quantile to use for autoscaling. For example, set to 95 to use the 95th percentile (p95) for autoscaling. Valid values are between 0 and 100.", - ) + quantile: Optional[StrictInt] = Field(default=None, description="The quantile to use for autoscaling. For example, set to 95 to use the 95th percentile (p95) for autoscaling. Valid values are between 0 and 100.") __properties: ClassVar[List[str]] = ["value", "quantile"] model_config = ConfigDict( @@ -43,6 +38,7 @@ class DeploymentScalingTargetRequestsResponseTime(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"value": obj.get("value"), "quantile": obj.get("quantile")} - ) + _obj = cls.model_validate({ + "value": obj.get("value"), + "quantile": obj.get("quantile") + }) return _obj + + diff --git a/koyeb/api/models/deployment_scaling_target_sleep_idle_delay.py b/koyeb/api/models/deployment_scaling_target_sleep_idle_delay.py index c5738f84..2d131c68 100644 --- a/koyeb/api/models/deployment_scaling_target_sleep_idle_delay.py +++ b/koyeb/api/models/deployment_scaling_target_sleep_idle_delay.py @@ -23,29 +23,14 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentScalingTargetSleepIdleDelay(BaseModel): """ DeploymentScalingTargetSleepIdleDelay - """ # noqa: E501 - - value: Optional[StrictInt] = Field( - default=None, - description="DEPRECATED: use deep_sleep_value instead. Delay in seconds after which a service which received 0 request is put to deep sleep.", - ) - deep_sleep_value: Optional[StrictInt] = Field( - default=None, - description="Delay in seconds after which a service which received 0 request is put to deep sleep.", - ) - light_sleep_value: Optional[StrictInt] = Field( - default=None, - description="Delay in seconds after which a service which received 0 request is put to light sleep.", - ) - __properties: ClassVar[List[str]] = [ - "value", - "deep_sleep_value", - "light_sleep_value", - ] + """ # noqa: E501 + value: Optional[StrictInt] = Field(default=None, description="DEPRECATED: use deep_sleep_value instead. Delay in seconds after which a service which received 0 request is put to deep sleep.") + deep_sleep_value: Optional[StrictInt] = Field(default=None, description="Delay in seconds after which a service which received 0 request is put to deep sleep.") + light_sleep_value: Optional[StrictInt] = Field(default=None, description="Delay in seconds after which a service which received 0 request is put to light sleep.") + __properties: ClassVar[List[str]] = ["value", "deep_sleep_value", "light_sleep_value"] model_config = ConfigDict( validate_by_name=True, @@ -54,6 +39,7 @@ class DeploymentScalingTargetSleepIdleDelay(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -95,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "value": obj.get("value"), - "deep_sleep_value": obj.get("deep_sleep_value"), - "light_sleep_value": obj.get("light_sleep_value"), - } - ) + _obj = cls.model_validate({ + "value": obj.get("value"), + "deep_sleep_value": obj.get("deep_sleep_value"), + "light_sleep_value": obj.get("light_sleep_value") + }) return _obj + + diff --git a/koyeb/api/models/deployment_status.py b/koyeb/api/models/deployment_status.py index c4b733c9..ce4765e8 100644 --- a/koyeb/api/models/deployment_status.py +++ b/koyeb/api/models/deployment_status.py @@ -26,24 +26,26 @@ class DeploymentStatus(str, Enum): """ allowed enum values """ - PENDING = "PENDING" - PROVISIONING = "PROVISIONING" - SCHEDULED = "SCHEDULED" - CANCELING = "CANCELING" - CANCELED = "CANCELED" - ALLOCATING = "ALLOCATING" - STARTING = "STARTING" - HEALTHY = "HEALTHY" - DEGRADED = "DEGRADED" - UNHEALTHY = "UNHEALTHY" - STOPPING = "STOPPING" - STOPPED = "STOPPED" - ERRORING = "ERRORING" - ERROR = "ERROR" - STASHED = "STASHED" - SLEEPING = "SLEEPING" + PENDING = 'PENDING' + PROVISIONING = 'PROVISIONING' + SCHEDULED = 'SCHEDULED' + CANCELING = 'CANCELING' + CANCELED = 'CANCELED' + ALLOCATING = 'ALLOCATING' + STARTING = 'STARTING' + HEALTHY = 'HEALTHY' + DEGRADED = 'DEGRADED' + UNHEALTHY = 'UNHEALTHY' + STOPPING = 'STOPPING' + STOPPED = 'STOPPED' + ERRORING = 'ERRORING' + ERROR = 'ERROR' + STASHED = 'STASHED' + SLEEPING = 'SLEEPING' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DeploymentStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/deployment_strategy.py b/koyeb/api/models/deployment_strategy.py index 6813e718..b1bd96d0 100644 --- a/koyeb/api/models/deployment_strategy.py +++ b/koyeb/api/models/deployment_strategy.py @@ -24,15 +24,11 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentStrategy(BaseModel): """ DeploymentStrategy - """ # noqa: E501 - - type: Optional[ - DeploymentStrategyType - ] = DeploymentStrategyType.DEPLOYMENT_STRATEGY_TYPE_INVALID + """ # noqa: E501 + type: Optional[DeploymentStrategyType] = DeploymentStrategyType.DEPLOYMENT_STRATEGY_TYPE_INVALID __properties: ClassVar[List[str]] = ["type"] model_config = ConfigDict( @@ -42,6 +38,7 @@ class DeploymentStrategy(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,11 +81,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "type": obj.get("type") - if obj.get("type") is not None - else DeploymentStrategyType.DEPLOYMENT_STRATEGY_TYPE_INVALID - } - ) + _obj = cls.model_validate({ + "type": obj.get("type") if obj.get("type") is not None else DeploymentStrategyType.DEPLOYMENT_STRATEGY_TYPE_INVALID + }) return _obj + + diff --git a/koyeb/api/models/deployment_strategy_type.py b/koyeb/api/models/deployment_strategy_type.py index 3c82cbd1..34e4d106 100644 --- a/koyeb/api/models/deployment_strategy_type.py +++ b/koyeb/api/models/deployment_strategy_type.py @@ -20,20 +20,22 @@ class DeploymentStrategyType(str, Enum): """ - - DEPLOYMENT_STRATEGY_TYPE_INVALID: DEPRECATED: Use DEPLOYMENT_STRATEGY_TYPE_DEFAULT instead. - DEPLOYMENT_STRATEGY_TYPE_DEFAULT: Default/unspecified strategy (resolves to platform default, currently ROLLING). - DEPLOYMENT_STRATEGY_TYPE_CANARY: Use canary strategy. - DEPLOYMENT_STRATEGY_TYPE_ROLLING: Use rolling strategy. - DEPLOYMENT_STRATEGY_TYPE_BLUE_GREEN: Use blue green strategy. - DEPLOYMENT_STRATEGY_TYPE_IMMEDIATE: Use immediate strategy. + - DEPLOYMENT_STRATEGY_TYPE_INVALID: DEPRECATED: Use DEPLOYMENT_STRATEGY_TYPE_DEFAULT instead. - DEPLOYMENT_STRATEGY_TYPE_DEFAULT: Default/unspecified strategy (resolves to platform default, currently ROLLING). - DEPLOYMENT_STRATEGY_TYPE_CANARY: Use canary strategy. - DEPLOYMENT_STRATEGY_TYPE_ROLLING: Use rolling strategy. - DEPLOYMENT_STRATEGY_TYPE_BLUE_GREEN: Use blue green strategy. - DEPLOYMENT_STRATEGY_TYPE_IMMEDIATE: Use immediate strategy. """ """ allowed enum values """ - DEPLOYMENT_STRATEGY_TYPE_INVALID = "DEPLOYMENT_STRATEGY_TYPE_INVALID" - DEPLOYMENT_STRATEGY_TYPE_DEFAULT = "DEPLOYMENT_STRATEGY_TYPE_DEFAULT" - DEPLOYMENT_STRATEGY_TYPE_CANARY = "DEPLOYMENT_STRATEGY_TYPE_CANARY" - DEPLOYMENT_STRATEGY_TYPE_ROLLING = "DEPLOYMENT_STRATEGY_TYPE_ROLLING" - DEPLOYMENT_STRATEGY_TYPE_BLUE_GREEN = "DEPLOYMENT_STRATEGY_TYPE_BLUE_GREEN" - DEPLOYMENT_STRATEGY_TYPE_IMMEDIATE = "DEPLOYMENT_STRATEGY_TYPE_IMMEDIATE" + DEPLOYMENT_STRATEGY_TYPE_INVALID = 'DEPLOYMENT_STRATEGY_TYPE_INVALID' + DEPLOYMENT_STRATEGY_TYPE_DEFAULT = 'DEPLOYMENT_STRATEGY_TYPE_DEFAULT' + DEPLOYMENT_STRATEGY_TYPE_CANARY = 'DEPLOYMENT_STRATEGY_TYPE_CANARY' + DEPLOYMENT_STRATEGY_TYPE_ROLLING = 'DEPLOYMENT_STRATEGY_TYPE_ROLLING' + DEPLOYMENT_STRATEGY_TYPE_BLUE_GREEN = 'DEPLOYMENT_STRATEGY_TYPE_BLUE_GREEN' + DEPLOYMENT_STRATEGY_TYPE_IMMEDIATE = 'DEPLOYMENT_STRATEGY_TYPE_IMMEDIATE' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DeploymentStrategyType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/deployment_volume.py b/koyeb/api/models/deployment_volume.py index b0c27f45..0a671f05 100644 --- a/koyeb/api/models/deployment_volume.py +++ b/koyeb/api/models/deployment_volume.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentVolume(BaseModel): """ DeploymentVolume - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None path: Optional[StrictStr] = None replica_index: Optional[StrictInt] = None @@ -42,6 +40,7 @@ class DeploymentVolume(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "path": obj.get("path"), - "replica_index": obj.get("replica_index"), - "scopes": obj.get("scopes"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "path": obj.get("path"), + "replica_index": obj.get("replica_index"), + "scopes": obj.get("scopes") + }) return _obj + + diff --git a/koyeb/api/models/desired_deployment.py b/koyeb/api/models/desired_deployment.py index f7af2aee..70ee050f 100644 --- a/koyeb/api/models/desired_deployment.py +++ b/koyeb/api/models/desired_deployment.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DesiredDeployment(BaseModel): """ DesiredDeployment - """ # noqa: E501 - + """ # noqa: E501 groups: Optional[List[DesiredDeploymentGroup]] = None __properties: ClassVar[List[str]] = ["groups"] @@ -40,6 +38,7 @@ class DesiredDeployment(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,10 +74,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.groups: for _item_groups in self.groups: - _items.append( - _item_groups.to_dict() if _item_groups is not None else None - ) - _dict["groups"] = _items + if _item_groups: + _items.append(_item_groups.to_dict()) + _dict['groups'] = _items return _dict @classmethod @@ -89,13 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "groups": [ - DesiredDeploymentGroup.from_dict(_item) for _item in obj["groups"] - ] - if obj.get("groups") is not None - else None - } - ) + _obj = cls.model_validate({ + "groups": [DesiredDeploymentGroup.from_dict(_item) for _item in obj["groups"]] if obj.get("groups") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/desired_deployment_group.py b/koyeb/api/models/desired_deployment_group.py index 49e7d8ed..ff32228b 100644 --- a/koyeb/api/models/desired_deployment_group.py +++ b/koyeb/api/models/desired_deployment_group.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DesiredDeploymentGroup(BaseModel): """ DesiredDeploymentGroup - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None deployment_ids: Optional[List[StrictStr]] = None __properties: ClassVar[List[str]] = ["name", "deployment_ids"] @@ -40,6 +38,7 @@ class DesiredDeploymentGroup(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"name": obj.get("name"), "deployment_ids": obj.get("deployment_ids")} - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "deployment_ids": obj.get("deployment_ids") + }) return _obj + + diff --git a/koyeb/api/models/digital_ocean_registry_configuration.py b/koyeb/api/models/digital_ocean_registry_configuration.py index 814943ff..655cb1bb 100644 --- a/koyeb/api/models/digital_ocean_registry_configuration.py +++ b/koyeb/api/models/digital_ocean_registry_configuration.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DigitalOceanRegistryConfiguration(BaseModel): """ DigitalOceanRegistryConfiguration - """ # noqa: E501 - + """ # noqa: E501 username: Optional[StrictStr] = None password: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["username", "password"] @@ -40,6 +38,7 @@ class DigitalOceanRegistryConfiguration(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"username": obj.get("username"), "password": obj.get("password")} - ) + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password") + }) return _obj + + diff --git a/koyeb/api/models/discourse_auth_reply.py b/koyeb/api/models/discourse_auth_reply.py index ac8199be..222a7321 100644 --- a/koyeb/api/models/discourse_auth_reply.py +++ b/koyeb/api/models/discourse_auth_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DiscourseAuthReply(BaseModel): """ DiscourseAuthReply - """ # noqa: E501 - + """ # noqa: E501 sso: Optional[StrictStr] = None sig: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["sso", "sig"] @@ -40,6 +38,7 @@ class DiscourseAuthReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,5 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"sso": obj.get("sso"), "sig": obj.get("sig")}) + _obj = cls.model_validate({ + "sso": obj.get("sso"), + "sig": obj.get("sig") + }) return _obj + + diff --git a/koyeb/api/models/discourse_auth_request.py b/koyeb/api/models/discourse_auth_request.py index 857708e1..ee511966 100644 --- a/koyeb/api/models/discourse_auth_request.py +++ b/koyeb/api/models/discourse_auth_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DiscourseAuthRequest(BaseModel): """ DiscourseAuthRequest - """ # noqa: E501 - + """ # noqa: E501 payload: Optional[StrictStr] = None sig: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["payload", "sig"] @@ -40,6 +38,7 @@ class DiscourseAuthRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"payload": obj.get("payload"), "sig": obj.get("sig")} - ) + _obj = cls.model_validate({ + "payload": obj.get("payload"), + "sig": obj.get("sig") + }) return _obj + + diff --git a/koyeb/api/models/docker_builder.py b/koyeb/api/models/docker_builder.py index 4dd66bfd..008cec1a 100644 --- a/koyeb/api/models/docker_builder.py +++ b/koyeb/api/models/docker_builder.py @@ -23,26 +23,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DockerBuilder(BaseModel): """ DockerBuilder - """ # noqa: E501 - + """ # noqa: E501 dockerfile: Optional[StrictStr] = None entrypoint: Optional[List[StrictStr]] = None command: Optional[StrictStr] = None args: Optional[List[StrictStr]] = None target: Optional[StrictStr] = None privileged: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "dockerfile", - "entrypoint", - "command", - "args", - "target", - "privileged", - ] + __properties: ClassVar[List[str]] = ["dockerfile", "entrypoint", "command", "args", "target", "privileged"] model_config = ConfigDict( validate_by_name=True, @@ -51,6 +42,7 @@ class DockerBuilder(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -92,14 +85,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "dockerfile": obj.get("dockerfile"), - "entrypoint": obj.get("entrypoint"), - "command": obj.get("command"), - "args": obj.get("args"), - "target": obj.get("target"), - "privileged": obj.get("privileged"), - } - ) + _obj = cls.model_validate({ + "dockerfile": obj.get("dockerfile"), + "entrypoint": obj.get("entrypoint"), + "command": obj.get("command"), + "args": obj.get("args"), + "target": obj.get("target"), + "privileged": obj.get("privileged") + }) return _obj + + diff --git a/koyeb/api/models/docker_hub_registry_configuration.py b/koyeb/api/models/docker_hub_registry_configuration.py index 18b48c74..1e3d6c45 100644 --- a/koyeb/api/models/docker_hub_registry_configuration.py +++ b/koyeb/api/models/docker_hub_registry_configuration.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DockerHubRegistryConfiguration(BaseModel): """ DockerHubRegistryConfiguration - """ # noqa: E501 - + """ # noqa: E501 username: Optional[StrictStr] = None password: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["username", "password"] @@ -40,6 +38,7 @@ class DockerHubRegistryConfiguration(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"username": obj.get("username"), "password": obj.get("password")} - ) + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password") + }) return _obj + + diff --git a/koyeb/api/models/docker_source.py b/koyeb/api/models/docker_source.py index b6793b6a..1ed042d9 100644 --- a/koyeb/api/models/docker_source.py +++ b/koyeb/api/models/docker_source.py @@ -23,26 +23,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DockerSource(BaseModel): """ DockerSource - """ # noqa: E501 - + """ # noqa: E501 image: Optional[StrictStr] = None command: Optional[StrictStr] = None args: Optional[List[StrictStr]] = None image_registry_secret: Optional[StrictStr] = None entrypoint: Optional[List[StrictStr]] = None privileged: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "image", - "command", - "args", - "image_registry_secret", - "entrypoint", - "privileged", - ] + __properties: ClassVar[List[str]] = ["image", "command", "args", "image_registry_secret", "entrypoint", "privileged"] model_config = ConfigDict( validate_by_name=True, @@ -51,6 +42,7 @@ class DockerSource(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -92,14 +85,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "image": obj.get("image"), - "command": obj.get("command"), - "args": obj.get("args"), - "image_registry_secret": obj.get("image_registry_secret"), - "entrypoint": obj.get("entrypoint"), - "privileged": obj.get("privileged"), - } - ) + _obj = cls.model_validate({ + "image": obj.get("image"), + "command": obj.get("command"), + "args": obj.get("args"), + "image_registry_secret": obj.get("image_registry_secret"), + "entrypoint": obj.get("entrypoint"), + "privileged": obj.get("privileged") + }) return _obj + + diff --git a/koyeb/api/models/domain.py b/koyeb/api/models/domain.py index 15a8f155..9c1101ee 100644 --- a/koyeb/api/models/domain.py +++ b/koyeb/api/models/domain.py @@ -27,12 +27,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Domain(BaseModel): """ Domain - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None name: Optional[StrictStr] = None @@ -48,28 +46,8 @@ class Domain(BaseModel): version: Optional[StrictStr] = None cloudflare: Optional[Dict[str, Any]] = None koyeb: Optional[DomainLoadBalancerKoyeb] = None - project_id: Optional[StrictStr] = Field( - default=None, - description="The project ID this domain belongs to. Empty if the domain is organization-level.", - ) - __properties: ClassVar[List[str]] = [ - "id", - "organization_id", - "name", - "created_at", - "updated_at", - "status", - "type", - "app_id", - "deployment_group", - "verified_at", - "intended_cname", - "messages", - "version", - "cloudflare", - "koyeb", - "project_id", - ] + project_id: Optional[StrictStr] = Field(default=None, description="The project ID this domain belongs to. Empty if the domain is organization-level.") + __properties: ClassVar[List[str]] = ["id", "organization_id", "name", "created_at", "updated_at", "status", "type", "app_id", "deployment_group", "verified_at", "intended_cname", "messages", "version", "cloudflare", "koyeb", "project_id"] model_config = ConfigDict( validate_by_name=True, @@ -78,6 +56,7 @@ class Domain(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -101,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -110,7 +90,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of koyeb if self.koyeb: - _dict["koyeb"] = self.koyeb.to_dict() + _dict['koyeb'] = self.koyeb.to_dict() return _dict @classmethod @@ -122,30 +102,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "organization_id": obj.get("organization_id"), - "name": obj.get("name"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "status": obj.get("status") - if obj.get("status") is not None - else DomainStatus.PENDING, - "type": obj.get("type") - if obj.get("type") is not None - else DomainType.AUTOASSIGNED, - "app_id": obj.get("app_id"), - "deployment_group": obj.get("deployment_group"), - "verified_at": obj.get("verified_at"), - "intended_cname": obj.get("intended_cname"), - "messages": obj.get("messages"), - "version": obj.get("version"), - "cloudflare": obj.get("cloudflare"), - "koyeb": DomainLoadBalancerKoyeb.from_dict(obj["koyeb"]) - if obj.get("koyeb") is not None - else None, - "project_id": obj.get("project_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "name": obj.get("name"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "status": obj.get("status") if obj.get("status") is not None else DomainStatus.PENDING, + "type": obj.get("type") if obj.get("type") is not None else DomainType.AUTOASSIGNED, + "app_id": obj.get("app_id"), + "deployment_group": obj.get("deployment_group"), + "verified_at": obj.get("verified_at"), + "intended_cname": obj.get("intended_cname"), + "messages": obj.get("messages"), + "version": obj.get("version"), + "cloudflare": obj.get("cloudflare"), + "koyeb": DomainLoadBalancerKoyeb.from_dict(obj["koyeb"]) if obj.get("koyeb") is not None else None, + "project_id": obj.get("project_id") + }) return _obj + + diff --git a/koyeb/api/models/domain_load_balancer_koyeb.py b/koyeb/api/models/domain_load_balancer_koyeb.py index a23d93d1..a3b2a3f1 100644 --- a/koyeb/api/models/domain_load_balancer_koyeb.py +++ b/koyeb/api/models/domain_load_balancer_koyeb.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DomainLoadBalancerKoyeb(BaseModel): """ DomainLoadBalancerKoyeb - """ # noqa: E501 - + """ # noqa: E501 request_timeout_seconds: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["request_timeout_seconds"] @@ -39,6 +37,7 @@ class DomainLoadBalancerKoyeb(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,7 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"request_timeout_seconds": obj.get("request_timeout_seconds")} - ) + _obj = cls.model_validate({ + "request_timeout_seconds": obj.get("request_timeout_seconds") + }) return _obj + + diff --git a/koyeb/api/models/domain_load_balancer_quotas.py b/koyeb/api/models/domain_load_balancer_quotas.py index f103cb75..4a16fea9 100644 --- a/koyeb/api/models/domain_load_balancer_quotas.py +++ b/koyeb/api/models/domain_load_balancer_quotas.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DomainLoadBalancerQuotas(BaseModel): """ DomainLoadBalancerQuotas - """ # noqa: E501 - + """ # noqa: E501 max_koyeb: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["max_koyeb"] @@ -39,6 +37,7 @@ class DomainLoadBalancerQuotas(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"max_koyeb": obj.get("max_koyeb")}) + _obj = cls.model_validate({ + "max_koyeb": obj.get("max_koyeb") + }) return _obj + + diff --git a/koyeb/api/models/domain_status.py b/koyeb/api/models/domain_status.py index 8abb49ab..1f441933 100644 --- a/koyeb/api/models/domain_status.py +++ b/koyeb/api/models/domain_status.py @@ -26,13 +26,15 @@ class DomainStatus(str, Enum): """ allowed enum values """ - PENDING = "PENDING" - ACTIVE = "ACTIVE" - ERROR = "ERROR" - DELETING = "DELETING" - DELETED = "DELETED" + PENDING = 'PENDING' + ACTIVE = 'ACTIVE' + ERROR = 'ERROR' + DELETING = 'DELETING' + DELETED = 'DELETED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DomainStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/domain_type.py b/koyeb/api/models/domain_type.py index 2a709294..6ea6ca50 100644 --- a/koyeb/api/models/domain_type.py +++ b/koyeb/api/models/domain_type.py @@ -26,10 +26,12 @@ class DomainType(str, Enum): """ allowed enum values """ - AUTOASSIGNED = "AUTOASSIGNED" - CUSTOM = "CUSTOM" + AUTOASSIGNED = 'AUTOASSIGNED' + CUSTOM = 'CUSTOM' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DomainType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/domains_summary.py b/koyeb/api/models/domains_summary.py index 98b06194..6c569af5 100644 --- a/koyeb/api/models/domains_summary.py +++ b/koyeb/api/models/domains_summary.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DomainsSummary(BaseModel): """ DomainsSummary - """ # noqa: E501 - + """ # noqa: E501 total: Optional[StrictStr] = None by_status: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["total", "by_status"] @@ -40,6 +38,7 @@ class DomainsSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"total": obj.get("total"), "by_status": obj.get("by_status")} - ) + _obj = cls.model_validate({ + "total": obj.get("total"), + "by_status": obj.get("by_status") + }) return _obj + + diff --git a/koyeb/api/models/egress_policy.py b/koyeb/api/models/egress_policy.py index 4f35024a..5aca2b96 100644 --- a/koyeb/api/models/egress_policy.py +++ b/koyeb/api/models/egress_policy.py @@ -25,17 +25,12 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class EgressPolicy(BaseModel): """ EgressPolicy - """ # noqa: E501 - + """ # noqa: E501 mode: Optional[EgressPolicyMode] = EgressPolicyMode.EGRESS_POLICY_MODE_DEFAULT - allow_list: Optional[List[NetworkPolicyDestination]] = Field( - default=None, - description="Allowed destinations (deny-by-default semantics under DENY_ALL). Ignored when mode is DEFAULT.", - ) + allow_list: Optional[List[NetworkPolicyDestination]] = Field(default=None, description="Allowed destinations (deny-by-default semantics under DENY_ALL). Ignored when mode is DEFAULT.") __properties: ClassVar[List[str]] = ["mode", "allow_list"] model_config = ConfigDict( @@ -45,6 +40,7 @@ class EgressPolicy(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -79,10 +76,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.allow_list: for _item_allow_list in self.allow_list: - _items.append( - _item_allow_list.to_dict() if _item_allow_list is not None else None - ) - _dict["allow_list"] = _items + if _item_allow_list: + _items.append(_item_allow_list.to_dict()) + _dict['allow_list'] = _items return _dict @classmethod @@ -94,17 +90,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "mode": obj.get("mode") - if obj.get("mode") is not None - else EgressPolicyMode.EGRESS_POLICY_MODE_DEFAULT, - "allow_list": [ - NetworkPolicyDestination.from_dict(_item) - for _item in obj["allow_list"] - ] - if obj.get("allow_list") is not None - else None, - } - ) + _obj = cls.model_validate({ + "mode": obj.get("mode") if obj.get("mode") is not None else EgressPolicyMode.EGRESS_POLICY_MODE_DEFAULT, + "allow_list": [NetworkPolicyDestination.from_dict(_item) for _item in obj["allow_list"]] if obj.get("allow_list") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/egress_policy_mode.py b/koyeb/api/models/egress_policy_mode.py index 968dc260..3786f8dd 100644 --- a/koyeb/api/models/egress_policy_mode.py +++ b/koyeb/api/models/egress_policy_mode.py @@ -26,10 +26,12 @@ class EgressPolicyMode(str, Enum): """ allowed enum values """ - EGRESS_POLICY_MODE_DEFAULT = "EGRESS_POLICY_MODE_DEFAULT" - EGRESS_POLICY_MODE_DENY_ALL = "EGRESS_POLICY_MODE_DENY_ALL" + EGRESS_POLICY_MODE_DEFAULT = 'EGRESS_POLICY_MODE_DEFAULT' + EGRESS_POLICY_MODE_DENY_ALL = 'EGRESS_POLICY_MODE_DENY_ALL' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of EgressPolicyMode from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/env.py b/koyeb/api/models/env.py index cee7b64a..4f05c55d 100644 --- a/koyeb/api/models/env.py +++ b/koyeb/api/models/env.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Env(BaseModel): """ Env - """ # noqa: E501 - + """ # noqa: E501 key: Optional[StrictStr] = None value: Optional[StrictStr] = None secret: Optional[StrictStr] = None @@ -41,6 +39,7 @@ class Env(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "key": obj.get("key"), - "value": obj.get("value"), - "secret": obj.get("secret"), - } - ) + _obj = cls.model_validate({ + "key": obj.get("key"), + "value": obj.get("value"), + "secret": obj.get("secret") + }) return _obj + + diff --git a/koyeb/api/models/error.py b/koyeb/api/models/error.py index ec2fe905..a7c14eae 100644 --- a/koyeb/api/models/error.py +++ b/koyeb/api/models/error.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Error(BaseModel): """ Error - """ # noqa: E501 - + """ # noqa: E501 status: Optional[StrictInt] = None code: Optional[StrictStr] = None message: Optional[StrictStr] = None @@ -41,6 +39,7 @@ class Error(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "status": obj.get("status"), - "code": obj.get("code"), - "message": obj.get("message"), - } - ) + _obj = cls.model_validate({ + "status": obj.get("status"), + "code": obj.get("code"), + "message": obj.get("message") + }) return _obj + + diff --git a/koyeb/api/models/error_field.py b/koyeb/api/models/error_field.py index 848aca13..0672a721 100644 --- a/koyeb/api/models/error_field.py +++ b/koyeb/api/models/error_field.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ErrorField(BaseModel): """ ErrorField - """ # noqa: E501 - + """ # noqa: E501 var_field: Optional[StrictStr] = Field(default=None, alias="field") description: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["field", "description"] @@ -40,6 +38,7 @@ class ErrorField(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"field": obj.get("field"), "description": obj.get("description")} - ) + _obj = cls.model_validate({ + "field": obj.get("field"), + "description": obj.get("description") + }) return _obj + + diff --git a/koyeb/api/models/error_with_fields.py b/koyeb/api/models/error_with_fields.py index 440b1ae6..40991b74 100644 --- a/koyeb/api/models/error_with_fields.py +++ b/koyeb/api/models/error_with_fields.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ErrorWithFields(BaseModel): """ ErrorWithFields - """ # noqa: E501 - + """ # noqa: E501 status: Optional[StrictInt] = None code: Optional[StrictStr] = None message: Optional[StrictStr] = None @@ -43,6 +41,7 @@ class ErrorWithFields(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.fields: for _item_fields in self.fields: - _items.append( - _item_fields.to_dict() if _item_fields is not None else None - ) - _dict["fields"] = _items + if _item_fields: + _items.append(_item_fields.to_dict()) + _dict['fields'] = _items return _dict @classmethod @@ -92,14 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "status": obj.get("status"), - "code": obj.get("code"), - "message": obj.get("message"), - "fields": [ErrorField.from_dict(_item) for _item in obj["fields"]] - if obj.get("fields") is not None - else None, - } - ) + _obj = cls.model_validate({ + "status": obj.get("status"), + "code": obj.get("code"), + "message": obj.get("message"), + "fields": [ErrorField.from_dict(_item) for _item in obj["fields"]] if obj.get("fields") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/exec_command_io.py b/koyeb/api/models/exec_command_io.py index 1db0c6f7..7adf4f6b 100644 --- a/koyeb/api/models/exec_command_io.py +++ b/koyeb/api/models/exec_command_io.py @@ -24,33 +24,22 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ExecCommandIO(BaseModel): """ ExecCommandIO - """ # noqa: E501 - - data: Optional[ - Union[Annotated[bytes, Field(strict=True)], Annotated[str, Field(strict=True)]] - ] = Field(default=None, description="Data is base64 encoded") - close: Optional[StrictBool] = Field( - default=None, description="Indicate last data frame" - ) + """ # noqa: E501 + data: Optional[Union[Annotated[bytes, Field(strict=True)], Annotated[str, Field(strict=True)]]] = Field(default=None, description="Data is base64 encoded") + close: Optional[StrictBool] = Field(default=None, description="Indicate last data frame") __properties: ClassVar[List[str]] = ["data", "close"] - @field_validator("data", mode="before") + @field_validator('data', mode="before") def data_validate_regular_expression(cls, value): """Validates the regular expression""" if value is None: return value - if isinstance(value, str) and not re.match( - r"^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$", - value, - ): - raise ValueError( - r"must validate the regular expression /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/" - ) + if isinstance(value, str) and not re.match(r"^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$", value): + raise ValueError(r"must validate the regular expression /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/") return value model_config = ConfigDict( @@ -60,6 +49,7 @@ def data_validate_regular_expression(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -83,7 +73,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -101,5 +92,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"data": obj.get("data"), "close": obj.get("close")}) + _obj = cls.model_validate({ + "data": obj.get("data"), + "close": obj.get("close") + }) return _obj + + diff --git a/koyeb/api/models/exec_command_reply.py b/koyeb/api/models/exec_command_reply.py index afe9d684..4b386cc4 100644 --- a/koyeb/api/models/exec_command_reply.py +++ b/koyeb/api/models/exec_command_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ExecCommandReply(BaseModel): """ ExecCommandReply - """ # noqa: E501 - + """ # noqa: E501 stdout: Optional[ExecCommandIO] = None stderr: Optional[ExecCommandIO] = None exited: Optional[StrictBool] = None @@ -43,6 +41,7 @@ class ExecCommandReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -75,10 +75,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of stdout if self.stdout: - _dict["stdout"] = self.stdout.to_dict() + _dict['stdout'] = self.stdout.to_dict() # override the default output from pydantic by calling `to_dict()` of stderr if self.stderr: - _dict["stderr"] = self.stderr.to_dict() + _dict['stderr'] = self.stderr.to_dict() return _dict @classmethod @@ -90,16 +90,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "stdout": ExecCommandIO.from_dict(obj["stdout"]) - if obj.get("stdout") is not None - else None, - "stderr": ExecCommandIO.from_dict(obj["stderr"]) - if obj.get("stderr") is not None - else None, - "exited": obj.get("exited"), - "exit_code": obj.get("exit_code"), - } - ) + _obj = cls.model_validate({ + "stdout": ExecCommandIO.from_dict(obj["stdout"]) if obj.get("stdout") is not None else None, + "stderr": ExecCommandIO.from_dict(obj["stderr"]) if obj.get("stderr") is not None else None, + "exited": obj.get("exited"), + "exit_code": obj.get("exit_code") + }) return _obj + + diff --git a/koyeb/api/models/exec_command_request_body.py b/koyeb/api/models/exec_command_request_body.py index 9d46edca..25257ae2 100644 --- a/koyeb/api/models/exec_command_request_body.py +++ b/koyeb/api/models/exec_command_request_body.py @@ -20,29 +20,19 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from koyeb.api.models.exec_command_io import ExecCommandIO -from koyeb.api.models.exec_command_request_terminal_size import ( - ExecCommandRequestTerminalSize, -) +from koyeb.api.models.exec_command_request_terminal_size import ExecCommandRequestTerminalSize from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class ExecCommandRequestBody(BaseModel): """ ExecCommandRequestBody - """ # noqa: E501 - - command: Optional[List[StrictStr]] = Field( - default=None, description="Command to exec. Mandatory in the first frame sent" - ) + """ # noqa: E501 + command: Optional[List[StrictStr]] = Field(default=None, description="Command to exec. Mandatory in the first frame sent") tty_size: Optional[ExecCommandRequestTerminalSize] = None stdin: Optional[ExecCommandIO] = None - disable_tty: Optional[StrictBool] = Field( - default=None, - description="Disable TTY. It's enough to specify it in the first frame", - alias="disableTty", - ) + disable_tty: Optional[StrictBool] = Field(default=None, description="Disable TTY. It's enough to specify it in the first frame", alias="disableTty") __properties: ClassVar[List[str]] = ["command", "tty_size", "stdin", "disableTty"] model_config = ConfigDict( @@ -52,6 +42,7 @@ class ExecCommandRequestBody(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -75,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +76,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of tty_size if self.tty_size: - _dict["tty_size"] = self.tty_size.to_dict() + _dict['tty_size'] = self.tty_size.to_dict() # override the default output from pydantic by calling `to_dict()` of stdin if self.stdin: - _dict["stdin"] = self.stdin.to_dict() + _dict['stdin'] = self.stdin.to_dict() return _dict @classmethod @@ -99,16 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "command": obj.get("command"), - "tty_size": ExecCommandRequestTerminalSize.from_dict(obj["tty_size"]) - if obj.get("tty_size") is not None - else None, - "stdin": ExecCommandIO.from_dict(obj["stdin"]) - if obj.get("stdin") is not None - else None, - "disableTty": obj.get("disableTty"), - } - ) + _obj = cls.model_validate({ + "command": obj.get("command"), + "tty_size": ExecCommandRequestTerminalSize.from_dict(obj["tty_size"]) if obj.get("tty_size") is not None else None, + "stdin": ExecCommandIO.from_dict(obj["stdin"]) if obj.get("stdin") is not None else None, + "disableTty": obj.get("disableTty") + }) return _obj + + diff --git a/koyeb/api/models/exec_command_request_id_type.py b/koyeb/api/models/exec_command_request_id_type.py index f6deb51f..9893c9dc 100644 --- a/koyeb/api/models/exec_command_request_id_type.py +++ b/koyeb/api/models/exec_command_request_id_type.py @@ -26,11 +26,13 @@ class ExecCommandRequestIdType(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - INSTANCE_ID = "INSTANCE_ID" - SERVICE_ID = "SERVICE_ID" + INVALID = 'INVALID' + INSTANCE_ID = 'INSTANCE_ID' + SERVICE_ID = 'SERVICE_ID' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ExecCommandRequestIdType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/exec_command_request_terminal_size.py b/koyeb/api/models/exec_command_request_terminal_size.py index 5f6f41ff..c0834f4d 100644 --- a/koyeb/api/models/exec_command_request_terminal_size.py +++ b/koyeb/api/models/exec_command_request_terminal_size.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ExecCommandRequestTerminalSize(BaseModel): """ ExecCommandRequestTerminalSize - """ # noqa: E501 - + """ # noqa: E501 height: Optional[StrictInt] = None width: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["height", "width"] @@ -40,6 +38,7 @@ class ExecCommandRequestTerminalSize(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"height": obj.get("height"), "width": obj.get("width")} - ) + _obj = cls.model_validate({ + "height": obj.get("height"), + "width": obj.get("width") + }) return _obj + + diff --git a/koyeb/api/models/gcp_container_registry_configuration.py b/koyeb/api/models/gcp_container_registry_configuration.py index 527bf173..2afa4c13 100644 --- a/koyeb/api/models/gcp_container_registry_configuration.py +++ b/koyeb/api/models/gcp_container_registry_configuration.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GCPContainerRegistryConfiguration(BaseModel): """ GCPContainerRegistryConfiguration - """ # noqa: E501 - + """ # noqa: E501 keyfile_content: Optional[StrictStr] = None url: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["keyfile_content", "url"] @@ -40,6 +38,7 @@ class GCPContainerRegistryConfiguration(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"keyfile_content": obj.get("keyfile_content"), "url": obj.get("url")} - ) + _obj = cls.model_validate({ + "keyfile_content": obj.get("keyfile_content"), + "url": obj.get("url") + }) return _obj + + diff --git a/koyeb/api/models/get_app_reply.py b/koyeb/api/models/get_app_reply.py index 5e653502..62077d85 100644 --- a/koyeb/api/models/get_app_reply.py +++ b/koyeb/api/models/get_app_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetAppReply(BaseModel): """ GetAppReply - """ # noqa: E501 - + """ # noqa: E501 app: Optional[App] = None __properties: ClassVar[List[str]] = ["app"] @@ -40,6 +38,7 @@ class GetAppReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of app if self.app: - _dict["app"] = self.app.to_dict() + _dict['app'] = self.app.to_dict() return _dict @classmethod @@ -84,7 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"app": App.from_dict(obj["app"]) if obj.get("app") is not None else None} - ) + _obj = cls.model_validate({ + "app": App.from_dict(obj["app"]) if obj.get("app") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_budget_reply.py b/koyeb/api/models/get_budget_reply.py index 510af54f..23d21ec8 100644 --- a/koyeb/api/models/get_budget_reply.py +++ b/koyeb/api/models/get_budget_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetBudgetReply(BaseModel): """ GetBudgetReply - """ # noqa: E501 - + """ # noqa: E501 budget: Optional[Budget] = None __properties: ClassVar[List[str]] = ["budget"] @@ -40,6 +38,7 @@ class GetBudgetReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of budget if self.budget: - _dict["budget"] = self.budget.to_dict() + _dict['budget'] = self.budget.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "budget": Budget.from_dict(obj["budget"]) - if obj.get("budget") is not None - else None - } - ) + _obj = cls.model_validate({ + "budget": Budget.from_dict(obj["budget"]) if obj.get("budget") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_catalog_instance_reply.py b/koyeb/api/models/get_catalog_instance_reply.py index d0e0b9e6..ae39eec1 100644 --- a/koyeb/api/models/get_catalog_instance_reply.py +++ b/koyeb/api/models/get_catalog_instance_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetCatalogInstanceReply(BaseModel): """ GetCatalogInstanceReply - """ # noqa: E501 - + """ # noqa: E501 instance: Optional[CatalogInstance] = None __properties: ClassVar[List[str]] = ["instance"] @@ -40,6 +38,7 @@ class GetCatalogInstanceReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of instance if self.instance: - _dict["instance"] = self.instance.to_dict() + _dict['instance'] = self.instance.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instance": CatalogInstance.from_dict(obj["instance"]) - if obj.get("instance") is not None - else None - } - ) + _obj = cls.model_validate({ + "instance": CatalogInstance.from_dict(obj["instance"]) if obj.get("instance") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_credential_reply.py b/koyeb/api/models/get_credential_reply.py index b7dba9bb..ce85864e 100644 --- a/koyeb/api/models/get_credential_reply.py +++ b/koyeb/api/models/get_credential_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetCredentialReply(BaseModel): """ GetCredentialReply - """ # noqa: E501 - + """ # noqa: E501 credential: Optional[Credential] = None __properties: ClassVar[List[str]] = ["credential"] @@ -40,6 +38,7 @@ class GetCredentialReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of credential if self.credential: - _dict["credential"] = self.credential.to_dict() + _dict['credential'] = self.credential.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "credential": Credential.from_dict(obj["credential"]) - if obj.get("credential") is not None - else None - } - ) + _obj = cls.model_validate({ + "credential": Credential.from_dict(obj["credential"]) if obj.get("credential") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_deployment_reply.py b/koyeb/api/models/get_deployment_reply.py index 77db2f00..3520e23b 100644 --- a/koyeb/api/models/get_deployment_reply.py +++ b/koyeb/api/models/get_deployment_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetDeploymentReply(BaseModel): """ GetDeploymentReply - """ # noqa: E501 - + """ # noqa: E501 deployment: Optional[Deployment] = None __properties: ClassVar[List[str]] = ["deployment"] @@ -40,6 +38,7 @@ class GetDeploymentReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of deployment if self.deployment: - _dict["deployment"] = self.deployment.to_dict() + _dict['deployment'] = self.deployment.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "deployment": Deployment.from_dict(obj["deployment"]) - if obj.get("deployment") is not None - else None - } - ) + _obj = cls.model_validate({ + "deployment": Deployment.from_dict(obj["deployment"]) if obj.get("deployment") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_deployment_scaling_reply.py b/koyeb/api/models/get_deployment_scaling_reply.py index 4d7ac556..ca24e214 100644 --- a/koyeb/api/models/get_deployment_scaling_reply.py +++ b/koyeb/api/models/get_deployment_scaling_reply.py @@ -19,19 +19,15 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.get_deployment_scaling_reply_item import ( - GetDeploymentScalingReplyItem, -) +from koyeb.api.models.get_deployment_scaling_reply_item import GetDeploymentScalingReplyItem from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetDeploymentScalingReply(BaseModel): """ GetDeploymentScalingReply - """ # noqa: E501 - + """ # noqa: E501 replicas: Optional[List[GetDeploymentScalingReplyItem]] = None __properties: ClassVar[List[str]] = ["replicas"] @@ -42,6 +38,7 @@ class GetDeploymentScalingReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -76,10 +74,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.replicas: for _item_replicas in self.replicas: - _items.append( - _item_replicas.to_dict() if _item_replicas is not None else None - ) - _dict["replicas"] = _items + if _item_replicas: + _items.append(_item_replicas.to_dict()) + _dict['replicas'] = _items return _dict @classmethod @@ -91,14 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "replicas": [ - GetDeploymentScalingReplyItem.from_dict(_item) - for _item in obj["replicas"] - ] - if obj.get("replicas") is not None - else None - } - ) + _obj = cls.model_validate({ + "replicas": [GetDeploymentScalingReplyItem.from_dict(_item) for _item in obj["replicas"]] if obj.get("replicas") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_deployment_scaling_reply_item.py b/koyeb/api/models/get_deployment_scaling_reply_item.py index da363ff0..da35b5ea 100644 --- a/koyeb/api/models/get_deployment_scaling_reply_item.py +++ b/koyeb/api/models/get_deployment_scaling_reply_item.py @@ -24,18 +24,13 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetDeploymentScalingReplyItem(BaseModel): """ GetDeploymentScalingReplyItem - """ # noqa: E501 - + """ # noqa: E501 region: Optional[StrictStr] = None replica_index: Optional[StrictInt] = None - instances: Optional[List[Instance]] = Field( - default=None, - description="An array of `active` and `starting` instances. Status of the active instance (and if none the most recent instance) string status = 4; Status message of the active instance (and if none the most recent instance) string message = 5;", - ) + instances: Optional[List[Instance]] = Field(default=None, description="An array of `active` and `starting` instances. Status of the active instance (and if none the most recent instance) string status = 4; Status message of the active instance (and if none the most recent instance) string message = 5;") __properties: ClassVar[List[str]] = ["region", "replica_index", "instances"] model_config = ConfigDict( @@ -45,6 +40,7 @@ class GetDeploymentScalingReplyItem(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -79,10 +76,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.instances: for _item_instances in self.instances: - _items.append( - _item_instances.to_dict() if _item_instances is not None else None - ) - _dict["instances"] = _items + if _item_instances: + _items.append(_item_instances.to_dict()) + _dict['instances'] = _items return _dict @classmethod @@ -94,13 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "region": obj.get("region"), - "replica_index": obj.get("replica_index"), - "instances": [Instance.from_dict(_item) for _item in obj["instances"]] - if obj.get("instances") is not None - else None, - } - ) + _obj = cls.model_validate({ + "region": obj.get("region"), + "replica_index": obj.get("replica_index"), + "instances": [Instance.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_domain_reply.py b/koyeb/api/models/get_domain_reply.py index 9a925c72..c22995dc 100644 --- a/koyeb/api/models/get_domain_reply.py +++ b/koyeb/api/models/get_domain_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetDomainReply(BaseModel): """ GetDomainReply - """ # noqa: E501 - + """ # noqa: E501 domain: Optional[Domain] = None __properties: ClassVar[List[str]] = ["domain"] @@ -40,6 +38,7 @@ class GetDomainReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of domain if self.domain: - _dict["domain"] = self.domain.to_dict() + _dict['domain'] = self.domain.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "domain": Domain.from_dict(obj["domain"]) - if obj.get("domain") is not None - else None - } - ) + _obj = cls.model_validate({ + "domain": Domain.from_dict(obj["domain"]) if obj.get("domain") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_github_installation_reply.py b/koyeb/api/models/get_github_installation_reply.py index 81a7b516..4ebeef8d 100644 --- a/koyeb/api/models/get_github_installation_reply.py +++ b/koyeb/api/models/get_github_installation_reply.py @@ -20,46 +20,27 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.kgitproxy_github_installation_status import ( - KgitproxyGithubInstallationStatus, -) +from koyeb.api.models.kgitproxy_github_installation_status import KgitproxyGithubInstallationStatus from koyeb.api.models.kgitproxy_indexing_status import KgitproxyIndexingStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetGithubInstallationReply(BaseModel): """ GetGithubInstallationReply - """ # noqa: E501 - + """ # noqa: E501 installation_id: Optional[StrictStr] = None installation_url: Optional[StrictStr] = None name: Optional[StrictStr] = None avatar_url: Optional[StrictStr] = None - status: Optional[ - KgitproxyGithubInstallationStatus - ] = KgitproxyGithubInstallationStatus.INVALID + status: Optional[KgitproxyGithubInstallationStatus] = KgitproxyGithubInstallationStatus.INVALID installed_at: Optional[datetime] = None suspended_at: Optional[datetime] = None - indexing_status: Optional[ - KgitproxyIndexingStatus - ] = KgitproxyIndexingStatus.INVALID_INDEXING_STATUS + indexing_status: Optional[KgitproxyIndexingStatus] = KgitproxyIndexingStatus.INVALID_INDEXING_STATUS indexed_repositories: Optional[StrictInt] = None total_repositories: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = [ - "installation_id", - "installation_url", - "name", - "avatar_url", - "status", - "installed_at", - "suspended_at", - "indexing_status", - "indexed_repositories", - "total_repositories", - ] + __properties: ClassVar[List[str]] = ["installation_id", "installation_url", "name", "avatar_url", "status", "installed_at", "suspended_at", "indexing_status", "indexed_repositories", "total_repositories"] model_config = ConfigDict( validate_by_name=True, @@ -68,6 +49,7 @@ class GetGithubInstallationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -91,7 +73,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -109,22 +92,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "installation_id": obj.get("installation_id"), - "installation_url": obj.get("installation_url"), - "name": obj.get("name"), - "avatar_url": obj.get("avatar_url"), - "status": obj.get("status") - if obj.get("status") is not None - else KgitproxyGithubInstallationStatus.INVALID, - "installed_at": obj.get("installed_at"), - "suspended_at": obj.get("suspended_at"), - "indexing_status": obj.get("indexing_status") - if obj.get("indexing_status") is not None - else KgitproxyIndexingStatus.INVALID_INDEXING_STATUS, - "indexed_repositories": obj.get("indexed_repositories"), - "total_repositories": obj.get("total_repositories"), - } - ) + _obj = cls.model_validate({ + "installation_id": obj.get("installation_id"), + "installation_url": obj.get("installation_url"), + "name": obj.get("name"), + "avatar_url": obj.get("avatar_url"), + "status": obj.get("status") if obj.get("status") is not None else KgitproxyGithubInstallationStatus.INVALID, + "installed_at": obj.get("installed_at"), + "suspended_at": obj.get("suspended_at"), + "indexing_status": obj.get("indexing_status") if obj.get("indexing_status") is not None else KgitproxyIndexingStatus.INVALID_INDEXING_STATUS, + "indexed_repositories": obj.get("indexed_repositories"), + "total_repositories": obj.get("total_repositories") + }) return _obj + + diff --git a/koyeb/api/models/get_idenfy_token_reply.py b/koyeb/api/models/get_idenfy_token_reply.py index fe8ac94e..68f867f4 100644 --- a/koyeb/api/models/get_idenfy_token_reply.py +++ b/koyeb/api/models/get_idenfy_token_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetIdenfyTokenReply(BaseModel): """ GetIdenfyTokenReply - """ # noqa: E501 - + """ # noqa: E501 auth_token: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["auth_token"] @@ -39,6 +37,7 @@ class GetIdenfyTokenReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"auth_token": obj.get("auth_token")}) + _obj = cls.model_validate({ + "auth_token": obj.get("auth_token") + }) return _obj + + diff --git a/koyeb/api/models/get_instance_reply.py b/koyeb/api/models/get_instance_reply.py index 3435f960..d97cd273 100644 --- a/koyeb/api/models/get_instance_reply.py +++ b/koyeb/api/models/get_instance_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetInstanceReply(BaseModel): """ GetInstanceReply - """ # noqa: E501 - + """ # noqa: E501 instance: Optional[Instance] = None __properties: ClassVar[List[str]] = ["instance"] @@ -40,6 +38,7 @@ class GetInstanceReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of instance if self.instance: - _dict["instance"] = self.instance.to_dict() + _dict['instance'] = self.instance.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instance": Instance.from_dict(obj["instance"]) - if obj.get("instance") is not None - else None - } - ) + _obj = cls.model_validate({ + "instance": Instance.from_dict(obj["instance"]) if obj.get("instance") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_instance_snapshot_reply.py b/koyeb/api/models/get_instance_snapshot_reply.py index 30e93415..f90ff55e 100644 --- a/koyeb/api/models/get_instance_snapshot_reply.py +++ b/koyeb/api/models/get_instance_snapshot_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetInstanceSnapshotReply(BaseModel): """ GetInstanceSnapshotReply - """ # noqa: E501 - + """ # noqa: E501 instance_snapshot: Optional[InstanceSnapshot] = None __properties: ClassVar[List[str]] = ["instance_snapshot"] @@ -40,6 +38,7 @@ class GetInstanceSnapshotReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of instance_snapshot if self.instance_snapshot: - _dict["instance_snapshot"] = self.instance_snapshot.to_dict() + _dict['instance_snapshot'] = self.instance_snapshot.to_dict() return _dict @classmethod @@ -84,13 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instance_snapshot": InstanceSnapshot.from_dict( - obj["instance_snapshot"] - ) - if obj.get("instance_snapshot") is not None - else None - } - ) + _obj = cls.model_validate({ + "instance_snapshot": InstanceSnapshot.from_dict(obj["instance_snapshot"]) if obj.get("instance_snapshot") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_intercom_profile_reply.py b/koyeb/api/models/get_intercom_profile_reply.py index 1fad5419..0c201cb7 100644 --- a/koyeb/api/models/get_intercom_profile_reply.py +++ b/koyeb/api/models/get_intercom_profile_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetIntercomProfileReply(BaseModel): """ GetIntercomProfileReply - """ # noqa: E501 - + """ # noqa: E501 hash: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["hash"] @@ -39,6 +37,7 @@ class GetIntercomProfileReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"hash": obj.get("hash")}) + _obj = cls.model_validate({ + "hash": obj.get("hash") + }) return _obj + + diff --git a/koyeb/api/models/get_metrics_reply.py b/koyeb/api/models/get_metrics_reply.py index 66d54ea1..00fd5359 100644 --- a/koyeb/api/models/get_metrics_reply.py +++ b/koyeb/api/models/get_metrics_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetMetricsReply(BaseModel): """ GetMetricsReply - """ # noqa: E501 - + """ # noqa: E501 metrics: Optional[List[GetMetricsReplyMetric]] = None __properties: ClassVar[List[str]] = ["metrics"] @@ -40,6 +38,7 @@ class GetMetricsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,10 +74,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.metrics: for _item_metrics in self.metrics: - _items.append( - _item_metrics.to_dict() if _item_metrics is not None else None - ) - _dict["metrics"] = _items + if _item_metrics: + _items.append(_item_metrics.to_dict()) + _dict['metrics'] = _items return _dict @classmethod @@ -89,13 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "metrics": [ - GetMetricsReplyMetric.from_dict(_item) for _item in obj["metrics"] - ] - if obj.get("metrics") is not None - else None - } - ) + _obj = cls.model_validate({ + "metrics": [GetMetricsReplyMetric.from_dict(_item) for _item in obj["metrics"]] if obj.get("metrics") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_metrics_reply_metric.py b/koyeb/api/models/get_metrics_reply_metric.py index 9e09b487..c4e03bae 100644 --- a/koyeb/api/models/get_metrics_reply_metric.py +++ b/koyeb/api/models/get_metrics_reply_metric.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetMetricsReplyMetric(BaseModel): """ GetMetricsReplyMetric - """ # noqa: E501 - + """ # noqa: E501 labels: Optional[Dict[str, StrictStr]] = None samples: Optional[List[Sample]] = None __properties: ClassVar[List[str]] = ["labels", "samples"] @@ -41,6 +39,7 @@ class GetMetricsReplyMetric(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -75,10 +75,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.samples: for _item_samples in self.samples: - _items.append( - _item_samples.to_dict() if _item_samples is not None else None - ) - _dict["samples"] = _items + if _item_samples: + _items.append(_item_samples.to_dict()) + _dict['samples'] = _items return _dict @classmethod @@ -90,12 +89,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "labels": obj.get("labels"), - "samples": [Sample.from_dict(_item) for _item in obj["samples"]] - if obj.get("samples") is not None - else None, - } - ) + _obj = cls.model_validate({ + "labels": obj.get("labels"), + "samples": [Sample.from_dict(_item) for _item in obj["samples"]] if obj.get("samples") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_o_auth_options_reply.py b/koyeb/api/models/get_o_auth_options_reply.py index 4eb1e61b..c2b77d1a 100644 --- a/koyeb/api/models/get_o_auth_options_reply.py +++ b/koyeb/api/models/get_o_auth_options_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetOAuthOptionsReply(BaseModel): """ A list of providers which you can use for single sign-on. - """ # noqa: E501 - + """ # noqa: E501 oauth_providers: Optional[List[OAuthProvider]] = None __properties: ClassVar[List[str]] = ["oauth_providers"] @@ -40,6 +38,7 @@ class GetOAuthOptionsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,12 +74,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.oauth_providers: for _item_oauth_providers in self.oauth_providers: - _items.append( - _item_oauth_providers.to_dict() - if _item_oauth_providers is not None - else None - ) - _dict["oauth_providers"] = _items + if _item_oauth_providers: + _items.append(_item_oauth_providers.to_dict()) + _dict['oauth_providers'] = _items return _dict @classmethod @@ -91,13 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "oauth_providers": [ - OAuthProvider.from_dict(_item) for _item in obj["oauth_providers"] - ] - if obj.get("oauth_providers") is not None - else None - } - ) + _obj = cls.model_validate({ + "oauth_providers": [OAuthProvider.from_dict(_item) for _item in obj["oauth_providers"]] if obj.get("oauth_providers") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_organization_invitation_reply.py b/koyeb/api/models/get_organization_invitation_reply.py index 89ed788e..7f738882 100644 --- a/koyeb/api/models/get_organization_invitation_reply.py +++ b/koyeb/api/models/get_organization_invitation_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetOrganizationInvitationReply(BaseModel): """ GetOrganizationInvitationReply - """ # noqa: E501 - + """ # noqa: E501 invitation: Optional[OrganizationInvitation] = None __properties: ClassVar[List[str]] = ["invitation"] @@ -40,6 +38,7 @@ class GetOrganizationInvitationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of invitation if self.invitation: - _dict["invitation"] = self.invitation.to_dict() + _dict['invitation'] = self.invitation.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "invitation": OrganizationInvitation.from_dict(obj["invitation"]) - if obj.get("invitation") is not None - else None - } - ) + _obj = cls.model_validate({ + "invitation": OrganizationInvitation.from_dict(obj["invitation"]) if obj.get("invitation") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_organization_quotas_usage_reply.py b/koyeb/api/models/get_organization_quotas_usage_reply.py index fd21a2e1..4a631443 100644 --- a/koyeb/api/models/get_organization_quotas_usage_reply.py +++ b/koyeb/api/models/get_organization_quotas_usage_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetOrganizationQuotasUsageReply(BaseModel): """ GetOrganizationQuotasUsageReply - """ # noqa: E501 - + """ # noqa: E501 usage: Optional[QuotaUsage] = None __properties: ClassVar[List[str]] = ["usage"] @@ -40,6 +38,7 @@ class GetOrganizationQuotasUsageReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of usage if self.usage: - _dict["usage"] = self.usage.to_dict() + _dict['usage'] = self.usage.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "usage": QuotaUsage.from_dict(obj["usage"]) - if obj.get("usage") is not None - else None - } - ) + _obj = cls.model_validate({ + "usage": QuotaUsage.from_dict(obj["usage"]) if obj.get("usage") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_organization_reply.py b/koyeb/api/models/get_organization_reply.py index 08a146b7..721a75a7 100644 --- a/koyeb/api/models/get_organization_reply.py +++ b/koyeb/api/models/get_organization_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetOrganizationReply(BaseModel): """ GetOrganizationReply - """ # noqa: E501 - + """ # noqa: E501 organization: Optional[Organization] = None __properties: ClassVar[List[str]] = ["organization"] @@ -40,6 +38,7 @@ class GetOrganizationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization": Organization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None - } - ) + _obj = cls.model_validate({ + "organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_organization_summary_reply.py b/koyeb/api/models/get_organization_summary_reply.py index ef030579..81f25bef 100644 --- a/koyeb/api/models/get_organization_summary_reply.py +++ b/koyeb/api/models/get_organization_summary_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetOrganizationSummaryReply(BaseModel): """ GetOrganizationSummaryReply - """ # noqa: E501 - + """ # noqa: E501 summary: Optional[OrganizationSummary] = None __properties: ClassVar[List[str]] = ["summary"] @@ -40,6 +38,7 @@ class GetOrganizationSummaryReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of summary if self.summary: - _dict["summary"] = self.summary.to_dict() + _dict['summary'] = self.summary.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "summary": OrganizationSummary.from_dict(obj["summary"]) - if obj.get("summary") is not None - else None - } - ) + _obj = cls.model_validate({ + "summary": OrganizationSummary.from_dict(obj["summary"]) if obj.get("summary") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_organization_usage_details_reply.py b/koyeb/api/models/get_organization_usage_details_reply.py index 49d66c57..be402a8f 100644 --- a/koyeb/api/models/get_organization_usage_details_reply.py +++ b/koyeb/api/models/get_organization_usage_details_reply.py @@ -25,26 +25,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetOrganizationUsageDetailsReply(BaseModel): """ GetOrganizationUsageDetailsReply - """ # noqa: E501 - + """ # noqa: E501 usage_details: Optional[List[UsageDetails]] = None database_details: Optional[List[DatabaseUsageDetails]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None count: Optional[StrictInt] = None order: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "usage_details", - "database_details", - "limit", - "offset", - "count", - "order", - ] + __properties: ClassVar[List[str]] = ["usage_details", "database_details", "limit", "offset", "count", "order"] model_config = ConfigDict( validate_by_name=True, @@ -53,6 +44,7 @@ class GetOrganizationUsageDetailsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -76,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -87,22 +80,16 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.usage_details: for _item_usage_details in self.usage_details: - _items.append( - _item_usage_details.to_dict() - if _item_usage_details is not None - else None - ) - _dict["usage_details"] = _items + if _item_usage_details: + _items.append(_item_usage_details.to_dict()) + _dict['usage_details'] = _items # override the default output from pydantic by calling `to_dict()` of each item in database_details (list) _items = [] if self.database_details: for _item_database_details in self.database_details: - _items.append( - _item_database_details.to_dict() - if _item_database_details is not None - else None - ) - _dict["database_details"] = _items + if _item_database_details: + _items.append(_item_database_details.to_dict()) + _dict['database_details'] = _items return _dict @classmethod @@ -114,23 +101,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "usage_details": [ - UsageDetails.from_dict(_item) for _item in obj["usage_details"] - ] - if obj.get("usage_details") is not None - else None, - "database_details": [ - DatabaseUsageDetails.from_dict(_item) - for _item in obj["database_details"] - ] - if obj.get("database_details") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - "order": obj.get("order"), - } - ) + _obj = cls.model_validate({ + "usage_details": [UsageDetails.from_dict(_item) for _item in obj["usage_details"]] if obj.get("usage_details") is not None else None, + "database_details": [DatabaseUsageDetails.from_dict(_item) for _item in obj["database_details"]] if obj.get("database_details") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "order": obj.get("order") + }) return _obj + + diff --git a/koyeb/api/models/get_organization_usage_reply.py b/koyeb/api/models/get_organization_usage_reply.py index c3cd84b7..acf39b56 100644 --- a/koyeb/api/models/get_organization_usage_reply.py +++ b/koyeb/api/models/get_organization_usage_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetOrganizationUsageReply(BaseModel): """ GetOrganizationUsageReply - """ # noqa: E501 - + """ # noqa: E501 usage: Optional[Usage] = None __properties: ClassVar[List[str]] = ["usage"] @@ -40,6 +38,7 @@ class GetOrganizationUsageReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of usage if self.usage: - _dict["usage"] = self.usage.to_dict() + _dict['usage'] = self.usage.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "usage": Usage.from_dict(obj["usage"]) - if obj.get("usage") is not None - else None - } - ) + _obj = cls.model_validate({ + "usage": Usage.from_dict(obj["usage"]) if obj.get("usage") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_payment_method_reply.py b/koyeb/api/models/get_payment_method_reply.py index 06095940..396b0b68 100644 --- a/koyeb/api/models/get_payment_method_reply.py +++ b/koyeb/api/models/get_payment_method_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetPaymentMethodReply(BaseModel): """ GetPaymentMethodReply - """ # noqa: E501 - + """ # noqa: E501 payment_method: Optional[PaymentMethod] = None __properties: ClassVar[List[str]] = ["payment_method"] @@ -40,6 +38,7 @@ class GetPaymentMethodReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of payment_method if self.payment_method: - _dict["payment_method"] = self.payment_method.to_dict() + _dict['payment_method'] = self.payment_method.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "payment_method": PaymentMethod.from_dict(obj["payment_method"]) - if obj.get("payment_method") is not None - else None - } - ) + _obj = cls.model_validate({ + "payment_method": PaymentMethod.from_dict(obj["payment_method"]) if obj.get("payment_method") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_persistent_volume_reply.py b/koyeb/api/models/get_persistent_volume_reply.py index 7412f1f1..7f641fb9 100644 --- a/koyeb/api/models/get_persistent_volume_reply.py +++ b/koyeb/api/models/get_persistent_volume_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetPersistentVolumeReply(BaseModel): """ GetPersistentVolumeReply - """ # noqa: E501 - + """ # noqa: E501 volume: Optional[PersistentVolume] = None __properties: ClassVar[List[str]] = ["volume"] @@ -40,6 +38,7 @@ class GetPersistentVolumeReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of volume if self.volume: - _dict["volume"] = self.volume.to_dict() + _dict['volume'] = self.volume.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "volume": PersistentVolume.from_dict(obj["volume"]) - if obj.get("volume") is not None - else None - } - ) + _obj = cls.model_validate({ + "volume": PersistentVolume.from_dict(obj["volume"]) if obj.get("volume") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_pool_claim_reply.py b/koyeb/api/models/get_pool_claim_reply.py index 6cf839b9..cd005130 100644 --- a/koyeb/api/models/get_pool_claim_reply.py +++ b/koyeb/api/models/get_pool_claim_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetPoolClaimReply(BaseModel): """ GetPoolClaimReply - """ # noqa: E501 - + """ # noqa: E501 claim: Optional[PoolClaim] = None __properties: ClassVar[List[str]] = ["claim"] @@ -40,6 +38,7 @@ class GetPoolClaimReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of claim if self.claim: - _dict["claim"] = self.claim.to_dict() + _dict['claim'] = self.claim.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "claim": PoolClaim.from_dict(obj["claim"]) - if obj.get("claim") is not None - else None - } - ) + _obj = cls.model_validate({ + "claim": PoolClaim.from_dict(obj["claim"]) if obj.get("claim") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_project_reply.py b/koyeb/api/models/get_project_reply.py index bc813765..384d04ee 100644 --- a/koyeb/api/models/get_project_reply.py +++ b/koyeb/api/models/get_project_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetProjectReply(BaseModel): """ GetProjectReply - """ # noqa: E501 - + """ # noqa: E501 project: Optional[Project] = None __properties: ClassVar[List[str]] = ["project"] @@ -40,6 +38,7 @@ class GetProjectReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of project if self.project: - _dict["project"] = self.project.to_dict() + _dict['project'] = self.project.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "project": Project.from_dict(obj["project"]) - if obj.get("project") is not None - else None - } - ) + _obj = cls.model_validate({ + "project": Project.from_dict(obj["project"]) if obj.get("project") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_quotas_reply.py b/koyeb/api/models/get_quotas_reply.py index e5dbdd98..a78691af 100644 --- a/koyeb/api/models/get_quotas_reply.py +++ b/koyeb/api/models/get_quotas_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetQuotasReply(BaseModel): """ GetQuotasReply - """ # noqa: E501 - + """ # noqa: E501 quotas: Optional[Quotas] = None __properties: ClassVar[List[str]] = ["quotas"] @@ -40,6 +38,7 @@ class GetQuotasReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of quotas if self.quotas: - _dict["quotas"] = self.quotas.to_dict() + _dict['quotas'] = self.quotas.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "quotas": Quotas.from_dict(obj["quotas"]) - if obj.get("quotas") is not None - else None - } - ) + _obj = cls.model_validate({ + "quotas": Quotas.from_dict(obj["quotas"]) if obj.get("quotas") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_region_reply.py b/koyeb/api/models/get_region_reply.py index 8bd402e2..276e9997 100644 --- a/koyeb/api/models/get_region_reply.py +++ b/koyeb/api/models/get_region_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetRegionReply(BaseModel): """ GetRegionReply - """ # noqa: E501 - + """ # noqa: E501 region: Optional[Region] = None __properties: ClassVar[List[str]] = ["region"] @@ -40,6 +38,7 @@ class GetRegionReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of region if self.region: - _dict["region"] = self.region.to_dict() + _dict['region'] = self.region.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "region": Region.from_dict(obj["region"]) - if obj.get("region") is not None - else None - } - ) + _obj = cls.model_validate({ + "region": Region.from_dict(obj["region"]) if obj.get("region") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_regional_deployment_reply.py b/koyeb/api/models/get_regional_deployment_reply.py index 03d8a8b6..02193ea0 100644 --- a/koyeb/api/models/get_regional_deployment_reply.py +++ b/koyeb/api/models/get_regional_deployment_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetRegionalDeploymentReply(BaseModel): """ GetRegionalDeploymentReply - """ # noqa: E501 - + """ # noqa: E501 regional_deployment: Optional[RegionalDeployment] = None __properties: ClassVar[List[str]] = ["regional_deployment"] @@ -40,6 +38,7 @@ class GetRegionalDeploymentReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of regional_deployment if self.regional_deployment: - _dict["regional_deployment"] = self.regional_deployment.to_dict() + _dict['regional_deployment'] = self.regional_deployment.to_dict() return _dict @classmethod @@ -84,13 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "regional_deployment": RegionalDeployment.from_dict( - obj["regional_deployment"] - ) - if obj.get("regional_deployment") is not None - else None - } - ) + _obj = cls.model_validate({ + "regional_deployment": RegionalDeployment.from_dict(obj["regional_deployment"]) if obj.get("regional_deployment") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_secret_reply.py b/koyeb/api/models/get_secret_reply.py index a86db90f..c9c989f9 100644 --- a/koyeb/api/models/get_secret_reply.py +++ b/koyeb/api/models/get_secret_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetSecretReply(BaseModel): """ GetSecretReply - """ # noqa: E501 - + """ # noqa: E501 secret: Optional[Secret] = None __properties: ClassVar[List[str]] = ["secret"] @@ -40,6 +38,7 @@ class GetSecretReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of secret if self.secret: - _dict["secret"] = self.secret.to_dict() + _dict['secret'] = self.secret.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "secret": Secret.from_dict(obj["secret"]) - if obj.get("secret") is not None - else None - } - ) + _obj = cls.model_validate({ + "secret": Secret.from_dict(obj["secret"]) if obj.get("secret") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_service_pool_reply.py b/koyeb/api/models/get_service_pool_reply.py index b41e7105..c0f33b8e 100644 --- a/koyeb/api/models/get_service_pool_reply.py +++ b/koyeb/api/models/get_service_pool_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetServicePoolReply(BaseModel): """ GetServicePoolReply - """ # noqa: E501 - + """ # noqa: E501 service_pool: Optional[ServicePool] = None __properties: ClassVar[List[str]] = ["service_pool"] @@ -40,6 +38,7 @@ class GetServicePoolReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of service_pool if self.service_pool: - _dict["service_pool"] = self.service_pool.to_dict() + _dict['service_pool'] = self.service_pool.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service_pool": ServicePool.from_dict(obj["service_pool"]) - if obj.get("service_pool") is not None - else None - } - ) + _obj = cls.model_validate({ + "service_pool": ServicePool.from_dict(obj["service_pool"]) if obj.get("service_pool") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_service_reply.py b/koyeb/api/models/get_service_reply.py index 76ac040a..7e0aca9c 100644 --- a/koyeb/api/models/get_service_reply.py +++ b/koyeb/api/models/get_service_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetServiceReply(BaseModel): """ GetServiceReply - """ # noqa: E501 - + """ # noqa: E501 service: Optional[Service] = None __properties: ClassVar[List[str]] = ["service"] @@ -40,6 +38,7 @@ class GetServiceReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of service if self.service: - _dict["service"] = self.service.to_dict() + _dict['service'] = self.service.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service": Service.from_dict(obj["service"]) - if obj.get("service") is not None - else None - } - ) + _obj = cls.model_validate({ + "service": Service.from_dict(obj["service"]) if obj.get("service") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_service_scaling_reply.py b/koyeb/api/models/get_service_scaling_reply.py index bc8fd771..247682de 100644 --- a/koyeb/api/models/get_service_scaling_reply.py +++ b/koyeb/api/models/get_service_scaling_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetServiceScalingReply(BaseModel): """ GetServiceScalingReply - """ # noqa: E501 - + """ # noqa: E501 scalings: Optional[List[ManualServiceScaling]] = None __properties: ClassVar[List[str]] = ["scalings"] @@ -40,6 +38,7 @@ class GetServiceScalingReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,10 +74,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.scalings: for _item_scalings in self.scalings: - _items.append( - _item_scalings.to_dict() if _item_scalings is not None else None - ) - _dict["scalings"] = _items + if _item_scalings: + _items.append(_item_scalings.to_dict()) + _dict['scalings'] = _items return _dict @classmethod @@ -89,13 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "scalings": [ - ManualServiceScaling.from_dict(_item) for _item in obj["scalings"] - ] - if obj.get("scalings") is not None - else None - } - ) + _obj = cls.model_validate({ + "scalings": [ManualServiceScaling.from_dict(_item) for _item in obj["scalings"]] if obj.get("scalings") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_snapshot_reply.py b/koyeb/api/models/get_snapshot_reply.py index 3330f261..84f13759 100644 --- a/koyeb/api/models/get_snapshot_reply.py +++ b/koyeb/api/models/get_snapshot_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetSnapshotReply(BaseModel): """ GetSnapshotReply - """ # noqa: E501 - + """ # noqa: E501 snapshot: Optional[Snapshot] = None __properties: ClassVar[List[str]] = ["snapshot"] @@ -40,6 +38,7 @@ class GetSnapshotReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of snapshot if self.snapshot: - _dict["snapshot"] = self.snapshot.to_dict() + _dict['snapshot'] = self.snapshot.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "snapshot": Snapshot.from_dict(obj["snapshot"]) - if obj.get("snapshot") is not None - else None - } - ) + _obj = cls.model_validate({ + "snapshot": Snapshot.from_dict(obj["snapshot"]) if obj.get("snapshot") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_subscription_reply.py b/koyeb/api/models/get_subscription_reply.py index 62ab727e..7fd742f0 100644 --- a/koyeb/api/models/get_subscription_reply.py +++ b/koyeb/api/models/get_subscription_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetSubscriptionReply(BaseModel): """ GetSubscriptionReply - """ # noqa: E501 - + """ # noqa: E501 subscription: Optional[Subscription] = None __properties: ClassVar[List[str]] = ["subscription"] @@ -40,6 +38,7 @@ class GetSubscriptionReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of subscription if self.subscription: - _dict["subscription"] = self.subscription.to_dict() + _dict['subscription'] = self.subscription.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "subscription": Subscription.from_dict(obj["subscription"]) - if obj.get("subscription") is not None - else None - } - ) + _obj = cls.model_validate({ + "subscription": Subscription.from_dict(obj["subscription"]) if obj.get("subscription") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_user_organization_invitation_reply.py b/koyeb/api/models/get_user_organization_invitation_reply.py index 978d5662..4146afba 100644 --- a/koyeb/api/models/get_user_organization_invitation_reply.py +++ b/koyeb/api/models/get_user_organization_invitation_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetUserOrganizationInvitationReply(BaseModel): """ GetUserOrganizationInvitationReply - """ # noqa: E501 - + """ # noqa: E501 invitation: Optional[OrganizationInvitation] = None __properties: ClassVar[List[str]] = ["invitation"] @@ -40,6 +38,7 @@ class GetUserOrganizationInvitationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of invitation if self.invitation: - _dict["invitation"] = self.invitation.to_dict() + _dict['invitation'] = self.invitation.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "invitation": OrganizationInvitation.from_dict(obj["invitation"]) - if obj.get("invitation") is not None - else None - } - ) + _obj = cls.model_validate({ + "invitation": OrganizationInvitation.from_dict(obj["invitation"]) if obj.get("invitation") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/get_user_settings_reply.py b/koyeb/api/models/get_user_settings_reply.py index 8fabf2de..4057ff42 100644 --- a/koyeb/api/models/get_user_settings_reply.py +++ b/koyeb/api/models/get_user_settings_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetUserSettingsReply(BaseModel): """ GetUserSettingsReply - """ # noqa: E501 - + """ # noqa: E501 settings: Optional[UserSettings] = None __properties: ClassVar[List[str]] = ["settings"] @@ -40,6 +38,7 @@ class GetUserSettingsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of settings if self.settings: - _dict["settings"] = self.settings.to_dict() + _dict['settings'] = self.settings.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "settings": UserSettings.from_dict(obj["settings"]) - if obj.get("settings") is not None - else None - } - ) + _obj = cls.model_validate({ + "settings": UserSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/git_deployment_metadata.py b/koyeb/api/models/git_deployment_metadata.py index 7b6f4cc2..52db3dcb 100644 --- a/koyeb/api/models/git_deployment_metadata.py +++ b/koyeb/api/models/git_deployment_metadata.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GitDeploymentMetadata(BaseModel): """ GitDeploymentMetadata - """ # noqa: E501 - + """ # noqa: E501 last_provisioned_deployment_id: Optional[StrictStr] = None git_env: Optional[GitEnvDeploymentMetadata] = None __properties: ClassVar[List[str]] = ["last_provisioned_deployment_id", "git_env"] @@ -41,6 +39,7 @@ class GitDeploymentMetadata(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of git_env if self.git_env: - _dict["git_env"] = self.git_env.to_dict() + _dict['git_env'] = self.git_env.to_dict() return _dict @classmethod @@ -85,14 +85,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "last_provisioned_deployment_id": obj.get( - "last_provisioned_deployment_id" - ), - "git_env": GitEnvDeploymentMetadata.from_dict(obj["git_env"]) - if obj.get("git_env") is not None - else None, - } - ) + _obj = cls.model_validate({ + "last_provisioned_deployment_id": obj.get("last_provisioned_deployment_id"), + "git_env": GitEnvDeploymentMetadata.from_dict(obj["git_env"]) if obj.get("git_env") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/git_env_deployment_metadata.py b/koyeb/api/models/git_env_deployment_metadata.py index 095fb60f..8a7a5710 100644 --- a/koyeb/api/models/git_env_deployment_metadata.py +++ b/koyeb/api/models/git_env_deployment_metadata.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GitEnvDeploymentMetadata(BaseModel): """ GitEnvDeploymentMetadata - """ # noqa: E501 - + """ # noqa: E501 sha: Optional[StrictStr] = None commit_author: Optional[StrictStr] = None commit_message: Optional[StrictStr] = None @@ -41,6 +39,7 @@ class GitEnvDeploymentMetadata(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "sha": obj.get("sha"), - "commit_author": obj.get("commit_author"), - "commit_message": obj.get("commit_message"), - } - ) + _obj = cls.model_validate({ + "sha": obj.get("sha"), + "commit_author": obj.get("commit_author"), + "commit_message": obj.get("commit_message") + }) return _obj + + diff --git a/koyeb/api/models/git_hub_registry_configuration.py b/koyeb/api/models/git_hub_registry_configuration.py index 61e5d778..ca3244ad 100644 --- a/koyeb/api/models/git_hub_registry_configuration.py +++ b/koyeb/api/models/git_hub_registry_configuration.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GitHubRegistryConfiguration(BaseModel): """ GitHubRegistryConfiguration - """ # noqa: E501 - + """ # noqa: E501 username: Optional[StrictStr] = None password: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["username", "password"] @@ -40,6 +38,7 @@ class GitHubRegistryConfiguration(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"username": obj.get("username"), "password": obj.get("password")} - ) + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password") + }) return _obj + + diff --git a/koyeb/api/models/git_lab_registry_configuration.py b/koyeb/api/models/git_lab_registry_configuration.py index 656f77bd..0b792b9a 100644 --- a/koyeb/api/models/git_lab_registry_configuration.py +++ b/koyeb/api/models/git_lab_registry_configuration.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GitLabRegistryConfiguration(BaseModel): """ GitLabRegistryConfiguration - """ # noqa: E501 - + """ # noqa: E501 username: Optional[StrictStr] = None password: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["username", "password"] @@ -40,6 +38,7 @@ class GitLabRegistryConfiguration(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"username": obj.get("username"), "password": obj.get("password")} - ) + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password") + }) return _obj + + diff --git a/koyeb/api/models/git_source.py b/koyeb/api/models/git_source.py index 3ad0991f..c805eb01 100644 --- a/koyeb/api/models/git_source.py +++ b/koyeb/api/models/git_source.py @@ -25,16 +25,11 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GitSource(BaseModel): """ GitSource - """ # noqa: E501 - - repository: Optional[StrictStr] = Field( - default=None, - description="A url to a git repository (contains the provider as well) .e.g: github.com/koyeb/test.", - ) + """ # noqa: E501 + repository: Optional[StrictStr] = Field(default=None, description="A url to a git repository (contains the provider as well) .e.g: github.com/koyeb/test.") branch: Optional[StrictStr] = None tag: Optional[StrictStr] = None sha: Optional[StrictStr] = None @@ -44,18 +39,7 @@ class GitSource(BaseModel): workdir: Optional[StrictStr] = None buildpack: Optional[BuildpackBuilder] = None docker: Optional[DockerBuilder] = None - __properties: ClassVar[List[str]] = [ - "repository", - "branch", - "tag", - "sha", - "build_command", - "run_command", - "no_deploy_on_push", - "workdir", - "buildpack", - "docker", - ] + __properties: ClassVar[List[str]] = ["repository", "branch", "tag", "sha", "build_command", "run_command", "no_deploy_on_push", "workdir", "buildpack", "docker"] model_config = ConfigDict( validate_by_name=True, @@ -64,6 +48,7 @@ class GitSource(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -87,7 +72,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -96,10 +82,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of buildpack if self.buildpack: - _dict["buildpack"] = self.buildpack.to_dict() + _dict['buildpack'] = self.buildpack.to_dict() # override the default output from pydantic by calling `to_dict()` of docker if self.docker: - _dict["docker"] = self.docker.to_dict() + _dict['docker'] = self.docker.to_dict() return _dict @classmethod @@ -111,22 +97,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "repository": obj.get("repository"), - "branch": obj.get("branch"), - "tag": obj.get("tag"), - "sha": obj.get("sha"), - "build_command": obj.get("build_command"), - "run_command": obj.get("run_command"), - "no_deploy_on_push": obj.get("no_deploy_on_push"), - "workdir": obj.get("workdir"), - "buildpack": BuildpackBuilder.from_dict(obj["buildpack"]) - if obj.get("buildpack") is not None - else None, - "docker": DockerBuilder.from_dict(obj["docker"]) - if obj.get("docker") is not None - else None, - } - ) + _obj = cls.model_validate({ + "repository": obj.get("repository"), + "branch": obj.get("branch"), + "tag": obj.get("tag"), + "sha": obj.get("sha"), + "build_command": obj.get("build_command"), + "run_command": obj.get("run_command"), + "no_deploy_on_push": obj.get("no_deploy_on_push"), + "workdir": obj.get("workdir"), + "buildpack": BuildpackBuilder.from_dict(obj["buildpack"]) if obj.get("buildpack") is not None else None, + "docker": DockerBuilder.from_dict(obj["docker"]) if obj.get("docker") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/github_installation_reply.py b/koyeb/api/models/github_installation_reply.py index 7ff07785..210ea082 100644 --- a/koyeb/api/models/github_installation_reply.py +++ b/koyeb/api/models/github_installation_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GithubInstallationReply(BaseModel): """ GithubInstallationReply - """ # noqa: E501 - + """ # noqa: E501 app_name: Optional[StrictStr] = None app_id: Optional[StrictStr] = None url: Optional[StrictStr] = None @@ -42,6 +40,7 @@ class GithubInstallationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "app_name": obj.get("app_name"), - "app_id": obj.get("app_id"), - "url": obj.get("url"), - "state": obj.get("state"), - } - ) + _obj = cls.model_validate({ + "app_name": obj.get("app_name"), + "app_id": obj.get("app_id"), + "url": obj.get("url"), + "state": obj.get("state") + }) return _obj + + diff --git a/koyeb/api/models/github_installation_request.py b/koyeb/api/models/github_installation_request.py index 3fe192b8..046aee5a 100644 --- a/koyeb/api/models/github_installation_request.py +++ b/koyeb/api/models/github_installation_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GithubInstallationRequest(BaseModel): """ GithubInstallationRequest - """ # noqa: E501 - + """ # noqa: E501 metadata: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["metadata"] @@ -39,6 +37,7 @@ class GithubInstallationRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"metadata": obj.get("metadata")}) + _obj = cls.model_validate({ + "metadata": obj.get("metadata") + }) return _obj + + diff --git a/koyeb/api/models/google_protobuf_any.py b/koyeb/api/models/google_protobuf_any.py index 43c57cab..0ba13728 100644 --- a/koyeb/api/models/google_protobuf_any.py +++ b/koyeb/api/models/google_protobuf_any.py @@ -23,17 +23,11 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GoogleProtobufAny(BaseModel): """ `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": , \"lastName\": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" } - """ # noqa: E501 - - type: Optional[StrictStr] = Field( - default=None, - description='A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL\'s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.', - alias="@type", - ) + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.", alias="@type") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["@type"] @@ -44,6 +38,7 @@ class GoogleProtobufAny(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,11 +63,9 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ - excluded_fields: Set[str] = set( - [ - "additional_properties", - ] - ) + excluded_fields: Set[str] = set([ + "additional_properties", + ]) _dict = self.model_dump( by_alias=True, @@ -95,10 +88,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"@type": obj.get("@type")}) + _obj = cls.model_validate({ + "@type": obj.get("@type") + }) # store additional fields in additional_properties for _key in obj.keys(): if _key not in cls.__properties: _obj.additional_properties[_key] = obj.get(_key) return _obj + + diff --git a/koyeb/api/models/google_protobuf_null_value.py b/koyeb/api/models/google_protobuf_null_value.py index 0245ec31..3b72b255 100644 --- a/koyeb/api/models/google_protobuf_null_value.py +++ b/koyeb/api/models/google_protobuf_null_value.py @@ -26,9 +26,11 @@ class GoogleProtobufNullValue(str, Enum): """ allowed enum values """ - NULL_VALUE = "NULL_VALUE" + NULL_VALUE = 'NULL_VALUE' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of GoogleProtobufNullValue from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/google_rpc_status.py b/koyeb/api/models/google_rpc_status.py index bd07f382..9cc093ba 100644 --- a/koyeb/api/models/google_rpc_status.py +++ b/koyeb/api/models/google_rpc_status.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GoogleRpcStatus(BaseModel): """ GoogleRpcStatus - """ # noqa: E501 - + """ # noqa: E501 code: Optional[StrictInt] = None message: Optional[StrictStr] = None details: Optional[List[GoogleProtobufAny]] = None @@ -42,6 +40,7 @@ class GoogleRpcStatus(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -76,10 +76,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.details: for _item_details in self.details: - _items.append( - _item_details.to_dict() if _item_details is not None else None - ) - _dict["details"] = _items + if _item_details: + _items.append(_item_details.to_dict()) + _dict['details'] = _items return _dict @classmethod @@ -91,15 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "code": obj.get("code"), - "message": obj.get("message"), - "details": [ - GoogleProtobufAny.from_dict(_item) for _item in obj["details"] - ] - if obj.get("details") is not None - else None, - } - ) + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "details": [GoogleProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/has_unpaid_invoices_reply.py b/koyeb/api/models/has_unpaid_invoices_reply.py index d474ea9e..55faf7bb 100644 --- a/koyeb/api/models/has_unpaid_invoices_reply.py +++ b/koyeb/api/models/has_unpaid_invoices_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class HasUnpaidInvoicesReply(BaseModel): """ HasUnpaidInvoicesReply - """ # noqa: E501 - + """ # noqa: E501 has_unpaid_invoices: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["has_unpaid_invoices"] @@ -39,6 +37,7 @@ class HasUnpaidInvoicesReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,7 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"has_unpaid_invoices": obj.get("has_unpaid_invoices")} - ) + _obj = cls.model_validate({ + "has_unpaid_invoices": obj.get("has_unpaid_invoices") + }) return _obj + + diff --git a/koyeb/api/models/http_header.py b/koyeb/api/models/http_header.py index b6525c46..063a5a75 100644 --- a/koyeb/api/models/http_header.py +++ b/koyeb/api/models/http_header.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class HTTPHeader(BaseModel): """ HTTPHeader - """ # noqa: E501 - + """ # noqa: E501 key: Optional[StrictStr] = None value: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["key", "value"] @@ -40,6 +38,7 @@ class HTTPHeader(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,5 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"key": obj.get("key"), "value": obj.get("value")}) + _obj = cls.model_validate({ + "key": obj.get("key"), + "value": obj.get("value") + }) return _obj + + diff --git a/koyeb/api/models/http_health_check.py b/koyeb/api/models/http_health_check.py index 7113ae81..5613f06d 100644 --- a/koyeb/api/models/http_health_check.py +++ b/koyeb/api/models/http_health_check.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class HTTPHealthCheck(BaseModel): """ HTTPHealthCheck - """ # noqa: E501 - + """ # noqa: E501 port: Optional[StrictInt] = None path: Optional[StrictStr] = None method: Optional[StrictStr] = None @@ -43,6 +41,7 @@ class HTTPHealthCheck(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.headers: for _item_headers in self.headers: - _items.append( - _item_headers.to_dict() if _item_headers is not None else None - ) - _dict["headers"] = _items + if _item_headers: + _items.append(_item_headers.to_dict()) + _dict['headers'] = _items return _dict @classmethod @@ -92,14 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "port": obj.get("port"), - "path": obj.get("path"), - "method": obj.get("method"), - "headers": [HTTPHeader.from_dict(_item) for _item in obj["headers"]] - if obj.get("headers") is not None - else None, - } - ) + _obj = cls.model_validate({ + "port": obj.get("port"), + "path": obj.get("path"), + "method": obj.get("method"), + "headers": [HTTPHeader.from_dict(_item) for _item in obj["headers"]] if obj.get("headers") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/instance.py b/koyeb/api/models/instance.py index 54d65b51..0843d9a5 100644 --- a/koyeb/api/models/instance.py +++ b/koyeb/api/models/instance.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Instance(BaseModel): """ Instance - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -49,31 +47,8 @@ class Instance(BaseModel): started_at: Optional[datetime] = None succeeded_at: Optional[datetime] = None terminated_at: Optional[datetime] = None - xyz_deployment_id: Optional[StrictStr] = Field( - default=None, - description="WARNING: Please don't use the following attribute. Koyeb doesn't guarantee backwards compatible breaking change and reserve the right to completely drop it without notice. USE AT YOUR OWN RISK.", - ) - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "updated_at", - "organization_id", - "app_id", - "service_id", - "regional_deployment_id", - "allocation_id", - "type", - "replica_index", - "region", - "datacenter", - "hypervisor", - "status", - "messages", - "started_at", - "succeeded_at", - "terminated_at", - "xyz_deployment_id", - ] + xyz_deployment_id: Optional[StrictStr] = Field(default=None, description="WARNING: Please don't use the following attribute. Koyeb doesn't guarantee backwards compatible breaking change and reserve the right to completely drop it without notice. USE AT YOUR OWN RISK.") + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "organization_id", "app_id", "service_id", "regional_deployment_id", "allocation_id", "type", "replica_index", "region", "datacenter", "hypervisor", "status", "messages", "started_at", "succeeded_at", "terminated_at", "xyz_deployment_id"] model_config = ConfigDict( validate_by_name=True, @@ -82,6 +57,7 @@ class Instance(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -105,7 +81,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -123,29 +100,27 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "organization_id": obj.get("organization_id"), - "app_id": obj.get("app_id"), - "service_id": obj.get("service_id"), - "regional_deployment_id": obj.get("regional_deployment_id"), - "allocation_id": obj.get("allocation_id"), - "type": obj.get("type"), - "replica_index": obj.get("replica_index"), - "region": obj.get("region"), - "datacenter": obj.get("datacenter"), - "hypervisor": obj.get("hypervisor"), - "status": obj.get("status") - if obj.get("status") is not None - else InstanceStatus.ALLOCATING, - "messages": obj.get("messages"), - "started_at": obj.get("started_at"), - "succeeded_at": obj.get("succeeded_at"), - "terminated_at": obj.get("terminated_at"), - "xyz_deployment_id": obj.get("xyz_deployment_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "organization_id": obj.get("organization_id"), + "app_id": obj.get("app_id"), + "service_id": obj.get("service_id"), + "regional_deployment_id": obj.get("regional_deployment_id"), + "allocation_id": obj.get("allocation_id"), + "type": obj.get("type"), + "replica_index": obj.get("replica_index"), + "region": obj.get("region"), + "datacenter": obj.get("datacenter"), + "hypervisor": obj.get("hypervisor"), + "status": obj.get("status") if obj.get("status") is not None else InstanceStatus.ALLOCATING, + "messages": obj.get("messages"), + "started_at": obj.get("started_at"), + "succeeded_at": obj.get("succeeded_at"), + "terminated_at": obj.get("terminated_at"), + "xyz_deployment_id": obj.get("xyz_deployment_id") + }) return _obj + + diff --git a/koyeb/api/models/instance_availability.py b/koyeb/api/models/instance_availability.py index 9798706a..fbce4994 100644 --- a/koyeb/api/models/instance_availability.py +++ b/koyeb/api/models/instance_availability.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InstanceAvailability(BaseModel): """ InstanceAvailability - """ # noqa: E501 - + """ # noqa: E501 regions: Optional[Dict[str, RegionAvailability]] = None availability: Optional[AvailabilityLevel] = AvailabilityLevel.UNKNOWN __properties: ClassVar[List[str]] = ["regions", "availability"] @@ -42,6 +40,7 @@ class InstanceAvailability(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -76,12 +76,9 @@ def to_dict(self) -> Dict[str, Any]: _field_dict = {} if self.regions: for _key_regions in self.regions: - _field_dict[_key_regions] = ( - self.regions[_key_regions].to_dict() - if self.regions[_key_regions] is not None - else None - ) - _dict["regions"] = _field_dict + if self.regions[_key_regions]: + _field_dict[_key_regions] = self.regions[_key_regions].to_dict() + _dict['regions'] = _field_dict return _dict @classmethod @@ -93,17 +90,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "regions": dict( - (_k, RegionAvailability.from_dict(_v)) - for _k, _v in obj["regions"].items() - ) - if obj.get("regions") is not None - else None, - "availability": obj.get("availability") - if obj.get("availability") is not None - else AvailabilityLevel.UNKNOWN, - } - ) + _obj = cls.model_validate({ + "regions": dict( + (_k, RegionAvailability.from_dict(_v)) + for _k, _v in obj["regions"].items() + ) + if obj.get("regions") is not None + else None, + "availability": obj.get("availability") if obj.get("availability") is not None else AvailabilityLevel.UNKNOWN + }) return _obj + + diff --git a/koyeb/api/models/instance_event.py b/koyeb/api/models/instance_event.py index 0723d3e4..da3ac224 100644 --- a/koyeb/api/models/instance_event.py +++ b/koyeb/api/models/instance_event.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InstanceEvent(BaseModel): """ InstanceEvent - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None when: Optional[datetime] = None organization_id: Optional[StrictStr] = None @@ -37,15 +35,7 @@ class InstanceEvent(BaseModel): type: Optional[StrictStr] = None message: Optional[StrictStr] = None metadata: Optional[Dict[str, Any]] = None - __properties: ClassVar[List[str]] = [ - "id", - "when", - "organization_id", - "instance_id", - "type", - "message", - "metadata", - ] + __properties: ClassVar[List[str]] = ["id", "when", "organization_id", "instance_id", "type", "message", "metadata"] model_config = ConfigDict( validate_by_name=True, @@ -54,6 +44,7 @@ class InstanceEvent(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -95,15 +87,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "when": obj.get("when"), - "organization_id": obj.get("organization_id"), - "instance_id": obj.get("instance_id"), - "type": obj.get("type"), - "message": obj.get("message"), - "metadata": obj.get("metadata"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "when": obj.get("when"), + "organization_id": obj.get("organization_id"), + "instance_id": obj.get("instance_id"), + "type": obj.get("type"), + "message": obj.get("message"), + "metadata": obj.get("metadata") + }) return _obj + + diff --git a/koyeb/api/models/instance_list_item.py b/koyeb/api/models/instance_list_item.py index b39b150b..2a3a23ea 100644 --- a/koyeb/api/models/instance_list_item.py +++ b/koyeb/api/models/instance_list_item.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InstanceListItem(BaseModel): """ InstanceListItem - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -45,27 +43,8 @@ class InstanceListItem(BaseModel): datacenter: Optional[StrictStr] = None status: Optional[InstanceStatus] = InstanceStatus.ALLOCATING messages: Optional[List[StrictStr]] = None - xyz_deployment_id: Optional[StrictStr] = Field( - default=None, - description="WARNING: Please don't use the following attribute. Koyeb doesn't guarantee backwards compatible breaking change and reserve the right to completely drop it without notice. USE AT YOUR OWN RISK.", - ) - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "updated_at", - "organization_id", - "app_id", - "service_id", - "regional_deployment_id", - "allocation_id", - "type", - "replica_index", - "region", - "datacenter", - "status", - "messages", - "xyz_deployment_id", - ] + xyz_deployment_id: Optional[StrictStr] = Field(default=None, description="WARNING: Please don't use the following attribute. Koyeb doesn't guarantee backwards compatible breaking change and reserve the right to completely drop it without notice. USE AT YOUR OWN RISK.") + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "organization_id", "app_id", "service_id", "regional_deployment_id", "allocation_id", "type", "replica_index", "region", "datacenter", "status", "messages", "xyz_deployment_id"] model_config = ConfigDict( validate_by_name=True, @@ -74,6 +53,7 @@ class InstanceListItem(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -97,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -115,25 +96,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "organization_id": obj.get("organization_id"), - "app_id": obj.get("app_id"), - "service_id": obj.get("service_id"), - "regional_deployment_id": obj.get("regional_deployment_id"), - "allocation_id": obj.get("allocation_id"), - "type": obj.get("type"), - "replica_index": obj.get("replica_index"), - "region": obj.get("region"), - "datacenter": obj.get("datacenter"), - "status": obj.get("status") - if obj.get("status") is not None - else InstanceStatus.ALLOCATING, - "messages": obj.get("messages"), - "xyz_deployment_id": obj.get("xyz_deployment_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "organization_id": obj.get("organization_id"), + "app_id": obj.get("app_id"), + "service_id": obj.get("service_id"), + "regional_deployment_id": obj.get("regional_deployment_id"), + "allocation_id": obj.get("allocation_id"), + "type": obj.get("type"), + "replica_index": obj.get("replica_index"), + "region": obj.get("region"), + "datacenter": obj.get("datacenter"), + "status": obj.get("status") if obj.get("status") is not None else InstanceStatus.ALLOCATING, + "messages": obj.get("messages"), + "xyz_deployment_id": obj.get("xyz_deployment_id") + }) return _obj + + diff --git a/koyeb/api/models/instance_snapshot.py b/koyeb/api/models/instance_snapshot.py index 7fb26613..249ff387 100644 --- a/koyeb/api/models/instance_snapshot.py +++ b/koyeb/api/models/instance_snapshot.py @@ -26,12 +26,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InstanceSnapshot(BaseModel): """ InstanceSnapshot - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None created_at: Optional[datetime] = None @@ -44,32 +42,11 @@ class InstanceSnapshot(BaseModel): deployment_id: Optional[StrictStr] = None regional_deployment_id: Optional[StrictStr] = None instance_id: Optional[StrictStr] = None - status: Optional[ - InstanceSnapshotStatus - ] = InstanceSnapshotStatus.INSTANCE_SNAPSHOT_STATUS_INVALID - type: Optional[ - InstanceSnapshotType - ] = InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID + status: Optional[InstanceSnapshotStatus] = InstanceSnapshotStatus.INSTANCE_SNAPSHOT_STATUS_INVALID + type: Optional[InstanceSnapshotType] = InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID version: Optional[StrictStr] = None messages: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = [ - "id", - "name", - "created_at", - "updated_at", - "available_at", - "deleted_at", - "organization_id", - "project_id", - "service_id", - "deployment_id", - "regional_deployment_id", - "instance_id", - "status", - "type", - "version", - "messages", - ] + __properties: ClassVar[List[str]] = ["id", "name", "created_at", "updated_at", "available_at", "deleted_at", "organization_id", "project_id", "service_id", "deployment_id", "regional_deployment_id", "instance_id", "status", "type", "version", "messages"] model_config = ConfigDict( validate_by_name=True, @@ -78,6 +55,7 @@ class InstanceSnapshot(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -101,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -119,28 +98,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "available_at": obj.get("available_at"), - "deleted_at": obj.get("deleted_at"), - "organization_id": obj.get("organization_id"), - "project_id": obj.get("project_id"), - "service_id": obj.get("service_id"), - "deployment_id": obj.get("deployment_id"), - "regional_deployment_id": obj.get("regional_deployment_id"), - "instance_id": obj.get("instance_id"), - "status": obj.get("status") - if obj.get("status") is not None - else InstanceSnapshotStatus.INSTANCE_SNAPSHOT_STATUS_INVALID, - "type": obj.get("type") - if obj.get("type") is not None - else InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID, - "version": obj.get("version"), - "messages": obj.get("messages"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "available_at": obj.get("available_at"), + "deleted_at": obj.get("deleted_at"), + "organization_id": obj.get("organization_id"), + "project_id": obj.get("project_id"), + "service_id": obj.get("service_id"), + "deployment_id": obj.get("deployment_id"), + "regional_deployment_id": obj.get("regional_deployment_id"), + "instance_id": obj.get("instance_id"), + "status": obj.get("status") if obj.get("status") is not None else InstanceSnapshotStatus.INSTANCE_SNAPSHOT_STATUS_INVALID, + "type": obj.get("type") if obj.get("type") is not None else InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID, + "version": obj.get("version"), + "messages": obj.get("messages") + }) return _obj + + diff --git a/koyeb/api/models/instance_snapshot_event.py b/koyeb/api/models/instance_snapshot_event.py index 3973c87b..98076760 100644 --- a/koyeb/api/models/instance_snapshot_event.py +++ b/koyeb/api/models/instance_snapshot_event.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InstanceSnapshotEvent(BaseModel): """ InstanceSnapshotEvent - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None when: Optional[datetime] = None organization_id: Optional[StrictStr] = None @@ -37,15 +35,7 @@ class InstanceSnapshotEvent(BaseModel): type: Optional[StrictStr] = None message: Optional[StrictStr] = None metadata: Optional[Dict[str, Any]] = None - __properties: ClassVar[List[str]] = [ - "id", - "when", - "organization_id", - "instance_snapshot_id", - "type", - "message", - "metadata", - ] + __properties: ClassVar[List[str]] = ["id", "when", "organization_id", "instance_snapshot_id", "type", "message", "metadata"] model_config = ConfigDict( validate_by_name=True, @@ -54,6 +44,7 @@ class InstanceSnapshotEvent(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -95,15 +87,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "when": obj.get("when"), - "organization_id": obj.get("organization_id"), - "instance_snapshot_id": obj.get("instance_snapshot_id"), - "type": obj.get("type"), - "message": obj.get("message"), - "metadata": obj.get("metadata"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "when": obj.get("when"), + "organization_id": obj.get("organization_id"), + "instance_snapshot_id": obj.get("instance_snapshot_id"), + "type": obj.get("type"), + "message": obj.get("message"), + "metadata": obj.get("metadata") + }) return _obj + + diff --git a/koyeb/api/models/instance_snapshot_quotas.py b/koyeb/api/models/instance_snapshot_quotas.py index 9345e32e..4fb674b8 100644 --- a/koyeb/api/models/instance_snapshot_quotas.py +++ b/koyeb/api/models/instance_snapshot_quotas.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InstanceSnapshotQuotas(BaseModel): """ InstanceSnapshotQuotas - """ # noqa: E501 - + """ # noqa: E501 filesystem: Optional[StrictInt] = None full: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["filesystem", "full"] @@ -40,6 +38,7 @@ class InstanceSnapshotQuotas(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"filesystem": obj.get("filesystem"), "full": obj.get("full")} - ) + _obj = cls.model_validate({ + "filesystem": obj.get("filesystem"), + "full": obj.get("full") + }) return _obj + + diff --git a/koyeb/api/models/instance_snapshot_status.py b/koyeb/api/models/instance_snapshot_status.py index 7bf4c276..a824eb6b 100644 --- a/koyeb/api/models/instance_snapshot_status.py +++ b/koyeb/api/models/instance_snapshot_status.py @@ -26,14 +26,16 @@ class InstanceSnapshotStatus(str, Enum): """ allowed enum values """ - INSTANCE_SNAPSHOT_STATUS_INVALID = "INSTANCE_SNAPSHOT_STATUS_INVALID" - INSTANCE_SNAPSHOT_STATUS_CREATING = "INSTANCE_SNAPSHOT_STATUS_CREATING" - INSTANCE_SNAPSHOT_STATUS_AVAILABLE = "INSTANCE_SNAPSHOT_STATUS_AVAILABLE" - INSTANCE_SNAPSHOT_STATUS_ERROR = "INSTANCE_SNAPSHOT_STATUS_ERROR" - INSTANCE_SNAPSHOT_STATUS_DELETING = "INSTANCE_SNAPSHOT_STATUS_DELETING" - INSTANCE_SNAPSHOT_STATUS_DELETED = "INSTANCE_SNAPSHOT_STATUS_DELETED" + INSTANCE_SNAPSHOT_STATUS_INVALID = 'INSTANCE_SNAPSHOT_STATUS_INVALID' + INSTANCE_SNAPSHOT_STATUS_CREATING = 'INSTANCE_SNAPSHOT_STATUS_CREATING' + INSTANCE_SNAPSHOT_STATUS_AVAILABLE = 'INSTANCE_SNAPSHOT_STATUS_AVAILABLE' + INSTANCE_SNAPSHOT_STATUS_ERROR = 'INSTANCE_SNAPSHOT_STATUS_ERROR' + INSTANCE_SNAPSHOT_STATUS_DELETING = 'INSTANCE_SNAPSHOT_STATUS_DELETING' + INSTANCE_SNAPSHOT_STATUS_DELETED = 'INSTANCE_SNAPSHOT_STATUS_DELETED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of InstanceSnapshotStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/instance_snapshot_type.py b/koyeb/api/models/instance_snapshot_type.py index ed2af447..a83a50fb 100644 --- a/koyeb/api/models/instance_snapshot_type.py +++ b/koyeb/api/models/instance_snapshot_type.py @@ -26,11 +26,13 @@ class InstanceSnapshotType(str, Enum): """ allowed enum values """ - INSTANCE_SNAPSHOT_TYPE_INVALID = "INSTANCE_SNAPSHOT_TYPE_INVALID" - INSTANCE_SNAPSHOT_TYPE_FILESYSTEM = "INSTANCE_SNAPSHOT_TYPE_FILESYSTEM" - INSTANCE_SNAPSHOT_TYPE_FULL = "INSTANCE_SNAPSHOT_TYPE_FULL" + INSTANCE_SNAPSHOT_TYPE_INVALID = 'INSTANCE_SNAPSHOT_TYPE_INVALID' + INSTANCE_SNAPSHOT_TYPE_FILESYSTEM = 'INSTANCE_SNAPSHOT_TYPE_FILESYSTEM' + INSTANCE_SNAPSHOT_TYPE_FULL = 'INSTANCE_SNAPSHOT_TYPE_FULL' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of InstanceSnapshotType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/instance_snapshot_type_usage.py b/koyeb/api/models/instance_snapshot_type_usage.py index 7196bed6..0e8b72b9 100644 --- a/koyeb/api/models/instance_snapshot_type_usage.py +++ b/koyeb/api/models/instance_snapshot_type_usage.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InstanceSnapshotTypeUsage(BaseModel): """ InstanceSnapshotTypeUsage - """ # noqa: E501 - + """ # noqa: E501 type: Optional[StrictStr] = None used: Optional[StrictInt] = None limit: Optional[StrictInt] = None @@ -41,6 +39,7 @@ class InstanceSnapshotTypeUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "type": obj.get("type"), - "used": obj.get("used"), - "limit": obj.get("limit"), - } - ) + _obj = cls.model_validate({ + "type": obj.get("type"), + "used": obj.get("used"), + "limit": obj.get("limit") + }) return _obj + + diff --git a/koyeb/api/models/instance_status.py b/koyeb/api/models/instance_status.py index b55bc490..10443720 100644 --- a/koyeb/api/models/instance_status.py +++ b/koyeb/api/models/instance_status.py @@ -26,16 +26,18 @@ class InstanceStatus(str, Enum): """ allowed enum values """ - ALLOCATING = "ALLOCATING" - STARTING = "STARTING" - HEALTHY = "HEALTHY" - UNHEALTHY = "UNHEALTHY" - STOPPING = "STOPPING" - STOPPED = "STOPPED" - ERROR = "ERROR" - SLEEPING = "SLEEPING" + ALLOCATING = 'ALLOCATING' + STARTING = 'STARTING' + HEALTHY = 'HEALTHY' + UNHEALTHY = 'UNHEALTHY' + STOPPING = 'STOPPING' + STOPPED = 'STOPPED' + ERROR = 'ERROR' + SLEEPING = 'SLEEPING' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of InstanceStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/instance_type_usage.py b/koyeb/api/models/instance_type_usage.py index 7b6f923c..d44a0ac5 100644 --- a/koyeb/api/models/instance_type_usage.py +++ b/koyeb/api/models/instance_type_usage.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InstanceTypeUsage(BaseModel): """ InstanceTypeUsage - """ # noqa: E501 - + """ # noqa: E501 instance_type: Optional[StrictStr] = None used: Optional[StrictInt] = None limit: Optional[StrictInt] = None @@ -41,6 +39,7 @@ class InstanceTypeUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instance_type": obj.get("instance_type"), - "used": obj.get("used"), - "limit": obj.get("limit"), - } - ) + _obj = cls.model_validate({ + "instance_type": obj.get("instance_type"), + "used": obj.get("used"), + "limit": obj.get("limit") + }) return _obj + + diff --git a/koyeb/api/models/instance_usage.py b/koyeb/api/models/instance_usage.py index b2e50393..e63b0799 100644 --- a/koyeb/api/models/instance_usage.py +++ b/koyeb/api/models/instance_usage.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InstanceUsage(BaseModel): """ InstanceUsage - """ # noqa: E501 - + """ # noqa: E501 duration_seconds: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["duration_seconds"] @@ -39,6 +37,7 @@ class InstanceUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"duration_seconds": obj.get("duration_seconds")}) + _obj = cls.model_validate({ + "duration_seconds": obj.get("duration_seconds") + }) return _obj + + diff --git a/koyeb/api/models/instances_summary.py b/koyeb/api/models/instances_summary.py index 2fd3a99e..982376b8 100644 --- a/koyeb/api/models/instances_summary.py +++ b/koyeb/api/models/instances_summary.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InstancesSummary(BaseModel): """ InstancesSummary - """ # noqa: E501 - + """ # noqa: E501 total: Optional[StrictStr] = None by_type: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["total", "by_type"] @@ -40,6 +38,7 @@ class InstancesSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"total": obj.get("total"), "by_type": obj.get("by_type")} - ) + _obj = cls.model_validate({ + "total": obj.get("total"), + "by_type": obj.get("by_type") + }) return _obj + + diff --git a/koyeb/api/models/invite_user_request.py b/koyeb/api/models/invite_user_request.py index b216f397..6c05f27e 100644 --- a/koyeb/api/models/invite_user_request.py +++ b/koyeb/api/models/invite_user_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InviteUserRequest(BaseModel): """ InviteUserRequest - """ # noqa: E501 - + """ # noqa: E501 email: Optional[StrictStr] = None name: Optional[StrictStr] = None message: Optional[StrictStr] = None @@ -41,6 +39,7 @@ class InviteUserRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "email": obj.get("email"), - "name": obj.get("name"), - "message": obj.get("message"), - } - ) + _obj = cls.model_validate({ + "email": obj.get("email"), + "name": obj.get("name"), + "message": obj.get("message") + }) return _obj + + diff --git a/koyeb/api/models/kgitproxy_branch.py b/koyeb/api/models/kgitproxy_branch.py index bbbb5b6e..6137452d 100644 --- a/koyeb/api/models/kgitproxy_branch.py +++ b/koyeb/api/models/kgitproxy_branch.py @@ -24,30 +24,18 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KgitproxyBranch(BaseModel): """ KgitproxyBranch - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None repository_id: Optional[StrictStr] = None name: Optional[StrictStr] = None is_default: Optional[StrictBool] = None is_protected: Optional[StrictBool] = None - provider: Optional[ - KgitproxyRepositoryProvider - ] = KgitproxyRepositoryProvider.INVALID_PROVIDER - __properties: ClassVar[List[str]] = [ - "id", - "organization_id", - "repository_id", - "name", - "is_default", - "is_protected", - "provider", - ] + provider: Optional[KgitproxyRepositoryProvider] = KgitproxyRepositoryProvider.INVALID_PROVIDER + __properties: ClassVar[List[str]] = ["id", "organization_id", "repository_id", "name", "is_default", "is_protected", "provider"] model_config = ConfigDict( validate_by_name=True, @@ -56,6 +44,7 @@ class KgitproxyBranch(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -79,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -97,17 +87,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "organization_id": obj.get("organization_id"), - "repository_id": obj.get("repository_id"), - "name": obj.get("name"), - "is_default": obj.get("is_default"), - "is_protected": obj.get("is_protected"), - "provider": obj.get("provider") - if obj.get("provider") is not None - else KgitproxyRepositoryProvider.INVALID_PROVIDER, - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "repository_id": obj.get("repository_id"), + "name": obj.get("name"), + "is_default": obj.get("is_default"), + "is_protected": obj.get("is_protected"), + "provider": obj.get("provider") if obj.get("provider") is not None else KgitproxyRepositoryProvider.INVALID_PROVIDER + }) return _obj + + diff --git a/koyeb/api/models/kgitproxy_git_hub_repository.py b/koyeb/api/models/kgitproxy_git_hub_repository.py index 3b6a4603..caa94569 100644 --- a/koyeb/api/models/kgitproxy_git_hub_repository.py +++ b/koyeb/api/models/kgitproxy_git_hub_repository.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KgitproxyGitHubRepository(BaseModel): """ KgitproxyGitHubRepository - """ # noqa: E501 - + """ # noqa: E501 github_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["github_id"] @@ -39,6 +37,7 @@ class KgitproxyGitHubRepository(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"github_id": obj.get("github_id")}) + _obj = cls.model_validate({ + "github_id": obj.get("github_id") + }) return _obj + + diff --git a/koyeb/api/models/kgitproxy_github_installation_status.py b/koyeb/api/models/kgitproxy_github_installation_status.py index b2644fec..9d281028 100644 --- a/koyeb/api/models/kgitproxy_github_installation_status.py +++ b/koyeb/api/models/kgitproxy_github_installation_status.py @@ -26,12 +26,14 @@ class KgitproxyGithubInstallationStatus(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - INSTALLED = "INSTALLED" - SUSPENDED = "SUSPENDED" - DELETED = "DELETED" + INVALID = 'INVALID' + INSTALLED = 'INSTALLED' + SUSPENDED = 'SUSPENDED' + DELETED = 'DELETED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of KgitproxyGithubInstallationStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/kgitproxy_indexing_status.py b/koyeb/api/models/kgitproxy_indexing_status.py index e10b3041..50cf2426 100644 --- a/koyeb/api/models/kgitproxy_indexing_status.py +++ b/koyeb/api/models/kgitproxy_indexing_status.py @@ -26,12 +26,14 @@ class KgitproxyIndexingStatus(str, Enum): """ allowed enum values """ - INVALID_INDEXING_STATUS = "INVALID_INDEXING_STATUS" - NOT_STARTED = "NOT_STARTED" - IN_PROGRESS = "IN_PROGRESS" - COMPLETED = "COMPLETED" + INVALID_INDEXING_STATUS = 'INVALID_INDEXING_STATUS' + NOT_STARTED = 'NOT_STARTED' + IN_PROGRESS = 'IN_PROGRESS' + COMPLETED = 'COMPLETED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of KgitproxyIndexingStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/kgitproxy_list_branches_reply.py b/koyeb/api/models/kgitproxy_list_branches_reply.py index 24a62ba6..db9af09a 100644 --- a/koyeb/api/models/kgitproxy_list_branches_reply.py +++ b/koyeb/api/models/kgitproxy_list_branches_reply.py @@ -24,24 +24,14 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KgitproxyListBranchesReply(BaseModel): """ KgitproxyListBranchesReply - """ # noqa: E501 - - branches: Optional[List[KgitproxyBranch]] = Field( - default=None, description="The collection of branches." - ) - limit: Optional[StrictInt] = Field( - default=None, description="The limit in the request." - ) - offset: Optional[StrictInt] = Field( - default=None, description="The offset in the request." - ) - count: Optional[StrictInt] = Field( - default=None, description="The total number of items." - ) + """ # noqa: E501 + branches: Optional[List[KgitproxyBranch]] = Field(default=None, description="The collection of branches.") + limit: Optional[StrictInt] = Field(default=None, description="The limit in the request.") + offset: Optional[StrictInt] = Field(default=None, description="The offset in the request.") + count: Optional[StrictInt] = Field(default=None, description="The total number of items.") __properties: ClassVar[List[str]] = ["branches", "limit", "offset", "count"] model_config = ConfigDict( @@ -51,6 +41,7 @@ class KgitproxyListBranchesReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -85,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.branches: for _item_branches in self.branches: - _items.append( - _item_branches.to_dict() if _item_branches is not None else None - ) - _dict["branches"] = _items + if _item_branches: + _items.append(_item_branches.to_dict()) + _dict['branches'] = _items return _dict @classmethod @@ -100,16 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "branches": [ - KgitproxyBranch.from_dict(_item) for _item in obj["branches"] - ] - if obj.get("branches") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "branches": [KgitproxyBranch.from_dict(_item) for _item in obj["branches"]] if obj.get("branches") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api/models/kgitproxy_list_repositories_reply.py b/koyeb/api/models/kgitproxy_list_repositories_reply.py index 2d875357..5294c346 100644 --- a/koyeb/api/models/kgitproxy_list_repositories_reply.py +++ b/koyeb/api/models/kgitproxy_list_repositories_reply.py @@ -24,24 +24,14 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KgitproxyListRepositoriesReply(BaseModel): """ KgitproxyListRepositoriesReply - """ # noqa: E501 - - repositories: Optional[List[KgitproxyRepository]] = Field( - default=None, description="The collection of repositories." - ) - limit: Optional[StrictInt] = Field( - default=None, description="The limit in the request." - ) - offset: Optional[StrictInt] = Field( - default=None, description="The offset in the request." - ) - count: Optional[StrictInt] = Field( - default=None, description="The total number of items." - ) + """ # noqa: E501 + repositories: Optional[List[KgitproxyRepository]] = Field(default=None, description="The collection of repositories.") + limit: Optional[StrictInt] = Field(default=None, description="The limit in the request.") + offset: Optional[StrictInt] = Field(default=None, description="The offset in the request.") + count: Optional[StrictInt] = Field(default=None, description="The total number of items.") __properties: ClassVar[List[str]] = ["repositories", "limit", "offset", "count"] model_config = ConfigDict( @@ -51,6 +41,7 @@ class KgitproxyListRepositoriesReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -85,12 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.repositories: for _item_repositories in self.repositories: - _items.append( - _item_repositories.to_dict() - if _item_repositories is not None - else None - ) - _dict["repositories"] = _items + if _item_repositories: + _items.append(_item_repositories.to_dict()) + _dict['repositories'] = _items return _dict @classmethod @@ -102,17 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "repositories": [ - KgitproxyRepository.from_dict(_item) - for _item in obj["repositories"] - ] - if obj.get("repositories") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "repositories": [KgitproxyRepository.from_dict(_item) for _item in obj["repositories"]] if obj.get("repositories") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api/models/kgitproxy_repository.py b/koyeb/api/models/kgitproxy_repository.py index 53adfa27..da6ce2e7 100644 --- a/koyeb/api/models/kgitproxy_repository.py +++ b/koyeb/api/models/kgitproxy_repository.py @@ -26,12 +26,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KgitproxyRepository(BaseModel): """ KgitproxyRepository - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None name: Optional[StrictStr] = None @@ -40,24 +38,10 @@ class KgitproxyRepository(BaseModel): is_private: Optional[StrictBool] = None is_disabled: Optional[StrictBool] = None default_branch: Optional[StrictStr] = None - provider: Optional[ - KgitproxyRepositoryProvider - ] = KgitproxyRepositoryProvider.INVALID_PROVIDER + provider: Optional[KgitproxyRepositoryProvider] = KgitproxyRepositoryProvider.INVALID_PROVIDER last_push_date: Optional[datetime] = None github: Optional[KgitproxyGitHubRepository] = None - __properties: ClassVar[List[str]] = [ - "id", - "organization_id", - "name", - "url", - "description", - "is_private", - "is_disabled", - "default_branch", - "provider", - "last_push_date", - "github", - ] + __properties: ClassVar[List[str]] = ["id", "organization_id", "name", "url", "description", "is_private", "is_disabled", "default_branch", "provider", "last_push_date", "github"] model_config = ConfigDict( validate_by_name=True, @@ -66,6 +50,7 @@ class KgitproxyRepository(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -89,7 +74,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -98,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of github if self.github: - _dict["github"] = self.github.to_dict() + _dict['github'] = self.github.to_dict() return _dict @classmethod @@ -110,23 +96,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "organization_id": obj.get("organization_id"), - "name": obj.get("name"), - "url": obj.get("url"), - "description": obj.get("description"), - "is_private": obj.get("is_private"), - "is_disabled": obj.get("is_disabled"), - "default_branch": obj.get("default_branch"), - "provider": obj.get("provider") - if obj.get("provider") is not None - else KgitproxyRepositoryProvider.INVALID_PROVIDER, - "last_push_date": obj.get("last_push_date"), - "github": KgitproxyGitHubRepository.from_dict(obj["github"]) - if obj.get("github") is not None - else None, - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "name": obj.get("name"), + "url": obj.get("url"), + "description": obj.get("description"), + "is_private": obj.get("is_private"), + "is_disabled": obj.get("is_disabled"), + "default_branch": obj.get("default_branch"), + "provider": obj.get("provider") if obj.get("provider") is not None else KgitproxyRepositoryProvider.INVALID_PROVIDER, + "last_push_date": obj.get("last_push_date"), + "github": KgitproxyGitHubRepository.from_dict(obj["github"]) if obj.get("github") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/kgitproxy_repository_provider.py b/koyeb/api/models/kgitproxy_repository_provider.py index 0f639dec..123d8ee8 100644 --- a/koyeb/api/models/kgitproxy_repository_provider.py +++ b/koyeb/api/models/kgitproxy_repository_provider.py @@ -26,10 +26,12 @@ class KgitproxyRepositoryProvider(str, Enum): """ allowed enum values """ - INVALID_PROVIDER = "INVALID_PROVIDER" - GITHUB = "GITHUB" + INVALID_PROVIDER = 'INVALID_PROVIDER' + GITHUB = 'GITHUB' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of KgitproxyRepositoryProvider from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/ksearch_app.py b/koyeb/api/models/ksearch_app.py index 35177b2b..a7dca43b 100644 --- a/koyeb/api/models/ksearch_app.py +++ b/koyeb/api/models/ksearch_app.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KsearchApp(BaseModel): """ KsearchApp - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None name: Optional[StrictStr] = None @@ -41,6 +39,7 @@ class KsearchApp(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "organization_id": obj.get("organization_id"), - "name": obj.get("name"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "name": obj.get("name") + }) return _obj + + diff --git a/koyeb/api/models/ksearch_global_deployment.py b/koyeb/api/models/ksearch_global_deployment.py index a073ba07..61edf644 100644 --- a/koyeb/api/models/ksearch_global_deployment.py +++ b/koyeb/api/models/ksearch_global_deployment.py @@ -23,22 +23,15 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KsearchGlobalDeployment(BaseModel): """ KsearchGlobalDeployment - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None app_id: Optional[StrictStr] = None service_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "organization_id", - "app_id", - "service_id", - ] + __properties: ClassVar[List[str]] = ["id", "organization_id", "app_id", "service_id"] model_config = ConfigDict( validate_by_name=True, @@ -47,6 +40,7 @@ class KsearchGlobalDeployment(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -88,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "organization_id": obj.get("organization_id"), - "app_id": obj.get("app_id"), - "service_id": obj.get("service_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "app_id": obj.get("app_id"), + "service_id": obj.get("service_id") + }) return _obj + + diff --git a/koyeb/api/models/ksearch_instance.py b/koyeb/api/models/ksearch_instance.py index d7b0de96..e451f836 100644 --- a/koyeb/api/models/ksearch_instance.py +++ b/koyeb/api/models/ksearch_instance.py @@ -23,24 +23,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KsearchInstance(BaseModel): """ KsearchInstance - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None app_id: Optional[StrictStr] = None service_id: Optional[StrictStr] = None allocation_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "organization_id", - "app_id", - "service_id", - "allocation_id", - ] + __properties: ClassVar[List[str]] = ["id", "organization_id", "app_id", "service_id", "allocation_id"] model_config = ConfigDict( validate_by_name=True, @@ -49,6 +41,7 @@ class KsearchInstance(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -72,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -90,13 +84,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "organization_id": obj.get("organization_id"), - "app_id": obj.get("app_id"), - "service_id": obj.get("service_id"), - "allocation_id": obj.get("allocation_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "app_id": obj.get("app_id"), + "service_id": obj.get("service_id"), + "allocation_id": obj.get("allocation_id") + }) return _obj + + diff --git a/koyeb/api/models/ksearch_organization.py b/koyeb/api/models/ksearch_organization.py index c9e27c77..5a0da6fd 100644 --- a/koyeb/api/models/ksearch_organization.py +++ b/koyeb/api/models/ksearch_organization.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KsearchOrganization(BaseModel): """ KsearchOrganization - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id", "name"] @@ -40,6 +38,7 @@ class KsearchOrganization(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,5 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"id": obj.get("id"), "name": obj.get("name")}) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name") + }) return _obj + + diff --git a/koyeb/api/models/ksearch_regional_deployment.py b/koyeb/api/models/ksearch_regional_deployment.py index b18825e5..1761256b 100644 --- a/koyeb/api/models/ksearch_regional_deployment.py +++ b/koyeb/api/models/ksearch_regional_deployment.py @@ -23,24 +23,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KsearchRegionalDeployment(BaseModel): """ KsearchRegionalDeployment - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None app_id: Optional[StrictStr] = None service_id: Optional[StrictStr] = None region: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "organization_id", - "app_id", - "service_id", - "region", - ] + __properties: ClassVar[List[str]] = ["id", "organization_id", "app_id", "service_id", "region"] model_config = ConfigDict( validate_by_name=True, @@ -49,6 +41,7 @@ class KsearchRegionalDeployment(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -72,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -90,13 +84,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "organization_id": obj.get("organization_id"), - "app_id": obj.get("app_id"), - "service_id": obj.get("service_id"), - "region": obj.get("region"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "app_id": obj.get("app_id"), + "service_id": obj.get("service_id"), + "region": obj.get("region") + }) return _obj + + diff --git a/koyeb/api/models/ksearch_search_reply.py b/koyeb/api/models/ksearch_search_reply.py index c6757562..9b27dc2e 100644 --- a/koyeb/api/models/ksearch_search_reply.py +++ b/koyeb/api/models/ksearch_search_reply.py @@ -30,12 +30,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KsearchSearchReply(BaseModel): """ KsearchSearchReply - """ # noqa: E501 - + """ # noqa: E501 organizations: Optional[List[KsearchOrganization]] = None users: Optional[List[KsearchUser]] = None apps: Optional[List[KsearchApp]] = None @@ -43,15 +41,7 @@ class KsearchSearchReply(BaseModel): global_deployments: Optional[List[KsearchGlobalDeployment]] = None regional_deployments: Optional[List[KsearchRegionalDeployment]] = None instances: Optional[List[KsearchInstance]] = None - __properties: ClassVar[List[str]] = [ - "organizations", - "users", - "apps", - "services", - "global_deployments", - "regional_deployments", - "instances", - ] + __properties: ClassVar[List[str]] = ["organizations", "users", "apps", "services", "global_deployments", "regional_deployments", "instances"] model_config = ConfigDict( validate_by_name=True, @@ -60,6 +50,7 @@ class KsearchSearchReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -83,7 +74,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -94,62 +86,51 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.organizations: for _item_organizations in self.organizations: - _items.append( - _item_organizations.to_dict() - if _item_organizations is not None - else None - ) - _dict["organizations"] = _items + if _item_organizations: + _items.append(_item_organizations.to_dict()) + _dict['organizations'] = _items # override the default output from pydantic by calling `to_dict()` of each item in users (list) _items = [] if self.users: for _item_users in self.users: - _items.append( - _item_users.to_dict() if _item_users is not None else None - ) - _dict["users"] = _items + if _item_users: + _items.append(_item_users.to_dict()) + _dict['users'] = _items # override the default output from pydantic by calling `to_dict()` of each item in apps (list) _items = [] if self.apps: for _item_apps in self.apps: - _items.append(_item_apps.to_dict() if _item_apps is not None else None) - _dict["apps"] = _items + if _item_apps: + _items.append(_item_apps.to_dict()) + _dict['apps'] = _items # override the default output from pydantic by calling `to_dict()` of each item in services (list) _items = [] if self.services: for _item_services in self.services: - _items.append( - _item_services.to_dict() if _item_services is not None else None - ) - _dict["services"] = _items + if _item_services: + _items.append(_item_services.to_dict()) + _dict['services'] = _items # override the default output from pydantic by calling `to_dict()` of each item in global_deployments (list) _items = [] if self.global_deployments: for _item_global_deployments in self.global_deployments: - _items.append( - _item_global_deployments.to_dict() - if _item_global_deployments is not None - else None - ) - _dict["global_deployments"] = _items + if _item_global_deployments: + _items.append(_item_global_deployments.to_dict()) + _dict['global_deployments'] = _items # override the default output from pydantic by calling `to_dict()` of each item in regional_deployments (list) _items = [] if self.regional_deployments: for _item_regional_deployments in self.regional_deployments: - _items.append( - _item_regional_deployments.to_dict() - if _item_regional_deployments is not None - else None - ) - _dict["regional_deployments"] = _items + if _item_regional_deployments: + _items.append(_item_regional_deployments.to_dict()) + _dict['regional_deployments'] = _items # override the default output from pydantic by calling `to_dict()` of each item in instances (list) _items = [] if self.instances: for _item_instances in self.instances: - _items.append( - _item_instances.to_dict() if _item_instances is not None else None - ) - _dict["instances"] = _items + if _item_instances: + _items.append(_item_instances.to_dict()) + _dict['instances'] = _items return _dict @classmethod @@ -161,42 +142,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organizations": [ - KsearchOrganization.from_dict(_item) - for _item in obj["organizations"] - ] - if obj.get("organizations") is not None - else None, - "users": [KsearchUser.from_dict(_item) for _item in obj["users"]] - if obj.get("users") is not None - else None, - "apps": [KsearchApp.from_dict(_item) for _item in obj["apps"]] - if obj.get("apps") is not None - else None, - "services": [ - KsearchService.from_dict(_item) for _item in obj["services"] - ] - if obj.get("services") is not None - else None, - "global_deployments": [ - KsearchGlobalDeployment.from_dict(_item) - for _item in obj["global_deployments"] - ] - if obj.get("global_deployments") is not None - else None, - "regional_deployments": [ - KsearchRegionalDeployment.from_dict(_item) - for _item in obj["regional_deployments"] - ] - if obj.get("regional_deployments") is not None - else None, - "instances": [ - KsearchInstance.from_dict(_item) for _item in obj["instances"] - ] - if obj.get("instances") is not None - else None, - } - ) + _obj = cls.model_validate({ + "organizations": [KsearchOrganization.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None, + "users": [KsearchUser.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None, + "apps": [KsearchApp.from_dict(_item) for _item in obj["apps"]] if obj.get("apps") is not None else None, + "services": [KsearchService.from_dict(_item) for _item in obj["services"]] if obj.get("services") is not None else None, + "global_deployments": [KsearchGlobalDeployment.from_dict(_item) for _item in obj["global_deployments"]] if obj.get("global_deployments") is not None else None, + "regional_deployments": [KsearchRegionalDeployment.from_dict(_item) for _item in obj["regional_deployments"]] if obj.get("regional_deployments") is not None else None, + "instances": [KsearchInstance.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/ksearch_service.py b/koyeb/api/models/ksearch_service.py index b7dfc5b8..b2c9c7d2 100644 --- a/koyeb/api/models/ksearch_service.py +++ b/koyeb/api/models/ksearch_service.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KsearchService(BaseModel): """ KsearchService - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None app_id: Optional[StrictStr] = None @@ -42,6 +40,7 @@ class KsearchService(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "organization_id": obj.get("organization_id"), - "app_id": obj.get("app_id"), - "name": obj.get("name"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "app_id": obj.get("app_id"), + "name": obj.get("name") + }) return _obj + + diff --git a/koyeb/api/models/ksearch_user.py b/koyeb/api/models/ksearch_user.py index cdff67c0..93668832 100644 --- a/koyeb/api/models/ksearch_user.py +++ b/koyeb/api/models/ksearch_user.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KsearchUser(BaseModel): """ KsearchUser - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None email: Optional[StrictStr] = None name: Optional[StrictStr] = None @@ -42,6 +40,7 @@ class KsearchUser(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "email": obj.get("email"), - "name": obj.get("name"), - "github_user": obj.get("github_user"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "email": obj.get("email"), + "name": obj.get("name"), + "github_user": obj.get("github_user") + }) return _obj + + diff --git a/koyeb/api/models/ktest_test_auth_reply.py b/koyeb/api/models/ktest_test_auth_reply.py index 7f6559d5..67feb3b0 100644 --- a/koyeb/api/models/ktest_test_auth_reply.py +++ b/koyeb/api/models/ktest_test_auth_reply.py @@ -23,22 +23,15 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KtestTestAuthReply(BaseModel): """ KtestTestAuthReply - """ # noqa: E501 - + """ # noqa: E501 payload: Optional[StrictStr] = None user_id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None workspace_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "payload", - "user_id", - "organization_id", - "workspace_id", - ] + __properties: ClassVar[List[str]] = ["payload", "user_id", "organization_id", "workspace_id"] model_config = ConfigDict( validate_by_name=True, @@ -47,6 +40,7 @@ class KtestTestAuthReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -88,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "payload": obj.get("payload"), - "user_id": obj.get("user_id"), - "organization_id": obj.get("organization_id"), - "workspace_id": obj.get("workspace_id"), - } - ) + _obj = cls.model_validate({ + "payload": obj.get("payload"), + "user_id": obj.get("user_id"), + "organization_id": obj.get("organization_id"), + "workspace_id": obj.get("workspace_id") + }) return _obj + + diff --git a/koyeb/api/models/ktest_test_auth_request.py b/koyeb/api/models/ktest_test_auth_request.py index 2900650b..58ced89e 100644 --- a/koyeb/api/models/ktest_test_auth_request.py +++ b/koyeb/api/models/ktest_test_auth_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KtestTestAuthRequest(BaseModel): """ KtestTestAuthRequest - """ # noqa: E501 - + """ # noqa: E501 payload: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["payload"] @@ -39,6 +37,7 @@ class KtestTestAuthRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"payload": obj.get("payload")}) + _obj = cls.model_validate({ + "payload": obj.get("payload") + }) return _obj + + diff --git a/koyeb/api/models/lifecycle_quotas.py b/koyeb/api/models/lifecycle_quotas.py index bc027411..543beefb 100644 --- a/koyeb/api/models/lifecycle_quotas.py +++ b/koyeb/api/models/lifecycle_quotas.py @@ -23,22 +23,15 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class LifecycleQuotas(BaseModel): """ LifecycleQuotas - """ # noqa: E501 - + """ # noqa: E501 delete_after_sleep_min: Optional[StrictInt] = None delete_after_sleep_max: Optional[StrictInt] = None delete_after_create_min: Optional[StrictInt] = None delete_after_create_max: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = [ - "delete_after_sleep_min", - "delete_after_sleep_max", - "delete_after_create_min", - "delete_after_create_max", - ] + __properties: ClassVar[List[str]] = ["delete_after_sleep_min", "delete_after_sleep_max", "delete_after_create_min", "delete_after_create_max"] model_config = ConfigDict( validate_by_name=True, @@ -47,6 +40,7 @@ class LifecycleQuotas(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -88,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "delete_after_sleep_min": obj.get("delete_after_sleep_min"), - "delete_after_sleep_max": obj.get("delete_after_sleep_max"), - "delete_after_create_min": obj.get("delete_after_create_min"), - "delete_after_create_max": obj.get("delete_after_create_max"), - } - ) + _obj = cls.model_validate({ + "delete_after_sleep_min": obj.get("delete_after_sleep_min"), + "delete_after_sleep_max": obj.get("delete_after_sleep_max"), + "delete_after_create_min": obj.get("delete_after_create_min"), + "delete_after_create_max": obj.get("delete_after_create_max") + }) return _obj + + diff --git a/koyeb/api/models/list_app_events_reply.py b/koyeb/api/models/list_app_events_reply.py index 0d92a77d..7e927df6 100644 --- a/koyeb/api/models/list_app_events_reply.py +++ b/koyeb/api/models/list_app_events_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListAppEventsReply(BaseModel): """ ListAppEventsReply - """ # noqa: E501 - + """ # noqa: E501 events: Optional[List[AppEvent]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None order: Optional[StrictStr] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "events", - "limit", - "offset", - "order", - "has_next", - ] + __properties: ClassVar[List[str]] = ["events", "limit", "offset", "order", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListAppEventsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.events: for _item_events in self.events: - _items.append( - _item_events.to_dict() if _item_events is not None else None - ) - _dict["events"] = _items + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _items return _dict @classmethod @@ -99,15 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "events": [AppEvent.from_dict(_item) for _item in obj["events"]] - if obj.get("events") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "order": obj.get("order"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "events": [AppEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "order": obj.get("order"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api/models/list_apps_reply.py b/koyeb/api/models/list_apps_reply.py index fb7797f4..70ad1b9a 100644 --- a/koyeb/api/models/list_apps_reply.py +++ b/koyeb/api/models/list_apps_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListAppsReply(BaseModel): """ ListAppsReply - """ # noqa: E501 - + """ # noqa: E501 apps: Optional[List[AppListItem]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -44,6 +42,7 @@ class ListAppsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -78,8 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.apps: for _item_apps in self.apps: - _items.append(_item_apps.to_dict() if _item_apps is not None else None) - _dict["apps"] = _items + if _item_apps: + _items.append(_item_apps.to_dict()) + _dict['apps'] = _items return _dict @classmethod @@ -91,15 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "apps": [AppListItem.from_dict(_item) for _item in obj["apps"]] - if obj.get("apps") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "apps": [AppListItem.from_dict(_item) for _item in obj["apps"]] if obj.get("apps") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api/models/list_catalog_instances_reply.py b/koyeb/api/models/list_catalog_instances_reply.py index 0510ddf8..7bf6547b 100644 --- a/koyeb/api/models/list_catalog_instances_reply.py +++ b/koyeb/api/models/list_catalog_instances_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListCatalogInstancesReply(BaseModel): """ ListCatalogInstancesReply - """ # noqa: E501 - + """ # noqa: E501 instances: Optional[List[CatalogInstanceListItem]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListCatalogInstancesReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.instances: for _item_instances in self.instances: - _items.append( - _item_instances.to_dict() if _item_instances is not None else None - ) - _dict["instances"] = _items + if _item_instances: + _items.append(_item_instances.to_dict()) + _dict['instances'] = _items return _dict @classmethod @@ -92,17 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instances": [ - CatalogInstanceListItem.from_dict(_item) - for _item in obj["instances"] - ] - if obj.get("instances") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "instances": [CatalogInstanceListItem.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api/models/list_credentials_reply.py b/koyeb/api/models/list_credentials_reply.py index c9990b3c..0330c7d0 100644 --- a/koyeb/api/models/list_credentials_reply.py +++ b/koyeb/api/models/list_credentials_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListCredentialsReply(BaseModel): """ ListCredentialsReply - """ # noqa: E501 - + """ # noqa: E501 credentials: Optional[List[Credential]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListCredentialsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,12 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.credentials: for _item_credentials in self.credentials: - _items.append( - _item_credentials.to_dict() - if _item_credentials is not None - else None - ) - _dict["credentials"] = _items + if _item_credentials: + _items.append(_item_credentials.to_dict()) + _dict['credentials'] = _items return _dict @classmethod @@ -94,16 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "credentials": [ - Credential.from_dict(_item) for _item in obj["credentials"] - ] - if obj.get("credentials") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "credentials": [Credential.from_dict(_item) for _item in obj["credentials"]] if obj.get("credentials") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api/models/list_datacenters_reply.py b/koyeb/api/models/list_datacenters_reply.py index 2b44690c..b0db3e93 100644 --- a/koyeb/api/models/list_datacenters_reply.py +++ b/koyeb/api/models/list_datacenters_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListDatacentersReply(BaseModel): """ ListDatacentersReply - """ # noqa: E501 - + """ # noqa: E501 datacenters: Optional[List[DatacenterListItem]] = None __properties: ClassVar[List[str]] = ["datacenters"] @@ -40,6 +38,7 @@ class ListDatacentersReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,12 +74,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.datacenters: for _item_datacenters in self.datacenters: - _items.append( - _item_datacenters.to_dict() - if _item_datacenters is not None - else None - ) - _dict["datacenters"] = _items + if _item_datacenters: + _items.append(_item_datacenters.to_dict()) + _dict['datacenters'] = _items return _dict @classmethod @@ -91,13 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "datacenters": [ - DatacenterListItem.from_dict(_item) for _item in obj["datacenters"] - ] - if obj.get("datacenters") is not None - else None - } - ) + _obj = cls.model_validate({ + "datacenters": [DatacenterListItem.from_dict(_item) for _item in obj["datacenters"]] if obj.get("datacenters") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/list_deployment_events_reply.py b/koyeb/api/models/list_deployment_events_reply.py index 428121ac..6cfc89da 100644 --- a/koyeb/api/models/list_deployment_events_reply.py +++ b/koyeb/api/models/list_deployment_events_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListDeploymentEventsReply(BaseModel): """ ListDeploymentEventsReply - """ # noqa: E501 - + """ # noqa: E501 events: Optional[List[DeploymentEvent]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None order: Optional[StrictStr] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "events", - "limit", - "offset", - "order", - "has_next", - ] + __properties: ClassVar[List[str]] = ["events", "limit", "offset", "order", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListDeploymentEventsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.events: for _item_events in self.events: - _items.append( - _item_events.to_dict() if _item_events is not None else None - ) - _dict["events"] = _items + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _items return _dict @classmethod @@ -99,15 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "events": [DeploymentEvent.from_dict(_item) for _item in obj["events"]] - if obj.get("events") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "order": obj.get("order"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "events": [DeploymentEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "order": obj.get("order"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api/models/list_deployments_reply.py b/koyeb/api/models/list_deployments_reply.py index 44925340..ca0a6975 100644 --- a/koyeb/api/models/list_deployments_reply.py +++ b/koyeb/api/models/list_deployments_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListDeploymentsReply(BaseModel): """ ListDeploymentsReply - """ # noqa: E501 - + """ # noqa: E501 deployments: Optional[List[DeploymentListItem]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None count: Optional[StrictInt] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "deployments", - "limit", - "offset", - "count", - "has_next", - ] + __properties: ClassVar[List[str]] = ["deployments", "limit", "offset", "count", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListDeploymentsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,12 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.deployments: for _item_deployments in self.deployments: - _items.append( - _item_deployments.to_dict() - if _item_deployments is not None - else None - ) - _dict["deployments"] = _items + if _item_deployments: + _items.append(_item_deployments.to_dict()) + _dict['deployments'] = _items return _dict @classmethod @@ -101,17 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "deployments": [ - DeploymentListItem.from_dict(_item) for _item in obj["deployments"] - ] - if obj.get("deployments") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "deployments": [DeploymentListItem.from_dict(_item) for _item in obj["deployments"]] if obj.get("deployments") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api/models/list_domains_reply.py b/koyeb/api/models/list_domains_reply.py index cc0b3c2b..1554e3e4 100644 --- a/koyeb/api/models/list_domains_reply.py +++ b/koyeb/api/models/list_domains_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListDomainsReply(BaseModel): """ ListDomainsReply - """ # noqa: E501 - + """ # noqa: E501 domains: Optional[List[Domain]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListDomainsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.domains: for _item_domains in self.domains: - _items.append( - _item_domains.to_dict() if _item_domains is not None else None - ) - _dict["domains"] = _items + if _item_domains: + _items.append(_item_domains.to_dict()) + _dict['domains'] = _items return _dict @classmethod @@ -92,14 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "domains": [Domain.from_dict(_item) for _item in obj["domains"]] - if obj.get("domains") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "domains": [Domain.from_dict(_item) for _item in obj["domains"]] if obj.get("domains") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api/models/list_instance_events_reply.py b/koyeb/api/models/list_instance_events_reply.py index 35270bd8..8575504a 100644 --- a/koyeb/api/models/list_instance_events_reply.py +++ b/koyeb/api/models/list_instance_events_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListInstanceEventsReply(BaseModel): """ ListInstanceEventsReply - """ # noqa: E501 - + """ # noqa: E501 events: Optional[List[InstanceEvent]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None order: Optional[StrictStr] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "events", - "limit", - "offset", - "order", - "has_next", - ] + __properties: ClassVar[List[str]] = ["events", "limit", "offset", "order", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListInstanceEventsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.events: for _item_events in self.events: - _items.append( - _item_events.to_dict() if _item_events is not None else None - ) - _dict["events"] = _items + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _items return _dict @classmethod @@ -99,15 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "events": [InstanceEvent.from_dict(_item) for _item in obj["events"]] - if obj.get("events") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "order": obj.get("order"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "events": [InstanceEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "order": obj.get("order"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api/models/list_instance_snapshot_events_reply.py b/koyeb/api/models/list_instance_snapshot_events_reply.py index f883c548..4420a81a 100644 --- a/koyeb/api/models/list_instance_snapshot_events_reply.py +++ b/koyeb/api/models/list_instance_snapshot_events_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListInstanceSnapshotEventsReply(BaseModel): """ ListInstanceSnapshotEventsReply - """ # noqa: E501 - + """ # noqa: E501 events: Optional[List[InstanceSnapshotEvent]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None order: Optional[StrictStr] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "events", - "limit", - "offset", - "order", - "has_next", - ] + __properties: ClassVar[List[str]] = ["events", "limit", "offset", "order", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListInstanceSnapshotEventsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.events: for _item_events in self.events: - _items.append( - _item_events.to_dict() if _item_events is not None else None - ) - _dict["events"] = _items + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _items return _dict @classmethod @@ -99,17 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "events": [ - InstanceSnapshotEvent.from_dict(_item) for _item in obj["events"] - ] - if obj.get("events") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "order": obj.get("order"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "events": [InstanceSnapshotEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "order": obj.get("order"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api/models/list_instance_snapshots_reply.py b/koyeb/api/models/list_instance_snapshots_reply.py index 27b0cb72..ea00c1a1 100644 --- a/koyeb/api/models/list_instance_snapshots_reply.py +++ b/koyeb/api/models/list_instance_snapshots_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListInstanceSnapshotsReply(BaseModel): """ ListInstanceSnapshotsReply - """ # noqa: E501 - + """ # noqa: E501 instance_snapshots: Optional[List[InstanceSnapshot]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None count: Optional[StrictInt] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "instance_snapshots", - "limit", - "offset", - "count", - "has_next", - ] + __properties: ClassVar[List[str]] = ["instance_snapshots", "limit", "offset", "count", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListInstanceSnapshotsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,12 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.instance_snapshots: for _item_instance_snapshots in self.instance_snapshots: - _items.append( - _item_instance_snapshots.to_dict() - if _item_instance_snapshots is not None - else None - ) - _dict["instance_snapshots"] = _items + if _item_instance_snapshots: + _items.append(_item_instance_snapshots.to_dict()) + _dict['instance_snapshots'] = _items return _dict @classmethod @@ -101,18 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instance_snapshots": [ - InstanceSnapshot.from_dict(_item) - for _item in obj["instance_snapshots"] - ] - if obj.get("instance_snapshots") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "instance_snapshots": [InstanceSnapshot.from_dict(_item) for _item in obj["instance_snapshots"]] if obj.get("instance_snapshots") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api/models/list_instances_reply.py b/koyeb/api/models/list_instances_reply.py index 13f28809..9cdf3fc0 100644 --- a/koyeb/api/models/list_instances_reply.py +++ b/koyeb/api/models/list_instances_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListInstancesReply(BaseModel): """ ListInstancesReply - """ # noqa: E501 - + """ # noqa: E501 instances: Optional[List[InstanceListItem]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None count: Optional[StrictInt] = None order: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "instances", - "limit", - "offset", - "count", - "order", - ] + __properties: ClassVar[List[str]] = ["instances", "limit", "offset", "count", "order"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListInstancesReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.instances: for _item_instances in self.instances: - _items.append( - _item_instances.to_dict() if _item_instances is not None else None - ) - _dict["instances"] = _items + if _item_instances: + _items.append(_item_instances.to_dict()) + _dict['instances'] = _items return _dict @classmethod @@ -99,17 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instances": [ - InstanceListItem.from_dict(_item) for _item in obj["instances"] - ] - if obj.get("instances") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - "order": obj.get("order"), - } - ) + _obj = cls.model_validate({ + "instances": [InstanceListItem.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "order": obj.get("order") + }) return _obj + + diff --git a/koyeb/api/models/list_organization_invitations_reply.py b/koyeb/api/models/list_organization_invitations_reply.py index 39a0ff1d..a20cd41c 100644 --- a/koyeb/api/models/list_organization_invitations_reply.py +++ b/koyeb/api/models/list_organization_invitations_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListOrganizationInvitationsReply(BaseModel): """ ListOrganizationInvitationsReply - """ # noqa: E501 - + """ # noqa: E501 invitations: Optional[List[OrganizationInvitation]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListOrganizationInvitationsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,12 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.invitations: for _item_invitations in self.invitations: - _items.append( - _item_invitations.to_dict() - if _item_invitations is not None - else None - ) - _dict["invitations"] = _items + if _item_invitations: + _items.append(_item_invitations.to_dict()) + _dict['invitations'] = _items return _dict @classmethod @@ -94,17 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "invitations": [ - OrganizationInvitation.from_dict(_item) - for _item in obj["invitations"] - ] - if obj.get("invitations") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "invitations": [OrganizationInvitation.from_dict(_item) for _item in obj["invitations"]] if obj.get("invitations") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api/models/list_organization_members_reply.py b/koyeb/api/models/list_organization_members_reply.py index 24fe23d6..aaf8f406 100644 --- a/koyeb/api/models/list_organization_members_reply.py +++ b/koyeb/api/models/list_organization_members_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListOrganizationMembersReply(BaseModel): """ ListOrganizationMembersReply - """ # noqa: E501 - + """ # noqa: E501 members: Optional[List[OrganizationMember]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListOrganizationMembersReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.members: for _item_members in self.members: - _items.append( - _item_members.to_dict() if _item_members is not None else None - ) - _dict["members"] = _items + if _item_members: + _items.append(_item_members.to_dict()) + _dict['members'] = _items return _dict @classmethod @@ -92,16 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "members": [ - OrganizationMember.from_dict(_item) for _item in obj["members"] - ] - if obj.get("members") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "members": [OrganizationMember.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api/models/list_payment_methods_reply.py b/koyeb/api/models/list_payment_methods_reply.py index 10a481da..fa5d21d4 100644 --- a/koyeb/api/models/list_payment_methods_reply.py +++ b/koyeb/api/models/list_payment_methods_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListPaymentMethodsReply(BaseModel): """ ListPaymentMethodsReply - """ # noqa: E501 - + """ # noqa: E501 payment_methods: Optional[List[PaymentMethod]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListPaymentMethodsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,12 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.payment_methods: for _item_payment_methods in self.payment_methods: - _items.append( - _item_payment_methods.to_dict() - if _item_payment_methods is not None - else None - ) - _dict["payment_methods"] = _items + if _item_payment_methods: + _items.append(_item_payment_methods.to_dict()) + _dict['payment_methods'] = _items return _dict @classmethod @@ -94,16 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "payment_methods": [ - PaymentMethod.from_dict(_item) for _item in obj["payment_methods"] - ] - if obj.get("payment_methods") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "payment_methods": [PaymentMethod.from_dict(_item) for _item in obj["payment_methods"]] if obj.get("payment_methods") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api/models/list_persistent_volume_events_reply.py b/koyeb/api/models/list_persistent_volume_events_reply.py index 96630bc5..eddda864 100644 --- a/koyeb/api/models/list_persistent_volume_events_reply.py +++ b/koyeb/api/models/list_persistent_volume_events_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListPersistentVolumeEventsReply(BaseModel): """ ListPersistentVolumeEventsReply - """ # noqa: E501 - + """ # noqa: E501 events: Optional[List[PersistentVolumeEvent]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None order: Optional[StrictStr] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "events", - "limit", - "offset", - "order", - "has_next", - ] + __properties: ClassVar[List[str]] = ["events", "limit", "offset", "order", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListPersistentVolumeEventsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.events: for _item_events in self.events: - _items.append( - _item_events.to_dict() if _item_events is not None else None - ) - _dict["events"] = _items + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _items return _dict @classmethod @@ -99,17 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "events": [ - PersistentVolumeEvent.from_dict(_item) for _item in obj["events"] - ] - if obj.get("events") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "order": obj.get("order"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "events": [PersistentVolumeEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "order": obj.get("order"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api/models/list_persistent_volumes_reply.py b/koyeb/api/models/list_persistent_volumes_reply.py index 4d04b9e4..bf65a92d 100644 --- a/koyeb/api/models/list_persistent_volumes_reply.py +++ b/koyeb/api/models/list_persistent_volumes_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListPersistentVolumesReply(BaseModel): """ ListPersistentVolumesReply - """ # noqa: E501 - + """ # noqa: E501 volumes: Optional[List[PersistentVolume]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListPersistentVolumesReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.volumes: for _item_volumes in self.volumes: - _items.append( - _item_volumes.to_dict() if _item_volumes is not None else None - ) - _dict["volumes"] = _items + if _item_volumes: + _items.append(_item_volumes.to_dict()) + _dict['volumes'] = _items return _dict @classmethod @@ -92,16 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "volumes": [ - PersistentVolume.from_dict(_item) for _item in obj["volumes"] - ] - if obj.get("volumes") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "volumes": [PersistentVolume.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api/models/list_pool_claim_reply.py b/koyeb/api/models/list_pool_claim_reply.py index c1300565..751af964 100644 --- a/koyeb/api/models/list_pool_claim_reply.py +++ b/koyeb/api/models/list_pool_claim_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListPoolClaimReply(BaseModel): """ ListPoolClaimReply - """ # noqa: E501 - + """ # noqa: E501 claims: Optional[List[PoolClaim]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None count: Optional[StrictInt] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "claims", - "limit", - "offset", - "count", - "has_next", - ] + __properties: ClassVar[List[str]] = ["claims", "limit", "offset", "count", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListPoolClaimReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.claims: for _item_claims in self.claims: - _items.append( - _item_claims.to_dict() if _item_claims is not None else None - ) - _dict["claims"] = _items + if _item_claims: + _items.append(_item_claims.to_dict()) + _dict['claims'] = _items return _dict @classmethod @@ -99,15 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "claims": [PoolClaim.from_dict(_item) for _item in obj["claims"]] - if obj.get("claims") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "claims": [PoolClaim.from_dict(_item) for _item in obj["claims"]] if obj.get("claims") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api/models/list_projects_reply.py b/koyeb/api/models/list_projects_reply.py index ddfdea1d..39a7204f 100644 --- a/koyeb/api/models/list_projects_reply.py +++ b/koyeb/api/models/list_projects_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListProjectsReply(BaseModel): """ ListProjectsReply - """ # noqa: E501 - + """ # noqa: E501 projects: Optional[List[Project]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -42,6 +40,7 @@ class ListProjectsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -76,10 +76,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.projects: for _item_projects in self.projects: - _items.append( - _item_projects.to_dict() if _item_projects is not None else None - ) - _dict["projects"] = _items + if _item_projects: + _items.append(_item_projects.to_dict()) + _dict['projects'] = _items return _dict @classmethod @@ -91,13 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "projects": [Project.from_dict(_item) for _item in obj["projects"]] - if obj.get("projects") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - } - ) + _obj = cls.model_validate({ + "projects": [Project.from_dict(_item) for _item in obj["projects"]] if obj.get("projects") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset") + }) return _obj + + diff --git a/koyeb/api/models/list_regional_deployment_events_reply.py b/koyeb/api/models/list_regional_deployment_events_reply.py index 229ad3c4..de103b11 100644 --- a/koyeb/api/models/list_regional_deployment_events_reply.py +++ b/koyeb/api/models/list_regional_deployment_events_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListRegionalDeploymentEventsReply(BaseModel): """ ListRegionalDeploymentEventsReply - """ # noqa: E501 - + """ # noqa: E501 events: Optional[List[RegionalDeploymentEvent]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None order: Optional[StrictStr] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "events", - "limit", - "offset", - "order", - "has_next", - ] + __properties: ClassVar[List[str]] = ["events", "limit", "offset", "order", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListRegionalDeploymentEventsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.events: for _item_events in self.events: - _items.append( - _item_events.to_dict() if _item_events is not None else None - ) - _dict["events"] = _items + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _items return _dict @classmethod @@ -99,17 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "events": [ - RegionalDeploymentEvent.from_dict(_item) for _item in obj["events"] - ] - if obj.get("events") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "order": obj.get("order"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "events": [RegionalDeploymentEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "order": obj.get("order"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api/models/list_regional_deployments_reply.py b/koyeb/api/models/list_regional_deployments_reply.py index 4d06494c..5a9bc37b 100644 --- a/koyeb/api/models/list_regional_deployments_reply.py +++ b/koyeb/api/models/list_regional_deployments_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListRegionalDeploymentsReply(BaseModel): """ ListRegionalDeploymentsReply - """ # noqa: E501 - + """ # noqa: E501 regional_deployments: Optional[List[RegionalDeploymentListItem]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None count: Optional[StrictInt] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "regional_deployments", - "limit", - "offset", - "count", - "has_next", - ] + __properties: ClassVar[List[str]] = ["regional_deployments", "limit", "offset", "count", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListRegionalDeploymentsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,12 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.regional_deployments: for _item_regional_deployments in self.regional_deployments: - _items.append( - _item_regional_deployments.to_dict() - if _item_regional_deployments is not None - else None - ) - _dict["regional_deployments"] = _items + if _item_regional_deployments: + _items.append(_item_regional_deployments.to_dict()) + _dict['regional_deployments'] = _items return _dict @classmethod @@ -101,18 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "regional_deployments": [ - RegionalDeploymentListItem.from_dict(_item) - for _item in obj["regional_deployments"] - ] - if obj.get("regional_deployments") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "regional_deployments": [RegionalDeploymentListItem.from_dict(_item) for _item in obj["regional_deployments"]] if obj.get("regional_deployments") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api/models/list_regions_reply.py b/koyeb/api/models/list_regions_reply.py index 9e8d10e3..4f69df6f 100644 --- a/koyeb/api/models/list_regions_reply.py +++ b/koyeb/api/models/list_regions_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListRegionsReply(BaseModel): """ ListRegionsReply - """ # noqa: E501 - + """ # noqa: E501 regions: Optional[List[RegionListItem]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListRegionsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.regions: for _item_regions in self.regions: - _items.append( - _item_regions.to_dict() if _item_regions is not None else None - ) - _dict["regions"] = _items + if _item_regions: + _items.append(_item_regions.to_dict()) + _dict['regions'] = _items return _dict @classmethod @@ -92,14 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "regions": [RegionListItem.from_dict(_item) for _item in obj["regions"]] - if obj.get("regions") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "regions": [RegionListItem.from_dict(_item) for _item in obj["regions"]] if obj.get("regions") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api/models/list_secrets_reply.py b/koyeb/api/models/list_secrets_reply.py index 8619117b..e90b9460 100644 --- a/koyeb/api/models/list_secrets_reply.py +++ b/koyeb/api/models/list_secrets_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListSecretsReply(BaseModel): """ ListSecretsReply - """ # noqa: E501 - + """ # noqa: E501 secrets: Optional[List[Secret]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListSecretsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.secrets: for _item_secrets in self.secrets: - _items.append( - _item_secrets.to_dict() if _item_secrets is not None else None - ) - _dict["secrets"] = _items + if _item_secrets: + _items.append(_item_secrets.to_dict()) + _dict['secrets'] = _items return _dict @classmethod @@ -92,14 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "secrets": [Secret.from_dict(_item) for _item in obj["secrets"]] - if obj.get("secrets") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "secrets": [Secret.from_dict(_item) for _item in obj["secrets"]] if obj.get("secrets") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api/models/list_service_events_reply.py b/koyeb/api/models/list_service_events_reply.py index d05109c5..f75bf1cc 100644 --- a/koyeb/api/models/list_service_events_reply.py +++ b/koyeb/api/models/list_service_events_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListServiceEventsReply(BaseModel): """ ListServiceEventsReply - """ # noqa: E501 - + """ # noqa: E501 events: Optional[List[ServiceEvent]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None order: Optional[StrictStr] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "events", - "limit", - "offset", - "order", - "has_next", - ] + __properties: ClassVar[List[str]] = ["events", "limit", "offset", "order", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListServiceEventsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.events: for _item_events in self.events: - _items.append( - _item_events.to_dict() if _item_events is not None else None - ) - _dict["events"] = _items + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _items return _dict @classmethod @@ -99,15 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "events": [ServiceEvent.from_dict(_item) for _item in obj["events"]] - if obj.get("events") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "order": obj.get("order"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "events": [ServiceEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "order": obj.get("order"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api/models/list_service_pools_reply.py b/koyeb/api/models/list_service_pools_reply.py index ed02768c..b7136dc7 100644 --- a/koyeb/api/models/list_service_pools_reply.py +++ b/koyeb/api/models/list_service_pools_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListServicePoolsReply(BaseModel): """ ListServicePoolsReply - """ # noqa: E501 - + """ # noqa: E501 service_pools: Optional[List[ServicePool]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None count: Optional[StrictInt] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "service_pools", - "limit", - "offset", - "count", - "has_next", - ] + __properties: ClassVar[List[str]] = ["service_pools", "limit", "offset", "count", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListServicePoolsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,12 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.service_pools: for _item_service_pools in self.service_pools: - _items.append( - _item_service_pools.to_dict() - if _item_service_pools is not None - else None - ) - _dict["service_pools"] = _items + if _item_service_pools: + _items.append(_item_service_pools.to_dict()) + _dict['service_pools'] = _items return _dict @classmethod @@ -101,17 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service_pools": [ - ServicePool.from_dict(_item) for _item in obj["service_pools"] - ] - if obj.get("service_pools") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "service_pools": [ServicePool.from_dict(_item) for _item in obj["service_pools"]] if obj.get("service_pools") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api/models/list_services_reply.py b/koyeb/api/models/list_services_reply.py index aada7461..f1e0b3ea 100644 --- a/koyeb/api/models/list_services_reply.py +++ b/koyeb/api/models/list_services_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListServicesReply(BaseModel): """ ListServicesReply - """ # noqa: E501 - + """ # noqa: E501 services: Optional[List[ServiceListItem]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None count: Optional[StrictInt] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "services", - "limit", - "offset", - "count", - "has_next", - ] + __properties: ClassVar[List[str]] = ["services", "limit", "offset", "count", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListServicesReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.services: for _item_services in self.services: - _items.append( - _item_services.to_dict() if _item_services is not None else None - ) - _dict["services"] = _items + if _item_services: + _items.append(_item_services.to_dict()) + _dict['services'] = _items return _dict @classmethod @@ -99,17 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "services": [ - ServiceListItem.from_dict(_item) for _item in obj["services"] - ] - if obj.get("services") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "services": [ServiceListItem.from_dict(_item) for _item in obj["services"]] if obj.get("services") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api/models/list_snapshots_reply.py b/koyeb/api/models/list_snapshots_reply.py index f4e3b21b..43d2e698 100644 --- a/koyeb/api/models/list_snapshots_reply.py +++ b/koyeb/api/models/list_snapshots_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListSnapshotsReply(BaseModel): """ ListSnapshotsReply - """ # noqa: E501 - + """ # noqa: E501 snapshots: Optional[List[Snapshot]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListSnapshotsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.snapshots: for _item_snapshots in self.snapshots: - _items.append( - _item_snapshots.to_dict() if _item_snapshots is not None else None - ) - _dict["snapshots"] = _items + if _item_snapshots: + _items.append(_item_snapshots.to_dict()) + _dict['snapshots'] = _items return _dict @classmethod @@ -92,14 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "snapshots": [Snapshot.from_dict(_item) for _item in obj["snapshots"]] - if obj.get("snapshots") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "snapshots": [Snapshot.from_dict(_item) for _item in obj["snapshots"]] if obj.get("snapshots") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api/models/list_usage_reply.py b/koyeb/api/models/list_usage_reply.py index bd193fce..aeedbfea 100644 --- a/koyeb/api/models/list_usage_reply.py +++ b/koyeb/api/models/list_usage_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListUsageReply(BaseModel): """ ListUsageReply - """ # noqa: E501 - + """ # noqa: E501 usage: Optional[CatalogUsage] = None __properties: ClassVar[List[str]] = ["usage"] @@ -40,6 +38,7 @@ class ListUsageReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of usage if self.usage: - _dict["usage"] = self.usage.to_dict() + _dict['usage'] = self.usage.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "usage": CatalogUsage.from_dict(obj["usage"]) - if obj.get("usage") is not None - else None - } - ) + _obj = cls.model_validate({ + "usage": CatalogUsage.from_dict(obj["usage"]) if obj.get("usage") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/list_user_organization_invitations_reply.py b/koyeb/api/models/list_user_organization_invitations_reply.py index d2e023b8..c1227061 100644 --- a/koyeb/api/models/list_user_organization_invitations_reply.py +++ b/koyeb/api/models/list_user_organization_invitations_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListUserOrganizationInvitationsReply(BaseModel): """ ListUserOrganizationInvitationsReply - """ # noqa: E501 - + """ # noqa: E501 invitations: Optional[List[OrganizationInvitation]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListUserOrganizationInvitationsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,12 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.invitations: for _item_invitations in self.invitations: - _items.append( - _item_invitations.to_dict() - if _item_invitations is not None - else None - ) - _dict["invitations"] = _items + if _item_invitations: + _items.append(_item_invitations.to_dict()) + _dict['invitations'] = _items return _dict @classmethod @@ -94,17 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "invitations": [ - OrganizationInvitation.from_dict(_item) - for _item in obj["invitations"] - ] - if obj.get("invitations") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "invitations": [OrganizationInvitation.from_dict(_item) for _item in obj["invitations"]] if obj.get("invitations") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api/models/list_user_organizations_reply.py b/koyeb/api/models/list_user_organizations_reply.py index bacbe414..6a2f76b7 100644 --- a/koyeb/api/models/list_user_organizations_reply.py +++ b/koyeb/api/models/list_user_organizations_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListUserOrganizationsReply(BaseModel): """ ListUserOrganizationsReply - """ # noqa: E501 - + """ # noqa: E501 organizations: Optional[List[Organization]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListUserOrganizationsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,12 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.organizations: for _item_organizations in self.organizations: - _items.append( - _item_organizations.to_dict() - if _item_organizations is not None - else None - ) - _dict["organizations"] = _items + if _item_organizations: + _items.append(_item_organizations.to_dict()) + _dict['organizations'] = _items return _dict @classmethod @@ -94,16 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organizations": [ - Organization.from_dict(_item) for _item in obj["organizations"] - ] - if obj.get("organizations") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "organizations": [Organization.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api/models/log_entry.py b/koyeb/api/models/log_entry.py index 36b567ed..ab3e7573 100644 --- a/koyeb/api/models/log_entry.py +++ b/koyeb/api/models/log_entry.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class LogEntry(BaseModel): """ LogEntry - """ # noqa: E501 - + """ # noqa: E501 msg: Optional[StrictStr] = None created_at: Optional[datetime] = None labels: Optional[Dict[str, Any]] = None @@ -42,6 +40,7 @@ class LogEntry(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,11 +83,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "msg": obj.get("msg"), - "created_at": obj.get("created_at"), - "labels": obj.get("labels"), - } - ) + _obj = cls.model_validate({ + "msg": obj.get("msg"), + "created_at": obj.get("created_at"), + "labels": obj.get("labels") + }) return _obj + + diff --git a/koyeb/api/models/login_method_reply.py b/koyeb/api/models/login_method_reply.py index dc73e8d7..58fb6b3d 100644 --- a/koyeb/api/models/login_method_reply.py +++ b/koyeb/api/models/login_method_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class LoginMethodReply(BaseModel): """ LoginMethodReply - """ # noqa: E501 - + """ # noqa: E501 method: Optional[LoginMethodReplyMethod] = LoginMethodReplyMethod.KOYEB __properties: ClassVar[List[str]] = ["method"] @@ -40,6 +38,7 @@ class LoginMethodReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,11 +81,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "method": obj.get("method") - if obj.get("method") is not None - else LoginMethodReplyMethod.KOYEB - } - ) + _obj = cls.model_validate({ + "method": obj.get("method") if obj.get("method") is not None else LoginMethodReplyMethod.KOYEB + }) return _obj + + diff --git a/koyeb/api/models/login_method_reply_method.py b/koyeb/api/models/login_method_reply_method.py index c8eccaa8..a27e8297 100644 --- a/koyeb/api/models/login_method_reply_method.py +++ b/koyeb/api/models/login_method_reply_method.py @@ -26,10 +26,12 @@ class LoginMethodReplyMethod(str, Enum): """ allowed enum values """ - KOYEB = "KOYEB" - WORKOS = "WORKOS" + KOYEB = 'KOYEB' + WORKOS = 'WORKOS' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of LoginMethodReplyMethod from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/login_reply.py b/koyeb/api/models/login_reply.py index 91373487..31e2c958 100644 --- a/koyeb/api/models/login_reply.py +++ b/koyeb/api/models/login_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class LoginReply(BaseModel): """ LoginReply - """ # noqa: E501 - + """ # noqa: E501 token: Optional[Token] = None __properties: ClassVar[List[str]] = ["token"] @@ -40,6 +38,7 @@ class LoginReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of token if self.token: - _dict["token"] = self.token.to_dict() + _dict['token'] = self.token.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "token": Token.from_dict(obj["token"]) - if obj.get("token") is not None - else None - } - ) + _obj = cls.model_validate({ + "token": Token.from_dict(obj["token"]) if obj.get("token") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/login_request.py b/koyeb/api/models/login_request.py index e8631098..8d89a070 100644 --- a/koyeb/api/models/login_request.py +++ b/koyeb/api/models/login_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class LoginRequest(BaseModel): """ LoginRequest - """ # noqa: E501 - + """ # noqa: E501 email: Optional[StrictStr] = None password: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None @@ -41,6 +39,7 @@ class LoginRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "email": obj.get("email"), - "password": obj.get("password"), - "organization_id": obj.get("organization_id"), - } - ) + _obj = cls.model_validate({ + "email": obj.get("email"), + "password": obj.get("password"), + "organization_id": obj.get("organization_id") + }) return _obj + + diff --git a/koyeb/api/models/manage_reply.py b/koyeb/api/models/manage_reply.py index 8a63ecb1..b997db88 100644 --- a/koyeb/api/models/manage_reply.py +++ b/koyeb/api/models/manage_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ManageReply(BaseModel): """ ManageReply - """ # noqa: E501 - + """ # noqa: E501 url: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["url"] @@ -39,6 +37,7 @@ class ManageReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"url": obj.get("url")}) + _obj = cls.model_validate({ + "url": obj.get("url") + }) return _obj + + diff --git a/koyeb/api/models/manual_service_scaling.py b/koyeb/api/models/manual_service_scaling.py index b66c1504..4de83018 100644 --- a/koyeb/api/models/manual_service_scaling.py +++ b/koyeb/api/models/manual_service_scaling.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ManualServiceScaling(BaseModel): """ ManualServiceScaling - """ # noqa: E501 - + """ # noqa: E501 scopes: Optional[List[StrictStr]] = None instances: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["scopes", "instances"] @@ -40,6 +38,7 @@ class ManualServiceScaling(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"scopes": obj.get("scopes"), "instances": obj.get("instances")} - ) + _obj = cls.model_validate({ + "scopes": obj.get("scopes"), + "instances": obj.get("instances") + }) return _obj + + diff --git a/koyeb/api/models/members_summary.py b/koyeb/api/models/members_summary.py index 7f8a146e..740fd1f3 100644 --- a/koyeb/api/models/members_summary.py +++ b/koyeb/api/models/members_summary.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class MembersSummary(BaseModel): """ MembersSummary - """ # noqa: E501 - + """ # noqa: E501 total: Optional[StrictStr] = None invitations_by_status: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["total", "invitations_by_status"] @@ -40,6 +38,7 @@ class MembersSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,10 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "total": obj.get("total"), - "invitations_by_status": obj.get("invitations_by_status"), - } - ) + _obj = cls.model_validate({ + "total": obj.get("total"), + "invitations_by_status": obj.get("invitations_by_status") + }) return _obj + + diff --git a/koyeb/api/models/mesh.py b/koyeb/api/models/mesh.py index de1227a8..f9a7f990 100644 --- a/koyeb/api/models/mesh.py +++ b/koyeb/api/models/mesh.py @@ -24,17 +24,12 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Mesh(BaseModel): """ Mesh groups the mesh scope selector and the (optional) custom mesh name. Kept inside NetworkPolicy so scope/name and other network-policy dimensions (egress, future inbound) live together. - """ # noqa: E501 - + """ # noqa: E501 scope: Optional[MeshScope] = MeshScope.MESH_SCOPE_UNSPECIFIED - name: Optional[StrictStr] = Field( - default=None, - description="Custom mesh name — required when scope is MESH_SCOPE_CUSTOM, ignored otherwise. Combined with the workspace ID server-side to ensure the same custom name in different workspaces never collides.", - ) + name: Optional[StrictStr] = Field(default=None, description="Custom mesh name — required when scope is MESH_SCOPE_CUSTOM, ignored otherwise. Combined with the workspace ID server-side to ensure the same custom name in different workspaces never collides.") __properties: ClassVar[List[str]] = ["scope", "name"] model_config = ConfigDict( @@ -44,6 +39,7 @@ class Mesh(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -85,12 +82,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "scope": obj.get("scope") - if obj.get("scope") is not None - else MeshScope.MESH_SCOPE_UNSPECIFIED, - "name": obj.get("name"), - } - ) + _obj = cls.model_validate({ + "scope": obj.get("scope") if obj.get("scope") is not None else MeshScope.MESH_SCOPE_UNSPECIFIED, + "name": obj.get("name") + }) return _obj + + diff --git a/koyeb/api/models/mesh_scope.py b/koyeb/api/models/mesh_scope.py index 09c58074..c43773aa 100644 --- a/koyeb/api/models/mesh_scope.py +++ b/koyeb/api/models/mesh_scope.py @@ -26,13 +26,15 @@ class MeshScope(str, Enum): """ allowed enum values """ - MESH_SCOPE_UNSPECIFIED = "MESH_SCOPE_UNSPECIFIED" - MESH_SCOPE_ORGANIZATION = "MESH_SCOPE_ORGANIZATION" - MESH_SCOPE_WORKSPACE = "MESH_SCOPE_WORKSPACE" - MESH_SCOPE_APP = "MESH_SCOPE_APP" - MESH_SCOPE_CUSTOM = "MESH_SCOPE_CUSTOM" + MESH_SCOPE_UNSPECIFIED = 'MESH_SCOPE_UNSPECIFIED' + MESH_SCOPE_ORGANIZATION = 'MESH_SCOPE_ORGANIZATION' + MESH_SCOPE_WORKSPACE = 'MESH_SCOPE_WORKSPACE' + MESH_SCOPE_APP = 'MESH_SCOPE_APP' + MESH_SCOPE_CUSTOM = 'MESH_SCOPE_CUSTOM' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of MeshScope from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/metric_name.py b/koyeb/api/models/metric_name.py index 04fe8f9c..34f66cf4 100644 --- a/koyeb/api/models/metric_name.py +++ b/koyeb/api/models/metric_name.py @@ -26,18 +26,20 @@ class MetricName(str, Enum): """ allowed enum values """ - UNKNOWN = "UNKNOWN" - CPU_TOTAL_PERCENT = "CPU_TOTAL_PERCENT" - MEM_RSS = "MEM_RSS" - HTTP_THROUGHPUT = "HTTP_THROUGHPUT" - HTTP_RESPONSE_TIME_50_P = "HTTP_RESPONSE_TIME_50P" - HTTP_RESPONSE_TIME_90_P = "HTTP_RESPONSE_TIME_90P" - HTTP_RESPONSE_TIME_99_P = "HTTP_RESPONSE_TIME_99P" - HTTP_RESPONSE_TIME_MAX = "HTTP_RESPONSE_TIME_MAX" - PUBLIC_DATA_TRANSFER_IN = "PUBLIC_DATA_TRANSFER_IN" - PUBLIC_DATA_TRANSFER_OUT = "PUBLIC_DATA_TRANSFER_OUT" + UNKNOWN = 'UNKNOWN' + CPU_TOTAL_PERCENT = 'CPU_TOTAL_PERCENT' + MEM_RSS = 'MEM_RSS' + HTTP_THROUGHPUT = 'HTTP_THROUGHPUT' + HTTP_RESPONSE_TIME_50_P = 'HTTP_RESPONSE_TIME_50P' + HTTP_RESPONSE_TIME_90_P = 'HTTP_RESPONSE_TIME_90P' + HTTP_RESPONSE_TIME_99_P = 'HTTP_RESPONSE_TIME_99P' + HTTP_RESPONSE_TIME_MAX = 'HTTP_RESPONSE_TIME_MAX' + PUBLIC_DATA_TRANSFER_IN = 'PUBLIC_DATA_TRANSFER_IN' + PUBLIC_DATA_TRANSFER_OUT = 'PUBLIC_DATA_TRANSFER_OUT' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of MetricName from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/neon_postgres_database.py b/koyeb/api/models/neon_postgres_database.py index b503bcda..efd11e35 100644 --- a/koyeb/api/models/neon_postgres_database.py +++ b/koyeb/api/models/neon_postgres_database.py @@ -19,34 +19,22 @@ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.neon_postgres_database_neon_database import ( - NeonPostgresDatabaseNeonDatabase, -) -from koyeb.api.models.neon_postgres_database_neon_role import ( - NeonPostgresDatabaseNeonRole, -) +from koyeb.api.models.neon_postgres_database_neon_database import NeonPostgresDatabaseNeonDatabase +from koyeb.api.models.neon_postgres_database_neon_role import NeonPostgresDatabaseNeonRole from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class NeonPostgresDatabase(BaseModel): """ NeonPostgresDatabase - """ # noqa: E501 - + """ # noqa: E501 pg_version: Optional[StrictInt] = None region: Optional[StrictStr] = None instance_type: Optional[StrictStr] = None roles: Optional[List[NeonPostgresDatabaseNeonRole]] = None databases: Optional[List[NeonPostgresDatabaseNeonDatabase]] = None - __properties: ClassVar[List[str]] = [ - "pg_version", - "region", - "instance_type", - "roles", - "databases", - ] + __properties: ClassVar[List[str]] = ["pg_version", "region", "instance_type", "roles", "databases"] model_config = ConfigDict( validate_by_name=True, @@ -55,6 +43,7 @@ class NeonPostgresDatabase(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -78,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -89,18 +79,16 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.roles: for _item_roles in self.roles: - _items.append( - _item_roles.to_dict() if _item_roles is not None else None - ) - _dict["roles"] = _items + if _item_roles: + _items.append(_item_roles.to_dict()) + _dict['roles'] = _items # override the default output from pydantic by calling `to_dict()` of each item in databases (list) _items = [] if self.databases: for _item_databases in self.databases: - _items.append( - _item_databases.to_dict() if _item_databases is not None else None - ) - _dict["databases"] = _items + if _item_databases: + _items.append(_item_databases.to_dict()) + _dict['databases'] = _items return _dict @classmethod @@ -112,23 +100,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "pg_version": obj.get("pg_version"), - "region": obj.get("region"), - "instance_type": obj.get("instance_type"), - "roles": [ - NeonPostgresDatabaseNeonRole.from_dict(_item) - for _item in obj["roles"] - ] - if obj.get("roles") is not None - else None, - "databases": [ - NeonPostgresDatabaseNeonDatabase.from_dict(_item) - for _item in obj["databases"] - ] - if obj.get("databases") is not None - else None, - } - ) + _obj = cls.model_validate({ + "pg_version": obj.get("pg_version"), + "region": obj.get("region"), + "instance_type": obj.get("instance_type"), + "roles": [NeonPostgresDatabaseNeonRole.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None, + "databases": [NeonPostgresDatabaseNeonDatabase.from_dict(_item) for _item in obj["databases"]] if obj.get("databases") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/neon_postgres_database_deployment_metadata.py b/koyeb/api/models/neon_postgres_database_deployment_metadata.py index 8319b37b..a17b3601 100644 --- a/koyeb/api/models/neon_postgres_database_deployment_metadata.py +++ b/koyeb/api/models/neon_postgres_database_deployment_metadata.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NeonPostgresDatabaseDeploymentMetadata(BaseModel): """ NeonPostgresDatabaseDeploymentMetadata - """ # noqa: E501 - + """ # noqa: E501 reset_role_passwords: Optional[List[StrictStr]] = None __properties: ClassVar[List[str]] = ["reset_role_passwords"] @@ -39,6 +37,7 @@ class NeonPostgresDatabaseDeploymentMetadata(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,7 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"reset_role_passwords": obj.get("reset_role_passwords")} - ) + _obj = cls.model_validate({ + "reset_role_passwords": obj.get("reset_role_passwords") + }) return _obj + + diff --git a/koyeb/api/models/neon_postgres_database_neon_database.py b/koyeb/api/models/neon_postgres_database_neon_database.py index 92ee9a8d..43beaaa5 100644 --- a/koyeb/api/models/neon_postgres_database_neon_database.py +++ b/koyeb/api/models/neon_postgres_database_neon_database.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NeonPostgresDatabaseNeonDatabase(BaseModel): """ NeonPostgresDatabaseNeonDatabase - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None owner: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name", "owner"] @@ -40,6 +38,7 @@ class NeonPostgresDatabaseNeonDatabase(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,5 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"name": obj.get("name"), "owner": obj.get("owner")}) + _obj = cls.model_validate({ + "name": obj.get("name"), + "owner": obj.get("owner") + }) return _obj + + diff --git a/koyeb/api/models/neon_postgres_database_neon_role.py b/koyeb/api/models/neon_postgres_database_neon_role.py index 197ccfca..bfd2d65a 100644 --- a/koyeb/api/models/neon_postgres_database_neon_role.py +++ b/koyeb/api/models/neon_postgres_database_neon_role.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NeonPostgresDatabaseNeonRole(BaseModel): """ NeonPostgresDatabaseNeonRole - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None secret: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name", "secret"] @@ -40,6 +38,7 @@ class NeonPostgresDatabaseNeonRole(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"name": obj.get("name"), "secret": obj.get("secret")} - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "secret": obj.get("secret") + }) return _obj + + diff --git a/koyeb/api/models/neon_postgres_summary.py b/koyeb/api/models/neon_postgres_summary.py index 1498922b..8994a6b2 100644 --- a/koyeb/api/models/neon_postgres_summary.py +++ b/koyeb/api/models/neon_postgres_summary.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NeonPostgresSummary(BaseModel): """ NeonPostgresSummary - """ # noqa: E501 - + """ # noqa: E501 total: Optional[StrictStr] = None by_instance_type: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["total", "by_instance_type"] @@ -40,6 +38,7 @@ class NeonPostgresSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"total": obj.get("total"), "by_instance_type": obj.get("by_instance_type")} - ) + _obj = cls.model_validate({ + "total": obj.get("total"), + "by_instance_type": obj.get("by_instance_type") + }) return _obj + + diff --git a/koyeb/api/models/network_policy.py b/koyeb/api/models/network_policy.py index 2fc6b036..199f919a 100644 --- a/koyeb/api/models/network_policy.py +++ b/koyeb/api/models/network_policy.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NetworkPolicy(BaseModel): """ NetworkPolicy - """ # noqa: E501 - + """ # noqa: E501 egress: Optional[EgressPolicy] = None mesh: Optional[Mesh] = None __properties: ClassVar[List[str]] = ["egress", "mesh"] @@ -42,6 +40,7 @@ class NetworkPolicy(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,10 +74,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of egress if self.egress: - _dict["egress"] = self.egress.to_dict() + _dict['egress'] = self.egress.to_dict() # override the default output from pydantic by calling `to_dict()` of mesh if self.mesh: - _dict["mesh"] = self.mesh.to_dict() + _dict['mesh'] = self.mesh.to_dict() return _dict @classmethod @@ -89,14 +89,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "egress": EgressPolicy.from_dict(obj["egress"]) - if obj.get("egress") is not None - else None, - "mesh": Mesh.from_dict(obj["mesh"]) - if obj.get("mesh") is not None - else None, - } - ) + _obj = cls.model_validate({ + "egress": EgressPolicy.from_dict(obj["egress"]) if obj.get("egress") is not None else None, + "mesh": Mesh.from_dict(obj["mesh"]) if obj.get("mesh") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/network_policy_destination.py b/koyeb/api/models/network_policy_destination.py index 74819999..d56457b4 100644 --- a/koyeb/api/models/network_policy_destination.py +++ b/koyeb/api/models/network_policy_destination.py @@ -23,16 +23,11 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NetworkPolicyDestination(BaseModel): """ NetworkPolicyDestination - """ # noqa: E501 - - cidr: Optional[StrictStr] = Field( - default=None, - description='IPv4 or IPv6 CIDR (e.g. "10.0.0.0/8", "2001:db8::/32"). Bare IPs are accepted at the API boundary and normalized to /32 (IPv4) or /128 (IPv6) before storage.', - ) + """ # noqa: E501 + cidr: Optional[StrictStr] = Field(default=None, description="IPv4 or IPv6 CIDR (e.g. \"10.0.0.0/8\", \"2001:db8::/32\"). Bare IPs are accepted at the API boundary and normalized to /32 (IPv4) or /128 (IPv6) before storage.") __properties: ClassVar[List[str]] = ["cidr"] model_config = ConfigDict( @@ -42,6 +37,7 @@ class NetworkPolicyDestination(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"cidr": obj.get("cidr")}) + _obj = cls.model_validate({ + "cidr": obj.get("cidr") + }) return _obj + + diff --git a/koyeb/api/models/next_invoice_reply.py b/koyeb/api/models/next_invoice_reply.py index 466f15a9..e8124577 100644 --- a/koyeb/api/models/next_invoice_reply.py +++ b/koyeb/api/models/next_invoice_reply.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NextInvoiceReply(BaseModel): """ NextInvoiceReply - """ # noqa: E501 - + """ # noqa: E501 stripe_invoice: Optional[Dict[str, Any]] = None lines: Optional[List[NextInvoiceReplyLine]] = None discounts: Optional[List[NextInvoiceReplyDiscount]] = None @@ -43,6 +41,7 @@ class NextInvoiceReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,18 +77,16 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.lines: for _item_lines in self.lines: - _items.append( - _item_lines.to_dict() if _item_lines is not None else None - ) - _dict["lines"] = _items + if _item_lines: + _items.append(_item_lines.to_dict()) + _dict['lines'] = _items # override the default output from pydantic by calling `to_dict()` of each item in discounts (list) _items = [] if self.discounts: for _item_discounts in self.discounts: - _items.append( - _item_discounts.to_dict() if _item_discounts is not None else None - ) - _dict["discounts"] = _items + if _item_discounts: + _items.append(_item_discounts.to_dict()) + _dict['discounts'] = _items return _dict @classmethod @@ -100,20 +98,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "stripe_invoice": obj.get("stripe_invoice"), - "lines": [ - NextInvoiceReplyLine.from_dict(_item) for _item in obj["lines"] - ] - if obj.get("lines") is not None - else None, - "discounts": [ - NextInvoiceReplyDiscount.from_dict(_item) - for _item in obj["discounts"] - ] - if obj.get("discounts") is not None - else None, - } - ) + _obj = cls.model_validate({ + "stripe_invoice": obj.get("stripe_invoice"), + "lines": [NextInvoiceReplyLine.from_dict(_item) for _item in obj["lines"]] if obj.get("lines") is not None else None, + "discounts": [NextInvoiceReplyDiscount.from_dict(_item) for _item in obj["discounts"]] if obj.get("discounts") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/next_invoice_reply_discount.py b/koyeb/api/models/next_invoice_reply_discount.py index d1aac567..42c92b6c 100644 --- a/koyeb/api/models/next_invoice_reply_discount.py +++ b/koyeb/api/models/next_invoice_reply_discount.py @@ -19,22 +19,16 @@ from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.next_invoice_reply_discount_type import ( - NextInvoiceReplyDiscountType, -) +from koyeb.api.models.next_invoice_reply_discount_type import NextInvoiceReplyDiscountType from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class NextInvoiceReplyDiscount(BaseModel): """ NextInvoiceReplyDiscount - """ # noqa: E501 - - type: Optional[ - NextInvoiceReplyDiscountType - ] = NextInvoiceReplyDiscountType.PERCENT_OFF + """ # noqa: E501 + type: Optional[NextInvoiceReplyDiscountType] = NextInvoiceReplyDiscountType.PERCENT_OFF name: Optional[StrictStr] = None amount: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["type", "name", "amount"] @@ -46,6 +40,7 @@ class NextInvoiceReplyDiscount(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -87,13 +83,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "type": obj.get("type") - if obj.get("type") is not None - else NextInvoiceReplyDiscountType.PERCENT_OFF, - "name": obj.get("name"), - "amount": obj.get("amount"), - } - ) + _obj = cls.model_validate({ + "type": obj.get("type") if obj.get("type") is not None else NextInvoiceReplyDiscountType.PERCENT_OFF, + "name": obj.get("name"), + "amount": obj.get("amount") + }) return _obj + + diff --git a/koyeb/api/models/next_invoice_reply_discount_type.py b/koyeb/api/models/next_invoice_reply_discount_type.py index 1e4d17b9..482f2960 100644 --- a/koyeb/api/models/next_invoice_reply_discount_type.py +++ b/koyeb/api/models/next_invoice_reply_discount_type.py @@ -26,10 +26,12 @@ class NextInvoiceReplyDiscountType(str, Enum): """ allowed enum values """ - PERCENT_OFF = "PERCENT_OFF" - AMOUNT_OFF = "AMOUNT_OFF" + PERCENT_OFF = 'PERCENT_OFF' + AMOUNT_OFF = 'AMOUNT_OFF' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of NextInvoiceReplyDiscountType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/next_invoice_reply_line.py b/koyeb/api/models/next_invoice_reply_line.py index 794f7337..d9938c9d 100644 --- a/koyeb/api/models/next_invoice_reply_line.py +++ b/koyeb/api/models/next_invoice_reply_line.py @@ -25,24 +25,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NextInvoiceReplyLine(BaseModel): """ NextInvoiceReplyLine - """ # noqa: E501 - + """ # noqa: E501 amount_excluding_tax: Optional[StrictInt] = None period: Optional[NextInvoiceReplyLinePeriod] = None plan_nickname: Optional[StrictStr] = None price: Optional[NextInvoiceReplyLinePrice] = None quantity: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = [ - "amount_excluding_tax", - "period", - "plan_nickname", - "price", - "quantity", - ] + __properties: ClassVar[List[str]] = ["amount_excluding_tax", "period", "plan_nickname", "price", "quantity"] model_config = ConfigDict( validate_by_name=True, @@ -51,6 +43,7 @@ class NextInvoiceReplyLine(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,10 +77,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of period if self.period: - _dict["period"] = self.period.to_dict() + _dict['period'] = self.period.to_dict() # override the default output from pydantic by calling `to_dict()` of price if self.price: - _dict["price"] = self.price.to_dict() + _dict['price'] = self.price.to_dict() return _dict @classmethod @@ -98,17 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "amount_excluding_tax": obj.get("amount_excluding_tax"), - "period": NextInvoiceReplyLinePeriod.from_dict(obj["period"]) - if obj.get("period") is not None - else None, - "plan_nickname": obj.get("plan_nickname"), - "price": NextInvoiceReplyLinePrice.from_dict(obj["price"]) - if obj.get("price") is not None - else None, - "quantity": obj.get("quantity"), - } - ) + _obj = cls.model_validate({ + "amount_excluding_tax": obj.get("amount_excluding_tax"), + "period": NextInvoiceReplyLinePeriod.from_dict(obj["period"]) if obj.get("period") is not None else None, + "plan_nickname": obj.get("plan_nickname"), + "price": NextInvoiceReplyLinePrice.from_dict(obj["price"]) if obj.get("price") is not None else None, + "quantity": obj.get("quantity") + }) return _obj + + diff --git a/koyeb/api/models/next_invoice_reply_line_period.py b/koyeb/api/models/next_invoice_reply_line_period.py index 2ab5705c..df3334a7 100644 --- a/koyeb/api/models/next_invoice_reply_line_period.py +++ b/koyeb/api/models/next_invoice_reply_line_period.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NextInvoiceReplyLinePeriod(BaseModel): """ NextInvoiceReplyLinePeriod - """ # noqa: E501 - + """ # noqa: E501 start: Optional[datetime] = None end: Optional[datetime] = None __properties: ClassVar[List[str]] = ["start", "end"] @@ -41,6 +39,7 @@ class NextInvoiceReplyLinePeriod(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,5 +82,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"start": obj.get("start"), "end": obj.get("end")}) + _obj = cls.model_validate({ + "start": obj.get("start"), + "end": obj.get("end") + }) return _obj + + diff --git a/koyeb/api/models/next_invoice_reply_line_price.py b/koyeb/api/models/next_invoice_reply_line_price.py index f63eab5a..9ef340d7 100644 --- a/koyeb/api/models/next_invoice_reply_line_price.py +++ b/koyeb/api/models/next_invoice_reply_line_price.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NextInvoiceReplyLinePrice(BaseModel): """ NextInvoiceReplyLinePrice - """ # noqa: E501 - + """ # noqa: E501 unit_amount_decimal: Optional[Union[StrictFloat, StrictInt]] = None __properties: ClassVar[List[str]] = ["unit_amount_decimal"] @@ -39,6 +37,7 @@ class NextInvoiceReplyLinePrice(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,7 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"unit_amount_decimal": obj.get("unit_amount_decimal")} - ) + _obj = cls.model_validate({ + "unit_amount_decimal": obj.get("unit_amount_decimal") + }) return _obj + + diff --git a/koyeb/api/models/notification.py b/koyeb/api/models/notification.py index 8b9e9d16..28bf86c4 100644 --- a/koyeb/api/models/notification.py +++ b/koyeb/api/models/notification.py @@ -25,24 +25,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Notification(BaseModel): """ Notification - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None activity: Optional[Activity] = None is_read: Optional[StrictBool] = None is_seen: Optional[StrictBool] = None created_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = [ - "id", - "activity", - "is_read", - "is_seen", - "created_at", - ] + __properties: ClassVar[List[str]] = ["id", "activity", "is_read", "is_seen", "created_at"] model_config = ConfigDict( validate_by_name=True, @@ -51,6 +43,7 @@ class Notification(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of activity if self.activity: - _dict["activity"] = self.activity.to_dict() + _dict['activity'] = self.activity.to_dict() return _dict @classmethod @@ -95,15 +89,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "activity": Activity.from_dict(obj["activity"]) - if obj.get("activity") is not None - else None, - "is_read": obj.get("is_read"), - "is_seen": obj.get("is_seen"), - "created_at": obj.get("created_at"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "activity": Activity.from_dict(obj["activity"]) if obj.get("activity") is not None else None, + "is_read": obj.get("is_read"), + "is_seen": obj.get("is_seen"), + "created_at": obj.get("created_at") + }) return _obj + + diff --git a/koyeb/api/models/notification_list.py b/koyeb/api/models/notification_list.py index 6979e5a9..0509e421 100644 --- a/koyeb/api/models/notification_list.py +++ b/koyeb/api/models/notification_list.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NotificationList(BaseModel): """ NotificationList - """ # noqa: E501 - + """ # noqa: E501 notifications: Optional[List[Notification]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -38,16 +36,7 @@ class NotificationList(BaseModel): is_seen: Optional[StrictBool] = None unread: Optional[StrictInt] = None unseen: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = [ - "notifications", - "limit", - "offset", - "count", - "is_read", - "is_seen", - "unread", - "unseen", - ] + __properties: ClassVar[List[str]] = ["notifications", "limit", "offset", "count", "is_read", "is_seen", "unread", "unseen"] model_config = ConfigDict( validate_by_name=True, @@ -56,6 +45,7 @@ class NotificationList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -79,7 +69,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -90,12 +81,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.notifications: for _item_notifications in self.notifications: - _items.append( - _item_notifications.to_dict() - if _item_notifications is not None - else None - ) - _dict["notifications"] = _items + if _item_notifications: + _items.append(_item_notifications.to_dict()) + _dict['notifications'] = _items return _dict @classmethod @@ -107,20 +95,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "notifications": [ - Notification.from_dict(_item) for _item in obj["notifications"] - ] - if obj.get("notifications") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - "is_read": obj.get("is_read"), - "is_seen": obj.get("is_seen"), - "unread": obj.get("unread"), - "unseen": obj.get("unseen"), - } - ) + _obj = cls.model_validate({ + "notifications": [Notification.from_dict(_item) for _item in obj["notifications"]] if obj.get("notifications") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "is_read": obj.get("is_read"), + "is_seen": obj.get("is_seen"), + "unread": obj.get("unread"), + "unseen": obj.get("unseen") + }) return _obj + + diff --git a/koyeb/api/models/o_auth_callback_reply.py b/koyeb/api/models/o_auth_callback_reply.py index 122c6f01..0197c191 100644 --- a/koyeb/api/models/o_auth_callback_reply.py +++ b/koyeb/api/models/o_auth_callback_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class OAuthCallbackReply(BaseModel): """ OAuthCallbackReply - """ # noqa: E501 - + """ # noqa: E501 token: Optional[Token] = None __properties: ClassVar[List[str]] = ["token"] @@ -40,6 +38,7 @@ class OAuthCallbackReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of token if self.token: - _dict["token"] = self.token.to_dict() + _dict['token'] = self.token.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "token": Token.from_dict(obj["token"]) - if obj.get("token") is not None - else None - } - ) + _obj = cls.model_validate({ + "token": Token.from_dict(obj["token"]) if obj.get("token") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/o_auth_callback_request.py b/koyeb/api/models/o_auth_callback_request.py index 62512cc5..651da98e 100644 --- a/koyeb/api/models/o_auth_callback_request.py +++ b/koyeb/api/models/o_auth_callback_request.py @@ -23,28 +23,15 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class OAuthCallbackRequest(BaseModel): """ OAuthCallbackRequest - """ # noqa: E501 - + """ # noqa: E501 state: Optional[StrictStr] = None code: Optional[StrictStr] = None - setup_action: Optional[StrictStr] = Field( - default=None, - description="setup_action is populated in the context of a GitHub app installation request. For logins and signups, it is not set.", - ) - installation_id: Optional[StrictStr] = Field( - default=None, - description="installation_id is populated in the context of a GitHub app installation request. For logins and signups, it is not set.", - ) - __properties: ClassVar[List[str]] = [ - "state", - "code", - "setup_action", - "installation_id", - ] + setup_action: Optional[StrictStr] = Field(default=None, description="setup_action is populated in the context of a GitHub app installation request. For logins and signups, it is not set.") + installation_id: Optional[StrictStr] = Field(default=None, description="installation_id is populated in the context of a GitHub app installation request. For logins and signups, it is not set.") + __properties: ClassVar[List[str]] = ["state", "code", "setup_action", "installation_id"] model_config = ConfigDict( validate_by_name=True, @@ -53,6 +40,7 @@ class OAuthCallbackRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -76,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -94,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "state": obj.get("state"), - "code": obj.get("code"), - "setup_action": obj.get("setup_action"), - "installation_id": obj.get("installation_id"), - } - ) + _obj = cls.model_validate({ + "state": obj.get("state"), + "code": obj.get("code"), + "setup_action": obj.get("setup_action"), + "installation_id": obj.get("installation_id") + }) return _obj + + diff --git a/koyeb/api/models/o_auth_provider.py b/koyeb/api/models/o_auth_provider.py index 62da2980..5d3417f6 100644 --- a/koyeb/api/models/o_auth_provider.py +++ b/koyeb/api/models/o_auth_provider.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class OAuthProvider(BaseModel): """ OAuthProvider - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None url: Optional[StrictStr] = None state: Optional[StrictStr] = None @@ -41,6 +39,7 @@ class OAuthProvider(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,7 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"id": obj.get("id"), "url": obj.get("url"), "state": obj.get("state")} - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "url": obj.get("url"), + "state": obj.get("state") + }) return _obj + + diff --git a/koyeb/api/models/object.py b/koyeb/api/models/object.py index ae4edf2a..b89598e3 100644 --- a/koyeb/api/models/object.py +++ b/koyeb/api/models/object.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Object(BaseModel): """ Object - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None type: Optional[StrictStr] = None @@ -43,6 +41,7 @@ class Object(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,13 +84,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "type": obj.get("type"), - "metadata": obj.get("metadata"), - "deleted": obj.get("deleted"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "metadata": obj.get("metadata"), + "deleted": obj.get("deleted") + }) return _obj + + diff --git a/koyeb/api/models/organization.py b/koyeb/api/models/organization.py index 584f1b1c..5834e674 100644 --- a/koyeb/api/models/organization.py +++ b/koyeb/api/models/organization.py @@ -20,9 +20,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.organization_deactivation_reason import ( - OrganizationDeactivationReason, -) +from koyeb.api.models.organization_deactivation_reason import OrganizationDeactivationReason from koyeb.api.models.organization_detailed_status import OrganizationDetailedStatus from koyeb.api.models.organization_status import OrganizationStatus from koyeb.api.models.plan import Plan @@ -30,12 +28,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Organization(BaseModel): """ Organization - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None external_id: Optional[StrictStr] = None provisioning: Optional[StrictBool] = None @@ -58,12 +54,8 @@ class Organization(BaseModel): latest_subscription_id: Optional[StrictStr] = None signup_qualification: Optional[Dict[str, Any]] = None status: Optional[OrganizationStatus] = OrganizationStatus.WARNING - status_message: Optional[ - OrganizationDetailedStatus - ] = OrganizationDetailedStatus.NEW - deactivation_reason: Optional[ - OrganizationDeactivationReason - ] = OrganizationDeactivationReason.INVALID + status_message: Optional[OrganizationDetailedStatus] = OrganizationDetailedStatus.NEW + deactivation_reason: Optional[OrganizationDeactivationReason] = OrganizationDeactivationReason.INVALID verified: Optional[StrictBool] = None qualifies_for_hobby23: Optional[StrictBool] = None reprocess_after: Optional[datetime] = None @@ -72,40 +64,7 @@ class Organization(BaseModel): trial_ends_at: Optional[datetime] = None email_domain_allowlist: Optional[List[StrictStr]] = None default_project_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "external_id", - "provisioning", - "address1", - "address2", - "city", - "postal_code", - "state", - "country", - "company", - "vat_number", - "billing_name", - "billing_email", - "name", - "plan", - "plan_updated_at", - "has_payment_method", - "subscription_id", - "current_subscription_id", - "latest_subscription_id", - "signup_qualification", - "status", - "status_message", - "deactivation_reason", - "verified", - "qualifies_for_hobby23", - "reprocess_after", - "trialing", - "trial_starts_at", - "trial_ends_at", - "email_domain_allowlist", - "default_project_id", - ] + __properties: ClassVar[List[str]] = ["id", "external_id", "provisioning", "address1", "address2", "city", "postal_code", "state", "country", "company", "vat_number", "billing_name", "billing_email", "name", "plan", "plan_updated_at", "has_payment_method", "subscription_id", "current_subscription_id", "latest_subscription_id", "signup_qualification", "status", "status_message", "deactivation_reason", "verified", "qualifies_for_hobby23", "reprocess_after", "trialing", "trial_starts_at", "trial_ends_at", "email_domain_allowlist", "default_project_id"] model_config = ConfigDict( validate_by_name=True, @@ -114,6 +73,7 @@ class Organization(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -137,7 +97,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -155,46 +116,40 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "external_id": obj.get("external_id"), - "provisioning": obj.get("provisioning"), - "address1": obj.get("address1"), - "address2": obj.get("address2"), - "city": obj.get("city"), - "postal_code": obj.get("postal_code"), - "state": obj.get("state"), - "country": obj.get("country"), - "company": obj.get("company"), - "vat_number": obj.get("vat_number"), - "billing_name": obj.get("billing_name"), - "billing_email": obj.get("billing_email"), - "name": obj.get("name"), - "plan": obj.get("plan") if obj.get("plan") is not None else Plan.HOBBY, - "plan_updated_at": obj.get("plan_updated_at"), - "has_payment_method": obj.get("has_payment_method"), - "subscription_id": obj.get("subscription_id"), - "current_subscription_id": obj.get("current_subscription_id"), - "latest_subscription_id": obj.get("latest_subscription_id"), - "signup_qualification": obj.get("signup_qualification"), - "status": obj.get("status") - if obj.get("status") is not None - else OrganizationStatus.WARNING, - "status_message": obj.get("status_message") - if obj.get("status_message") is not None - else OrganizationDetailedStatus.NEW, - "deactivation_reason": obj.get("deactivation_reason") - if obj.get("deactivation_reason") is not None - else OrganizationDeactivationReason.INVALID, - "verified": obj.get("verified"), - "qualifies_for_hobby23": obj.get("qualifies_for_hobby23"), - "reprocess_after": obj.get("reprocess_after"), - "trialing": obj.get("trialing"), - "trial_starts_at": obj.get("trial_starts_at"), - "trial_ends_at": obj.get("trial_ends_at"), - "email_domain_allowlist": obj.get("email_domain_allowlist"), - "default_project_id": obj.get("default_project_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "external_id": obj.get("external_id"), + "provisioning": obj.get("provisioning"), + "address1": obj.get("address1"), + "address2": obj.get("address2"), + "city": obj.get("city"), + "postal_code": obj.get("postal_code"), + "state": obj.get("state"), + "country": obj.get("country"), + "company": obj.get("company"), + "vat_number": obj.get("vat_number"), + "billing_name": obj.get("billing_name"), + "billing_email": obj.get("billing_email"), + "name": obj.get("name"), + "plan": obj.get("plan") if obj.get("plan") is not None else Plan.HOBBY, + "plan_updated_at": obj.get("plan_updated_at"), + "has_payment_method": obj.get("has_payment_method"), + "subscription_id": obj.get("subscription_id"), + "current_subscription_id": obj.get("current_subscription_id"), + "latest_subscription_id": obj.get("latest_subscription_id"), + "signup_qualification": obj.get("signup_qualification"), + "status": obj.get("status") if obj.get("status") is not None else OrganizationStatus.WARNING, + "status_message": obj.get("status_message") if obj.get("status_message") is not None else OrganizationDetailedStatus.NEW, + "deactivation_reason": obj.get("deactivation_reason") if obj.get("deactivation_reason") is not None else OrganizationDeactivationReason.INVALID, + "verified": obj.get("verified"), + "qualifies_for_hobby23": obj.get("qualifies_for_hobby23"), + "reprocess_after": obj.get("reprocess_after"), + "trialing": obj.get("trialing"), + "trial_starts_at": obj.get("trial_starts_at"), + "trial_ends_at": obj.get("trial_ends_at"), + "email_domain_allowlist": obj.get("email_domain_allowlist"), + "default_project_id": obj.get("default_project_id") + }) return _obj + + diff --git a/koyeb/api/models/organization_deactivation_reason.py b/koyeb/api/models/organization_deactivation_reason.py index be4ea25b..f7c78f6e 100644 --- a/koyeb/api/models/organization_deactivation_reason.py +++ b/koyeb/api/models/organization_deactivation_reason.py @@ -26,14 +26,16 @@ class OrganizationDeactivationReason(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - REQUESTED_BY_OWNER = "REQUESTED_BY_OWNER" - SUBSCRIPTION_TERMINATION = "SUBSCRIPTION_TERMINATION" - LOCKED_BY_ADMIN = "LOCKED_BY_ADMIN" - VERIFICATION_FAILED = "VERIFICATION_FAILED" - TRIAL_DID_NOT_CONVERT = "TRIAL_DID_NOT_CONVERT" + INVALID = 'INVALID' + REQUESTED_BY_OWNER = 'REQUESTED_BY_OWNER' + SUBSCRIPTION_TERMINATION = 'SUBSCRIPTION_TERMINATION' + LOCKED_BY_ADMIN = 'LOCKED_BY_ADMIN' + VERIFICATION_FAILED = 'VERIFICATION_FAILED' + TRIAL_DID_NOT_CONVERT = 'TRIAL_DID_NOT_CONVERT' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of OrganizationDeactivationReason from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/organization_detailed_status.py b/koyeb/api/models/organization_detailed_status.py index 97152a5a..18a8ad08 100644 --- a/koyeb/api/models/organization_detailed_status.py +++ b/koyeb/api/models/organization_detailed_status.py @@ -26,18 +26,20 @@ class OrganizationDetailedStatus(str, Enum): """ allowed enum values """ - NEW = "NEW" - EMAIL_NOT_VALIDATED = "EMAIL_NOT_VALIDATED" - BILLING_INFO_MISSING = "BILLING_INFO_MISSING" - LOCKED = "LOCKED" - PAYMENT_FAILURE = "PAYMENT_FAILURE" - VALID = "VALID" - PENDING_VERIFICATION = "PENDING_VERIFICATION" - VERIFICATION_FAILED = "VERIFICATION_FAILED" - REVIEWING_ACCOUNT = "REVIEWING_ACCOUNT" - PLAN_UPGRADE_REQUIRED = "PLAN_UPGRADE_REQUIRED" + NEW = 'NEW' + EMAIL_NOT_VALIDATED = 'EMAIL_NOT_VALIDATED' + BILLING_INFO_MISSING = 'BILLING_INFO_MISSING' + LOCKED = 'LOCKED' + PAYMENT_FAILURE = 'PAYMENT_FAILURE' + VALID = 'VALID' + PENDING_VERIFICATION = 'PENDING_VERIFICATION' + VERIFICATION_FAILED = 'VERIFICATION_FAILED' + REVIEWING_ACCOUNT = 'REVIEWING_ACCOUNT' + PLAN_UPGRADE_REQUIRED = 'PLAN_UPGRADE_REQUIRED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of OrganizationDetailedStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/organization_invitation.py b/koyeb/api/models/organization_invitation.py index b9c4d5af..f1f45092 100644 --- a/koyeb/api/models/organization_invitation.py +++ b/koyeb/api/models/organization_invitation.py @@ -28,18 +28,14 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class OrganizationInvitation(BaseModel): """ OrganizationInvitation - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None email: Optional[StrictStr] = None role: Optional[UserRoleRole] = UserRoleRole.INVALID - status: Optional[ - OrganizationInvitationStatus - ] = OrganizationInvitationStatus.INVALID + status: Optional[OrganizationInvitationStatus] = OrganizationInvitationStatus.INVALID expires_at: Optional[datetime] = None organization_id: Optional[StrictStr] = None organization: Optional[PublicOrganization] = None @@ -47,19 +43,7 @@ class OrganizationInvitation(BaseModel): invitee: Optional[PublicUser] = None inviter_id: Optional[StrictStr] = None inviter: Optional[PublicUser] = None - __properties: ClassVar[List[str]] = [ - "id", - "email", - "role", - "status", - "expires_at", - "organization_id", - "organization", - "invitee_id", - "invitee", - "inviter_id", - "inviter", - ] + __properties: ClassVar[List[str]] = ["id", "email", "role", "status", "expires_at", "organization_id", "organization", "invitee_id", "invitee", "inviter_id", "inviter"] model_config = ConfigDict( validate_by_name=True, @@ -68,6 +52,7 @@ class OrganizationInvitation(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -91,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -100,13 +86,13 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() # override the default output from pydantic by calling `to_dict()` of invitee if self.invitee: - _dict["invitee"] = self.invitee.to_dict() + _dict['invitee'] = self.invitee.to_dict() # override the default output from pydantic by calling `to_dict()` of inviter if self.inviter: - _dict["inviter"] = self.inviter.to_dict() + _dict['inviter'] = self.inviter.to_dict() return _dict @classmethod @@ -118,29 +104,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "email": obj.get("email"), - "role": obj.get("role") - if obj.get("role") is not None - else UserRoleRole.INVALID, - "status": obj.get("status") - if obj.get("status") is not None - else OrganizationInvitationStatus.INVALID, - "expires_at": obj.get("expires_at"), - "organization_id": obj.get("organization_id"), - "organization": PublicOrganization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None, - "invitee_id": obj.get("invitee_id"), - "invitee": PublicUser.from_dict(obj["invitee"]) - if obj.get("invitee") is not None - else None, - "inviter_id": obj.get("inviter_id"), - "inviter": PublicUser.from_dict(obj["inviter"]) - if obj.get("inviter") is not None - else None, - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "email": obj.get("email"), + "role": obj.get("role") if obj.get("role") is not None else UserRoleRole.INVALID, + "status": obj.get("status") if obj.get("status") is not None else OrganizationInvitationStatus.INVALID, + "expires_at": obj.get("expires_at"), + "organization_id": obj.get("organization_id"), + "organization": PublicOrganization.from_dict(obj["organization"]) if obj.get("organization") is not None else None, + "invitee_id": obj.get("invitee_id"), + "invitee": PublicUser.from_dict(obj["invitee"]) if obj.get("invitee") is not None else None, + "inviter_id": obj.get("inviter_id"), + "inviter": PublicUser.from_dict(obj["inviter"]) if obj.get("inviter") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/organization_invitation_status.py b/koyeb/api/models/organization_invitation_status.py index 79b188ac..256fce22 100644 --- a/koyeb/api/models/organization_invitation_status.py +++ b/koyeb/api/models/organization_invitation_status.py @@ -26,13 +26,15 @@ class OrganizationInvitationStatus(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - PENDING = "PENDING" - ACCEPTED = "ACCEPTED" - REFUSED = "REFUSED" - EXPIRED = "EXPIRED" + INVALID = 'INVALID' + PENDING = 'PENDING' + ACCEPTED = 'ACCEPTED' + REFUSED = 'REFUSED' + EXPIRED = 'EXPIRED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of OrganizationInvitationStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/organization_member.py b/koyeb/api/models/organization_member.py index 1257ac7f..4946c2c0 100644 --- a/koyeb/api/models/organization_member.py +++ b/koyeb/api/models/organization_member.py @@ -28,12 +28,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class OrganizationMember(BaseModel): """ OrganizationMember - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None user_id: Optional[StrictStr] = None @@ -43,17 +41,7 @@ class OrganizationMember(BaseModel): status: Optional[OrganizationMemberStatus] = OrganizationMemberStatus.INVALID user: Optional[PublicUser] = None organization: Optional[PublicOrganization] = None - __properties: ClassVar[List[str]] = [ - "id", - "organization_id", - "user_id", - "external_id", - "joined_at", - "role", - "status", - "user", - "organization", - ] + __properties: ClassVar[List[str]] = ["id", "organization_id", "user_id", "external_id", "joined_at", "role", "status", "user", "organization"] model_config = ConfigDict( validate_by_name=True, @@ -62,6 +50,7 @@ class OrganizationMember(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -85,7 +74,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -94,10 +84,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of user if self.user: - _dict["user"] = self.user.to_dict() + _dict['user'] = self.user.to_dict() # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -109,25 +99,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "organization_id": obj.get("organization_id"), - "user_id": obj.get("user_id"), - "external_id": obj.get("external_id"), - "joined_at": obj.get("joined_at"), - "role": obj.get("role") - if obj.get("role") is not None - else UserRoleRole.INVALID, - "status": obj.get("status") - if obj.get("status") is not None - else OrganizationMemberStatus.INVALID, - "user": PublicUser.from_dict(obj["user"]) - if obj.get("user") is not None - else None, - "organization": PublicOrganization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None, - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "user_id": obj.get("user_id"), + "external_id": obj.get("external_id"), + "joined_at": obj.get("joined_at"), + "role": obj.get("role") if obj.get("role") is not None else UserRoleRole.INVALID, + "status": obj.get("status") if obj.get("status") is not None else OrganizationMemberStatus.INVALID, + "user": PublicUser.from_dict(obj["user"]) if obj.get("user") is not None else None, + "organization": PublicOrganization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/organization_member_status.py b/koyeb/api/models/organization_member_status.py index a3c3dfcf..eb1a7f38 100644 --- a/koyeb/api/models/organization_member_status.py +++ b/koyeb/api/models/organization_member_status.py @@ -26,11 +26,13 @@ class OrganizationMemberStatus(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - ACTIVE = "ACTIVE" - DELETED = "DELETED" + INVALID = 'INVALID' + ACTIVE = 'ACTIVE' + DELETED = 'DELETED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of OrganizationMemberStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/organization_status.py b/koyeb/api/models/organization_status.py index 7b71ec15..b8b6c050 100644 --- a/koyeb/api/models/organization_status.py +++ b/koyeb/api/models/organization_status.py @@ -26,15 +26,17 @@ class OrganizationStatus(str, Enum): """ allowed enum values """ - WARNING = "WARNING" - LOCKED = "LOCKED" - ACTIVE = "ACTIVE" - DEACTIVATING = "DEACTIVATING" - DEACTIVATED = "DEACTIVATED" - DELETING = "DELETING" - DELETED = "DELETED" + WARNING = 'WARNING' + LOCKED = 'LOCKED' + ACTIVE = 'ACTIVE' + DEACTIVATING = 'DEACTIVATING' + DEACTIVATED = 'DEACTIVATED' + DELETING = 'DELETING' + DELETED = 'DELETED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of OrganizationStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/organization_summary.py b/koyeb/api/models/organization_summary.py index d237d808..bc47cc7e 100644 --- a/koyeb/api/models/organization_summary.py +++ b/koyeb/api/models/organization_summary.py @@ -30,12 +30,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class OrganizationSummary(BaseModel): """ OrganizationSummary - """ # noqa: E501 - + """ # noqa: E501 organization_id: Optional[StrictStr] = None instances: Optional[InstancesSummary] = None apps: Optional[AppsSummary] = None @@ -44,16 +42,7 @@ class OrganizationSummary(BaseModel): secrets: Optional[SecretsSummary] = None neon_postgres: Optional[NeonPostgresSummary] = None members: Optional[MembersSummary] = None - __properties: ClassVar[List[str]] = [ - "organization_id", - "instances", - "apps", - "services", - "domains", - "secrets", - "neon_postgres", - "members", - ] + __properties: ClassVar[List[str]] = ["organization_id", "instances", "apps", "services", "domains", "secrets", "neon_postgres", "members"] model_config = ConfigDict( validate_by_name=True, @@ -62,6 +51,7 @@ class OrganizationSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -85,7 +75,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -94,32 +85,29 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of instances if self.instances: - _dict["instances"] = self.instances.to_dict() + _dict['instances'] = self.instances.to_dict() # override the default output from pydantic by calling `to_dict()` of apps if self.apps: - _dict["apps"] = self.apps.to_dict() + _dict['apps'] = self.apps.to_dict() # override the default output from pydantic by calling `to_dict()` of each value in services (dict) _field_dict = {} if self.services: for _key_services in self.services: - _field_dict[_key_services] = ( - self.services[_key_services].to_dict() - if self.services[_key_services] is not None - else None - ) - _dict["services"] = _field_dict + if self.services[_key_services]: + _field_dict[_key_services] = self.services[_key_services].to_dict() + _dict['services'] = _field_dict # override the default output from pydantic by calling `to_dict()` of domains if self.domains: - _dict["domains"] = self.domains.to_dict() + _dict['domains'] = self.domains.to_dict() # override the default output from pydantic by calling `to_dict()` of secrets if self.secrets: - _dict["secrets"] = self.secrets.to_dict() + _dict['secrets'] = self.secrets.to_dict() # override the default output from pydantic by calling `to_dict()` of neon_postgres if self.neon_postgres: - _dict["neon_postgres"] = self.neon_postgres.to_dict() + _dict['neon_postgres'] = self.neon_postgres.to_dict() # override the default output from pydantic by calling `to_dict()` of members if self.members: - _dict["members"] = self.members.to_dict() + _dict['members'] = self.members.to_dict() return _dict @classmethod @@ -131,33 +119,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization_id": obj.get("organization_id"), - "instances": InstancesSummary.from_dict(obj["instances"]) - if obj.get("instances") is not None - else None, - "apps": AppsSummary.from_dict(obj["apps"]) - if obj.get("apps") is not None - else None, - "services": dict( - (_k, ServiceSummary.from_dict(_v)) - for _k, _v in obj["services"].items() - ) - if obj.get("services") is not None - else None, - "domains": DomainsSummary.from_dict(obj["domains"]) - if obj.get("domains") is not None - else None, - "secrets": SecretsSummary.from_dict(obj["secrets"]) - if obj.get("secrets") is not None - else None, - "neon_postgres": NeonPostgresSummary.from_dict(obj["neon_postgres"]) - if obj.get("neon_postgres") is not None - else None, - "members": MembersSummary.from_dict(obj["members"]) - if obj.get("members") is not None - else None, - } - ) + _obj = cls.model_validate({ + "organization_id": obj.get("organization_id"), + "instances": InstancesSummary.from_dict(obj["instances"]) if obj.get("instances") is not None else None, + "apps": AppsSummary.from_dict(obj["apps"]) if obj.get("apps") is not None else None, + "services": dict( + (_k, ServiceSummary.from_dict(_v)) + for _k, _v in obj["services"].items() + ) + if obj.get("services") is not None + else None, + "domains": DomainsSummary.from_dict(obj["domains"]) if obj.get("domains") is not None else None, + "secrets": SecretsSummary.from_dict(obj["secrets"]) if obj.get("secrets") is not None else None, + "neon_postgres": NeonPostgresSummary.from_dict(obj["neon_postgres"]) if obj.get("neon_postgres") is not None else None, + "members": MembersSummary.from_dict(obj["members"]) if obj.get("members") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/payment_method.py b/koyeb/api/models/payment_method.py index 37b752cb..02fed602 100644 --- a/koyeb/api/models/payment_method.py +++ b/koyeb/api/models/payment_method.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PaymentMethod(BaseModel): """ PaymentMethod - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -52,29 +50,7 @@ class PaymentMethod(BaseModel): card_last_digits: Optional[StrictStr] = None card_expiration_month: Optional[StrictInt] = None card_expiration_year: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "updated_at", - "version", - "organization_id", - "type", - "provider", - "status", - "messages", - "stripe_payment_method_id", - "authorization_verified_at", - "authorization_canceled_at", - "authorization_stripe_payment_intent_id", - "authorization_stripe_payment_intent_client_secret", - "card_brand", - "card_country", - "card_funding", - "card_fingerprint", - "card_last_digits", - "card_expiration_month", - "card_expiration_year", - ] + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "version", "organization_id", "type", "provider", "status", "messages", "stripe_payment_method_id", "authorization_verified_at", "authorization_canceled_at", "authorization_stripe_payment_intent_id", "authorization_stripe_payment_intent_client_secret", "card_brand", "card_country", "card_funding", "card_fingerprint", "card_last_digits", "card_expiration_month", "card_expiration_year"] model_config = ConfigDict( validate_by_name=True, @@ -83,6 +59,7 @@ class PaymentMethod(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -106,7 +83,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -124,35 +102,29 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "version": obj.get("version"), - "organization_id": obj.get("organization_id"), - "type": obj.get("type"), - "provider": obj.get("provider"), - "status": obj.get("status") - if obj.get("status") is not None - else PaymentMethodStatus.INVALID, - "messages": obj.get("messages"), - "stripe_payment_method_id": obj.get("stripe_payment_method_id"), - "authorization_verified_at": obj.get("authorization_verified_at"), - "authorization_canceled_at": obj.get("authorization_canceled_at"), - "authorization_stripe_payment_intent_id": obj.get( - "authorization_stripe_payment_intent_id" - ), - "authorization_stripe_payment_intent_client_secret": obj.get( - "authorization_stripe_payment_intent_client_secret" - ), - "card_brand": obj.get("card_brand"), - "card_country": obj.get("card_country"), - "card_funding": obj.get("card_funding"), - "card_fingerprint": obj.get("card_fingerprint"), - "card_last_digits": obj.get("card_last_digits"), - "card_expiration_month": obj.get("card_expiration_month"), - "card_expiration_year": obj.get("card_expiration_year"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "version": obj.get("version"), + "organization_id": obj.get("organization_id"), + "type": obj.get("type"), + "provider": obj.get("provider"), + "status": obj.get("status") if obj.get("status") is not None else PaymentMethodStatus.INVALID, + "messages": obj.get("messages"), + "stripe_payment_method_id": obj.get("stripe_payment_method_id"), + "authorization_verified_at": obj.get("authorization_verified_at"), + "authorization_canceled_at": obj.get("authorization_canceled_at"), + "authorization_stripe_payment_intent_id": obj.get("authorization_stripe_payment_intent_id"), + "authorization_stripe_payment_intent_client_secret": obj.get("authorization_stripe_payment_intent_client_secret"), + "card_brand": obj.get("card_brand"), + "card_country": obj.get("card_country"), + "card_funding": obj.get("card_funding"), + "card_fingerprint": obj.get("card_fingerprint"), + "card_last_digits": obj.get("card_last_digits"), + "card_expiration_month": obj.get("card_expiration_month"), + "card_expiration_year": obj.get("card_expiration_year") + }) return _obj + + diff --git a/koyeb/api/models/payment_method_status.py b/koyeb/api/models/payment_method_status.py index 23137302..bb5f4d84 100644 --- a/koyeb/api/models/payment_method_status.py +++ b/koyeb/api/models/payment_method_status.py @@ -26,15 +26,17 @@ class PaymentMethodStatus(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - CREATED = "CREATED" - AUTHORIZED = "AUTHORIZED" - DECLINED = "DECLINED" - CANCELED = "CANCELED" - EXPIRED = "EXPIRED" - UNCHECKED = "UNCHECKED" + INVALID = 'INVALID' + CREATED = 'CREATED' + AUTHORIZED = 'AUTHORIZED' + DECLINED = 'DECLINED' + CANCELED = 'CANCELED' + EXPIRED = 'EXPIRED' + UNCHECKED = 'UNCHECKED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of PaymentMethodStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/period_usage.py b/koyeb/api/models/period_usage.py index 9fe502df..1b9d80cf 100644 --- a/koyeb/api/models/period_usage.py +++ b/koyeb/api/models/period_usage.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PeriodUsage(BaseModel): """ PeriodUsage - """ # noqa: E501 - + """ # noqa: E501 starting_time: Optional[datetime] = None ending_time: Optional[datetime] = None apps: Optional[List[AppUsage]] = None @@ -43,6 +41,7 @@ class PeriodUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,8 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.apps: for _item_apps in self.apps: - _items.append(_item_apps.to_dict() if _item_apps is not None else None) - _dict["apps"] = _items + if _item_apps: + _items.append(_item_apps.to_dict()) + _dict['apps'] = _items return _dict @classmethod @@ -90,13 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "starting_time": obj.get("starting_time"), - "ending_time": obj.get("ending_time"), - "apps": [AppUsage.from_dict(_item) for _item in obj["apps"]] - if obj.get("apps") is not None - else None, - } - ) + _obj = cls.model_validate({ + "starting_time": obj.get("starting_time"), + "ending_time": obj.get("ending_time"), + "apps": [AppUsage.from_dict(_item) for _item in obj["apps"]] if obj.get("apps") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/persistent_volume.py b/koyeb/api/models/persistent_volume.py index 82522e1c..c2e8e742 100644 --- a/koyeb/api/models/persistent_volume.py +++ b/koyeb/api/models/persistent_volume.py @@ -20,20 +20,16 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.persistent_volume_backing_store import ( - PersistentVolumeBackingStore, -) +from koyeb.api.models.persistent_volume_backing_store import PersistentVolumeBackingStore from koyeb.api.models.persistent_volume_status import PersistentVolumeStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class PersistentVolume(BaseModel): """ PersistentVolume - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None snapshot_id: Optional[StrictStr] = None @@ -46,28 +42,9 @@ class PersistentVolume(BaseModel): read_only: Optional[StrictBool] = None max_size: Optional[StrictInt] = None cur_size: Optional[StrictInt] = None - status: Optional[ - PersistentVolumeStatus - ] = PersistentVolumeStatus.PERSISTENT_VOLUME_STATUS_INVALID - backing_store: Optional[ - PersistentVolumeBackingStore - ] = PersistentVolumeBackingStore.PERSISTENT_VOLUME_BACKING_STORE_INVALID - __properties: ClassVar[List[str]] = [ - "id", - "name", - "snapshot_id", - "created_at", - "updated_at", - "deleted_at", - "organization_id", - "service_id", - "region", - "read_only", - "max_size", - "cur_size", - "status", - "backing_store", - ] + status: Optional[PersistentVolumeStatus] = PersistentVolumeStatus.PERSISTENT_VOLUME_STATUS_INVALID + backing_store: Optional[PersistentVolumeBackingStore] = PersistentVolumeBackingStore.PERSISTENT_VOLUME_BACKING_STORE_INVALID + __properties: ClassVar[List[str]] = ["id", "name", "snapshot_id", "created_at", "updated_at", "deleted_at", "organization_id", "service_id", "region", "read_only", "max_size", "cur_size", "status", "backing_store"] model_config = ConfigDict( validate_by_name=True, @@ -76,6 +53,7 @@ class PersistentVolume(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -99,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -117,26 +96,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "snapshot_id": obj.get("snapshot_id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "deleted_at": obj.get("deleted_at"), - "organization_id": obj.get("organization_id"), - "service_id": obj.get("service_id"), - "region": obj.get("region"), - "read_only": obj.get("read_only"), - "max_size": obj.get("max_size"), - "cur_size": obj.get("cur_size"), - "status": obj.get("status") - if obj.get("status") is not None - else PersistentVolumeStatus.PERSISTENT_VOLUME_STATUS_INVALID, - "backing_store": obj.get("backing_store") - if obj.get("backing_store") is not None - else PersistentVolumeBackingStore.PERSISTENT_VOLUME_BACKING_STORE_INVALID, - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "snapshot_id": obj.get("snapshot_id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "deleted_at": obj.get("deleted_at"), + "organization_id": obj.get("organization_id"), + "service_id": obj.get("service_id"), + "region": obj.get("region"), + "read_only": obj.get("read_only"), + "max_size": obj.get("max_size"), + "cur_size": obj.get("cur_size"), + "status": obj.get("status") if obj.get("status") is not None else PersistentVolumeStatus.PERSISTENT_VOLUME_STATUS_INVALID, + "backing_store": obj.get("backing_store") if obj.get("backing_store") is not None else PersistentVolumeBackingStore.PERSISTENT_VOLUME_BACKING_STORE_INVALID + }) return _obj + + diff --git a/koyeb/api/models/persistent_volume_backing_store.py b/koyeb/api/models/persistent_volume_backing_store.py index b0b52db9..9f8a3494 100644 --- a/koyeb/api/models/persistent_volume_backing_store.py +++ b/koyeb/api/models/persistent_volume_backing_store.py @@ -26,12 +26,12 @@ class PersistentVolumeBackingStore(str, Enum): """ allowed enum values """ - PERSISTENT_VOLUME_BACKING_STORE_INVALID = "PERSISTENT_VOLUME_BACKING_STORE_INVALID" - PERSISTENT_VOLUME_BACKING_STORE_LOCAL_BLK = ( - "PERSISTENT_VOLUME_BACKING_STORE_LOCAL_BLK" - ) + PERSISTENT_VOLUME_BACKING_STORE_INVALID = 'PERSISTENT_VOLUME_BACKING_STORE_INVALID' + PERSISTENT_VOLUME_BACKING_STORE_LOCAL_BLK = 'PERSISTENT_VOLUME_BACKING_STORE_LOCAL_BLK' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of PersistentVolumeBackingStore from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/persistent_volume_event.py b/koyeb/api/models/persistent_volume_event.py index f04abe91..723404ea 100644 --- a/koyeb/api/models/persistent_volume_event.py +++ b/koyeb/api/models/persistent_volume_event.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PersistentVolumeEvent(BaseModel): """ PersistentVolumeEvent - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None when: Optional[datetime] = None organization_id: Optional[StrictStr] = None @@ -37,15 +35,7 @@ class PersistentVolumeEvent(BaseModel): type: Optional[StrictStr] = None message: Optional[StrictStr] = None metadata: Optional[Dict[str, Any]] = None - __properties: ClassVar[List[str]] = [ - "id", - "when", - "organization_id", - "persistent_volume_id", - "type", - "message", - "metadata", - ] + __properties: ClassVar[List[str]] = ["id", "when", "organization_id", "persistent_volume_id", "type", "message", "metadata"] model_config = ConfigDict( validate_by_name=True, @@ -54,6 +44,7 @@ class PersistentVolumeEvent(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -95,15 +87,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "when": obj.get("when"), - "organization_id": obj.get("organization_id"), - "persistent_volume_id": obj.get("persistent_volume_id"), - "type": obj.get("type"), - "message": obj.get("message"), - "metadata": obj.get("metadata"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "when": obj.get("when"), + "organization_id": obj.get("organization_id"), + "persistent_volume_id": obj.get("persistent_volume_id"), + "type": obj.get("type"), + "message": obj.get("message"), + "metadata": obj.get("metadata") + }) return _obj + + diff --git a/koyeb/api/models/persistent_volume_quotas.py b/koyeb/api/models/persistent_volume_quotas.py index d250f912..b33bb37d 100644 --- a/koyeb/api/models/persistent_volume_quotas.py +++ b/koyeb/api/models/persistent_volume_quotas.py @@ -23,28 +23,14 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PersistentVolumeQuotas(BaseModel): """ PersistentVolumeQuotas - """ # noqa: E501 - - max_total_size: Optional[StrictInt] = Field( - default=None, - description="MaxTotalSize for all volumes on a region (in Gigabyte / GB).", - ) - max_volume_size: Optional[StrictInt] = Field( - default=None, description="MaxVolumeSize for one volume (in Gigabyte / GB)." - ) - max_per_instance_size: Optional[StrictInt] = Field( - default=None, - description="MaxPerInstanceSize for all volumes on an instance (in Gigabyte / GB).", - ) - __properties: ClassVar[List[str]] = [ - "max_total_size", - "max_volume_size", - "max_per_instance_size", - ] + """ # noqa: E501 + max_total_size: Optional[StrictInt] = Field(default=None, description="MaxTotalSize for all volumes on a region (in Gigabyte / GB).") + max_volume_size: Optional[StrictInt] = Field(default=None, description="MaxVolumeSize for one volume (in Gigabyte / GB).") + max_per_instance_size: Optional[StrictInt] = Field(default=None, description="MaxPerInstanceSize for all volumes on an instance (in Gigabyte / GB).") + __properties: ClassVar[List[str]] = ["max_total_size", "max_volume_size", "max_per_instance_size"] model_config = ConfigDict( validate_by_name=True, @@ -53,6 +39,7 @@ class PersistentVolumeQuotas(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -76,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -94,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "max_total_size": obj.get("max_total_size"), - "max_volume_size": obj.get("max_volume_size"), - "max_per_instance_size": obj.get("max_per_instance_size"), - } - ) + _obj = cls.model_validate({ + "max_total_size": obj.get("max_total_size"), + "max_volume_size": obj.get("max_volume_size"), + "max_per_instance_size": obj.get("max_per_instance_size") + }) return _obj + + diff --git a/koyeb/api/models/persistent_volume_region_usage.py b/koyeb/api/models/persistent_volume_region_usage.py index 11ec76f7..62a5e0a0 100644 --- a/koyeb/api/models/persistent_volume_region_usage.py +++ b/koyeb/api/models/persistent_volume_region_usage.py @@ -23,20 +23,14 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PersistentVolumeRegionUsage(BaseModel): """ PersistentVolumeRegionUsage - """ # noqa: E501 - + """ # noqa: E501 region: Optional[StrictStr] = None total_size_gb_used: Optional[StrictInt] = None total_size_gb_limit: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = [ - "region", - "total_size_gb_used", - "total_size_gb_limit", - ] + __properties: ClassVar[List[str]] = ["region", "total_size_gb_used", "total_size_gb_limit"] model_config = ConfigDict( validate_by_name=True, @@ -45,6 +39,7 @@ class PersistentVolumeRegionUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -86,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "region": obj.get("region"), - "total_size_gb_used": obj.get("total_size_gb_used"), - "total_size_gb_limit": obj.get("total_size_gb_limit"), - } - ) + _obj = cls.model_validate({ + "region": obj.get("region"), + "total_size_gb_used": obj.get("total_size_gb_used"), + "total_size_gb_limit": obj.get("total_size_gb_limit") + }) return _obj + + diff --git a/koyeb/api/models/persistent_volume_status.py b/koyeb/api/models/persistent_volume_status.py index 3ad575e0..9e8fae12 100644 --- a/koyeb/api/models/persistent_volume_status.py +++ b/koyeb/api/models/persistent_volume_status.py @@ -26,14 +26,16 @@ class PersistentVolumeStatus(str, Enum): """ allowed enum values """ - PERSISTENT_VOLUME_STATUS_INVALID = "PERSISTENT_VOLUME_STATUS_INVALID" - PERSISTENT_VOLUME_STATUS_ATTACHED = "PERSISTENT_VOLUME_STATUS_ATTACHED" - PERSISTENT_VOLUME_STATUS_DETACHED = "PERSISTENT_VOLUME_STATUS_DETACHED" - PERSISTENT_VOLUME_STATUS_DELETING = "PERSISTENT_VOLUME_STATUS_DELETING" - PERSISTENT_VOLUME_STATUS_DELETED = "PERSISTENT_VOLUME_STATUS_DELETED" - PERSISTENT_VOLUME_STATUS_ARCHIVING = "PERSISTENT_VOLUME_STATUS_ARCHIVING" + PERSISTENT_VOLUME_STATUS_INVALID = 'PERSISTENT_VOLUME_STATUS_INVALID' + PERSISTENT_VOLUME_STATUS_ATTACHED = 'PERSISTENT_VOLUME_STATUS_ATTACHED' + PERSISTENT_VOLUME_STATUS_DETACHED = 'PERSISTENT_VOLUME_STATUS_DETACHED' + PERSISTENT_VOLUME_STATUS_DELETING = 'PERSISTENT_VOLUME_STATUS_DELETING' + PERSISTENT_VOLUME_STATUS_DELETED = 'PERSISTENT_VOLUME_STATUS_DELETED' + PERSISTENT_VOLUME_STATUS_ARCHIVING = 'PERSISTENT_VOLUME_STATUS_ARCHIVING' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of PersistentVolumeStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/plan.py b/koyeb/api/models/plan.py index 08b1384e..ea762666 100644 --- a/koyeb/api/models/plan.py +++ b/koyeb/api/models/plan.py @@ -26,20 +26,22 @@ class Plan(str, Enum): """ allowed enum values """ - HOBBY = "hobby" - STARTER = "starter" - STARTUP = "startup" - BUSINESS = "business" - ENTERPRISE = "enterprise" - INTERNAL = "internal" - HOBBY23 = "hobby23" - NO_PLAN = "no_plan" - PRO = "pro" - SCALE = "scale" - PARTNER_CSP = "partner_csp" - PARTNER_CSP_UNIT = "partner_csp_unit" + HOBBY = 'hobby' + STARTER = 'starter' + STARTUP = 'startup' + BUSINESS = 'business' + ENTERPRISE = 'enterprise' + INTERNAL = 'internal' + HOBBY23 = 'hobby23' + NO_PLAN = 'no_plan' + PRO = 'pro' + SCALE = 'scale' + PARTNER_CSP = 'partner_csp' + PARTNER_CSP_UNIT = 'partner_csp_unit' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of Plan from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/pool_claim.py b/koyeb/api/models/pool_claim.py index f1ff7511..79157fa0 100644 --- a/koyeb/api/models/pool_claim.py +++ b/koyeb/api/models/pool_claim.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PoolClaim(BaseModel): """ PoolClaim - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None pool_id: Optional[StrictStr] = None service_id: Optional[StrictStr] = None @@ -43,20 +41,7 @@ class PoolClaim(BaseModel): fulfilled_at: Optional[datetime] = None released_at: Optional[datetime] = None pool_generation: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "pool_id", - "service_id", - "request_id", - "status", - "organization_id", - "workspace_id", - "customer_id", - "created_at", - "fulfilled_at", - "released_at", - "pool_generation", - ] + __properties: ClassVar[List[str]] = ["id", "pool_id", "service_id", "request_id", "status", "organization_id", "workspace_id", "customer_id", "created_at", "fulfilled_at", "released_at", "pool_generation"] model_config = ConfigDict( validate_by_name=True, @@ -65,6 +50,7 @@ class PoolClaim(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -88,7 +74,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -106,22 +93,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "pool_id": obj.get("pool_id"), - "service_id": obj.get("service_id"), - "request_id": obj.get("request_id"), - "status": obj.get("status") - if obj.get("status") is not None - else PoolClaimStatus.UNSPECIFIED, - "organization_id": obj.get("organization_id"), - "workspace_id": obj.get("workspace_id"), - "customer_id": obj.get("customer_id"), - "created_at": obj.get("created_at"), - "fulfilled_at": obj.get("fulfilled_at"), - "released_at": obj.get("released_at"), - "pool_generation": obj.get("pool_generation"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "pool_id": obj.get("pool_id"), + "service_id": obj.get("service_id"), + "request_id": obj.get("request_id"), + "status": obj.get("status") if obj.get("status") is not None else PoolClaimStatus.UNSPECIFIED, + "organization_id": obj.get("organization_id"), + "workspace_id": obj.get("workspace_id"), + "customer_id": obj.get("customer_id"), + "created_at": obj.get("created_at"), + "fulfilled_at": obj.get("fulfilled_at"), + "released_at": obj.get("released_at"), + "pool_generation": obj.get("pool_generation") + }) return _obj + + diff --git a/koyeb/api/models/pool_claim_reply.py b/koyeb/api/models/pool_claim_reply.py index 208ec011..20cbcbcf 100644 --- a/koyeb/api/models/pool_claim_reply.py +++ b/koyeb/api/models/pool_claim_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PoolClaimReply(BaseModel): """ PoolClaimReply - """ # noqa: E501 - + """ # noqa: E501 claim_id: Optional[StrictStr] = None service_id: Optional[StrictStr] = None prewarmed: Optional[StrictBool] = None @@ -41,6 +39,7 @@ class PoolClaimReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "claim_id": obj.get("claim_id"), - "service_id": obj.get("service_id"), - "prewarmed": obj.get("prewarmed"), - } - ) + _obj = cls.model_validate({ + "claim_id": obj.get("claim_id"), + "service_id": obj.get("service_id"), + "prewarmed": obj.get("prewarmed") + }) return _obj + + diff --git a/koyeb/api/models/pool_claim_request.py b/koyeb/api/models/pool_claim_request.py index 9d2968cb..354f87bd 100644 --- a/koyeb/api/models/pool_claim_request.py +++ b/koyeb/api/models/pool_claim_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PoolClaimRequest(BaseModel): """ PoolClaimRequest - """ # noqa: E501 - + """ # noqa: E501 pool_id: Optional[StrictStr] = None request_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["pool_id", "request_id"] @@ -40,6 +38,7 @@ class PoolClaimRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"pool_id": obj.get("pool_id"), "request_id": obj.get("request_id")} - ) + _obj = cls.model_validate({ + "pool_id": obj.get("pool_id"), + "request_id": obj.get("request_id") + }) return _obj + + diff --git a/koyeb/api/models/pool_claim_status.py b/koyeb/api/models/pool_claim_status.py index b05f69b1..abefaa47 100644 --- a/koyeb/api/models/pool_claim_status.py +++ b/koyeb/api/models/pool_claim_status.py @@ -26,13 +26,15 @@ class PoolClaimStatus(str, Enum): """ allowed enum values """ - UNSPECIFIED = "UNSPECIFIED" - PENDING = "PENDING" - FULFILLED = "FULFILLED" - FAILED = "FAILED" - RELEASED = "RELEASED" + UNSPECIFIED = 'UNSPECIFIED' + PENDING = 'PENDING' + FULFILLED = 'FULFILLED' + FAILED = 'FAILED' + RELEASED = 'RELEASED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of PoolClaimStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/port.py b/koyeb/api/models/port.py index 6c990f5a..11bc010b 100644 --- a/koyeb/api/models/port.py +++ b/koyeb/api/models/port.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Port(BaseModel): """ Port - """ # noqa: E501 - + """ # noqa: E501 port: Optional[StrictInt] = None protocol: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["port", "protocol"] @@ -40,6 +38,7 @@ class Port(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"port": obj.get("port"), "protocol": obj.get("protocol")} - ) + _obj = cls.model_validate({ + "port": obj.get("port"), + "protocol": obj.get("protocol") + }) return _obj + + diff --git a/koyeb/api/models/private_registry_configuration.py b/koyeb/api/models/private_registry_configuration.py index 029aa86b..6d45b615 100644 --- a/koyeb/api/models/private_registry_configuration.py +++ b/koyeb/api/models/private_registry_configuration.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PrivateRegistryConfiguration(BaseModel): """ PrivateRegistryConfiguration - """ # noqa: E501 - + """ # noqa: E501 username: Optional[StrictStr] = None password: Optional[StrictStr] = None url: Optional[StrictStr] = None @@ -41,6 +39,7 @@ class PrivateRegistryConfiguration(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "username": obj.get("username"), - "password": obj.get("password"), - "url": obj.get("url"), - } - ) + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password"), + "url": obj.get("url") + }) return _obj + + diff --git a/koyeb/api/models/project.py b/koyeb/api/models/project.py index 2b0db6f3..4f244dc0 100644 --- a/koyeb/api/models/project.py +++ b/koyeb/api/models/project.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Project(BaseModel): """ Project - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None description: Optional[StrictStr] = None @@ -37,15 +35,7 @@ class Project(BaseModel): updated_at: Optional[datetime] = None created_at: Optional[datetime] = None service_count: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "name", - "description", - "organization_id", - "updated_at", - "created_at", - "service_count", - ] + __properties: ClassVar[List[str]] = ["id", "name", "description", "organization_id", "updated_at", "created_at", "service_count"] model_config = ConfigDict( validate_by_name=True, @@ -54,6 +44,7 @@ class Project(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -95,15 +87,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "description": obj.get("description"), - "organization_id": obj.get("organization_id"), - "updated_at": obj.get("updated_at"), - "created_at": obj.get("created_at"), - "service_count": obj.get("service_count"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "description": obj.get("description"), + "organization_id": obj.get("organization_id"), + "updated_at": obj.get("updated_at"), + "created_at": obj.get("created_at"), + "service_count": obj.get("service_count") + }) return _obj + + diff --git a/koyeb/api/models/proxy_port_protocol.py b/koyeb/api/models/proxy_port_protocol.py index 886bb3bc..3d253437 100644 --- a/koyeb/api/models/proxy_port_protocol.py +++ b/koyeb/api/models/proxy_port_protocol.py @@ -26,9 +26,11 @@ class ProxyPortProtocol(str, Enum): """ allowed enum values """ - TCP = "tcp" + TCP = 'tcp' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ProxyPortProtocol from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/public_organization.py b/koyeb/api/models/public_organization.py index 5629b08d..4a082ffc 100644 --- a/koyeb/api/models/public_organization.py +++ b/koyeb/api/models/public_organization.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PublicOrganization(BaseModel): """ PublicOrganization - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None plan: Optional[Plan] = Plan.HOBBY @@ -45,6 +43,7 @@ class PublicOrganization(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -86,15 +86,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "plan": obj.get("plan") if obj.get("plan") is not None else Plan.HOBBY, - "status": obj.get("status") - if obj.get("status") is not None - else OrganizationStatus.WARNING, - "external_id": obj.get("external_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "plan": obj.get("plan") if obj.get("plan") is not None else Plan.HOBBY, + "status": obj.get("status") if obj.get("status") is not None else OrganizationStatus.WARNING, + "external_id": obj.get("external_id") + }) return _obj + + diff --git a/koyeb/api/models/public_user.py b/koyeb/api/models/public_user.py index 7cc3859e..9a899158 100644 --- a/koyeb/api/models/public_user.py +++ b/koyeb/api/models/public_user.py @@ -23,26 +23,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PublicUser(BaseModel): """ PublicUser - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None email: Optional[StrictStr] = None name: Optional[StrictStr] = None avatar_url: Optional[StrictStr] = None github_id: Optional[StrictStr] = None github_user: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "email", - "name", - "avatar_url", - "github_id", - "github_user", - ] + __properties: ClassVar[List[str]] = ["id", "email", "name", "avatar_url", "github_id", "github_user"] model_config = ConfigDict( validate_by_name=True, @@ -51,6 +42,7 @@ class PublicUser(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -92,14 +85,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "email": obj.get("email"), - "name": obj.get("name"), - "avatar_url": obj.get("avatar_url"), - "github_id": obj.get("github_id"), - "github_user": obj.get("github_user"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "email": obj.get("email"), + "name": obj.get("name"), + "avatar_url": obj.get("avatar_url"), + "github_id": obj.get("github_id"), + "github_user": obj.get("github_user") + }) return _obj + + diff --git a/koyeb/api/models/query_logs_reply.py b/koyeb/api/models/query_logs_reply.py index 2411e9e0..22fc7ad6 100644 --- a/koyeb/api/models/query_logs_reply.py +++ b/koyeb/api/models/query_logs_reply.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class QueryLogsReply(BaseModel): """ QueryLogsReply - """ # noqa: E501 - + """ # noqa: E501 data: Optional[List[LogEntry]] = None pagination: Optional[QueryLogsReplyPagination] = None __properties: ClassVar[List[str]] = ["data", "pagination"] @@ -42,6 +40,7 @@ class QueryLogsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -76,11 +76,12 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.data: for _item_data in self.data: - _items.append(_item_data.to_dict() if _item_data is not None else None) - _dict["data"] = _items + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items # override the default output from pydantic by calling `to_dict()` of pagination if self.pagination: - _dict["pagination"] = self.pagination.to_dict() + _dict['pagination'] = self.pagination.to_dict() return _dict @classmethod @@ -92,14 +93,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "data": [LogEntry.from_dict(_item) for _item in obj["data"]] - if obj.get("data") is not None - else None, - "pagination": QueryLogsReplyPagination.from_dict(obj["pagination"]) - if obj.get("pagination") is not None - else None, - } - ) + _obj = cls.model_validate({ + "data": [LogEntry.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "pagination": QueryLogsReplyPagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/query_logs_reply_pagination.py b/koyeb/api/models/query_logs_reply_pagination.py index 3c478605..59a7151a 100644 --- a/koyeb/api/models/query_logs_reply_pagination.py +++ b/koyeb/api/models/query_logs_reply_pagination.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class QueryLogsReplyPagination(BaseModel): """ QueryLogsReplyPagination - """ # noqa: E501 - + """ # noqa: E501 has_more: Optional[StrictBool] = None next_start: Optional[datetime] = None next_end: Optional[datetime] = None @@ -42,6 +40,7 @@ class QueryLogsReplyPagination(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,11 +83,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "has_more": obj.get("has_more"), - "next_start": obj.get("next_start"), - "next_end": obj.get("next_end"), - } - ) + _obj = cls.model_validate({ + "has_more": obj.get("has_more"), + "next_start": obj.get("next_start"), + "next_end": obj.get("next_end") + }) return _obj + + diff --git a/koyeb/api/models/quota_usage.py b/koyeb/api/models/quota_usage.py index e285a0f9..850c35a2 100644 --- a/koyeb/api/models/quota_usage.py +++ b/koyeb/api/models/quota_usage.py @@ -26,12 +26,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class QuotaUsage(BaseModel): """ QuotaUsage carries an organization's current resource consumption alongside the corresponding plan limits (from the caller's InternalToken.Quotas). Paused services are included in services_used but excluded from memory / instances_by_type / proxy_ports totals, matching enforcement semantics. - """ # noqa: E501 - + """ # noqa: E501 apps_used: Optional[StrictInt] = None apps_limit: Optional[StrictInt] = None services_used: Optional[StrictInt] = None @@ -47,23 +45,7 @@ class QuotaUsage(BaseModel): instances_by_type: Optional[List[InstanceTypeUsage]] = None persistent_volumes_by_region: Optional[List[PersistentVolumeRegionUsage]] = None instance_snapshots_by_type: Optional[List[InstanceSnapshotTypeUsage]] = None - __properties: ClassVar[List[str]] = [ - "apps_used", - "apps_limit", - "services_used", - "services_limit", - "memory_mb_used", - "memory_mb_limit", - "custom_domains_used", - "custom_domains_limit", - "koyeb_lb_domains_used", - "koyeb_lb_domains_limit", - "proxy_ports_used", - "proxy_ports_limit", - "instances_by_type", - "persistent_volumes_by_region", - "instance_snapshots_by_type", - ] + __properties: ClassVar[List[str]] = ["apps_used", "apps_limit", "services_used", "services_limit", "memory_mb_used", "memory_mb_limit", "custom_domains_used", "custom_domains_limit", "koyeb_lb_domains_used", "koyeb_lb_domains_limit", "proxy_ports_used", "proxy_ports_limit", "instances_by_type", "persistent_volumes_by_region", "instance_snapshots_by_type"] model_config = ConfigDict( validate_by_name=True, @@ -72,6 +54,7 @@ class QuotaUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -95,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -106,32 +90,23 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.instances_by_type: for _item_instances_by_type in self.instances_by_type: - _items.append( - _item_instances_by_type.to_dict() - if _item_instances_by_type is not None - else None - ) - _dict["instances_by_type"] = _items + if _item_instances_by_type: + _items.append(_item_instances_by_type.to_dict()) + _dict['instances_by_type'] = _items # override the default output from pydantic by calling `to_dict()` of each item in persistent_volumes_by_region (list) _items = [] if self.persistent_volumes_by_region: for _item_persistent_volumes_by_region in self.persistent_volumes_by_region: - _items.append( - _item_persistent_volumes_by_region.to_dict() - if _item_persistent_volumes_by_region is not None - else None - ) - _dict["persistent_volumes_by_region"] = _items + if _item_persistent_volumes_by_region: + _items.append(_item_persistent_volumes_by_region.to_dict()) + _dict['persistent_volumes_by_region'] = _items # override the default output from pydantic by calling `to_dict()` of each item in instance_snapshots_by_type (list) _items = [] if self.instance_snapshots_by_type: for _item_instance_snapshots_by_type in self.instance_snapshots_by_type: - _items.append( - _item_instance_snapshots_by_type.to_dict() - if _item_instance_snapshots_by_type is not None - else None - ) - _dict["instance_snapshots_by_type"] = _items + if _item_instance_snapshots_by_type: + _items.append(_item_instance_snapshots_by_type.to_dict()) + _dict['instance_snapshots_by_type'] = _items return _dict @classmethod @@ -143,38 +118,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "apps_used": obj.get("apps_used"), - "apps_limit": obj.get("apps_limit"), - "services_used": obj.get("services_used"), - "services_limit": obj.get("services_limit"), - "memory_mb_used": obj.get("memory_mb_used"), - "memory_mb_limit": obj.get("memory_mb_limit"), - "custom_domains_used": obj.get("custom_domains_used"), - "custom_domains_limit": obj.get("custom_domains_limit"), - "koyeb_lb_domains_used": obj.get("koyeb_lb_domains_used"), - "koyeb_lb_domains_limit": obj.get("koyeb_lb_domains_limit"), - "proxy_ports_used": obj.get("proxy_ports_used"), - "proxy_ports_limit": obj.get("proxy_ports_limit"), - "instances_by_type": [ - InstanceTypeUsage.from_dict(_item) - for _item in obj["instances_by_type"] - ] - if obj.get("instances_by_type") is not None - else None, - "persistent_volumes_by_region": [ - PersistentVolumeRegionUsage.from_dict(_item) - for _item in obj["persistent_volumes_by_region"] - ] - if obj.get("persistent_volumes_by_region") is not None - else None, - "instance_snapshots_by_type": [ - InstanceSnapshotTypeUsage.from_dict(_item) - for _item in obj["instance_snapshots_by_type"] - ] - if obj.get("instance_snapshots_by_type") is not None - else None, - } - ) + _obj = cls.model_validate({ + "apps_used": obj.get("apps_used"), + "apps_limit": obj.get("apps_limit"), + "services_used": obj.get("services_used"), + "services_limit": obj.get("services_limit"), + "memory_mb_used": obj.get("memory_mb_used"), + "memory_mb_limit": obj.get("memory_mb_limit"), + "custom_domains_used": obj.get("custom_domains_used"), + "custom_domains_limit": obj.get("custom_domains_limit"), + "koyeb_lb_domains_used": obj.get("koyeb_lb_domains_used"), + "koyeb_lb_domains_limit": obj.get("koyeb_lb_domains_limit"), + "proxy_ports_used": obj.get("proxy_ports_used"), + "proxy_ports_limit": obj.get("proxy_ports_limit"), + "instances_by_type": [InstanceTypeUsage.from_dict(_item) for _item in obj["instances_by_type"]] if obj.get("instances_by_type") is not None else None, + "persistent_volumes_by_region": [PersistentVolumeRegionUsage.from_dict(_item) for _item in obj["persistent_volumes_by_region"]] if obj.get("persistent_volumes_by_region") is not None else None, + "instance_snapshots_by_type": [InstanceSnapshotTypeUsage.from_dict(_item) for _item in obj["instance_snapshots_by_type"]] if obj.get("instance_snapshots_by_type") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/quotas.py b/koyeb/api/models/quotas.py index 52f0fbf7..6e72a2bb 100644 --- a/koyeb/api/models/quotas.py +++ b/koyeb/api/models/quotas.py @@ -28,12 +28,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Quotas(BaseModel): """ Quotas - """ # noqa: E501 - + """ # noqa: E501 apps: Optional[StrictStr] = None services: Optional[StrictStr] = None domains: Optional[StrictStr] = None @@ -57,31 +55,7 @@ class Quotas(BaseModel): lifecycle: Optional[LifecycleQuotas] = None max_projects: Optional[StrictStr] = None instance_snapshots: Optional[InstanceSnapshotQuotas] = None - __properties: ClassVar[List[str]] = [ - "apps", - "services", - "domains", - "services_by_app", - "service_provisioning_concurrency", - "memory_mb", - "instance_types", - "regions", - "max_organization_members", - "max_instances_by_type", - "persistent_volumes_by_region", - "custom_domains", - "domains_load_balancer", - "metrics_retention", - "logs_retention", - "access_reserved_subdomains", - "proxy_ports", - "scale_to_zero", - "archives", - "archive_max_size_mb", - "lifecycle", - "max_projects", - "instance_snapshots", - ] + __properties: ClassVar[List[str]] = ["apps", "services", "domains", "services_by_app", "service_provisioning_concurrency", "memory_mb", "instance_types", "regions", "max_organization_members", "max_instances_by_type", "persistent_volumes_by_region", "custom_domains", "domains_load_balancer", "metrics_retention", "logs_retention", "access_reserved_subdomains", "proxy_ports", "scale_to_zero", "archives", "archive_max_size_mb", "lifecycle", "max_projects", "instance_snapshots"] model_config = ConfigDict( validate_by_name=True, @@ -90,6 +64,7 @@ class Quotas(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -113,7 +88,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -124,29 +100,21 @@ def to_dict(self) -> Dict[str, Any]: _field_dict = {} if self.persistent_volumes_by_region: for _key_persistent_volumes_by_region in self.persistent_volumes_by_region: - _field_dict[_key_persistent_volumes_by_region] = ( - self.persistent_volumes_by_region[ - _key_persistent_volumes_by_region - ].to_dict() - if self.persistent_volumes_by_region[ - _key_persistent_volumes_by_region - ] - is not None - else None - ) - _dict["persistent_volumes_by_region"] = _field_dict + if self.persistent_volumes_by_region[_key_persistent_volumes_by_region]: + _field_dict[_key_persistent_volumes_by_region] = self.persistent_volumes_by_region[_key_persistent_volumes_by_region].to_dict() + _dict['persistent_volumes_by_region'] = _field_dict # override the default output from pydantic by calling `to_dict()` of domains_load_balancer if self.domains_load_balancer: - _dict["domains_load_balancer"] = self.domains_load_balancer.to_dict() + _dict['domains_load_balancer'] = self.domains_load_balancer.to_dict() # override the default output from pydantic by calling `to_dict()` of scale_to_zero if self.scale_to_zero: - _dict["scale_to_zero"] = self.scale_to_zero.to_dict() + _dict['scale_to_zero'] = self.scale_to_zero.to_dict() # override the default output from pydantic by calling `to_dict()` of lifecycle if self.lifecycle: - _dict["lifecycle"] = self.lifecycle.to_dict() + _dict['lifecycle'] = self.lifecycle.to_dict() # override the default output from pydantic by calling `to_dict()` of instance_snapshots if self.instance_snapshots: - _dict["instance_snapshots"] = self.instance_snapshots.to_dict() + _dict['instance_snapshots'] = self.instance_snapshots.to_dict() return _dict @classmethod @@ -158,50 +126,36 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "apps": obj.get("apps"), - "services": obj.get("services"), - "domains": obj.get("domains"), - "services_by_app": obj.get("services_by_app"), - "service_provisioning_concurrency": obj.get( - "service_provisioning_concurrency" - ), - "memory_mb": obj.get("memory_mb"), - "instance_types": obj.get("instance_types"), - "regions": obj.get("regions"), - "max_organization_members": obj.get("max_organization_members"), - "max_instances_by_type": obj.get("max_instances_by_type"), - "persistent_volumes_by_region": dict( - (_k, PersistentVolumeQuotas.from_dict(_v)) - for _k, _v in obj["persistent_volumes_by_region"].items() - ) - if obj.get("persistent_volumes_by_region") is not None - else None, - "custom_domains": obj.get("custom_domains"), - "domains_load_balancer": DomainLoadBalancerQuotas.from_dict( - obj["domains_load_balancer"] - ) - if obj.get("domains_load_balancer") is not None - else None, - "metrics_retention": obj.get("metrics_retention"), - "logs_retention": obj.get("logs_retention"), - "access_reserved_subdomains": obj.get("access_reserved_subdomains"), - "proxy_ports": obj.get("proxy_ports"), - "scale_to_zero": ScaleToZeroQuotas.from_dict(obj["scale_to_zero"]) - if obj.get("scale_to_zero") is not None - else None, - "archives": obj.get("archives"), - "archive_max_size_mb": obj.get("archive_max_size_mb"), - "lifecycle": LifecycleQuotas.from_dict(obj["lifecycle"]) - if obj.get("lifecycle") is not None - else None, - "max_projects": obj.get("max_projects"), - "instance_snapshots": InstanceSnapshotQuotas.from_dict( - obj["instance_snapshots"] - ) - if obj.get("instance_snapshots") is not None - else None, - } - ) + _obj = cls.model_validate({ + "apps": obj.get("apps"), + "services": obj.get("services"), + "domains": obj.get("domains"), + "services_by_app": obj.get("services_by_app"), + "service_provisioning_concurrency": obj.get("service_provisioning_concurrency"), + "memory_mb": obj.get("memory_mb"), + "instance_types": obj.get("instance_types"), + "regions": obj.get("regions"), + "max_organization_members": obj.get("max_organization_members"), + "max_instances_by_type": obj.get("max_instances_by_type"), + "persistent_volumes_by_region": dict( + (_k, PersistentVolumeQuotas.from_dict(_v)) + for _k, _v in obj["persistent_volumes_by_region"].items() + ) + if obj.get("persistent_volumes_by_region") is not None + else None, + "custom_domains": obj.get("custom_domains"), + "domains_load_balancer": DomainLoadBalancerQuotas.from_dict(obj["domains_load_balancer"]) if obj.get("domains_load_balancer") is not None else None, + "metrics_retention": obj.get("metrics_retention"), + "logs_retention": obj.get("logs_retention"), + "access_reserved_subdomains": obj.get("access_reserved_subdomains"), + "proxy_ports": obj.get("proxy_ports"), + "scale_to_zero": ScaleToZeroQuotas.from_dict(obj["scale_to_zero"]) if obj.get("scale_to_zero") is not None else None, + "archives": obj.get("archives"), + "archive_max_size_mb": obj.get("archive_max_size_mb"), + "lifecycle": LifecycleQuotas.from_dict(obj["lifecycle"]) if obj.get("lifecycle") is not None else None, + "max_projects": obj.get("max_projects"), + "instance_snapshots": InstanceSnapshotQuotas.from_dict(obj["instance_snapshots"]) if obj.get("instance_snapshots") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/reactivate_organization_reply.py b/koyeb/api/models/reactivate_organization_reply.py index 3788e5d0..40f753e0 100644 --- a/koyeb/api/models/reactivate_organization_reply.py +++ b/koyeb/api/models/reactivate_organization_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ReactivateOrganizationReply(BaseModel): """ ReactivateOrganizationReply - """ # noqa: E501 - + """ # noqa: E501 organization: Optional[Organization] = None __properties: ClassVar[List[str]] = ["organization"] @@ -40,6 +38,7 @@ class ReactivateOrganizationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization": Organization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None - } - ) + _obj = cls.model_validate({ + "organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/redeem_coupon_request.py b/koyeb/api/models/redeem_coupon_request.py index 724890fd..08156d17 100644 --- a/koyeb/api/models/redeem_coupon_request.py +++ b/koyeb/api/models/redeem_coupon_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RedeemCouponRequest(BaseModel): """ RedeemCouponRequest - """ # noqa: E501 - + """ # noqa: E501 code: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["code"] @@ -39,6 +37,7 @@ class RedeemCouponRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"code": obj.get("code")}) + _obj = cls.model_validate({ + "code": obj.get("code") + }) return _obj + + diff --git a/koyeb/api/models/redeploy_reply.py b/koyeb/api/models/redeploy_reply.py index c6329bdb..a20ca871 100644 --- a/koyeb/api/models/redeploy_reply.py +++ b/koyeb/api/models/redeploy_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RedeployReply(BaseModel): """ RedeployReply - """ # noqa: E501 - + """ # noqa: E501 deployment: Optional[Deployment] = None __properties: ClassVar[List[str]] = ["deployment"] @@ -40,6 +38,7 @@ class RedeployReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of deployment if self.deployment: - _dict["deployment"] = self.deployment.to_dict() + _dict['deployment'] = self.deployment.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "deployment": Deployment.from_dict(obj["deployment"]) - if obj.get("deployment") is not None - else None - } - ) + _obj = cls.model_validate({ + "deployment": Deployment.from_dict(obj["deployment"]) if obj.get("deployment") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/redeploy_request_info.py b/koyeb/api/models/redeploy_request_info.py index 6889b0c3..1f606e7a 100644 --- a/koyeb/api/models/redeploy_request_info.py +++ b/koyeb/api/models/redeploy_request_info.py @@ -23,25 +23,15 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RedeployRequestInfo(BaseModel): """ RedeployRequestInfo - """ # noqa: E501 - + """ # noqa: E501 deployment_group: Optional[StrictStr] = None sha: Optional[StrictStr] = None use_cache: Optional[StrictBool] = None - skip_build: Optional[StrictBool] = Field( - default=None, - description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened.", - ) - __properties: ClassVar[List[str]] = [ - "deployment_group", - "sha", - "use_cache", - "skip_build", - ] + skip_build: Optional[StrictBool] = Field(default=None, description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened.") + __properties: ClassVar[List[str]] = ["deployment_group", "sha", "use_cache", "skip_build"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +40,7 @@ class RedeployRequestInfo(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -91,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "deployment_group": obj.get("deployment_group"), - "sha": obj.get("sha"), - "use_cache": obj.get("use_cache"), - "skip_build": obj.get("skip_build"), - } - ) + _obj = cls.model_validate({ + "deployment_group": obj.get("deployment_group"), + "sha": obj.get("sha"), + "use_cache": obj.get("use_cache"), + "skip_build": obj.get("skip_build") + }) return _obj + + diff --git a/koyeb/api/models/region.py b/koyeb/api/models/region.py index da918102..7af81cd7 100644 --- a/koyeb/api/models/region.py +++ b/koyeb/api/models/region.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Region(BaseModel): """ Region - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None coordinates: Optional[List[StrictStr]] = None @@ -36,20 +34,8 @@ class Region(BaseModel): instances: Optional[List[StrictStr]] = None datacenters: Optional[List[StrictStr]] = None volumes_enabled: Optional[StrictBool] = None - scope: Optional[StrictStr] = Field( - default=None, - description="The scope of the region, continent, metropolitan area, etc.", - ) - __properties: ClassVar[List[str]] = [ - "id", - "name", - "coordinates", - "status", - "instances", - "datacenters", - "volumes_enabled", - "scope", - ] + scope: Optional[StrictStr] = Field(default=None, description="The scope of the region, continent, metropolitan area, etc.") + __properties: ClassVar[List[str]] = ["id", "name", "coordinates", "status", "instances", "datacenters", "volumes_enabled", "scope"] model_config = ConfigDict( validate_by_name=True, @@ -58,6 +44,7 @@ class Region(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -81,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -99,16 +87,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "coordinates": obj.get("coordinates"), - "status": obj.get("status"), - "instances": obj.get("instances"), - "datacenters": obj.get("datacenters"), - "volumes_enabled": obj.get("volumes_enabled"), - "scope": obj.get("scope"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "coordinates": obj.get("coordinates"), + "status": obj.get("status"), + "instances": obj.get("instances"), + "datacenters": obj.get("datacenters"), + "volumes_enabled": obj.get("volumes_enabled"), + "scope": obj.get("scope") + }) return _obj + + diff --git a/koyeb/api/models/region_availability.py b/koyeb/api/models/region_availability.py index 2e379153..3867e2f3 100644 --- a/koyeb/api/models/region_availability.py +++ b/koyeb/api/models/region_availability.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RegionAvailability(BaseModel): """ RegionAvailability - """ # noqa: E501 - + """ # noqa: E501 availability: Optional[AvailabilityLevel] = AvailabilityLevel.UNKNOWN __properties: ClassVar[List[str]] = ["availability"] @@ -40,6 +38,7 @@ class RegionAvailability(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,11 +81,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "availability": obj.get("availability") - if obj.get("availability") is not None - else AvailabilityLevel.UNKNOWN - } - ) + _obj = cls.model_validate({ + "availability": obj.get("availability") if obj.get("availability") is not None else AvailabilityLevel.UNKNOWN + }) return _obj + + diff --git a/koyeb/api/models/region_list_item.py b/koyeb/api/models/region_list_item.py index fc808a2f..2e407704 100644 --- a/koyeb/api/models/region_list_item.py +++ b/koyeb/api/models/region_list_item.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RegionListItem(BaseModel): """ RegionListItem - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None coordinates: Optional[List[StrictStr]] = None @@ -36,20 +34,8 @@ class RegionListItem(BaseModel): instances: Optional[List[StrictStr]] = None datacenters: Optional[List[StrictStr]] = None volumes_enabled: Optional[StrictBool] = None - scope: Optional[StrictStr] = Field( - default=None, - description="The scope of the region, continent, metropolitan area, etc.", - ) - __properties: ClassVar[List[str]] = [ - "id", - "name", - "coordinates", - "status", - "instances", - "datacenters", - "volumes_enabled", - "scope", - ] + scope: Optional[StrictStr] = Field(default=None, description="The scope of the region, continent, metropolitan area, etc.") + __properties: ClassVar[List[str]] = ["id", "name", "coordinates", "status", "instances", "datacenters", "volumes_enabled", "scope"] model_config = ConfigDict( validate_by_name=True, @@ -58,6 +44,7 @@ class RegionListItem(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -81,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -99,16 +87,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "coordinates": obj.get("coordinates"), - "status": obj.get("status"), - "instances": obj.get("instances"), - "datacenters": obj.get("datacenters"), - "volumes_enabled": obj.get("volumes_enabled"), - "scope": obj.get("scope"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "coordinates": obj.get("coordinates"), + "status": obj.get("status"), + "instances": obj.get("instances"), + "datacenters": obj.get("datacenters"), + "volumes_enabled": obj.get("volumes_enabled"), + "scope": obj.get("scope") + }) return _obj + + diff --git a/koyeb/api/models/region_usage.py b/koyeb/api/models/region_usage.py index b7cc5efb..a0aa8343 100644 --- a/koyeb/api/models/region_usage.py +++ b/koyeb/api/models/region_usage.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RegionUsage(BaseModel): """ RegionUsage - """ # noqa: E501 - + """ # noqa: E501 instances: Optional[Dict[str, InstanceUsage]] = None __properties: ClassVar[List[str]] = ["instances"] @@ -40,6 +38,7 @@ class RegionUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,12 +74,9 @@ def to_dict(self) -> Dict[str, Any]: _field_dict = {} if self.instances: for _key_instances in self.instances: - _field_dict[_key_instances] = ( - self.instances[_key_instances].to_dict() - if self.instances[_key_instances] is not None - else None - ) - _dict["instances"] = _field_dict + if self.instances[_key_instances]: + _field_dict[_key_instances] = self.instances[_key_instances].to_dict() + _dict['instances'] = _field_dict return _dict @classmethod @@ -91,14 +88,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instances": dict( - (_k, InstanceUsage.from_dict(_v)) - for _k, _v in obj["instances"].items() - ) - if obj.get("instances") is not None - else None - } - ) + _obj = cls.model_validate({ + "instances": dict( + (_k, InstanceUsage.from_dict(_v)) + for _k, _v in obj["instances"].items() + ) + if obj.get("instances") is not None + else None + }) return _obj + + diff --git a/koyeb/api/models/regional_deployment.py b/koyeb/api/models/regional_deployment.py index a9ec23a7..78c58023 100644 --- a/koyeb/api/models/regional_deployment.py +++ b/koyeb/api/models/regional_deployment.py @@ -28,12 +28,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RegionalDeployment(BaseModel): """ RegionalDeployment - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -59,33 +57,7 @@ class RegionalDeployment(BaseModel): version: Optional[StrictStr] = None deployment_group: Optional[StrictStr] = None deployment_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "updated_at", - "scheduled_at", - "allocated_at", - "started_at", - "succeeded_at", - "terminated_at", - "organization_id", - "app_id", - "service_id", - "region", - "parent_id", - "child_id", - "status", - "messages", - "definition", - "datacenters", - "metadata", - "provisioning_info", - "role", - "instance_snapshot_id", - "version", - "deployment_group", - "deployment_id", - ] + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "scheduled_at", "allocated_at", "started_at", "succeeded_at", "terminated_at", "organization_id", "app_id", "service_id", "region", "parent_id", "child_id", "status", "messages", "definition", "datacenters", "metadata", "provisioning_info", "role", "instance_snapshot_id", "version", "deployment_group", "deployment_id"] model_config = ConfigDict( validate_by_name=True, @@ -94,6 +66,7 @@ class RegionalDeployment(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -117,7 +90,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -126,10 +100,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of definition if self.definition: - _dict["definition"] = self.definition.to_dict() + _dict['definition'] = self.definition.to_dict() # override the default output from pydantic by calling `to_dict()` of provisioning_info if self.provisioning_info: - _dict["provisioning_info"] = self.provisioning_info.to_dict() + _dict['provisioning_info'] = self.provisioning_info.to_dict() return _dict @classmethod @@ -141,43 +115,33 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "scheduled_at": obj.get("scheduled_at"), - "allocated_at": obj.get("allocated_at"), - "started_at": obj.get("started_at"), - "succeeded_at": obj.get("succeeded_at"), - "terminated_at": obj.get("terminated_at"), - "organization_id": obj.get("organization_id"), - "app_id": obj.get("app_id"), - "service_id": obj.get("service_id"), - "region": obj.get("region"), - "parent_id": obj.get("parent_id"), - "child_id": obj.get("child_id"), - "status": obj.get("status") - if obj.get("status") is not None - else RegionalDeploymentStatus.PENDING, - "messages": obj.get("messages"), - "definition": RegionalDeploymentDefinition.from_dict(obj["definition"]) - if obj.get("definition") is not None - else None, - "datacenters": obj.get("datacenters"), - "metadata": obj.get("metadata"), - "provisioning_info": DeploymentProvisioningInfo.from_dict( - obj["provisioning_info"] - ) - if obj.get("provisioning_info") is not None - else None, - "role": obj.get("role") - if obj.get("role") is not None - else RegionalDeploymentRole.INVALID, - "instance_snapshot_id": obj.get("instance_snapshot_id"), - "version": obj.get("version"), - "deployment_group": obj.get("deployment_group"), - "deployment_id": obj.get("deployment_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "scheduled_at": obj.get("scheduled_at"), + "allocated_at": obj.get("allocated_at"), + "started_at": obj.get("started_at"), + "succeeded_at": obj.get("succeeded_at"), + "terminated_at": obj.get("terminated_at"), + "organization_id": obj.get("organization_id"), + "app_id": obj.get("app_id"), + "service_id": obj.get("service_id"), + "region": obj.get("region"), + "parent_id": obj.get("parent_id"), + "child_id": obj.get("child_id"), + "status": obj.get("status") if obj.get("status") is not None else RegionalDeploymentStatus.PENDING, + "messages": obj.get("messages"), + "definition": RegionalDeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None, + "datacenters": obj.get("datacenters"), + "metadata": obj.get("metadata"), + "provisioning_info": DeploymentProvisioningInfo.from_dict(obj["provisioning_info"]) if obj.get("provisioning_info") is not None else None, + "role": obj.get("role") if obj.get("role") is not None else RegionalDeploymentRole.INVALID, + "instance_snapshot_id": obj.get("instance_snapshot_id"), + "version": obj.get("version"), + "deployment_group": obj.get("deployment_group"), + "deployment_id": obj.get("deployment_id") + }) return _obj + + diff --git a/koyeb/api/models/regional_deployment_definition.py b/koyeb/api/models/regional_deployment_definition.py index 04286afa..d08b3820 100644 --- a/koyeb/api/models/regional_deployment_definition.py +++ b/koyeb/api/models/regional_deployment_definition.py @@ -28,9 +28,7 @@ from koyeb.api.models.git_source import GitSource from koyeb.api.models.network_policy import NetworkPolicy from koyeb.api.models.port import Port -from koyeb.api.models.regional_deployment_definition_type import ( - RegionalDeploymentDefinitionType, -) +from koyeb.api.models.regional_deployment_definition_type import RegionalDeploymentDefinitionType from koyeb.api.models.regional_deployment_mesh import RegionalDeploymentMesh from koyeb.api.models.regional_deployment_volume import RegionalDeploymentVolume from koyeb.api.models.route import Route @@ -39,16 +37,12 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RegionalDeploymentDefinition(BaseModel): """ RegionalDeploymentDefinition - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None - type: Optional[ - RegionalDeploymentDefinitionType - ] = RegionalDeploymentDefinitionType.INVALID + type: Optional[RegionalDeploymentDefinitionType] = RegionalDeploymentDefinitionType.INVALID strategy: Optional[DeploymentStrategy] = None routes: Optional[List[Route]] = None ports: Optional[List[Port]] = None @@ -61,34 +55,12 @@ class RegionalDeploymentDefinition(BaseModel): volumes: Optional[List[RegionalDeploymentVolume]] = None config_files: Optional[List[ConfigFile]] = None skip_cache: Optional[StrictBool] = None - mesh: Optional[ - RegionalDeploymentMesh - ] = RegionalDeploymentMesh.REGIONAL_DEPLOYMENT_MESH_AUTO + mesh: Optional[RegionalDeploymentMesh] = RegionalDeploymentMesh.REGIONAL_DEPLOYMENT_MESH_AUTO network_policy: Optional[NetworkPolicy] = None docker: Optional[DockerSource] = None git: Optional[GitSource] = None archive: Optional[ArchiveSource] = None - __properties: ClassVar[List[str]] = [ - "name", - "type", - "strategy", - "routes", - "ports", - "env", - "region", - "scaling", - "instance_type", - "deployment_group", - "health_checks", - "volumes", - "config_files", - "skip_cache", - "mesh", - "network_policy", - "docker", - "git", - "archive", - ] + __properties: ClassVar[List[str]] = ["name", "type", "strategy", "routes", "ports", "env", "region", "scaling", "instance_type", "deployment_group", "health_checks", "volumes", "config_files", "skip_cache", "mesh", "network_policy", "docker", "git", "archive"] model_config = ConfigDict( validate_by_name=True, @@ -97,6 +69,7 @@ class RegionalDeploymentDefinition(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -120,7 +93,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -129,72 +103,64 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of strategy if self.strategy: - _dict["strategy"] = self.strategy.to_dict() + _dict['strategy'] = self.strategy.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in routes (list) _items = [] if self.routes: for _item_routes in self.routes: - _items.append( - _item_routes.to_dict() if _item_routes is not None else None - ) - _dict["routes"] = _items + if _item_routes: + _items.append(_item_routes.to_dict()) + _dict['routes'] = _items # override the default output from pydantic by calling `to_dict()` of each item in ports (list) _items = [] if self.ports: for _item_ports in self.ports: - _items.append( - _item_ports.to_dict() if _item_ports is not None else None - ) - _dict["ports"] = _items + if _item_ports: + _items.append(_item_ports.to_dict()) + _dict['ports'] = _items # override the default output from pydantic by calling `to_dict()` of each item in env (list) _items = [] if self.env: for _item_env in self.env: - _items.append(_item_env.to_dict() if _item_env is not None else None) - _dict["env"] = _items + if _item_env: + _items.append(_item_env.to_dict()) + _dict['env'] = _items # override the default output from pydantic by calling `to_dict()` of scaling if self.scaling: - _dict["scaling"] = self.scaling.to_dict() + _dict['scaling'] = self.scaling.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in health_checks (list) _items = [] if self.health_checks: for _item_health_checks in self.health_checks: - _items.append( - _item_health_checks.to_dict() - if _item_health_checks is not None - else None - ) - _dict["health_checks"] = _items + if _item_health_checks: + _items.append(_item_health_checks.to_dict()) + _dict['health_checks'] = _items # override the default output from pydantic by calling `to_dict()` of each item in volumes (list) _items = [] if self.volumes: for _item_volumes in self.volumes: - _items.append( - _item_volumes.to_dict() if _item_volumes is not None else None - ) - _dict["volumes"] = _items + if _item_volumes: + _items.append(_item_volumes.to_dict()) + _dict['volumes'] = _items # override the default output from pydantic by calling `to_dict()` of each item in config_files (list) _items = [] if self.config_files: for _item_config_files in self.config_files: - _items.append( - _item_config_files.to_dict() - if _item_config_files is not None - else None - ) - _dict["config_files"] = _items + if _item_config_files: + _items.append(_item_config_files.to_dict()) + _dict['config_files'] = _items # override the default output from pydantic by calling `to_dict()` of network_policy if self.network_policy: - _dict["network_policy"] = self.network_policy.to_dict() + _dict['network_policy'] = self.network_policy.to_dict() # override the default output from pydantic by calling `to_dict()` of docker if self.docker: - _dict["docker"] = self.docker.to_dict() + _dict['docker'] = self.docker.to_dict() # override the default output from pydantic by calling `to_dict()` of git if self.git: - _dict["git"] = self.git.to_dict() + _dict['git'] = self.git.to_dict() # override the default output from pydantic by calling `to_dict()` of archive if self.archive: - _dict["archive"] = self.archive.to_dict() + _dict['archive'] = self.archive.to_dict() return _dict @classmethod @@ -206,63 +172,27 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "type": obj.get("type") - if obj.get("type") is not None - else RegionalDeploymentDefinitionType.INVALID, - "strategy": DeploymentStrategy.from_dict(obj["strategy"]) - if obj.get("strategy") is not None - else None, - "routes": [Route.from_dict(_item) for _item in obj["routes"]] - if obj.get("routes") is not None - else None, - "ports": [Port.from_dict(_item) for _item in obj["ports"]] - if obj.get("ports") is not None - else None, - "env": [Env.from_dict(_item) for _item in obj["env"]] - if obj.get("env") is not None - else None, - "region": obj.get("region"), - "scaling": Scaling.from_dict(obj["scaling"]) - if obj.get("scaling") is not None - else None, - "instance_type": obj.get("instance_type"), - "deployment_group": obj.get("deployment_group"), - "health_checks": [ - DeploymentHealthCheck.from_dict(_item) - for _item in obj["health_checks"] - ] - if obj.get("health_checks") is not None - else None, - "volumes": [ - RegionalDeploymentVolume.from_dict(_item) - for _item in obj["volumes"] - ] - if obj.get("volumes") is not None - else None, - "config_files": [ - ConfigFile.from_dict(_item) for _item in obj["config_files"] - ] - if obj.get("config_files") is not None - else None, - "skip_cache": obj.get("skip_cache"), - "mesh": obj.get("mesh") - if obj.get("mesh") is not None - else RegionalDeploymentMesh.REGIONAL_DEPLOYMENT_MESH_AUTO, - "network_policy": NetworkPolicy.from_dict(obj["network_policy"]) - if obj.get("network_policy") is not None - else None, - "docker": DockerSource.from_dict(obj["docker"]) - if obj.get("docker") is not None - else None, - "git": GitSource.from_dict(obj["git"]) - if obj.get("git") is not None - else None, - "archive": ArchiveSource.from_dict(obj["archive"]) - if obj.get("archive") is not None - else None, - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "type": obj.get("type") if obj.get("type") is not None else RegionalDeploymentDefinitionType.INVALID, + "strategy": DeploymentStrategy.from_dict(obj["strategy"]) if obj.get("strategy") is not None else None, + "routes": [Route.from_dict(_item) for _item in obj["routes"]] if obj.get("routes") is not None else None, + "ports": [Port.from_dict(_item) for _item in obj["ports"]] if obj.get("ports") is not None else None, + "env": [Env.from_dict(_item) for _item in obj["env"]] if obj.get("env") is not None else None, + "region": obj.get("region"), + "scaling": Scaling.from_dict(obj["scaling"]) if obj.get("scaling") is not None else None, + "instance_type": obj.get("instance_type"), + "deployment_group": obj.get("deployment_group"), + "health_checks": [DeploymentHealthCheck.from_dict(_item) for _item in obj["health_checks"]] if obj.get("health_checks") is not None else None, + "volumes": [RegionalDeploymentVolume.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None, + "config_files": [ConfigFile.from_dict(_item) for _item in obj["config_files"]] if obj.get("config_files") is not None else None, + "skip_cache": obj.get("skip_cache"), + "mesh": obj.get("mesh") if obj.get("mesh") is not None else RegionalDeploymentMesh.REGIONAL_DEPLOYMENT_MESH_AUTO, + "network_policy": NetworkPolicy.from_dict(obj["network_policy"]) if obj.get("network_policy") is not None else None, + "docker": DockerSource.from_dict(obj["docker"]) if obj.get("docker") is not None else None, + "git": GitSource.from_dict(obj["git"]) if obj.get("git") is not None else None, + "archive": ArchiveSource.from_dict(obj["archive"]) if obj.get("archive") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/regional_deployment_definition_type.py b/koyeb/api/models/regional_deployment_definition_type.py index cf99a593..d130da32 100644 --- a/koyeb/api/models/regional_deployment_definition_type.py +++ b/koyeb/api/models/regional_deployment_definition_type.py @@ -26,13 +26,15 @@ class RegionalDeploymentDefinitionType(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - WEB = "WEB" - WORKER = "WORKER" - UNDERSCORE = "_" - SANDBOX = "SANDBOX" + INVALID = 'INVALID' + WEB = 'WEB' + WORKER = 'WORKER' + UNDERSCORE = '_' + SANDBOX = 'SANDBOX' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of RegionalDeploymentDefinitionType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/regional_deployment_event.py b/koyeb/api/models/regional_deployment_event.py index 0d1c6dec..9d09295a 100644 --- a/koyeb/api/models/regional_deployment_event.py +++ b/koyeb/api/models/regional_deployment_event.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RegionalDeploymentEvent(BaseModel): """ RegionalDeploymentEvent - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None when: Optional[datetime] = None organization_id: Optional[StrictStr] = None @@ -37,15 +35,7 @@ class RegionalDeploymentEvent(BaseModel): type: Optional[StrictStr] = None message: Optional[StrictStr] = None metadata: Optional[Dict[str, Any]] = None - __properties: ClassVar[List[str]] = [ - "id", - "when", - "organization_id", - "regional_deployment_id", - "type", - "message", - "metadata", - ] + __properties: ClassVar[List[str]] = ["id", "when", "organization_id", "regional_deployment_id", "type", "message", "metadata"] model_config = ConfigDict( validate_by_name=True, @@ -54,6 +44,7 @@ class RegionalDeploymentEvent(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -95,15 +87,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "when": obj.get("when"), - "organization_id": obj.get("organization_id"), - "regional_deployment_id": obj.get("regional_deployment_id"), - "type": obj.get("type"), - "message": obj.get("message"), - "metadata": obj.get("metadata"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "when": obj.get("when"), + "organization_id": obj.get("organization_id"), + "regional_deployment_id": obj.get("regional_deployment_id"), + "type": obj.get("type"), + "message": obj.get("message"), + "metadata": obj.get("metadata") + }) return _obj + + diff --git a/koyeb/api/models/regional_deployment_list_item.py b/koyeb/api/models/regional_deployment_list_item.py index 3d2a06be..5d8c0799 100644 --- a/koyeb/api/models/regional_deployment_list_item.py +++ b/koyeb/api/models/regional_deployment_list_item.py @@ -26,12 +26,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RegionalDeploymentListItem(BaseModel): """ RegionalDeploymentListItem - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -40,16 +38,7 @@ class RegionalDeploymentListItem(BaseModel): messages: Optional[List[StrictStr]] = None definition: Optional[RegionalDeploymentDefinition] = None instance_snapshot_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "updated_at", - "region", - "status", - "messages", - "definition", - "instance_snapshot_id", - ] + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "region", "status", "messages", "definition", "instance_snapshot_id"] model_config = ConfigDict( validate_by_name=True, @@ -58,6 +47,7 @@ class RegionalDeploymentListItem(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -81,7 +71,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -90,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of definition if self.definition: - _dict["definition"] = self.definition.to_dict() + _dict['definition'] = self.definition.to_dict() return _dict @classmethod @@ -102,20 +93,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "region": obj.get("region"), - "status": obj.get("status") - if obj.get("status") is not None - else RegionalDeploymentStatus.PENDING, - "messages": obj.get("messages"), - "definition": RegionalDeploymentDefinition.from_dict(obj["definition"]) - if obj.get("definition") is not None - else None, - "instance_snapshot_id": obj.get("instance_snapshot_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "region": obj.get("region"), + "status": obj.get("status") if obj.get("status") is not None else RegionalDeploymentStatus.PENDING, + "messages": obj.get("messages"), + "definition": RegionalDeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None, + "instance_snapshot_id": obj.get("instance_snapshot_id") + }) return _obj + + diff --git a/koyeb/api/models/regional_deployment_mesh.py b/koyeb/api/models/regional_deployment_mesh.py index 2a819434..6de8183d 100644 --- a/koyeb/api/models/regional_deployment_mesh.py +++ b/koyeb/api/models/regional_deployment_mesh.py @@ -26,11 +26,13 @@ class RegionalDeploymentMesh(str, Enum): """ allowed enum values """ - REGIONAL_DEPLOYMENT_MESH_AUTO = "REGIONAL_DEPLOYMENT_MESH_AUTO" - REGIONAL_DEPLOYMENT_MESH_ENABLED = "REGIONAL_DEPLOYMENT_MESH_ENABLED" - REGIONAL_DEPLOYMENT_MESH_DISABLED = "REGIONAL_DEPLOYMENT_MESH_DISABLED" + REGIONAL_DEPLOYMENT_MESH_AUTO = 'REGIONAL_DEPLOYMENT_MESH_AUTO' + REGIONAL_DEPLOYMENT_MESH_ENABLED = 'REGIONAL_DEPLOYMENT_MESH_ENABLED' + REGIONAL_DEPLOYMENT_MESH_DISABLED = 'REGIONAL_DEPLOYMENT_MESH_DISABLED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of RegionalDeploymentMesh from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/regional_deployment_role.py b/koyeb/api/models/regional_deployment_role.py index 92908b22..1a17b3e3 100644 --- a/koyeb/api/models/regional_deployment_role.py +++ b/koyeb/api/models/regional_deployment_role.py @@ -26,12 +26,14 @@ class RegionalDeploymentRole(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - ACTIVE = "ACTIVE" - UPCOMING = "UPCOMING" - CURRENT = "CURRENT" + INVALID = 'INVALID' + ACTIVE = 'ACTIVE' + UPCOMING = 'UPCOMING' + CURRENT = 'CURRENT' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of RegionalDeploymentRole from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/regional_deployment_status.py b/koyeb/api/models/regional_deployment_status.py index 7b21b754..fc0a3635 100644 --- a/koyeb/api/models/regional_deployment_status.py +++ b/koyeb/api/models/regional_deployment_status.py @@ -26,23 +26,25 @@ class RegionalDeploymentStatus(str, Enum): """ allowed enum values """ - PENDING = "PENDING" - PROVISIONING = "PROVISIONING" - SCHEDULED = "SCHEDULED" - CANCELING = "CANCELING" - CANCELED = "CANCELED" - ALLOCATING = "ALLOCATING" - STARTING = "STARTING" - HEALTHY = "HEALTHY" - DEGRADED = "DEGRADED" - UNHEALTHY = "UNHEALTHY" - STOPPING = "STOPPING" - STOPPED = "STOPPED" - ERRORING = "ERRORING" - ERROR = "ERROR" - SLEEPING = "SLEEPING" + PENDING = 'PENDING' + PROVISIONING = 'PROVISIONING' + SCHEDULED = 'SCHEDULED' + CANCELING = 'CANCELING' + CANCELED = 'CANCELED' + ALLOCATING = 'ALLOCATING' + STARTING = 'STARTING' + HEALTHY = 'HEALTHY' + DEGRADED = 'DEGRADED' + UNHEALTHY = 'UNHEALTHY' + STOPPING = 'STOPPING' + STOPPED = 'STOPPED' + ERRORING = 'ERRORING' + ERROR = 'ERROR' + SLEEPING = 'SLEEPING' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of RegionalDeploymentStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/regional_deployment_volume.py b/koyeb/api/models/regional_deployment_volume.py index 0758da9e..51e48ee7 100644 --- a/koyeb/api/models/regional_deployment_volume.py +++ b/koyeb/api/models/regional_deployment_volume.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RegionalDeploymentVolume(BaseModel): """ RegionalDeploymentVolume - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None path: Optional[StrictStr] = None replica_index: Optional[StrictInt] = None @@ -41,6 +39,7 @@ class RegionalDeploymentVolume(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "path": obj.get("path"), - "replica_index": obj.get("replica_index"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "path": obj.get("path"), + "replica_index": obj.get("replica_index") + }) return _obj + + diff --git a/koyeb/api/models/remove_organization_member_reply.py b/koyeb/api/models/remove_organization_member_reply.py index b854135a..f7c12bb9 100644 --- a/koyeb/api/models/remove_organization_member_reply.py +++ b/koyeb/api/models/remove_organization_member_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RemoveOrganizationMemberReply(BaseModel): """ RemoveOrganizationMemberReply - """ # noqa: E501 - + """ # noqa: E501 member: Optional[OrganizationMember] = None __properties: ClassVar[List[str]] = ["member"] @@ -40,6 +38,7 @@ class RemoveOrganizationMemberReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of member if self.member: - _dict["member"] = self.member.to_dict() + _dict['member'] = self.member.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "member": OrganizationMember.from_dict(obj["member"]) - if obj.get("member") is not None - else None - } - ) + _obj = cls.model_validate({ + "member": OrganizationMember.from_dict(obj["member"]) if obj.get("member") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/resend_organization_invitation_reply.py b/koyeb/api/models/resend_organization_invitation_reply.py index 100cc6dc..58db6109 100644 --- a/koyeb/api/models/resend_organization_invitation_reply.py +++ b/koyeb/api/models/resend_organization_invitation_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ResendOrganizationInvitationReply(BaseModel): """ ResendOrganizationInvitationReply - """ # noqa: E501 - + """ # noqa: E501 invitation: Optional[OrganizationInvitation] = None __properties: ClassVar[List[str]] = ["invitation"] @@ -40,6 +38,7 @@ class ResendOrganizationInvitationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of invitation if self.invitation: - _dict["invitation"] = self.invitation.to_dict() + _dict['invitation'] = self.invitation.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "invitation": OrganizationInvitation.from_dict(obj["invitation"]) - if obj.get("invitation") is not None - else None - } - ) + _obj = cls.model_validate({ + "invitation": OrganizationInvitation.from_dict(obj["invitation"]) if obj.get("invitation") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/reset_password_request.py b/koyeb/api/models/reset_password_request.py index 911dd4a1..f2016ae1 100644 --- a/koyeb/api/models/reset_password_request.py +++ b/koyeb/api/models/reset_password_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ResetPasswordRequest(BaseModel): """ ResetPasswordRequest - """ # noqa: E501 - + """ # noqa: E501 email: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["email"] @@ -39,6 +37,7 @@ class ResetPasswordRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"email": obj.get("email")}) + _obj = cls.model_validate({ + "email": obj.get("email") + }) return _obj + + diff --git a/koyeb/api/models/reveal_secret_reply.py b/koyeb/api/models/reveal_secret_reply.py index de3b4836..ccb8be1c 100644 --- a/koyeb/api/models/reveal_secret_reply.py +++ b/koyeb/api/models/reveal_secret_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RevealSecretReply(BaseModel): """ RevealSecretReply - """ # noqa: E501 - + """ # noqa: E501 value: Optional[Dict[str, Any]] = None __properties: ClassVar[List[str]] = ["value"] @@ -39,6 +37,7 @@ class RevealSecretReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"value": obj.get("value")}) + _obj = cls.model_validate({ + "value": obj.get("value") + }) return _obj + + diff --git a/koyeb/api/models/review_organization_capacity_reply.py b/koyeb/api/models/review_organization_capacity_reply.py index ffce029e..4d053dac 100644 --- a/koyeb/api/models/review_organization_capacity_reply.py +++ b/koyeb/api/models/review_organization_capacity_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ReviewOrganizationCapacityReply(BaseModel): """ ReviewOrganizationCapacityReply - """ # noqa: E501 - + """ # noqa: E501 has_capacity: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["has_capacity"] @@ -39,6 +37,7 @@ class ReviewOrganizationCapacityReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"has_capacity": obj.get("has_capacity")}) + _obj = cls.model_validate({ + "has_capacity": obj.get("has_capacity") + }) return _obj + + diff --git a/koyeb/api/models/review_organization_capacity_request.py b/koyeb/api/models/review_organization_capacity_request.py index accb33be..e945f69a 100644 --- a/koyeb/api/models/review_organization_capacity_request.py +++ b/koyeb/api/models/review_organization_capacity_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ReviewOrganizationCapacityRequest(BaseModel): """ ReviewOrganizationCapacityRequest - """ # noqa: E501 - + """ # noqa: E501 plan: Optional[StrictStr] = None trialing: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["plan", "trialing"] @@ -40,6 +38,7 @@ class ReviewOrganizationCapacityRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"plan": obj.get("plan"), "trialing": obj.get("trialing")} - ) + _obj = cls.model_validate({ + "plan": obj.get("plan"), + "trialing": obj.get("trialing") + }) return _obj + + diff --git a/koyeb/api/models/route.py b/koyeb/api/models/route.py index a502474f..18410423 100644 --- a/koyeb/api/models/route.py +++ b/koyeb/api/models/route.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Route(BaseModel): """ Route - """ # noqa: E501 - + """ # noqa: E501 port: Optional[StrictInt] = None path: Optional[StrictStr] = None security_policies: Optional[SecurityPolicies] = None @@ -42,6 +40,7 @@ class Route(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of security_policies if self.security_policies: - _dict["security_policies"] = self.security_policies.to_dict() + _dict['security_policies'] = self.security_policies.to_dict() return _dict @classmethod @@ -86,15 +86,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "port": obj.get("port"), - "path": obj.get("path"), - "security_policies": SecurityPolicies.from_dict( - obj["security_policies"] - ) - if obj.get("security_policies") is not None - else None, - } - ) + _obj = cls.model_validate({ + "port": obj.get("port"), + "path": obj.get("path"), + "security_policies": SecurityPolicies.from_dict(obj["security_policies"]) if obj.get("security_policies") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/sample.py b/koyeb/api/models/sample.py index a462263c..a21ef90f 100644 --- a/koyeb/api/models/sample.py +++ b/koyeb/api/models/sample.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Sample(BaseModel): """ Sample - """ # noqa: E501 - + """ # noqa: E501 timestamp: Optional[StrictStr] = None value: Optional[Union[StrictFloat, StrictInt]] = None __properties: ClassVar[List[str]] = ["timestamp", "value"] @@ -40,6 +38,7 @@ class Sample(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"timestamp": obj.get("timestamp"), "value": obj.get("value")} - ) + _obj = cls.model_validate({ + "timestamp": obj.get("timestamp"), + "value": obj.get("value") + }) return _obj + + diff --git a/koyeb/api/models/sandbox_metadata.py b/koyeb/api/models/sandbox_metadata.py index 3868167c..9233fbc2 100644 --- a/koyeb/api/models/sandbox_metadata.py +++ b/koyeb/api/models/sandbox_metadata.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class SandboxMetadata(BaseModel): """ SandboxMetadata - """ # noqa: E501 - + """ # noqa: E501 public_url: Optional[StrictStr] = None routing_key: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["public_url", "routing_key"] @@ -40,6 +38,7 @@ class SandboxMetadata(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"public_url": obj.get("public_url"), "routing_key": obj.get("routing_key")} - ) + _obj = cls.model_validate({ + "public_url": obj.get("public_url"), + "routing_key": obj.get("routing_key") + }) return _obj + + diff --git a/koyeb/api/models/scale_to_zero_quotas.py b/koyeb/api/models/scale_to_zero_quotas.py index afe4e3d7..9f6ce06d 100644 --- a/koyeb/api/models/scale_to_zero_quotas.py +++ b/koyeb/api/models/scale_to_zero_quotas.py @@ -23,26 +23,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ScaleToZeroQuotas(BaseModel): """ ScaleToZeroQuotas - """ # noqa: E501 - + """ # noqa: E501 is_deep_sleep_enabled: Optional[StrictBool] = None deep_sleep_idle_delay_min: Optional[StrictInt] = None deep_sleep_idle_delay_max: Optional[StrictInt] = None is_light_sleep_enabled: Optional[StrictBool] = None light_sleep_idle_delay_min: Optional[StrictInt] = None light_sleep_idle_delay_max: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = [ - "is_deep_sleep_enabled", - "deep_sleep_idle_delay_min", - "deep_sleep_idle_delay_max", - "is_light_sleep_enabled", - "light_sleep_idle_delay_min", - "light_sleep_idle_delay_max", - ] + __properties: ClassVar[List[str]] = ["is_deep_sleep_enabled", "deep_sleep_idle_delay_min", "deep_sleep_idle_delay_max", "is_light_sleep_enabled", "light_sleep_idle_delay_min", "light_sleep_idle_delay_max"] model_config = ConfigDict( validate_by_name=True, @@ -51,6 +42,7 @@ class ScaleToZeroQuotas(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -92,14 +85,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "is_deep_sleep_enabled": obj.get("is_deep_sleep_enabled"), - "deep_sleep_idle_delay_min": obj.get("deep_sleep_idle_delay_min"), - "deep_sleep_idle_delay_max": obj.get("deep_sleep_idle_delay_max"), - "is_light_sleep_enabled": obj.get("is_light_sleep_enabled"), - "light_sleep_idle_delay_min": obj.get("light_sleep_idle_delay_min"), - "light_sleep_idle_delay_max": obj.get("light_sleep_idle_delay_max"), - } - ) + _obj = cls.model_validate({ + "is_deep_sleep_enabled": obj.get("is_deep_sleep_enabled"), + "deep_sleep_idle_delay_min": obj.get("deep_sleep_idle_delay_min"), + "deep_sleep_idle_delay_max": obj.get("deep_sleep_idle_delay_max"), + "is_light_sleep_enabled": obj.get("is_light_sleep_enabled"), + "light_sleep_idle_delay_min": obj.get("light_sleep_idle_delay_min"), + "light_sleep_idle_delay_max": obj.get("light_sleep_idle_delay_max") + }) return _obj + + diff --git a/koyeb/api/models/scaling.py b/koyeb/api/models/scaling.py index db6f1349..19fcc4d7 100644 --- a/koyeb/api/models/scaling.py +++ b/koyeb/api/models/scaling.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Scaling(BaseModel): """ Scaling - """ # noqa: E501 - + """ # noqa: E501 min: Optional[StrictInt] = None max: Optional[StrictInt] = None targets: Optional[List[DeploymentScalingTarget]] = None @@ -42,6 +40,7 @@ class Scaling(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -76,10 +76,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.targets: for _item_targets in self.targets: - _items.append( - _item_targets.to_dict() if _item_targets is not None else None - ) - _dict["targets"] = _items + if _item_targets: + _items.append(_item_targets.to_dict()) + _dict['targets'] = _items return _dict @classmethod @@ -91,15 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "min": obj.get("min"), - "max": obj.get("max"), - "targets": [ - DeploymentScalingTarget.from_dict(_item) for _item in obj["targets"] - ] - if obj.get("targets") is not None - else None, - } - ) + _obj = cls.model_validate({ + "min": obj.get("min"), + "max": obj.get("max"), + "targets": [DeploymentScalingTarget.from_dict(_item) for _item in obj["targets"]] if obj.get("targets") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/secret.py b/koyeb/api/models/secret.py index e43733b5..c811ec50 100644 --- a/koyeb/api/models/secret.py +++ b/koyeb/api/models/secret.py @@ -20,19 +20,11 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.azure_container_registry_configuration import ( - AzureContainerRegistryConfiguration, -) +from koyeb.api.models.azure_container_registry_configuration import AzureContainerRegistryConfiguration from koyeb.api.models.database_role_password import DatabaseRolePassword -from koyeb.api.models.digital_ocean_registry_configuration import ( - DigitalOceanRegistryConfiguration, -) -from koyeb.api.models.docker_hub_registry_configuration import ( - DockerHubRegistryConfiguration, -) -from koyeb.api.models.gcp_container_registry_configuration import ( - GCPContainerRegistryConfiguration, -) +from koyeb.api.models.digital_ocean_registry_configuration import DigitalOceanRegistryConfiguration +from koyeb.api.models.docker_hub_registry_configuration import DockerHubRegistryConfiguration +from koyeb.api.models.gcp_container_registry_configuration import GCPContainerRegistryConfiguration from koyeb.api.models.git_hub_registry_configuration import GitHubRegistryConfiguration from koyeb.api.models.git_lab_registry_configuration import GitLabRegistryConfiguration from koyeb.api.models.private_registry_configuration import PrivateRegistryConfiguration @@ -41,22 +33,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Secret(BaseModel): """ Secret - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None type: Optional[SecretType] = SecretType.SIMPLE updated_at: Optional[datetime] = None created_at: Optional[datetime] = None - project_id: Optional[StrictStr] = Field( - default=None, - description="The project ID this secret belongs to. Empty if the secret is organization-level.", - ) + project_id: Optional[StrictStr] = Field(default=None, description="The project ID this secret belongs to. Empty if the secret is organization-level.") value: Optional[StrictStr] = None docker_hub_registry: Optional[DockerHubRegistryConfiguration] = None private_registry: Optional[PrivateRegistryConfiguration] = None @@ -66,24 +53,7 @@ class Secret(BaseModel): gcp_container_registry: Optional[GCPContainerRegistryConfiguration] = None azure_container_registry: Optional[AzureContainerRegistryConfiguration] = None database_role_password: Optional[DatabaseRolePassword] = None - __properties: ClassVar[List[str]] = [ - "id", - "name", - "organization_id", - "type", - "updated_at", - "created_at", - "project_id", - "value", - "docker_hub_registry", - "private_registry", - "digital_ocean_registry", - "github_registry", - "gitlab_registry", - "gcp_container_registry", - "azure_container_registry", - "database_role_password", - ] + __properties: ClassVar[List[str]] = ["id", "name", "organization_id", "type", "updated_at", "created_at", "project_id", "value", "docker_hub_registry", "private_registry", "digital_ocean_registry", "github_registry", "gitlab_registry", "gcp_container_registry", "azure_container_registry", "database_role_password"] model_config = ConfigDict( validate_by_name=True, @@ -92,6 +62,7 @@ class Secret(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -115,7 +86,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -124,28 +96,28 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of docker_hub_registry if self.docker_hub_registry: - _dict["docker_hub_registry"] = self.docker_hub_registry.to_dict() + _dict['docker_hub_registry'] = self.docker_hub_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of private_registry if self.private_registry: - _dict["private_registry"] = self.private_registry.to_dict() + _dict['private_registry'] = self.private_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of digital_ocean_registry if self.digital_ocean_registry: - _dict["digital_ocean_registry"] = self.digital_ocean_registry.to_dict() + _dict['digital_ocean_registry'] = self.digital_ocean_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of github_registry if self.github_registry: - _dict["github_registry"] = self.github_registry.to_dict() + _dict['github_registry'] = self.github_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of gitlab_registry if self.gitlab_registry: - _dict["gitlab_registry"] = self.gitlab_registry.to_dict() + _dict['gitlab_registry'] = self.gitlab_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of gcp_container_registry if self.gcp_container_registry: - _dict["gcp_container_registry"] = self.gcp_container_registry.to_dict() + _dict['gcp_container_registry'] = self.gcp_container_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of azure_container_registry if self.azure_container_registry: - _dict["azure_container_registry"] = self.azure_container_registry.to_dict() + _dict['azure_container_registry'] = self.azure_container_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of database_role_password if self.database_role_password: - _dict["database_role_password"] = self.database_role_password.to_dict() + _dict['database_role_password'] = self.database_role_password.to_dict() return _dict @classmethod @@ -157,58 +129,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "organization_id": obj.get("organization_id"), - "type": obj.get("type") - if obj.get("type") is not None - else SecretType.SIMPLE, - "updated_at": obj.get("updated_at"), - "created_at": obj.get("created_at"), - "project_id": obj.get("project_id"), - "value": obj.get("value"), - "docker_hub_registry": DockerHubRegistryConfiguration.from_dict( - obj["docker_hub_registry"] - ) - if obj.get("docker_hub_registry") is not None - else None, - "private_registry": PrivateRegistryConfiguration.from_dict( - obj["private_registry"] - ) - if obj.get("private_registry") is not None - else None, - "digital_ocean_registry": DigitalOceanRegistryConfiguration.from_dict( - obj["digital_ocean_registry"] - ) - if obj.get("digital_ocean_registry") is not None - else None, - "github_registry": GitHubRegistryConfiguration.from_dict( - obj["github_registry"] - ) - if obj.get("github_registry") is not None - else None, - "gitlab_registry": GitLabRegistryConfiguration.from_dict( - obj["gitlab_registry"] - ) - if obj.get("gitlab_registry") is not None - else None, - "gcp_container_registry": GCPContainerRegistryConfiguration.from_dict( - obj["gcp_container_registry"] - ) - if obj.get("gcp_container_registry") is not None - else None, - "azure_container_registry": AzureContainerRegistryConfiguration.from_dict( - obj["azure_container_registry"] - ) - if obj.get("azure_container_registry") is not None - else None, - "database_role_password": DatabaseRolePassword.from_dict( - obj["database_role_password"] - ) - if obj.get("database_role_password") is not None - else None, - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "organization_id": obj.get("organization_id"), + "type": obj.get("type") if obj.get("type") is not None else SecretType.SIMPLE, + "updated_at": obj.get("updated_at"), + "created_at": obj.get("created_at"), + "project_id": obj.get("project_id"), + "value": obj.get("value"), + "docker_hub_registry": DockerHubRegistryConfiguration.from_dict(obj["docker_hub_registry"]) if obj.get("docker_hub_registry") is not None else None, + "private_registry": PrivateRegistryConfiguration.from_dict(obj["private_registry"]) if obj.get("private_registry") is not None else None, + "digital_ocean_registry": DigitalOceanRegistryConfiguration.from_dict(obj["digital_ocean_registry"]) if obj.get("digital_ocean_registry") is not None else None, + "github_registry": GitHubRegistryConfiguration.from_dict(obj["github_registry"]) if obj.get("github_registry") is not None else None, + "gitlab_registry": GitLabRegistryConfiguration.from_dict(obj["gitlab_registry"]) if obj.get("gitlab_registry") is not None else None, + "gcp_container_registry": GCPContainerRegistryConfiguration.from_dict(obj["gcp_container_registry"]) if obj.get("gcp_container_registry") is not None else None, + "azure_container_registry": AzureContainerRegistryConfiguration.from_dict(obj["azure_container_registry"]) if obj.get("azure_container_registry") is not None else None, + "database_role_password": DatabaseRolePassword.from_dict(obj["database_role_password"]) if obj.get("database_role_password") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/secret_type.py b/koyeb/api/models/secret_type.py index d58e874a..241aca98 100644 --- a/koyeb/api/models/secret_type.py +++ b/koyeb/api/models/secret_type.py @@ -26,11 +26,13 @@ class SecretType(str, Enum): """ allowed enum values """ - SIMPLE = "SIMPLE" - REGISTRY = "REGISTRY" - MANAGED = "MANAGED" + SIMPLE = 'SIMPLE' + REGISTRY = 'REGISTRY' + MANAGED = 'MANAGED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SecretType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/secrets_summary.py b/koyeb/api/models/secrets_summary.py index c9ebbe40..83f0d8a9 100644 --- a/koyeb/api/models/secrets_summary.py +++ b/koyeb/api/models/secrets_summary.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class SecretsSummary(BaseModel): """ SecretsSummary - """ # noqa: E501 - + """ # noqa: E501 total: Optional[StrictStr] = None by_type: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["total", "by_type"] @@ -40,6 +38,7 @@ class SecretsSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"total": obj.get("total"), "by_type": obj.get("by_type")} - ) + _obj = cls.model_validate({ + "total": obj.get("total"), + "by_type": obj.get("by_type") + }) return _obj + + diff --git a/koyeb/api/models/security_policies.py b/koyeb/api/models/security_policies.py index f4cec590..690fcc17 100644 --- a/koyeb/api/models/security_policies.py +++ b/koyeb/api/models/security_policies.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class SecurityPolicies(BaseModel): """ SecurityPolicies - """ # noqa: E501 - + """ # noqa: E501 basic_auths: Optional[List[BasicAuthPolicy]] = None api_keys: Optional[List[StrictStr]] = None __properties: ClassVar[List[str]] = ["basic_auths", "api_keys"] @@ -41,6 +39,7 @@ class SecurityPolicies(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -75,12 +75,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.basic_auths: for _item_basic_auths in self.basic_auths: - _items.append( - _item_basic_auths.to_dict() - if _item_basic_auths is not None - else None - ) - _dict["basic_auths"] = _items + if _item_basic_auths: + _items.append(_item_basic_auths.to_dict()) + _dict['basic_auths'] = _items return _dict @classmethod @@ -92,14 +89,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "basic_auths": [ - BasicAuthPolicy.from_dict(_item) for _item in obj["basic_auths"] - ] - if obj.get("basic_auths") is not None - else None, - "api_keys": obj.get("api_keys"), - } - ) + _obj = cls.model_validate({ + "basic_auths": [BasicAuthPolicy.from_dict(_item) for _item in obj["basic_auths"]] if obj.get("basic_auths") is not None else None, + "api_keys": obj.get("api_keys") + }) return _obj + + diff --git a/koyeb/api/models/service.py b/koyeb/api/models/service.py index efa6839c..c06b8023 100644 --- a/koyeb/api/models/service.py +++ b/koyeb/api/models/service.py @@ -28,12 +28,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Service(BaseModel): """ Service - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -56,30 +54,7 @@ class Service(BaseModel): state: Optional[ServiceState] = None life_cycle: Optional[ServiceLifeCycle] = None service_account_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "updated_at", - "started_at", - "succeeded_at", - "paused_at", - "resumed_at", - "terminated_at", - "name", - "type", - "organization_id", - "project_id", - "app_id", - "status", - "messages", - "version", - "active_deployment_id", - "latest_deployment_id", - "last_provisioned_deployment_id", - "state", - "life_cycle", - "service_account_id", - ] + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "started_at", "succeeded_at", "paused_at", "resumed_at", "terminated_at", "name", "type", "organization_id", "project_id", "app_id", "status", "messages", "version", "active_deployment_id", "latest_deployment_id", "last_provisioned_deployment_id", "state", "life_cycle", "service_account_id"] model_config = ConfigDict( validate_by_name=True, @@ -88,6 +63,7 @@ class Service(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -111,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -120,10 +97,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of state if self.state: - _dict["state"] = self.state.to_dict() + _dict['state'] = self.state.to_dict() # override the default output from pydantic by calling `to_dict()` of life_cycle if self.life_cycle: - _dict["life_cycle"] = self.life_cycle.to_dict() + _dict['life_cycle'] = self.life_cycle.to_dict() return _dict @classmethod @@ -135,40 +112,30 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "started_at": obj.get("started_at"), - "succeeded_at": obj.get("succeeded_at"), - "paused_at": obj.get("paused_at"), - "resumed_at": obj.get("resumed_at"), - "terminated_at": obj.get("terminated_at"), - "name": obj.get("name"), - "type": obj.get("type") - if obj.get("type") is not None - else ServiceType.INVALID_TYPE, - "organization_id": obj.get("organization_id"), - "project_id": obj.get("project_id"), - "app_id": obj.get("app_id"), - "status": obj.get("status") - if obj.get("status") is not None - else ServiceStatus.STARTING, - "messages": obj.get("messages"), - "version": obj.get("version"), - "active_deployment_id": obj.get("active_deployment_id"), - "latest_deployment_id": obj.get("latest_deployment_id"), - "last_provisioned_deployment_id": obj.get( - "last_provisioned_deployment_id" - ), - "state": ServiceState.from_dict(obj["state"]) - if obj.get("state") is not None - else None, - "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) - if obj.get("life_cycle") is not None - else None, - "service_account_id": obj.get("service_account_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "started_at": obj.get("started_at"), + "succeeded_at": obj.get("succeeded_at"), + "paused_at": obj.get("paused_at"), + "resumed_at": obj.get("resumed_at"), + "terminated_at": obj.get("terminated_at"), + "name": obj.get("name"), + "type": obj.get("type") if obj.get("type") is not None else ServiceType.INVALID_TYPE, + "organization_id": obj.get("organization_id"), + "project_id": obj.get("project_id"), + "app_id": obj.get("app_id"), + "status": obj.get("status") if obj.get("status") is not None else ServiceStatus.STARTING, + "messages": obj.get("messages"), + "version": obj.get("version"), + "active_deployment_id": obj.get("active_deployment_id"), + "latest_deployment_id": obj.get("latest_deployment_id"), + "last_provisioned_deployment_id": obj.get("last_provisioned_deployment_id"), + "state": ServiceState.from_dict(obj["state"]) if obj.get("state") is not None else None, + "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) if obj.get("life_cycle") is not None else None, + "service_account_id": obj.get("service_account_id") + }) return _obj + + diff --git a/koyeb/api/models/service_event.py b/koyeb/api/models/service_event.py index 5146ee01..381f2b0e 100644 --- a/koyeb/api/models/service_event.py +++ b/koyeb/api/models/service_event.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ServiceEvent(BaseModel): """ ServiceEvent - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None when: Optional[datetime] = None organization_id: Optional[StrictStr] = None @@ -37,15 +35,7 @@ class ServiceEvent(BaseModel): type: Optional[StrictStr] = None message: Optional[StrictStr] = None metadata: Optional[Dict[str, Any]] = None - __properties: ClassVar[List[str]] = [ - "id", - "when", - "organization_id", - "service_id", - "type", - "message", - "metadata", - ] + __properties: ClassVar[List[str]] = ["id", "when", "organization_id", "service_id", "type", "message", "metadata"] model_config = ConfigDict( validate_by_name=True, @@ -54,6 +44,7 @@ class ServiceEvent(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -95,15 +87,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "when": obj.get("when"), - "organization_id": obj.get("organization_id"), - "service_id": obj.get("service_id"), - "type": obj.get("type"), - "message": obj.get("message"), - "metadata": obj.get("metadata"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "when": obj.get("when"), + "organization_id": obj.get("organization_id"), + "service_id": obj.get("service_id"), + "type": obj.get("type"), + "message": obj.get("message"), + "metadata": obj.get("metadata") + }) return _obj + + diff --git a/koyeb/api/models/service_life_cycle.py b/koyeb/api/models/service_life_cycle.py index bcec37e4..f0ee3a76 100644 --- a/koyeb/api/models/service_life_cycle.py +++ b/koyeb/api/models/service_life_cycle.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ServiceLifeCycle(BaseModel): """ ServiceLifeCycle - """ # noqa: E501 - + """ # noqa: E501 delete_after_sleep: Optional[StrictInt] = None delete_after_create: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["delete_after_sleep", "delete_after_create"] @@ -40,6 +38,7 @@ class ServiceLifeCycle(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,10 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "delete_after_sleep": obj.get("delete_after_sleep"), - "delete_after_create": obj.get("delete_after_create"), - } - ) + _obj = cls.model_validate({ + "delete_after_sleep": obj.get("delete_after_sleep"), + "delete_after_create": obj.get("delete_after_create") + }) return _obj + + diff --git a/koyeb/api/models/service_list_item.py b/koyeb/api/models/service_list_item.py index ac201af1..d7eec1d5 100644 --- a/koyeb/api/models/service_list_item.py +++ b/koyeb/api/models/service_list_item.py @@ -28,12 +28,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ServiceListItem(BaseModel): """ ServiceListItem - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None type: Optional[ServiceType] = ServiceType.INVALID_TYPE @@ -50,24 +48,7 @@ class ServiceListItem(BaseModel): latest_deployment_id: Optional[StrictStr] = None life_cycle: Optional[ServiceLifeCycle] = None service_account_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "name", - "type", - "organization_id", - "project_id", - "app_id", - "updated_at", - "created_at", - "status", - "messages", - "version", - "state", - "active_deployment_id", - "latest_deployment_id", - "life_cycle", - "service_account_id", - ] + __properties: ClassVar[List[str]] = ["id", "name", "type", "organization_id", "project_id", "app_id", "updated_at", "created_at", "status", "messages", "version", "state", "active_deployment_id", "latest_deployment_id", "life_cycle", "service_account_id"] model_config = ConfigDict( validate_by_name=True, @@ -76,6 +57,7 @@ class ServiceListItem(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -99,7 +81,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -108,10 +91,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of state if self.state: - _dict["state"] = self.state.to_dict() + _dict['state'] = self.state.to_dict() # override the default output from pydantic by calling `to_dict()` of life_cycle if self.life_cycle: - _dict["life_cycle"] = self.life_cycle.to_dict() + _dict['life_cycle'] = self.life_cycle.to_dict() return _dict @classmethod @@ -123,32 +106,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "type": obj.get("type") - if obj.get("type") is not None - else ServiceType.INVALID_TYPE, - "organization_id": obj.get("organization_id"), - "project_id": obj.get("project_id"), - "app_id": obj.get("app_id"), - "updated_at": obj.get("updated_at"), - "created_at": obj.get("created_at"), - "status": obj.get("status") - if obj.get("status") is not None - else ServiceStatus.STARTING, - "messages": obj.get("messages"), - "version": obj.get("version"), - "state": ServiceState.from_dict(obj["state"]) - if obj.get("state") is not None - else None, - "active_deployment_id": obj.get("active_deployment_id"), - "latest_deployment_id": obj.get("latest_deployment_id"), - "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) - if obj.get("life_cycle") is not None - else None, - "service_account_id": obj.get("service_account_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type") if obj.get("type") is not None else ServiceType.INVALID_TYPE, + "organization_id": obj.get("organization_id"), + "project_id": obj.get("project_id"), + "app_id": obj.get("app_id"), + "updated_at": obj.get("updated_at"), + "created_at": obj.get("created_at"), + "status": obj.get("status") if obj.get("status") is not None else ServiceStatus.STARTING, + "messages": obj.get("messages"), + "version": obj.get("version"), + "state": ServiceState.from_dict(obj["state"]) if obj.get("state") is not None else None, + "active_deployment_id": obj.get("active_deployment_id"), + "latest_deployment_id": obj.get("latest_deployment_id"), + "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) if obj.get("life_cycle") is not None else None, + "service_account_id": obj.get("service_account_id") + }) return _obj + + diff --git a/koyeb/api/models/service_pool.py b/koyeb/api/models/service_pool.py index 507b1896..7f1b9c09 100644 --- a/koyeb/api/models/service_pool.py +++ b/koyeb/api/models/service_pool.py @@ -26,12 +26,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ServicePool(BaseModel): """ ServicePool - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -45,21 +43,7 @@ class ServicePool(BaseModel): messages: Optional[List[StrictStr]] = None generation: Optional[StrictStr] = None customer_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "updated_at", - "organization_id", - "workspace_id", - "name", - "size", - "ready_count", - "definition", - "status", - "messages", - "generation", - "customer_id", - ] + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "organization_id", "workspace_id", "name", "size", "ready_count", "definition", "status", "messages", "generation", "customer_id"] model_config = ConfigDict( validate_by_name=True, @@ -68,6 +52,7 @@ class ServicePool(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -91,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -100,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of definition if self.definition: - _dict["definition"] = self.definition.to_dict() + _dict['definition'] = self.definition.to_dict() return _dict @classmethod @@ -112,25 +98,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "organization_id": obj.get("organization_id"), - "workspace_id": obj.get("workspace_id"), - "name": obj.get("name"), - "size": obj.get("size"), - "ready_count": obj.get("ready_count"), - "definition": DeploymentDefinition.from_dict(obj["definition"]) - if obj.get("definition") is not None - else None, - "status": obj.get("status") - if obj.get("status") is not None - else ServicePoolStatus.UNSPECIFIED, - "messages": obj.get("messages"), - "generation": obj.get("generation"), - "customer_id": obj.get("customer_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "organization_id": obj.get("organization_id"), + "workspace_id": obj.get("workspace_id"), + "name": obj.get("name"), + "size": obj.get("size"), + "ready_count": obj.get("ready_count"), + "definition": DeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None, + "status": obj.get("status") if obj.get("status") is not None else ServicePoolStatus.UNSPECIFIED, + "messages": obj.get("messages"), + "generation": obj.get("generation"), + "customer_id": obj.get("customer_id") + }) return _obj + + diff --git a/koyeb/api/models/service_pool_status.py b/koyeb/api/models/service_pool_status.py index fd5a03dc..331fe51f 100644 --- a/koyeb/api/models/service_pool_status.py +++ b/koyeb/api/models/service_pool_status.py @@ -26,13 +26,15 @@ class ServicePoolStatus(str, Enum): """ allowed enum values """ - UNSPECIFIED = "UNSPECIFIED" - READY = "READY" - PROVISIONING = "PROVISIONING" - ERROR = "ERROR" - DELETING = "DELETING" + UNSPECIFIED = 'UNSPECIFIED' + READY = 'READY' + PROVISIONING = 'PROVISIONING' + ERROR = 'ERROR' + DELETING = 'DELETING' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ServicePoolStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/service_state.py b/koyeb/api/models/service_state.py index 26f09e59..54515bee 100644 --- a/koyeb/api/models/service_state.py +++ b/koyeb/api/models/service_state.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ServiceState(BaseModel): """ ServiceState - """ # noqa: E501 - + """ # noqa: E501 desired_deployment: Optional[DesiredDeployment] = None auto_release: Optional[AutoRelease] = None __properties: ClassVar[List[str]] = ["desired_deployment", "auto_release"] @@ -42,6 +40,7 @@ class ServiceState(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,10 +74,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of desired_deployment if self.desired_deployment: - _dict["desired_deployment"] = self.desired_deployment.to_dict() + _dict['desired_deployment'] = self.desired_deployment.to_dict() # override the default output from pydantic by calling `to_dict()` of auto_release if self.auto_release: - _dict["auto_release"] = self.auto_release.to_dict() + _dict['auto_release'] = self.auto_release.to_dict() return _dict @classmethod @@ -89,16 +89,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "desired_deployment": DesiredDeployment.from_dict( - obj["desired_deployment"] - ) - if obj.get("desired_deployment") is not None - else None, - "auto_release": AutoRelease.from_dict(obj["auto_release"]) - if obj.get("auto_release") is not None - else None, - } - ) + _obj = cls.model_validate({ + "desired_deployment": DesiredDeployment.from_dict(obj["desired_deployment"]) if obj.get("desired_deployment") is not None else None, + "auto_release": AutoRelease.from_dict(obj["auto_release"]) if obj.get("auto_release") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/service_status.py b/koyeb/api/models/service_status.py index 2fde4c67..f0f5bfb1 100644 --- a/koyeb/api/models/service_status.py +++ b/koyeb/api/models/service_status.py @@ -26,17 +26,19 @@ class ServiceStatus(str, Enum): """ allowed enum values """ - STARTING = "STARTING" - HEALTHY = "HEALTHY" - DEGRADED = "DEGRADED" - UNHEALTHY = "UNHEALTHY" - DELETING = "DELETING" - DELETED = "DELETED" - PAUSING = "PAUSING" - PAUSED = "PAUSED" - RESUMING = "RESUMING" + STARTING = 'STARTING' + HEALTHY = 'HEALTHY' + DEGRADED = 'DEGRADED' + UNHEALTHY = 'UNHEALTHY' + DELETING = 'DELETING' + DELETED = 'DELETED' + PAUSING = 'PAUSING' + PAUSED = 'PAUSED' + RESUMING = 'RESUMING' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ServiceStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/service_summary.py b/koyeb/api/models/service_summary.py index 8c661d03..5f36d154 100644 --- a/koyeb/api/models/service_summary.py +++ b/koyeb/api/models/service_summary.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ServiceSummary(BaseModel): """ ServiceSummary - """ # noqa: E501 - + """ # noqa: E501 total: Optional[StrictStr] = None by_status: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["total", "by_status"] @@ -40,6 +38,7 @@ class ServiceSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"total": obj.get("total"), "by_status": obj.get("by_status")} - ) + _obj = cls.model_validate({ + "total": obj.get("total"), + "by_status": obj.get("by_status") + }) return _obj + + diff --git a/koyeb/api/models/service_type.py b/koyeb/api/models/service_type.py index 7f839c5b..684e867e 100644 --- a/koyeb/api/models/service_type.py +++ b/koyeb/api/models/service_type.py @@ -26,13 +26,15 @@ class ServiceType(str, Enum): """ allowed enum values """ - INVALID_TYPE = "INVALID_TYPE" - WEB = "WEB" - WORKER = "WORKER" - DATABASE = "DATABASE" - SANDBOX = "SANDBOX" + INVALID_TYPE = 'INVALID_TYPE' + WEB = 'WEB' + WORKER = 'WORKER' + DATABASE = 'DATABASE' + SANDBOX = 'SANDBOX' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ServiceType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/service_usage.py b/koyeb/api/models/service_usage.py index 5f7ebb1b..862052de 100644 --- a/koyeb/api/models/service_usage.py +++ b/koyeb/api/models/service_usage.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ServiceUsage(BaseModel): """ ServiceUsage - """ # noqa: E501 - + """ # noqa: E501 service_id: Optional[StrictStr] = None service_name: Optional[StrictStr] = None regions: Optional[Dict[str, RegionUsage]] = None @@ -42,6 +40,7 @@ class ServiceUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -76,12 +76,9 @@ def to_dict(self) -> Dict[str, Any]: _field_dict = {} if self.regions: for _key_regions in self.regions: - _field_dict[_key_regions] = ( - self.regions[_key_regions].to_dict() - if self.regions[_key_regions] is not None - else None - ) - _dict["regions"] = _field_dict + if self.regions[_key_regions]: + _field_dict[_key_regions] = self.regions[_key_regions].to_dict() + _dict['regions'] = _field_dict return _dict @classmethod @@ -93,15 +90,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service_id": obj.get("service_id"), - "service_name": obj.get("service_name"), - "regions": dict( - (_k, RegionUsage.from_dict(_v)) for _k, _v in obj["regions"].items() - ) - if obj.get("regions") is not None - else None, - } - ) + _obj = cls.model_validate({ + "service_id": obj.get("service_id"), + "service_name": obj.get("service_name"), + "regions": dict( + (_k, RegionUsage.from_dict(_v)) + for _k, _v in obj["regions"].items() + ) + if obj.get("regions") is not None + else None + }) return _obj + + diff --git a/koyeb/api/models/snapshot.py b/koyeb/api/models/snapshot.py index c9d83312..7690d461 100644 --- a/koyeb/api/models/snapshot.py +++ b/koyeb/api/models/snapshot.py @@ -26,12 +26,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Snapshot(BaseModel): """ The object that represents a snapshot. It can either be local, on a node, or remote, in a cold storage. - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None size: Optional[StrictInt] = None @@ -43,19 +41,7 @@ class Snapshot(BaseModel): region: Optional[StrictStr] = None status: Optional[SnapshotStatus] = SnapshotStatus.SNAPSHOT_STATUS_INVALID type: Optional[SnapshotType] = SnapshotType.SNAPSHOT_TYPE_INVALID - __properties: ClassVar[List[str]] = [ - "id", - "name", - "size", - "created_at", - "updated_at", - "deleted_at", - "organization_id", - "parent_volume_id", - "region", - "status", - "type", - ] + __properties: ClassVar[List[str]] = ["id", "name", "size", "created_at", "updated_at", "deleted_at", "organization_id", "parent_volume_id", "region", "status", "type"] model_config = ConfigDict( validate_by_name=True, @@ -64,6 +50,7 @@ class Snapshot(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -87,7 +74,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -105,23 +93,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "size": obj.get("size"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "deleted_at": obj.get("deleted_at"), - "organization_id": obj.get("organization_id"), - "parent_volume_id": obj.get("parent_volume_id"), - "region": obj.get("region"), - "status": obj.get("status") - if obj.get("status") is not None - else SnapshotStatus.SNAPSHOT_STATUS_INVALID, - "type": obj.get("type") - if obj.get("type") is not None - else SnapshotType.SNAPSHOT_TYPE_INVALID, - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "size": obj.get("size"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "deleted_at": obj.get("deleted_at"), + "organization_id": obj.get("organization_id"), + "parent_volume_id": obj.get("parent_volume_id"), + "region": obj.get("region"), + "status": obj.get("status") if obj.get("status") is not None else SnapshotStatus.SNAPSHOT_STATUS_INVALID, + "type": obj.get("type") if obj.get("type") is not None else SnapshotType.SNAPSHOT_TYPE_INVALID + }) return _obj + + diff --git a/koyeb/api/models/snapshot_status.py b/koyeb/api/models/snapshot_status.py index 014feb59..ec7f810c 100644 --- a/koyeb/api/models/snapshot_status.py +++ b/koyeb/api/models/snapshot_status.py @@ -26,14 +26,16 @@ class SnapshotStatus(str, Enum): """ allowed enum values """ - SNAPSHOT_STATUS_INVALID = "SNAPSHOT_STATUS_INVALID" - SNAPSHOT_STATUS_CREATING = "SNAPSHOT_STATUS_CREATING" - SNAPSHOT_STATUS_AVAILABLE = "SNAPSHOT_STATUS_AVAILABLE" - SNAPSHOT_STATUS_MIGRATING = "SNAPSHOT_STATUS_MIGRATING" - SNAPSHOT_STATUS_DELETING = "SNAPSHOT_STATUS_DELETING" - SNAPSHOT_STATUS_DELETED = "SNAPSHOT_STATUS_DELETED" + SNAPSHOT_STATUS_INVALID = 'SNAPSHOT_STATUS_INVALID' + SNAPSHOT_STATUS_CREATING = 'SNAPSHOT_STATUS_CREATING' + SNAPSHOT_STATUS_AVAILABLE = 'SNAPSHOT_STATUS_AVAILABLE' + SNAPSHOT_STATUS_MIGRATING = 'SNAPSHOT_STATUS_MIGRATING' + SNAPSHOT_STATUS_DELETING = 'SNAPSHOT_STATUS_DELETING' + SNAPSHOT_STATUS_DELETED = 'SNAPSHOT_STATUS_DELETED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SnapshotStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/snapshot_type.py b/koyeb/api/models/snapshot_type.py index ff34880b..bbe3f47a 100644 --- a/koyeb/api/models/snapshot_type.py +++ b/koyeb/api/models/snapshot_type.py @@ -26,11 +26,13 @@ class SnapshotType(str, Enum): """ allowed enum values """ - SNAPSHOT_TYPE_INVALID = "SNAPSHOT_TYPE_INVALID" - SNAPSHOT_TYPE_LOCAL = "SNAPSHOT_TYPE_LOCAL" - SNAPSHOT_TYPE_REMOTE = "SNAPSHOT_TYPE_REMOTE" + SNAPSHOT_TYPE_INVALID = 'SNAPSHOT_TYPE_INVALID' + SNAPSHOT_TYPE_LOCAL = 'SNAPSHOT_TYPE_LOCAL' + SNAPSHOT_TYPE_REMOTE = 'SNAPSHOT_TYPE_REMOTE' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SnapshotType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/stream_result_of_exec_command_reply.py b/koyeb/api/models/stream_result_of_exec_command_reply.py index 2bebe9cb..eeaa66c1 100644 --- a/koyeb/api/models/stream_result_of_exec_command_reply.py +++ b/koyeb/api/models/stream_result_of_exec_command_reply.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class StreamResultOfExecCommandReply(BaseModel): """ StreamResultOfExecCommandReply - """ # noqa: E501 - + """ # noqa: E501 result: Optional[ExecCommandReply] = None error: Optional[GoogleRpcStatus] = None __properties: ClassVar[List[str]] = ["result", "error"] @@ -42,6 +40,7 @@ class StreamResultOfExecCommandReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,10 +74,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of result if self.result: - _dict["result"] = self.result.to_dict() + _dict['result'] = self.result.to_dict() # override the default output from pydantic by calling `to_dict()` of error if self.error: - _dict["error"] = self.error.to_dict() + _dict['error'] = self.error.to_dict() return _dict @classmethod @@ -89,14 +89,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "result": ExecCommandReply.from_dict(obj["result"]) - if obj.get("result") is not None - else None, - "error": GoogleRpcStatus.from_dict(obj["error"]) - if obj.get("error") is not None - else None, - } - ) + _obj = cls.model_validate({ + "result": ExecCommandReply.from_dict(obj["result"]) if obj.get("result") is not None else None, + "error": GoogleRpcStatus.from_dict(obj["error"]) if obj.get("error") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/stream_result_of_log_entry.py b/koyeb/api/models/stream_result_of_log_entry.py index ea5076ae..e4818d19 100644 --- a/koyeb/api/models/stream_result_of_log_entry.py +++ b/koyeb/api/models/stream_result_of_log_entry.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class StreamResultOfLogEntry(BaseModel): """ StreamResultOfLogEntry - """ # noqa: E501 - + """ # noqa: E501 result: Optional[LogEntry] = None error: Optional[GoogleRpcStatus] = None __properties: ClassVar[List[str]] = ["result", "error"] @@ -42,6 +40,7 @@ class StreamResultOfLogEntry(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,10 +74,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of result if self.result: - _dict["result"] = self.result.to_dict() + _dict['result'] = self.result.to_dict() # override the default output from pydantic by calling `to_dict()` of error if self.error: - _dict["error"] = self.error.to_dict() + _dict['error'] = self.error.to_dict() return _dict @classmethod @@ -89,14 +89,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "result": LogEntry.from_dict(obj["result"]) - if obj.get("result") is not None - else None, - "error": GoogleRpcStatus.from_dict(obj["error"]) - if obj.get("error") is not None - else None, - } - ) + _obj = cls.model_validate({ + "result": LogEntry.from_dict(obj["result"]) if obj.get("result") is not None else None, + "error": GoogleRpcStatus.from_dict(obj["error"]) if obj.get("error") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/subscription.py b/koyeb/api/models/subscription.py index a41ffe87..7d1b4889 100644 --- a/koyeb/api/models/subscription.py +++ b/koyeb/api/models/subscription.py @@ -26,12 +26,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Subscription(BaseModel): """ Subscription - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -56,32 +54,7 @@ class Subscription(BaseModel): trial_ends_at: Optional[datetime] = None trial_max_spend: Optional[StrictStr] = None current_spend: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "updated_at", - "version", - "organization_id", - "stripe_subscription_id", - "status", - "messages", - "has_pending_update", - "stripe_pending_invoice_id", - "terminate_at", - "canceled_at", - "terminated_at", - "current_period_start", - "current_period_end", - "currency", - "amount_payable", - "amount_paid", - "amount_remaining", - "payment_failure", - "trialing", - "trial_ends_at", - "trial_max_spend", - "current_spend", - ] + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "version", "organization_id", "stripe_subscription_id", "status", "messages", "has_pending_update", "stripe_pending_invoice_id", "terminate_at", "canceled_at", "terminated_at", "current_period_start", "current_period_end", "currency", "amount_payable", "amount_paid", "amount_remaining", "payment_failure", "trialing", "trial_ends_at", "trial_max_spend", "current_spend"] model_config = ConfigDict( validate_by_name=True, @@ -90,6 +63,7 @@ class Subscription(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -113,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -122,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of payment_failure if self.payment_failure: - _dict["payment_failure"] = self.payment_failure.to_dict() + _dict['payment_failure'] = self.payment_failure.to_dict() return _dict @classmethod @@ -134,38 +109,32 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "version": obj.get("version"), - "organization_id": obj.get("organization_id"), - "stripe_subscription_id": obj.get("stripe_subscription_id"), - "status": obj.get("status") - if obj.get("status") is not None - else SubscriptionStatus.INVALID, - "messages": obj.get("messages"), - "has_pending_update": obj.get("has_pending_update"), - "stripe_pending_invoice_id": obj.get("stripe_pending_invoice_id"), - "terminate_at": obj.get("terminate_at"), - "canceled_at": obj.get("canceled_at"), - "terminated_at": obj.get("terminated_at"), - "current_period_start": obj.get("current_period_start"), - "current_period_end": obj.get("current_period_end"), - "currency": obj.get("currency"), - "amount_payable": obj.get("amount_payable"), - "amount_paid": obj.get("amount_paid"), - "amount_remaining": obj.get("amount_remaining"), - "payment_failure": SubscriptionPaymentFailure.from_dict( - obj["payment_failure"] - ) - if obj.get("payment_failure") is not None - else None, - "trialing": obj.get("trialing"), - "trial_ends_at": obj.get("trial_ends_at"), - "trial_max_spend": obj.get("trial_max_spend"), - "current_spend": obj.get("current_spend"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "version": obj.get("version"), + "organization_id": obj.get("organization_id"), + "stripe_subscription_id": obj.get("stripe_subscription_id"), + "status": obj.get("status") if obj.get("status") is not None else SubscriptionStatus.INVALID, + "messages": obj.get("messages"), + "has_pending_update": obj.get("has_pending_update"), + "stripe_pending_invoice_id": obj.get("stripe_pending_invoice_id"), + "terminate_at": obj.get("terminate_at"), + "canceled_at": obj.get("canceled_at"), + "terminated_at": obj.get("terminated_at"), + "current_period_start": obj.get("current_period_start"), + "current_period_end": obj.get("current_period_end"), + "currency": obj.get("currency"), + "amount_payable": obj.get("amount_payable"), + "amount_paid": obj.get("amount_paid"), + "amount_remaining": obj.get("amount_remaining"), + "payment_failure": SubscriptionPaymentFailure.from_dict(obj["payment_failure"]) if obj.get("payment_failure") is not None else None, + "trialing": obj.get("trialing"), + "trial_ends_at": obj.get("trial_ends_at"), + "trial_max_spend": obj.get("trial_max_spend"), + "current_spend": obj.get("current_spend") + }) return _obj + + diff --git a/koyeb/api/models/subscription_payment_failure.py b/koyeb/api/models/subscription_payment_failure.py index 66189e22..5a26fa06 100644 --- a/koyeb/api/models/subscription_payment_failure.py +++ b/koyeb/api/models/subscription_payment_failure.py @@ -20,19 +20,15 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.subscription_payment_failure_stripe_sdk import ( - SubscriptionPaymentFailureStripeSDK, -) +from koyeb.api.models.subscription_payment_failure_stripe_sdk import SubscriptionPaymentFailureStripeSDK from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class SubscriptionPaymentFailure(BaseModel): """ SubscriptionPaymentFailure - """ # noqa: E501 - + """ # noqa: E501 failed_at: Optional[datetime] = None next_attempt: Optional[datetime] = None attempt_count: Optional[StrictStr] = None @@ -43,18 +39,7 @@ class SubscriptionPaymentFailure(BaseModel): payment_method_required: Optional[StrictBool] = None redirect_url: Optional[StrictStr] = None stripe_sdk: Optional[SubscriptionPaymentFailureStripeSDK] = None - __properties: ClassVar[List[str]] = [ - "failed_at", - "next_attempt", - "attempt_count", - "error_code", - "error_reason", - "error_type", - "error_message", - "payment_method_required", - "redirect_url", - "stripe_sdk", - ] + __properties: ClassVar[List[str]] = ["failed_at", "next_attempt", "attempt_count", "error_code", "error_reason", "error_type", "error_message", "payment_method_required", "redirect_url", "stripe_sdk"] model_config = ConfigDict( validate_by_name=True, @@ -63,6 +48,7 @@ class SubscriptionPaymentFailure(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -86,7 +72,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -95,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of stripe_sdk if self.stripe_sdk: - _dict["stripe_sdk"] = self.stripe_sdk.to_dict() + _dict['stripe_sdk'] = self.stripe_sdk.to_dict() return _dict @classmethod @@ -107,22 +94,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "failed_at": obj.get("failed_at"), - "next_attempt": obj.get("next_attempt"), - "attempt_count": obj.get("attempt_count"), - "error_code": obj.get("error_code"), - "error_reason": obj.get("error_reason"), - "error_type": obj.get("error_type"), - "error_message": obj.get("error_message"), - "payment_method_required": obj.get("payment_method_required"), - "redirect_url": obj.get("redirect_url"), - "stripe_sdk": SubscriptionPaymentFailureStripeSDK.from_dict( - obj["stripe_sdk"] - ) - if obj.get("stripe_sdk") is not None - else None, - } - ) + _obj = cls.model_validate({ + "failed_at": obj.get("failed_at"), + "next_attempt": obj.get("next_attempt"), + "attempt_count": obj.get("attempt_count"), + "error_code": obj.get("error_code"), + "error_reason": obj.get("error_reason"), + "error_type": obj.get("error_type"), + "error_message": obj.get("error_message"), + "payment_method_required": obj.get("payment_method_required"), + "redirect_url": obj.get("redirect_url"), + "stripe_sdk": SubscriptionPaymentFailureStripeSDK.from_dict(obj["stripe_sdk"]) if obj.get("stripe_sdk") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/subscription_payment_failure_stripe_sdk.py b/koyeb/api/models/subscription_payment_failure_stripe_sdk.py index 3e97164c..7af992ae 100644 --- a/koyeb/api/models/subscription_payment_failure_stripe_sdk.py +++ b/koyeb/api/models/subscription_payment_failure_stripe_sdk.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class SubscriptionPaymentFailureStripeSDK(BaseModel): """ SubscriptionPaymentFailureStripeSDK - """ # noqa: E501 - + """ # noqa: E501 client_secret_key: Optional[StrictStr] = None raw_json: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["client_secret_key", "raw_json"] @@ -40,6 +38,7 @@ class SubscriptionPaymentFailureStripeSDK(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,10 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "client_secret_key": obj.get("client_secret_key"), - "raw_json": obj.get("raw_json"), - } - ) + _obj = cls.model_validate({ + "client_secret_key": obj.get("client_secret_key"), + "raw_json": obj.get("raw_json") + }) return _obj + + diff --git a/koyeb/api/models/subscription_status.py b/koyeb/api/models/subscription_status.py index 9ca68e76..486f6efa 100644 --- a/koyeb/api/models/subscription_status.py +++ b/koyeb/api/models/subscription_status.py @@ -26,17 +26,19 @@ class SubscriptionStatus(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - CREATED = "CREATED" - ACTIVE = "ACTIVE" - WARNING = "WARNING" - URGENT = "URGENT" - CANCELING = "CANCELING" - CANCELED = "CANCELED" - TERMINATING = "TERMINATING" - TERMINATED = "TERMINATED" + INVALID = 'INVALID' + CREATED = 'CREATED' + ACTIVE = 'ACTIVE' + WARNING = 'WARNING' + URGENT = 'URGENT' + CANCELING = 'CANCELING' + CANCELED = 'CANCELED' + TERMINATING = 'TERMINATING' + TERMINATED = 'TERMINATED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SubscriptionStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/tcp_health_check.py b/koyeb/api/models/tcp_health_check.py index a2938aed..dc9ba685 100644 --- a/koyeb/api/models/tcp_health_check.py +++ b/koyeb/api/models/tcp_health_check.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class TCPHealthCheck(BaseModel): """ TCPHealthCheck - """ # noqa: E501 - + """ # noqa: E501 port: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["port"] @@ -39,6 +37,7 @@ class TCPHealthCheck(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"port": obj.get("port")}) + _obj = cls.model_validate({ + "port": obj.get("port") + }) return _obj + + diff --git a/koyeb/api/models/token.py b/koyeb/api/models/token.py index bc4f8c88..79f495a6 100644 --- a/koyeb/api/models/token.py +++ b/koyeb/api/models/token.py @@ -24,22 +24,15 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Token(BaseModel): """ Token - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None user_id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None expires_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = [ - "id", - "user_id", - "organization_id", - "expires_at", - ] + __properties: ClassVar[List[str]] = ["id", "user_id", "organization_id", "expires_at"] model_config = ConfigDict( validate_by_name=True, @@ -48,6 +41,7 @@ class Token(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -71,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -89,12 +84,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "user_id": obj.get("user_id"), - "organization_id": obj.get("organization_id"), - "expires_at": obj.get("expires_at"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "user_id": obj.get("user_id"), + "organization_id": obj.get("organization_id"), + "expires_at": obj.get("expires_at") + }) return _obj + + diff --git a/koyeb/api/models/trigger_deployment_metadata.py b/koyeb/api/models/trigger_deployment_metadata.py index 8855f265..ead04fe0 100644 --- a/koyeb/api/models/trigger_deployment_metadata.py +++ b/koyeb/api/models/trigger_deployment_metadata.py @@ -19,31 +19,19 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.trigger_deployment_metadata_actor_type import ( - TriggerDeploymentMetadataActorType, -) -from koyeb.api.models.trigger_deployment_metadata_trigger_type import ( - TriggerDeploymentMetadataTriggerType, -) -from koyeb.api.models.trigger_git_deployment_metadata import ( - TriggerGitDeploymentMetadata, -) +from koyeb.api.models.trigger_deployment_metadata_actor_type import TriggerDeploymentMetadataActorType +from koyeb.api.models.trigger_deployment_metadata_trigger_type import TriggerDeploymentMetadataTriggerType +from koyeb.api.models.trigger_git_deployment_metadata import TriggerGitDeploymentMetadata from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class TriggerDeploymentMetadata(BaseModel): """ TriggerDeploymentMetadata - """ # noqa: E501 - - type: Optional[ - TriggerDeploymentMetadataTriggerType - ] = TriggerDeploymentMetadataTriggerType.UNKNOWN_TYPE - actor: Optional[ - TriggerDeploymentMetadataActorType - ] = TriggerDeploymentMetadataActorType.UNKNOWN_ACTOR + """ # noqa: E501 + type: Optional[TriggerDeploymentMetadataTriggerType] = TriggerDeploymentMetadataTriggerType.UNKNOWN_TYPE + actor: Optional[TriggerDeploymentMetadataActorType] = TriggerDeploymentMetadataActorType.UNKNOWN_ACTOR git: Optional[TriggerGitDeploymentMetadata] = None __properties: ClassVar[List[str]] = ["type", "actor", "git"] @@ -54,6 +42,7 @@ class TriggerDeploymentMetadata(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +76,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of git if self.git: - _dict["git"] = self.git.to_dict() + _dict['git'] = self.git.to_dict() return _dict @classmethod @@ -98,17 +88,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "type": obj.get("type") - if obj.get("type") is not None - else TriggerDeploymentMetadataTriggerType.UNKNOWN_TYPE, - "actor": obj.get("actor") - if obj.get("actor") is not None - else TriggerDeploymentMetadataActorType.UNKNOWN_ACTOR, - "git": TriggerGitDeploymentMetadata.from_dict(obj["git"]) - if obj.get("git") is not None - else None, - } - ) + _obj = cls.model_validate({ + "type": obj.get("type") if obj.get("type") is not None else TriggerDeploymentMetadataTriggerType.UNKNOWN_TYPE, + "actor": obj.get("actor") if obj.get("actor") is not None else TriggerDeploymentMetadataActorType.UNKNOWN_ACTOR, + "git": TriggerGitDeploymentMetadata.from_dict(obj["git"]) if obj.get("git") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/trigger_deployment_metadata_actor_type.py b/koyeb/api/models/trigger_deployment_metadata_actor_type.py index 13d05047..a74aa835 100644 --- a/koyeb/api/models/trigger_deployment_metadata_actor_type.py +++ b/koyeb/api/models/trigger_deployment_metadata_actor_type.py @@ -26,11 +26,13 @@ class TriggerDeploymentMetadataActorType(str, Enum): """ allowed enum values """ - UNKNOWN_ACTOR = "UNKNOWN_ACTOR" - USER = "USER" - SYSTEM = "SYSTEM" + UNKNOWN_ACTOR = 'UNKNOWN_ACTOR' + USER = 'USER' + SYSTEM = 'SYSTEM' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of TriggerDeploymentMetadataActorType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/trigger_deployment_metadata_trigger_type.py b/koyeb/api/models/trigger_deployment_metadata_trigger_type.py index 71bfb900..3aac8381 100644 --- a/koyeb/api/models/trigger_deployment_metadata_trigger_type.py +++ b/koyeb/api/models/trigger_deployment_metadata_trigger_type.py @@ -26,12 +26,14 @@ class TriggerDeploymentMetadataTriggerType(str, Enum): """ allowed enum values """ - UNKNOWN_TYPE = "UNKNOWN_TYPE" - GIT = "GIT" - RESUME = "RESUME" - DATABASE_SYNC = "DATABASE_SYNC" + UNKNOWN_TYPE = 'UNKNOWN_TYPE' + GIT = 'GIT' + RESUME = 'RESUME' + DATABASE_SYNC = 'DATABASE_SYNC' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of TriggerDeploymentMetadataTriggerType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/trigger_git_deployment_metadata.py b/koyeb/api/models/trigger_git_deployment_metadata.py index 46b3f2e0..7abbdc05 100644 --- a/koyeb/api/models/trigger_git_deployment_metadata.py +++ b/koyeb/api/models/trigger_git_deployment_metadata.py @@ -19,22 +19,16 @@ from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.trigger_git_deployment_metadata_provider import ( - TriggerGitDeploymentMetadataProvider, -) +from koyeb.api.models.trigger_git_deployment_metadata_provider import TriggerGitDeploymentMetadataProvider from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class TriggerGitDeploymentMetadata(BaseModel): """ TriggerGitDeploymentMetadata - """ # noqa: E501 - - provider: Optional[ - TriggerGitDeploymentMetadataProvider - ] = TriggerGitDeploymentMetadataProvider.UNKNOWN + """ # noqa: E501 + provider: Optional[TriggerGitDeploymentMetadataProvider] = TriggerGitDeploymentMetadataProvider.UNKNOWN repository: Optional[StrictStr] = None branch: Optional[StrictStr] = None sha: Optional[StrictStr] = None @@ -42,16 +36,7 @@ class TriggerGitDeploymentMetadata(BaseModel): sender_username: Optional[StrictStr] = None sender_avatar_url: Optional[StrictStr] = None sender_profile_url: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "provider", - "repository", - "branch", - "sha", - "message", - "sender_username", - "sender_avatar_url", - "sender_profile_url", - ] + __properties: ClassVar[List[str]] = ["provider", "repository", "branch", "sha", "message", "sender_username", "sender_avatar_url", "sender_profile_url"] model_config = ConfigDict( validate_by_name=True, @@ -60,6 +45,7 @@ class TriggerGitDeploymentMetadata(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -83,7 +69,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -101,18 +88,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "provider": obj.get("provider") - if obj.get("provider") is not None - else TriggerGitDeploymentMetadataProvider.UNKNOWN, - "repository": obj.get("repository"), - "branch": obj.get("branch"), - "sha": obj.get("sha"), - "message": obj.get("message"), - "sender_username": obj.get("sender_username"), - "sender_avatar_url": obj.get("sender_avatar_url"), - "sender_profile_url": obj.get("sender_profile_url"), - } - ) + _obj = cls.model_validate({ + "provider": obj.get("provider") if obj.get("provider") is not None else TriggerGitDeploymentMetadataProvider.UNKNOWN, + "repository": obj.get("repository"), + "branch": obj.get("branch"), + "sha": obj.get("sha"), + "message": obj.get("message"), + "sender_username": obj.get("sender_username"), + "sender_avatar_url": obj.get("sender_avatar_url"), + "sender_profile_url": obj.get("sender_profile_url") + }) return _obj + + diff --git a/koyeb/api/models/trigger_git_deployment_metadata_provider.py b/koyeb/api/models/trigger_git_deployment_metadata_provider.py index 41c0f8de..c2f10198 100644 --- a/koyeb/api/models/trigger_git_deployment_metadata_provider.py +++ b/koyeb/api/models/trigger_git_deployment_metadata_provider.py @@ -26,10 +26,12 @@ class TriggerGitDeploymentMetadataProvider(str, Enum): """ allowed enum values """ - UNKNOWN = "UNKNOWN" - GITHUB = "GITHUB" + UNKNOWN = 'UNKNOWN' + GITHUB = 'GITHUB' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of TriggerGitDeploymentMetadataProvider from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/update_app.py b/koyeb/api/models/update_app.py index 14d24477..af919983 100644 --- a/koyeb/api/models/update_app.py +++ b/koyeb/api/models/update_app.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateApp(BaseModel): """ UpdateApp - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None life_cycle: Optional[AppLifeCycle] = None __properties: ClassVar[List[str]] = ["name", "life_cycle"] @@ -41,6 +39,7 @@ class UpdateApp(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of life_cycle if self.life_cycle: - _dict["life_cycle"] = self.life_cycle.to_dict() + _dict['life_cycle'] = self.life_cycle.to_dict() return _dict @classmethod @@ -85,12 +85,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "life_cycle": AppLifeCycle.from_dict(obj["life_cycle"]) - if obj.get("life_cycle") is not None - else None, - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "life_cycle": AppLifeCycle.from_dict(obj["life_cycle"]) if obj.get("life_cycle") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/update_app_reply.py b/koyeb/api/models/update_app_reply.py index 9069e794..7b90209c 100644 --- a/koyeb/api/models/update_app_reply.py +++ b/koyeb/api/models/update_app_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateAppReply(BaseModel): """ UpdateAppReply - """ # noqa: E501 - + """ # noqa: E501 app: Optional[App] = None __properties: ClassVar[List[str]] = ["app"] @@ -40,6 +38,7 @@ class UpdateAppReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of app if self.app: - _dict["app"] = self.app.to_dict() + _dict['app'] = self.app.to_dict() return _dict @classmethod @@ -84,7 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"app": App.from_dict(obj["app"]) if obj.get("app") is not None else None} - ) + _obj = cls.model_validate({ + "app": App.from_dict(obj["app"]) if obj.get("app") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/update_budget_reply.py b/koyeb/api/models/update_budget_reply.py index 1df4d92e..1780ce6f 100644 --- a/koyeb/api/models/update_budget_reply.py +++ b/koyeb/api/models/update_budget_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateBudgetReply(BaseModel): """ UpdateBudgetReply - """ # noqa: E501 - + """ # noqa: E501 budget: Optional[Budget] = None __properties: ClassVar[List[str]] = ["budget"] @@ -40,6 +38,7 @@ class UpdateBudgetReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of budget if self.budget: - _dict["budget"] = self.budget.to_dict() + _dict['budget'] = self.budget.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "budget": Budget.from_dict(obj["budget"]) - if obj.get("budget") is not None - else None - } - ) + _obj = cls.model_validate({ + "budget": Budget.from_dict(obj["budget"]) if obj.get("budget") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/update_budget_request.py b/koyeb/api/models/update_budget_request.py index 03739342..37e6e091 100644 --- a/koyeb/api/models/update_budget_request.py +++ b/koyeb/api/models/update_budget_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateBudgetRequest(BaseModel): """ UpdateBudgetRequest - """ # noqa: E501 - + """ # noqa: E501 amount: Optional[StrictStr] = Field(default=None, description="In cents.") __properties: ClassVar[List[str]] = ["amount"] @@ -39,6 +37,7 @@ class UpdateBudgetRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"amount": obj.get("amount")}) + _obj = cls.model_validate({ + "amount": obj.get("amount") + }) return _obj + + diff --git a/koyeb/api/models/update_credential_reply.py b/koyeb/api/models/update_credential_reply.py index 4a4e4d1e..bc949438 100644 --- a/koyeb/api/models/update_credential_reply.py +++ b/koyeb/api/models/update_credential_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateCredentialReply(BaseModel): """ UpdateCredentialReply - """ # noqa: E501 - + """ # noqa: E501 credential: Optional[Credential] = None __properties: ClassVar[List[str]] = ["credential"] @@ -40,6 +38,7 @@ class UpdateCredentialReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of credential if self.credential: - _dict["credential"] = self.credential.to_dict() + _dict['credential'] = self.credential.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "credential": Credential.from_dict(obj["credential"]) - if obj.get("credential") is not None - else None - } - ) + _obj = cls.model_validate({ + "credential": Credential.from_dict(obj["credential"]) if obj.get("credential") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/update_domain.py b/koyeb/api/models/update_domain.py index ab77593a..603ab46e 100644 --- a/koyeb/api/models/update_domain.py +++ b/koyeb/api/models/update_domain.py @@ -23,18 +23,12 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateDomain(BaseModel): """ UpdateDomain - """ # noqa: E501 - - app_id: Optional[StrictStr] = Field( - default=None, description="To attach or detach from an app for custom domain." - ) - subdomain: Optional[StrictStr] = Field( - default=None, description="To change subdomain for auto-assigned domain." - ) + """ # noqa: E501 + app_id: Optional[StrictStr] = Field(default=None, description="To attach or detach from an app for custom domain.") + subdomain: Optional[StrictStr] = Field(default=None, description="To change subdomain for auto-assigned domain.") __properties: ClassVar[List[str]] = ["app_id", "subdomain"] model_config = ConfigDict( @@ -44,6 +38,7 @@ class UpdateDomain(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -85,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"app_id": obj.get("app_id"), "subdomain": obj.get("subdomain")} - ) + _obj = cls.model_validate({ + "app_id": obj.get("app_id"), + "subdomain": obj.get("subdomain") + }) return _obj + + diff --git a/koyeb/api/models/update_domain_reply.py b/koyeb/api/models/update_domain_reply.py index 680d7fdb..f0824dcc 100644 --- a/koyeb/api/models/update_domain_reply.py +++ b/koyeb/api/models/update_domain_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateDomainReply(BaseModel): """ UpdateDomainReply - """ # noqa: E501 - + """ # noqa: E501 domain: Optional[Domain] = None __properties: ClassVar[List[str]] = ["domain"] @@ -40,6 +38,7 @@ class UpdateDomainReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of domain if self.domain: - _dict["domain"] = self.domain.to_dict() + _dict['domain'] = self.domain.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "domain": Domain.from_dict(obj["domain"]) - if obj.get("domain") is not None - else None - } - ) + _obj = cls.model_validate({ + "domain": Domain.from_dict(obj["domain"]) if obj.get("domain") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/update_organization_default_project_reply.py b/koyeb/api/models/update_organization_default_project_reply.py index fcce2520..da8f6299 100644 --- a/koyeb/api/models/update_organization_default_project_reply.py +++ b/koyeb/api/models/update_organization_default_project_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateOrganizationDefaultProjectReply(BaseModel): """ UpdateOrganizationDefaultProjectReply - """ # noqa: E501 - + """ # noqa: E501 organization: Optional[Organization] = None __properties: ClassVar[List[str]] = ["organization"] @@ -40,6 +38,7 @@ class UpdateOrganizationDefaultProjectReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization": Organization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None - } - ) + _obj = cls.model_validate({ + "organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/update_organization_default_project_request.py b/koyeb/api/models/update_organization_default_project_request.py index 6a94af83..9170f668 100644 --- a/koyeb/api/models/update_organization_default_project_request.py +++ b/koyeb/api/models/update_organization_default_project_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateOrganizationDefaultProjectRequest(BaseModel): """ UpdateOrganizationDefaultProjectRequest - """ # noqa: E501 - + """ # noqa: E501 default_project_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["default_project_id"] @@ -39,6 +37,7 @@ class UpdateOrganizationDefaultProjectRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"default_project_id": obj.get("default_project_id")}) + _obj = cls.model_validate({ + "default_project_id": obj.get("default_project_id") + }) return _obj + + diff --git a/koyeb/api/models/update_organization_name_reply.py b/koyeb/api/models/update_organization_name_reply.py index 6b1c4855..d7b19f01 100644 --- a/koyeb/api/models/update_organization_name_reply.py +++ b/koyeb/api/models/update_organization_name_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateOrganizationNameReply(BaseModel): """ UpdateOrganizationNameReply - """ # noqa: E501 - + """ # noqa: E501 organization: Optional[Organization] = None __properties: ClassVar[List[str]] = ["organization"] @@ -40,6 +38,7 @@ class UpdateOrganizationNameReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization": Organization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None - } - ) + _obj = cls.model_validate({ + "organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/update_organization_name_request.py b/koyeb/api/models/update_organization_name_request.py index 93f1f05e..a2c26fc5 100644 --- a/koyeb/api/models/update_organization_name_request.py +++ b/koyeb/api/models/update_organization_name_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateOrganizationNameRequest(BaseModel): """ UpdateOrganizationNameRequest - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name"] @@ -39,6 +37,7 @@ class UpdateOrganizationNameRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"name": obj.get("name")}) + _obj = cls.model_validate({ + "name": obj.get("name") + }) return _obj + + diff --git a/koyeb/api/models/update_organization_plan_reply.py b/koyeb/api/models/update_organization_plan_reply.py index 1a1c7c20..0dc1c17d 100644 --- a/koyeb/api/models/update_organization_plan_reply.py +++ b/koyeb/api/models/update_organization_plan_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateOrganizationPlanReply(BaseModel): """ UpdateOrganizationPlanReply - """ # noqa: E501 - + """ # noqa: E501 organization: Optional[Organization] = None __properties: ClassVar[List[str]] = ["organization"] @@ -40,6 +38,7 @@ class UpdateOrganizationPlanReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization": Organization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None - } - ) + _obj = cls.model_validate({ + "organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/update_organization_plan_request.py b/koyeb/api/models/update_organization_plan_request.py index fca379be..6916acd8 100644 --- a/koyeb/api/models/update_organization_plan_request.py +++ b/koyeb/api/models/update_organization_plan_request.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateOrganizationPlanRequest(BaseModel): """ UpdateOrganizationPlanRequest - """ # noqa: E501 - + """ # noqa: E501 plan: Optional[Plan] = Plan.HOBBY coupon_code: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["plan", "coupon_code"] @@ -41,6 +39,7 @@ class UpdateOrganizationPlanRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,10 +82,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "plan": obj.get("plan") if obj.get("plan") is not None else Plan.HOBBY, - "coupon_code": obj.get("coupon_code"), - } - ) + _obj = cls.model_validate({ + "plan": obj.get("plan") if obj.get("plan") is not None else Plan.HOBBY, + "coupon_code": obj.get("coupon_code") + }) return _obj + + diff --git a/koyeb/api/models/update_organization_reply.py b/koyeb/api/models/update_organization_reply.py index 624d4192..7491a235 100644 --- a/koyeb/api/models/update_organization_reply.py +++ b/koyeb/api/models/update_organization_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateOrganizationReply(BaseModel): """ UpdateOrganizationReply - """ # noqa: E501 - + """ # noqa: E501 organization: Optional[Organization] = None __properties: ClassVar[List[str]] = ["organization"] @@ -40,6 +38,7 @@ class UpdateOrganizationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization": Organization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None - } - ) + _obj = cls.model_validate({ + "organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/update_password_request.py b/koyeb/api/models/update_password_request.py index 14dd558e..f87f352c 100644 --- a/koyeb/api/models/update_password_request.py +++ b/koyeb/api/models/update_password_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdatePasswordRequest(BaseModel): """ UpdatePasswordRequest - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None password: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id", "password"] @@ -40,6 +38,7 @@ class UpdatePasswordRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"id": obj.get("id"), "password": obj.get("password")} - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "password": obj.get("password") + }) return _obj + + diff --git a/koyeb/api/models/update_persistent_volume_reply.py b/koyeb/api/models/update_persistent_volume_reply.py index adc613cf..868c0ba5 100644 --- a/koyeb/api/models/update_persistent_volume_reply.py +++ b/koyeb/api/models/update_persistent_volume_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdatePersistentVolumeReply(BaseModel): """ UpdatePersistentVolumeReply - """ # noqa: E501 - + """ # noqa: E501 volume: Optional[PersistentVolume] = None __properties: ClassVar[List[str]] = ["volume"] @@ -40,6 +38,7 @@ class UpdatePersistentVolumeReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of volume if self.volume: - _dict["volume"] = self.volume.to_dict() + _dict['volume'] = self.volume.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "volume": PersistentVolume.from_dict(obj["volume"]) - if obj.get("volume") is not None - else None - } - ) + _obj = cls.model_validate({ + "volume": PersistentVolume.from_dict(obj["volume"]) if obj.get("volume") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/update_persistent_volume_request.py b/koyeb/api/models/update_persistent_volume_request.py index 26974afa..14852a46 100644 --- a/koyeb/api/models/update_persistent_volume_request.py +++ b/koyeb/api/models/update_persistent_volume_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdatePersistentVolumeRequest(BaseModel): """ UpdatePersistentVolumeRequest - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None max_size: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["name", "max_size"] @@ -40,6 +38,7 @@ class UpdatePersistentVolumeRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"name": obj.get("name"), "max_size": obj.get("max_size")} - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "max_size": obj.get("max_size") + }) return _obj + + diff --git a/koyeb/api/models/update_project_reply.py b/koyeb/api/models/update_project_reply.py index 8fc38a9f..f2e68b82 100644 --- a/koyeb/api/models/update_project_reply.py +++ b/koyeb/api/models/update_project_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateProjectReply(BaseModel): """ UpdateProjectReply - """ # noqa: E501 - + """ # noqa: E501 project: Optional[Project] = None __properties: ClassVar[List[str]] = ["project"] @@ -40,6 +38,7 @@ class UpdateProjectReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of project if self.project: - _dict["project"] = self.project.to_dict() + _dict['project'] = self.project.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "project": Project.from_dict(obj["project"]) - if obj.get("project") is not None - else None - } - ) + _obj = cls.model_validate({ + "project": Project.from_dict(obj["project"]) if obj.get("project") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/update_secret_reply.py b/koyeb/api/models/update_secret_reply.py index f0e0d9e5..0841791e 100644 --- a/koyeb/api/models/update_secret_reply.py +++ b/koyeb/api/models/update_secret_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateSecretReply(BaseModel): """ UpdateSecretReply - """ # noqa: E501 - + """ # noqa: E501 secret: Optional[Secret] = None __properties: ClassVar[List[str]] = ["secret"] @@ -40,6 +38,7 @@ class UpdateSecretReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of secret if self.secret: - _dict["secret"] = self.secret.to_dict() + _dict['secret'] = self.secret.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "secret": Secret.from_dict(obj["secret"]) - if obj.get("secret") is not None - else None - } - ) + _obj = cls.model_validate({ + "secret": Secret.from_dict(obj["secret"]) if obj.get("secret") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/update_service.py b/koyeb/api/models/update_service.py index 0ef296be..44737cd5 100644 --- a/koyeb/api/models/update_service.py +++ b/koyeb/api/models/update_service.py @@ -26,29 +26,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateService(BaseModel): """ UpdateService - """ # noqa: E501 - + """ # noqa: E501 definition: Optional[DeploymentDefinition] = None metadata: Optional[DeploymentMetadata] = None - skip_build: Optional[StrictBool] = Field( - default=None, - description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened.", - ) + skip_build: Optional[StrictBool] = Field(default=None, description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened.") save_only: Optional[StrictBool] = None life_cycle: Optional[ServiceLifeCycle] = None instance_snapshot_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "definition", - "metadata", - "skip_build", - "save_only", - "life_cycle", - "instance_snapshot_id", - ] + __properties: ClassVar[List[str]] = ["definition", "metadata", "skip_build", "save_only", "life_cycle", "instance_snapshot_id"] model_config = ConfigDict( validate_by_name=True, @@ -57,6 +45,7 @@ class UpdateService(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -80,7 +69,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -89,13 +79,13 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of definition if self.definition: - _dict["definition"] = self.definition.to_dict() + _dict['definition'] = self.definition.to_dict() # override the default output from pydantic by calling `to_dict()` of metadata if self.metadata: - _dict["metadata"] = self.metadata.to_dict() + _dict['metadata'] = self.metadata.to_dict() # override the default output from pydantic by calling `to_dict()` of life_cycle if self.life_cycle: - _dict["life_cycle"] = self.life_cycle.to_dict() + _dict['life_cycle'] = self.life_cycle.to_dict() return _dict @classmethod @@ -107,20 +97,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "definition": DeploymentDefinition.from_dict(obj["definition"]) - if obj.get("definition") is not None - else None, - "metadata": DeploymentMetadata.from_dict(obj["metadata"]) - if obj.get("metadata") is not None - else None, - "skip_build": obj.get("skip_build"), - "save_only": obj.get("save_only"), - "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) - if obj.get("life_cycle") is not None - else None, - "instance_snapshot_id": obj.get("instance_snapshot_id"), - } - ) + _obj = cls.model_validate({ + "definition": DeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None, + "metadata": DeploymentMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "skip_build": obj.get("skip_build"), + "save_only": obj.get("save_only"), + "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) if obj.get("life_cycle") is not None else None, + "instance_snapshot_id": obj.get("instance_snapshot_id") + }) return _obj + + diff --git a/koyeb/api/models/update_service_pool.py b/koyeb/api/models/update_service_pool.py index a9b5894f..5b925149 100644 --- a/koyeb/api/models/update_service_pool.py +++ b/koyeb/api/models/update_service_pool.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateServicePool(BaseModel): """ UpdateServicePool - """ # noqa: E501 - + """ # noqa: E501 size: Optional[StrictInt] = None definition: Optional[DeploymentDefinition] = None __properties: ClassVar[List[str]] = ["size", "definition"] @@ -41,6 +39,7 @@ class UpdateServicePool(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of definition if self.definition: - _dict["definition"] = self.definition.to_dict() + _dict['definition'] = self.definition.to_dict() return _dict @classmethod @@ -85,12 +85,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "size": obj.get("size"), - "definition": DeploymentDefinition.from_dict(obj["definition"]) - if obj.get("definition") is not None - else None, - } - ) + _obj = cls.model_validate({ + "size": obj.get("size"), + "definition": DeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/update_service_pool_reply.py b/koyeb/api/models/update_service_pool_reply.py index 473ad995..ffce029f 100644 --- a/koyeb/api/models/update_service_pool_reply.py +++ b/koyeb/api/models/update_service_pool_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateServicePoolReply(BaseModel): """ UpdateServicePoolReply - """ # noqa: E501 - + """ # noqa: E501 service_pool: Optional[ServicePool] = None __properties: ClassVar[List[str]] = ["service_pool"] @@ -40,6 +38,7 @@ class UpdateServicePoolReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of service_pool if self.service_pool: - _dict["service_pool"] = self.service_pool.to_dict() + _dict['service_pool'] = self.service_pool.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service_pool": ServicePool.from_dict(obj["service_pool"]) - if obj.get("service_pool") is not None - else None - } - ) + _obj = cls.model_validate({ + "service_pool": ServicePool.from_dict(obj["service_pool"]) if obj.get("service_pool") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/update_service_reply.py b/koyeb/api/models/update_service_reply.py index cc94eadd..654fdcc8 100644 --- a/koyeb/api/models/update_service_reply.py +++ b/koyeb/api/models/update_service_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateServiceReply(BaseModel): """ UpdateServiceReply - """ # noqa: E501 - + """ # noqa: E501 service: Optional[Service] = None __properties: ClassVar[List[str]] = ["service"] @@ -40,6 +38,7 @@ class UpdateServiceReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of service if self.service: - _dict["service"] = self.service.to_dict() + _dict['service'] = self.service.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service": Service.from_dict(obj["service"]) - if obj.get("service") is not None - else None - } - ) + _obj = cls.model_validate({ + "service": Service.from_dict(obj["service"]) if obj.get("service") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/update_service_scaling_request.py b/koyeb/api/models/update_service_scaling_request.py index c7476e86..d0c89f0c 100644 --- a/koyeb/api/models/update_service_scaling_request.py +++ b/koyeb/api/models/update_service_scaling_request.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateServiceScalingRequest(BaseModel): """ UpdateServiceScalingRequest - """ # noqa: E501 - + """ # noqa: E501 scalings: Optional[List[ManualServiceScaling]] = None __properties: ClassVar[List[str]] = ["scalings"] @@ -40,6 +38,7 @@ class UpdateServiceScalingRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,10 +74,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.scalings: for _item_scalings in self.scalings: - _items.append( - _item_scalings.to_dict() if _item_scalings is not None else None - ) - _dict["scalings"] = _items + if _item_scalings: + _items.append(_item_scalings.to_dict()) + _dict['scalings'] = _items return _dict @classmethod @@ -89,13 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "scalings": [ - ManualServiceScaling.from_dict(_item) for _item in obj["scalings"] - ] - if obj.get("scalings") is not None - else None - } - ) + _obj = cls.model_validate({ + "scalings": [ManualServiceScaling.from_dict(_item) for _item in obj["scalings"]] if obj.get("scalings") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/update_snapshot_reply.py b/koyeb/api/models/update_snapshot_reply.py index d9a81706..61200bd1 100644 --- a/koyeb/api/models/update_snapshot_reply.py +++ b/koyeb/api/models/update_snapshot_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateSnapshotReply(BaseModel): """ UpdateSnapshotReply - """ # noqa: E501 - + """ # noqa: E501 snapshot: Optional[Snapshot] = None __properties: ClassVar[List[str]] = ["snapshot"] @@ -40,6 +38,7 @@ class UpdateSnapshotReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of snapshot if self.snapshot: - _dict["snapshot"] = self.snapshot.to_dict() + _dict['snapshot'] = self.snapshot.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "snapshot": Snapshot.from_dict(obj["snapshot"]) - if obj.get("snapshot") is not None - else None - } - ) + _obj = cls.model_validate({ + "snapshot": Snapshot.from_dict(obj["snapshot"]) if obj.get("snapshot") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/update_snapshot_request.py b/koyeb/api/models/update_snapshot_request.py index f466cbee..801fc6b0 100644 --- a/koyeb/api/models/update_snapshot_request.py +++ b/koyeb/api/models/update_snapshot_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateSnapshotRequest(BaseModel): """ UpdateSnapshotRequest - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name"] @@ -39,6 +37,7 @@ class UpdateSnapshotRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"name": obj.get("name")}) + _obj = cls.model_validate({ + "name": obj.get("name") + }) return _obj + + diff --git a/koyeb/api/models/update_user_request_user_update_body.py b/koyeb/api/models/update_user_request_user_update_body.py index 0769c582..0a05660b 100644 --- a/koyeb/api/models/update_user_request_user_update_body.py +++ b/koyeb/api/models/update_user_request_user_update_body.py @@ -23,26 +23,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateUserRequestUserUpdateBody(BaseModel): """ UpdateUserRequestUserUpdateBody - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None email: Optional[StrictStr] = None current_password: Optional[StrictStr] = None password: Optional[StrictStr] = None newsletter_subscribed: Optional[StrictBool] = None name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "email", - "current_password", - "password", - "newsletter_subscribed", - "name", - ] + __properties: ClassVar[List[str]] = ["id", "email", "current_password", "password", "newsletter_subscribed", "name"] model_config = ConfigDict( validate_by_name=True, @@ -51,6 +42,7 @@ class UpdateUserRequestUserUpdateBody(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -92,14 +85,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "email": obj.get("email"), - "current_password": obj.get("current_password"), - "password": obj.get("password"), - "newsletter_subscribed": obj.get("newsletter_subscribed"), - "name": obj.get("name"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "email": obj.get("email"), + "current_password": obj.get("current_password"), + "password": obj.get("password"), + "newsletter_subscribed": obj.get("newsletter_subscribed"), + "name": obj.get("name") + }) return _obj + + diff --git a/koyeb/api/models/update_user_settings_reply.py b/koyeb/api/models/update_user_settings_reply.py index e7c20f2e..574cd59b 100644 --- a/koyeb/api/models/update_user_settings_reply.py +++ b/koyeb/api/models/update_user_settings_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateUserSettingsReply(BaseModel): """ UpdateUserSettingsReply - """ # noqa: E501 - + """ # noqa: E501 settings: Optional[UserSettings] = None __properties: ClassVar[List[str]] = ["settings"] @@ -40,6 +38,7 @@ class UpdateUserSettingsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of settings if self.settings: - _dict["settings"] = self.settings.to_dict() + _dict['settings'] = self.settings.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "settings": UserSettings.from_dict(obj["settings"]) - if obj.get("settings") is not None - else None - } - ) + _obj = cls.model_validate({ + "settings": UserSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/update_user_settings_request.py b/koyeb/api/models/update_user_settings_request.py index 0dd06786..33ff27fe 100644 --- a/koyeb/api/models/update_user_settings_request.py +++ b/koyeb/api/models/update_user_settings_request.py @@ -23,16 +23,11 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateUserSettingsRequest(BaseModel): """ UpdateUserSettingsRequest - """ # noqa: E501 - - failed_deployment_email_notification: Optional[StrictBool] = Field( - default=None, - description="(Optional) Toggle failed deployment email notification.", - ) + """ # noqa: E501 + failed_deployment_email_notification: Optional[StrictBool] = Field(default=None, description="(Optional) Toggle failed deployment email notification.") __properties: ClassVar[List[str]] = ["failed_deployment_email_notification"] model_config = ConfigDict( @@ -42,6 +37,7 @@ class UpdateUserSettingsRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,11 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "failed_deployment_email_notification": obj.get( - "failed_deployment_email_notification" - ) - } - ) + _obj = cls.model_validate({ + "failed_deployment_email_notification": obj.get("failed_deployment_email_notification") + }) return _obj + + diff --git a/koyeb/api/models/upsert_signup_qualification_reply.py b/koyeb/api/models/upsert_signup_qualification_reply.py index 9d959718..87a73530 100644 --- a/koyeb/api/models/upsert_signup_qualification_reply.py +++ b/koyeb/api/models/upsert_signup_qualification_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpsertSignupQualificationReply(BaseModel): """ UpsertSignupQualificationReply - """ # noqa: E501 - + """ # noqa: E501 organization: Optional[Organization] = None __properties: ClassVar[List[str]] = ["organization"] @@ -40,6 +38,7 @@ class UpsertSignupQualificationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization": Organization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None - } - ) + _obj = cls.model_validate({ + "organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/upsert_signup_qualification_request.py b/koyeb/api/models/upsert_signup_qualification_request.py index 3391bbb9..f89bab9b 100644 --- a/koyeb/api/models/upsert_signup_qualification_request.py +++ b/koyeb/api/models/upsert_signup_qualification_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpsertSignupQualificationRequest(BaseModel): """ UpsertSignupQualificationRequest - """ # noqa: E501 - + """ # noqa: E501 signup_qualification: Optional[Dict[str, Any]] = None __properties: ClassVar[List[str]] = ["signup_qualification"] @@ -39,6 +37,7 @@ class UpsertSignupQualificationRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,7 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"signup_qualification": obj.get("signup_qualification")} - ) + _obj = cls.model_validate({ + "signup_qualification": obj.get("signup_qualification") + }) return _obj + + diff --git a/koyeb/api/models/usage.py b/koyeb/api/models/usage.py index a4feb551..e0dd8541 100644 --- a/koyeb/api/models/usage.py +++ b/koyeb/api/models/usage.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Usage(BaseModel): """ Usage - """ # noqa: E501 - + """ # noqa: E501 organization_id: Optional[StrictStr] = None periods: Optional[Dict[str, PeriodUsage]] = None __properties: ClassVar[List[str]] = ["organization_id", "periods"] @@ -41,6 +39,7 @@ class Usage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -75,12 +75,9 @@ def to_dict(self) -> Dict[str, Any]: _field_dict = {} if self.periods: for _key_periods in self.periods: - _field_dict[_key_periods] = ( - self.periods[_key_periods].to_dict() - if self.periods[_key_periods] is not None - else None - ) - _dict["periods"] = _field_dict + if self.periods[_key_periods]: + _field_dict[_key_periods] = self.periods[_key_periods].to_dict() + _dict['periods'] = _field_dict return _dict @classmethod @@ -92,14 +89,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization_id": obj.get("organization_id"), - "periods": dict( - (_k, PeriodUsage.from_dict(_v)) for _k, _v in obj["periods"].items() - ) - if obj.get("periods") is not None - else None, - } - ) + _obj = cls.model_validate({ + "organization_id": obj.get("organization_id"), + "periods": dict( + (_k, PeriodUsage.from_dict(_v)) + for _k, _v in obj["periods"].items() + ) + if obj.get("periods") is not None + else None + }) return _obj + + diff --git a/koyeb/api/models/usage_details.py b/koyeb/api/models/usage_details.py index 4476e91f..1063d0da 100644 --- a/koyeb/api/models/usage_details.py +++ b/koyeb/api/models/usage_details.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UsageDetails(BaseModel): """ UsageDetails - """ # noqa: E501 - + """ # noqa: E501 organization_id: Optional[StrictStr] = None instance_id: Optional[StrictStr] = None app_id: Optional[StrictStr] = None @@ -43,21 +41,7 @@ class UsageDetails(BaseModel): duration_seconds: Optional[StrictInt] = None started_at: Optional[datetime] = None terminated_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = [ - "organization_id", - "instance_id", - "app_id", - "app_name", - "service_id", - "service_name", - "regional_deployment_id", - "region", - "deployment_id", - "instance_type", - "duration_seconds", - "started_at", - "terminated_at", - ] + __properties: ClassVar[List[str]] = ["organization_id", "instance_id", "app_id", "app_name", "service_id", "service_name", "regional_deployment_id", "region", "deployment_id", "instance_type", "duration_seconds", "started_at", "terminated_at"] model_config = ConfigDict( validate_by_name=True, @@ -66,6 +50,7 @@ class UsageDetails(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -89,7 +74,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -107,21 +93,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization_id": obj.get("organization_id"), - "instance_id": obj.get("instance_id"), - "app_id": obj.get("app_id"), - "app_name": obj.get("app_name"), - "service_id": obj.get("service_id"), - "service_name": obj.get("service_name"), - "regional_deployment_id": obj.get("regional_deployment_id"), - "region": obj.get("region"), - "deployment_id": obj.get("deployment_id"), - "instance_type": obj.get("instance_type"), - "duration_seconds": obj.get("duration_seconds"), - "started_at": obj.get("started_at"), - "terminated_at": obj.get("terminated_at"), - } - ) + _obj = cls.model_validate({ + "organization_id": obj.get("organization_id"), + "instance_id": obj.get("instance_id"), + "app_id": obj.get("app_id"), + "app_name": obj.get("app_name"), + "service_id": obj.get("service_id"), + "service_name": obj.get("service_name"), + "regional_deployment_id": obj.get("regional_deployment_id"), + "region": obj.get("region"), + "deployment_id": obj.get("deployment_id"), + "instance_type": obj.get("instance_type"), + "duration_seconds": obj.get("duration_seconds"), + "started_at": obj.get("started_at"), + "terminated_at": obj.get("terminated_at") + }) return _obj + + diff --git a/koyeb/api/models/user.py b/koyeb/api/models/user.py index 9a0192eb..1041b9ad 100644 --- a/koyeb/api/models/user.py +++ b/koyeb/api/models/user.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class User(BaseModel): """ User - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None email: Optional[StrictStr] = None avatar_url: Optional[StrictStr] = None @@ -46,23 +44,7 @@ class User(BaseModel): name: Optional[StrictStr] = None email_validated: Optional[StrictBool] = None trialed: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "id", - "email", - "avatar_url", - "two_factor_authentication", - "last_login", - "last_login_ip", - "updated_at", - "created_at", - "newsletter_subscribed", - "github_id", - "github_user", - "flags", - "name", - "email_validated", - "trialed", - ] + __properties: ClassVar[List[str]] = ["id", "email", "avatar_url", "two_factor_authentication", "last_login", "last_login_ip", "updated_at", "created_at", "newsletter_subscribed", "github_id", "github_user", "flags", "name", "email_validated", "trialed"] model_config = ConfigDict( validate_by_name=True, @@ -71,6 +53,7 @@ class User(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -94,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -112,23 +96,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "email": obj.get("email"), - "avatar_url": obj.get("avatar_url"), - "two_factor_authentication": obj.get("two_factor_authentication"), - "last_login": obj.get("last_login"), - "last_login_ip": obj.get("last_login_ip"), - "updated_at": obj.get("updated_at"), - "created_at": obj.get("created_at"), - "newsletter_subscribed": obj.get("newsletter_subscribed"), - "github_id": obj.get("github_id"), - "github_user": obj.get("github_user"), - "flags": obj.get("flags"), - "name": obj.get("name"), - "email_validated": obj.get("email_validated"), - "trialed": obj.get("trialed"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "email": obj.get("email"), + "avatar_url": obj.get("avatar_url"), + "two_factor_authentication": obj.get("two_factor_authentication"), + "last_login": obj.get("last_login"), + "last_login_ip": obj.get("last_login_ip"), + "updated_at": obj.get("updated_at"), + "created_at": obj.get("created_at"), + "newsletter_subscribed": obj.get("newsletter_subscribed"), + "github_id": obj.get("github_id"), + "github_user": obj.get("github_user"), + "flags": obj.get("flags"), + "name": obj.get("name"), + "email_validated": obj.get("email_validated"), + "trialed": obj.get("trialed") + }) return _obj + + diff --git a/koyeb/api/models/user_flags.py b/koyeb/api/models/user_flags.py index d17ba64c..4a31b7c9 100644 --- a/koyeb/api/models/user_flags.py +++ b/koyeb/api/models/user_flags.py @@ -26,23 +26,23 @@ class UserFlags(str, Enum): """ allowed enum values """ - ADMIN = "ADMIN" - TEST = "TEST" - RESTRICTED = "RESTRICTED" - ACTIVE = "ACTIVE" - BETA = "BETA" - MAX_ORGANIZATIONS_25 = "MAX_ORGANIZATIONS_25" - MAX_ORGANIZATIONS_100 = "MAX_ORGANIZATIONS_100" - MAX_ORGANIZATIONS_1000 = "MAX_ORGANIZATIONS_1000" - MAX_ORGANIZATIONS_10000 = "MAX_ORGANIZATIONS_10000" - MAX_ORGANIZATIONS_100000 = "MAX_ORGANIZATIONS_100000" - MAX_ORGANIZATIONS_1000000 = "MAX_ORGANIZATIONS_1000000" - PARTNER_CSP = "PARTNER_CSP" - IGNORE_ORGANIZATION_NAME_RESERVATION_RULE_NEON_PREFIX = ( - "IGNORE_ORGANIZATION_NAME_RESERVATION_RULE_NEON_PREFIX" - ) + ADMIN = 'ADMIN' + TEST = 'TEST' + RESTRICTED = 'RESTRICTED' + ACTIVE = 'ACTIVE' + BETA = 'BETA' + MAX_ORGANIZATIONS_25 = 'MAX_ORGANIZATIONS_25' + MAX_ORGANIZATIONS_100 = 'MAX_ORGANIZATIONS_100' + MAX_ORGANIZATIONS_1000 = 'MAX_ORGANIZATIONS_1000' + MAX_ORGANIZATIONS_10000 = 'MAX_ORGANIZATIONS_10000' + MAX_ORGANIZATIONS_100000 = 'MAX_ORGANIZATIONS_100000' + MAX_ORGANIZATIONS_1000000 = 'MAX_ORGANIZATIONS_1000000' + PARTNER_CSP = 'PARTNER_CSP' + IGNORE_ORGANIZATION_NAME_RESERVATION_RULE_NEON_PREFIX = 'IGNORE_ORGANIZATION_NAME_RESERVATION_RULE_NEON_PREFIX' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of UserFlags from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/user_reply.py b/koyeb/api/models/user_reply.py index 43a3c1ce..2adaf7c4 100644 --- a/koyeb/api/models/user_reply.py +++ b/koyeb/api/models/user_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UserReply(BaseModel): """ UserReply - """ # noqa: E501 - + """ # noqa: E501 user: Optional[User] = None __properties: ClassVar[List[str]] = ["user"] @@ -40,6 +38,7 @@ class UserReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of user if self.user: - _dict["user"] = self.user.to_dict() + _dict['user'] = self.user.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "user": User.from_dict(obj["user"]) - if obj.get("user") is not None - else None - } - ) + _obj = cls.model_validate({ + "user": User.from_dict(obj["user"]) if obj.get("user") is not None else None + }) return _obj + + diff --git a/koyeb/api/models/user_role_role.py b/koyeb/api/models/user_role_role.py index 900874be..f964e609 100644 --- a/koyeb/api/models/user_role_role.py +++ b/koyeb/api/models/user_role_role.py @@ -26,10 +26,12 @@ class UserRoleRole(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - OWNER = "OWNER" + INVALID = 'INVALID' + OWNER = 'OWNER' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of UserRoleRole from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/models/user_settings.py b/koyeb/api/models/user_settings.py index 3e77725c..1e7118b4 100644 --- a/koyeb/api/models/user_settings.py +++ b/koyeb/api/models/user_settings.py @@ -23,20 +23,14 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UserSettings(BaseModel): """ UserSettings - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None user_id: Optional[StrictStr] = None failed_deployment_email_notification: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "id", - "user_id", - "failed_deployment_email_notification", - ] + __properties: ClassVar[List[str]] = ["id", "user_id", "failed_deployment_email_notification"] model_config = ConfigDict( validate_by_name=True, @@ -45,6 +39,7 @@ class UserSettings(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -86,13 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "user_id": obj.get("user_id"), - "failed_deployment_email_notification": obj.get( - "failed_deployment_email_notification" - ), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "user_id": obj.get("user_id"), + "failed_deployment_email_notification": obj.get("failed_deployment_email_notification") + }) return _obj + + diff --git a/koyeb/api/models/verify_docker_image_reply.py b/koyeb/api/models/verify_docker_image_reply.py index d9414c7a..31e475ac 100644 --- a/koyeb/api/models/verify_docker_image_reply.py +++ b/koyeb/api/models/verify_docker_image_reply.py @@ -19,24 +19,18 @@ from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api.models.verify_docker_image_reply_err_code import ( - VerifyDockerImageReplyErrCode, -) +from koyeb.api.models.verify_docker_image_reply_err_code import VerifyDockerImageReplyErrCode from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class VerifyDockerImageReply(BaseModel): """ VerifyDockerImageReply - """ # noqa: E501 - + """ # noqa: E501 success: Optional[StrictBool] = None reason: Optional[StrictStr] = None - code: Optional[ - VerifyDockerImageReplyErrCode - ] = VerifyDockerImageReplyErrCode.UNKNOWN + code: Optional[VerifyDockerImageReplyErrCode] = VerifyDockerImageReplyErrCode.UNKNOWN __properties: ClassVar[List[str]] = ["success", "reason", "code"] model_config = ConfigDict( @@ -46,6 +40,7 @@ class VerifyDockerImageReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -87,13 +83,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "success": obj.get("success"), - "reason": obj.get("reason"), - "code": obj.get("code") - if obj.get("code") is not None - else VerifyDockerImageReplyErrCode.UNKNOWN, - } - ) + _obj = cls.model_validate({ + "success": obj.get("success"), + "reason": obj.get("reason"), + "code": obj.get("code") if obj.get("code") is not None else VerifyDockerImageReplyErrCode.UNKNOWN + }) return _obj + + diff --git a/koyeb/api/models/verify_docker_image_reply_err_code.py b/koyeb/api/models/verify_docker_image_reply_err_code.py index b3212b42..fb4d4ae6 100644 --- a/koyeb/api/models/verify_docker_image_reply_err_code.py +++ b/koyeb/api/models/verify_docker_image_reply_err_code.py @@ -26,21 +26,23 @@ class VerifyDockerImageReplyErrCode(str, Enum): """ allowed enum values """ - UNKNOWN = "UNKNOWN" - AUTH_ACCESS_DENIED = "AUTH_ACCESS_DENIED" - ANON_ACCESS_DENIED = "ANON_ACCESS_DENIED" - AUTH_NOT_FOUND = "AUTH_NOT_FOUND" - ANON_NOT_FOUND = "ANON_NOT_FOUND" - REGISTRY_ERROR = "REGISTRY_ERROR" - TIMEOUT = "TIMEOUT" - DNS = "DNS" - MALFORMED = "MALFORMED" - INVALID_OS = "INVALID_OS" - INVALID_ARCH = "INVALID_ARCH" - INVALID_SCHEME = "INVALID_SCHEME" - GENERIC = "GENERIC" + UNKNOWN = 'UNKNOWN' + AUTH_ACCESS_DENIED = 'AUTH_ACCESS_DENIED' + ANON_ACCESS_DENIED = 'ANON_ACCESS_DENIED' + AUTH_NOT_FOUND = 'AUTH_NOT_FOUND' + ANON_NOT_FOUND = 'ANON_NOT_FOUND' + REGISTRY_ERROR = 'REGISTRY_ERROR' + TIMEOUT = 'TIMEOUT' + DNS = 'DNS' + MALFORMED = 'MALFORMED' + INVALID_OS = 'INVALID_OS' + INVALID_ARCH = 'INVALID_ARCH' + INVALID_SCHEME = 'INVALID_SCHEME' + GENERIC = 'GENERIC' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of VerifyDockerImageReplyErrCode from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api/rest.py b/koyeb/api/rest.py index fc0ae49a..1b445b7d 100644 --- a/koyeb/api/rest.py +++ b/koyeb/api/rest.py @@ -37,23 +37,6 @@ def is_socks_proxy_url(url): return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES -def contenttype_matches(contenttype, maintype, subtype): - """Matches the given contenttype against the given type and subtype - - :param contenttype: the content type to match - :param maintype: the expected maintype - :param subtype: the expected subtype - :return: `true` when the given content type matches the given type and subtype, - regardless of the presence of mime type parameters, otherwise returns `false`. - :rtype: bool - """ - pattern = "{type}/(?:[^+;]+\\+)?{subtype}(?:[ \t]*;.*)?".format( - type=re.escape(maintype), - subtype=re.escape(subtype), - ) - return re.fullmatch(pattern, contenttype, re.IGNORECASE) is not None - - def should_bypass_proxies(url: str, no_proxy: str) -> bool: """Return whether ``url`` matches the comma-separated ``no_proxy`` rules.""" parsed_url = urlparse(url) @@ -67,10 +50,10 @@ def should_bypass_proxies(url: str, no_proxy: str) -> bool: except ValueError: host_ip = None - for entry in (entry.strip().lower() for entry in no_proxy.split(",")): + for entry in (entry.strip().lower() for entry in no_proxy.split(',')): if not entry: continue - if entry == "*": + if entry == '*': return True if host_ip is not None: @@ -80,12 +63,12 @@ def should_bypass_proxies(url: str, no_proxy: str) -> bool: except ValueError: pass - entry = entry.lstrip(".") + entry = entry.lstrip('.') if ( host == entry - or host.endswith("." + entry) + or host.endswith('.' + entry) or host_and_port == entry - or host_and_port.endswith("." + entry) + or host_and_port.endswith('.' + entry) ): return True @@ -93,6 +76,7 @@ def should_bypass_proxies(url: str, no_proxy: str) -> bool: class RESTResponse(io.IOBase): + def __init__(self, resp) -> None: self.response = resp self.status = resp.status @@ -119,6 +103,7 @@ def getheader(self, name, default=None): class RESTClientObject: + def __init__(self, configuration) -> None: # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 @@ -139,37 +124,37 @@ def __init__(self, configuration) -> None: "ca_cert_data": configuration.ca_cert_data, } if configuration.assert_hostname is not None: - pool_args["assert_hostname"] = configuration.assert_hostname + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) if configuration.retries is not None: - pool_args["retries"] = configuration.retries + pool_args['retries'] = configuration.retries if configuration.tls_server_name: - pool_args["server_hostname"] = configuration.tls_server_name + pool_args['server_hostname'] = configuration.tls_server_name + if configuration.socket_options is not None: - pool_args["socket_options"] = configuration.socket_options + pool_args['socket_options'] = configuration.socket_options if configuration.connection_pool_maxsize is not None: - pool_args["maxsize"] = configuration.connection_pool_maxsize + pool_args['maxsize'] = configuration.connection_pool_maxsize # https pool manager self.pool_manager: urllib3.PoolManager if configuration.proxy and not should_bypass_proxies( - configuration.host, configuration.no_proxy or "" + configuration.host, configuration.no_proxy or '' ): if is_socks_proxy_url(configuration.proxy): from urllib3.contrib.socks import SOCKSProxyManager - pool_args["proxy_url"] = configuration.proxy pool_args["headers"] = configuration.proxy_headers self.pool_manager = SOCKSProxyManager(**pool_args) else: pool_args["proxy_url"] = configuration.proxy pool_args["proxy_headers"] = configuration.proxy_headers - if configuration.proxy_ssl_context is not None: - pool_args["proxy_ssl_context"] = configuration.proxy_ssl_context self.pool_manager = urllib3.ProxyManager(**pool_args) else: self.pool_manager = urllib3.PoolManager(**pool_args) @@ -181,7 +166,7 @@ def request( headers=None, body=None, post_params=None, - _request_timeout=None, + _request_timeout=None ): """Perform requests. @@ -198,7 +183,15 @@ def request( (connection, read) timeouts. """ method = method.upper() - assert method in ["GET", "HEAD", "DELETE", "POST", "PUT", "PATCH", "OPTIONS"] + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] if post_params and body: raise ApiValueError( @@ -212,28 +205,30 @@ def request( if _request_timeout: if isinstance(_request_timeout, (int, float)): timeout = urllib3.Timeout(total=_request_timeout) - elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2: + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): timeout = urllib3.Timeout( - connect=_request_timeout[0], read=_request_timeout[1] + connect=_request_timeout[0], + read=_request_timeout[1] ) try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]: - content_type = headers.get("Content-Type") - is_json = not content_type or contenttype_matches( - content_type, "application", "json" + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + content_type = headers.get('Content-Type') + is_json = ( + not content_type + or re.search('json', content_type, re.IGNORECASE) ) # JSON is valid YAML 1.2, so structured YAML bodies can use # the existing JSON serializer: # https://yaml.org/spec/1.2.2/#13-relation-to-json is_structured_yaml = ( content_type - and ( - contenttype_matches(content_type, "application", "yaml") - or contenttype_matches(content_type, "text", "yaml") - or contenttype_matches(content_type, "text", "x-yaml") - ) + and re.search('yaml', content_type, re.IGNORECASE) and not isinstance(body, (str, bytes)) ) if is_json or is_structured_yaml: @@ -246,11 +241,9 @@ def request( body=request_body, timeout=timeout, headers=headers, - preload_content=False, + preload_content=False ) - elif contenttype_matches( - content_type, "application", "x-www-form-urlencoded" - ): + elif content_type == 'application/x-www-form-urlencoded': r = self.pool_manager.request( method, url, @@ -258,18 +251,15 @@ def request( encode_multipart=False, timeout=timeout, headers=headers, - preload_content=False, + preload_content=False ) - elif contenttype_matches(content_type, "multipart", "form-data"): + elif content_type == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. - del headers["Content-Type"] + del headers['Content-Type'] # Ensures that dict objects are serialized - post_params = [ - (a, json.dumps(b)) if isinstance(b, dict) else (a, b) - for a, b in post_params - ] + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] r = self.pool_manager.request( method, url, @@ -277,7 +267,7 @@ def request( encode_multipart=True, timeout=timeout, headers=headers, - preload_content=False, + preload_content=False ) # Pass a `string` parameter directly in the body to support # other content types than JSON when `body` argument is @@ -289,9 +279,9 @@ def request( body=body, timeout=timeout, headers=headers, - preload_content=False, + preload_content=False ) - elif content_type.startswith("text/") and isinstance(body, bool): + elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): request_body = "true" if body else "false" r = self.pool_manager.request( method, @@ -299,8 +289,7 @@ def request( body=request_body, preload_content=False, timeout=timeout, - headers=headers, - ) + headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided @@ -315,7 +304,7 @@ def request( fields={}, timeout=timeout, headers=headers, - preload_content=False, + preload_content=False ) except urllib3.exceptions.SSLError as e: msg = "\n".join([type(e).__name__, str(e)]) diff --git a/koyeb/api_README.md b/koyeb/api_README.md index b648ac6c..97d1ad02 100644 --- a/koyeb/api_README.md +++ b/koyeb/api_README.md @@ -5,7 +5,7 @@ The `koyeb.api` package is automatically generated by the [OpenAPI Generator](ht - API version: 1.0.0 - Package version: 1.5.3 -- Generator version: 7.26.0-SNAPSHOT +- Generator version: 7.24.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. @@ -196,6 +196,7 @@ Class | Method | HTTP request | Description *SecretsApi* | [**update_secret**](koyeb/api/docs/SecretsApi.md#update_secret) | **PUT** /v1/secrets/{id} | Update Secret *SecretsApi* | [**update_secret2**](koyeb/api/docs/SecretsApi.md#update_secret2) | **PATCH** /v1/secrets/{id} | Update Secret *ServicePoolsApi* | [**create_service_pool**](koyeb/api/docs/ServicePoolsApi.md#create_service_pool) | **POST** /v1/service_pools | Create a ServicePool +*ServicePoolsApi* | [**delete_service_pool**](koyeb/api/docs/ServicePoolsApi.md#delete_service_pool) | **DELETE** /v1/service_pools/{id} | Delete a ServicePool *ServicePoolsApi* | [**get_service_pool**](koyeb/api/docs/ServicePoolsApi.md#get_service_pool) | **GET** /v1/service_pools/{id} | Get a ServicePool *ServicePoolsApi* | [**list_service_pools**](koyeb/api/docs/ServicePoolsApi.md#list_service_pools) | **GET** /v1/service_pools | List ServicePools *ServicePoolsApi* | [**update_service_pool**](koyeb/api/docs/ServicePoolsApi.md#update_service_pool) | **PUT** /v1/service_pools/{id} | diff --git a/koyeb/api_async/.openapi-generator/FILES b/koyeb/api_async/.openapi-generator/FILES index aa91b9b9..448e4a33 100644 --- a/koyeb/api_async/.openapi-generator/FILES +++ b/koyeb/api_async/.openapi-generator/FILES @@ -942,27 +942,4 @@ koyeb/api_async/models/verify_docker_image_reply.py koyeb/api_async/models/verify_docker_image_reply_err_code.py koyeb/api_async/rest.py koyeb/api_async/test/__init__.py -koyeb/api_async/test/test_create_service_pool.py -koyeb/api_async/test/test_create_service_pool_reply.py -koyeb/api_async/test/test_get_organization_quotas_usage_reply.py -koyeb/api_async/test/test_get_pool_claim_reply.py -koyeb/api_async/test/test_get_service_pool_reply.py -koyeb/api_async/test/test_instance_snapshot_type_usage.py -koyeb/api_async/test/test_instance_type_usage.py -koyeb/api_async/test/test_list_pool_claim_reply.py -koyeb/api_async/test/test_list_service_pools_reply.py -koyeb/api_async/test/test_mesh.py -koyeb/api_async/test/test_mesh_scope.py -koyeb/api_async/test/test_persistent_volume_region_usage.py -koyeb/api_async/test/test_pool_claim.py -koyeb/api_async/test/test_pool_claim_reply.py -koyeb/api_async/test/test_pool_claim_request.py -koyeb/api_async/test/test_pool_claim_status.py -koyeb/api_async/test/test_pool_claims_api.py -koyeb/api_async/test/test_quota_usage.py -koyeb/api_async/test/test_service_pool.py -koyeb/api_async/test/test_service_pool_status.py -koyeb/api_async/test/test_service_pools_api.py -koyeb/api_async/test/test_update_service_pool.py -koyeb/api_async/test/test_update_service_pool_reply.py koyeb/api_async_README.md diff --git a/koyeb/api_async/.openapi-generator/VERSION b/koyeb/api_async/.openapi-generator/VERSION index 32a8cfac..07832195 100644 --- a/koyeb/api_async/.openapi-generator/VERSION +++ b/koyeb/api_async/.openapi-generator/VERSION @@ -1 +1 @@ -7.26.0-SNAPSHOT +7.24.0 diff --git a/koyeb/api_async/__init__.py b/koyeb/api_async/__init__.py index bb9bbd31..76e38e23 100644 --- a/koyeb/api_async/__init__.py +++ b/koyeb/api_async/__init__.py @@ -499,57 +499,33 @@ # import apis into sdk package from koyeb.api_async.api.apps_api import AppsApi as AppsApi from koyeb.api_async.api.archives_api import ArchivesApi as ArchivesApi -from koyeb.api_async.api.catalog_datacenters_api import ( - CatalogDatacentersApi as CatalogDatacentersApi, -) -from koyeb.api_async.api.catalog_instance_usage_api import ( - CatalogInstanceUsageApi as CatalogInstanceUsageApi, -) -from koyeb.api_async.api.catalog_instances_api import ( - CatalogInstancesApi as CatalogInstancesApi, -) -from koyeb.api_async.api.catalog_regions_api import ( - CatalogRegionsApi as CatalogRegionsApi, -) +from koyeb.api_async.api.catalog_datacenters_api import CatalogDatacentersApi as CatalogDatacentersApi +from koyeb.api_async.api.catalog_instance_usage_api import CatalogInstanceUsageApi as CatalogInstanceUsageApi +from koyeb.api_async.api.catalog_instances_api import CatalogInstancesApi as CatalogInstancesApi +from koyeb.api_async.api.catalog_regions_api import CatalogRegionsApi as CatalogRegionsApi from koyeb.api_async.api.compose_api import ComposeApi as ComposeApi from koyeb.api_async.api.coupons_api import CouponsApi as CouponsApi from koyeb.api_async.api.credentials_api import CredentialsApi as CredentialsApi from koyeb.api_async.api.deployments_api import DeploymentsApi as DeploymentsApi from koyeb.api_async.api.docker_helper_api import DockerHelperApi as DockerHelperApi from koyeb.api_async.api.domains_api import DomainsApi as DomainsApi -from koyeb.api_async.api.instance_snapshots_api import ( - InstanceSnapshotsApi as InstanceSnapshotsApi, -) +from koyeb.api_async.api.instance_snapshots_api import InstanceSnapshotsApi as InstanceSnapshotsApi from koyeb.api_async.api.instances_api import InstancesApi as InstancesApi from koyeb.api_async.api.intercom_api import IntercomApi as IntercomApi from koyeb.api_async.api.logs_api import LogsApi as LogsApi from koyeb.api_async.api.metrics_api import MetricsApi as MetricsApi -from koyeb.api_async.api.organization_confirmations_api import ( - OrganizationConfirmationsApi as OrganizationConfirmationsApi, -) -from koyeb.api_async.api.organization_invitations_api import ( - OrganizationInvitationsApi as OrganizationInvitationsApi, -) -from koyeb.api_async.api.organization_members_api import ( - OrganizationMembersApi as OrganizationMembersApi, -) -from koyeb.api_async.api.organization_quotas_api import ( - OrganizationQuotasApi as OrganizationQuotasApi, -) -from koyeb.api_async.api.payment_methods_api import ( - PaymentMethodsApi as PaymentMethodsApi, -) -from koyeb.api_async.api.persistent_volumes_api import ( - PersistentVolumesApi as PersistentVolumesApi, -) +from koyeb.api_async.api.organization_confirmations_api import OrganizationConfirmationsApi as OrganizationConfirmationsApi +from koyeb.api_async.api.organization_invitations_api import OrganizationInvitationsApi as OrganizationInvitationsApi +from koyeb.api_async.api.organization_members_api import OrganizationMembersApi as OrganizationMembersApi +from koyeb.api_async.api.organization_quotas_api import OrganizationQuotasApi as OrganizationQuotasApi +from koyeb.api_async.api.payment_methods_api import PaymentMethodsApi as PaymentMethodsApi +from koyeb.api_async.api.persistent_volumes_api import PersistentVolumesApi as PersistentVolumesApi from koyeb.api_async.api.pool_claims_api import PoolClaimsApi as PoolClaimsApi from koyeb.api_async.api.profile_api import ProfileApi as ProfileApi from koyeb.api_async.api.projects_api import ProjectsApi as ProjectsApi from koyeb.api_async.api.provisioning_api import ProvisioningApi as ProvisioningApi from koyeb.api_async.api.quotas_api import QuotasApi as QuotasApi -from koyeb.api_async.api.regional_deployments_api import ( - RegionalDeploymentsApi as RegionalDeploymentsApi, -) +from koyeb.api_async.api.regional_deployments_api import RegionalDeploymentsApi as RegionalDeploymentsApi from koyeb.api_async.api.repositories_api import RepositoriesApi as RepositoriesApi from koyeb.api_async.api.search_api import SearchApi as SearchApi from koyeb.api_async.api.secrets_api import SecretsApi as SecretsApi @@ -580,9 +556,7 @@ from koyeb.api_async.exceptions import ApiException as ApiException # import models into sdk package -from koyeb.api_async.models.accept_organization_invitation_reply import ( - AcceptOrganizationInvitationReply as AcceptOrganizationInvitationReply, -) +from koyeb.api_async.models.accept_organization_invitation_reply import AcceptOrganizationInvitationReply as AcceptOrganizationInvitationReply from koyeb.api_async.models.action import Action as Action from koyeb.api_async.models.activity import Activity as Activity from koyeb.api_async.models.activity_list import ActivityList as ActivityList @@ -594,838 +568,354 @@ from koyeb.api_async.models.app_usage import AppUsage as AppUsage from koyeb.api_async.models.apps_summary import AppsSummary as AppsSummary from koyeb.api_async.models.archive import Archive as Archive -from koyeb.api_async.models.archive_deployment_metadata import ( - ArchiveDeploymentMetadata as ArchiveDeploymentMetadata, -) +from koyeb.api_async.models.archive_deployment_metadata import ArchiveDeploymentMetadata as ArchiveDeploymentMetadata from koyeb.api_async.models.archive_source import ArchiveSource as ArchiveSource from koyeb.api_async.models.auto_release import AutoRelease as AutoRelease -from koyeb.api_async.models.auto_release_group import ( - AutoReleaseGroup as AutoReleaseGroup, -) -from koyeb.api_async.models.autocomplete_reply import ( - AutocompleteReply as AutocompleteReply, -) -from koyeb.api_async.models.autocomplete_request import ( - AutocompleteRequest as AutocompleteRequest, -) -from koyeb.api_async.models.availability_level import ( - AvailabilityLevel as AvailabilityLevel, -) -from koyeb.api_async.models.azure_container_registry_configuration import ( - AzureContainerRegistryConfiguration as AzureContainerRegistryConfiguration, -) +from koyeb.api_async.models.auto_release_group import AutoReleaseGroup as AutoReleaseGroup +from koyeb.api_async.models.autocomplete_reply import AutocompleteReply as AutocompleteReply +from koyeb.api_async.models.autocomplete_request import AutocompleteRequest as AutocompleteRequest +from koyeb.api_async.models.availability_level import AvailabilityLevel as AvailabilityLevel +from koyeb.api_async.models.azure_container_registry_configuration import AzureContainerRegistryConfiguration as AzureContainerRegistryConfiguration from koyeb.api_async.models.basic_auth_policy import BasicAuthPolicy as BasicAuthPolicy from koyeb.api_async.models.budget import Budget as Budget -from koyeb.api_async.models.buildpack_builder import ( - BuildpackBuilder as BuildpackBuilder, -) +from koyeb.api_async.models.buildpack_builder import BuildpackBuilder as BuildpackBuilder from koyeb.api_async.models.canny_auth_reply import CannyAuthReply as CannyAuthReply -from koyeb.api_async.models.catalog_gpu_details import ( - CatalogGPUDetails as CatalogGPUDetails, -) +from koyeb.api_async.models.catalog_gpu_details import CatalogGPUDetails as CatalogGPUDetails from koyeb.api_async.models.catalog_instance import CatalogInstance as CatalogInstance -from koyeb.api_async.models.catalog_instance_list_item import ( - CatalogInstanceListItem as CatalogInstanceListItem, -) +from koyeb.api_async.models.catalog_instance_list_item import CatalogInstanceListItem as CatalogInstanceListItem from koyeb.api_async.models.catalog_usage import CatalogUsage as CatalogUsage -from koyeb.api_async.models.check_coupon_reply import ( - CheckCouponReply as CheckCouponReply, -) -from koyeb.api_async.models.clear_idenfy_verification_result_request import ( - ClearIdenfyVerificationResultRequest as ClearIdenfyVerificationResultRequest, -) +from koyeb.api_async.models.check_coupon_reply import CheckCouponReply as CheckCouponReply +from koyeb.api_async.models.clear_idenfy_verification_result_request import ClearIdenfyVerificationResultRequest as ClearIdenfyVerificationResultRequest from koyeb.api_async.models.compose_reply import ComposeReply as ComposeReply from koyeb.api_async.models.config_file import ConfigFile as ConfigFile -from koyeb.api_async.models.confirm_payment_authorization_reply import ( - ConfirmPaymentAuthorizationReply as ConfirmPaymentAuthorizationReply, -) -from koyeb.api_async.models.create_access_token_reply import ( - CreateAccessTokenReply as CreateAccessTokenReply, -) -from koyeb.api_async.models.create_access_token_request import ( - CreateAccessTokenRequest as CreateAccessTokenRequest, -) -from koyeb.api_async.models.create_account_request import ( - CreateAccountRequest as CreateAccountRequest, -) +from koyeb.api_async.models.confirm_payment_authorization_reply import ConfirmPaymentAuthorizationReply as ConfirmPaymentAuthorizationReply +from koyeb.api_async.models.create_access_token_reply import CreateAccessTokenReply as CreateAccessTokenReply +from koyeb.api_async.models.create_access_token_request import CreateAccessTokenRequest as CreateAccessTokenRequest +from koyeb.api_async.models.create_account_request import CreateAccountRequest as CreateAccountRequest from koyeb.api_async.models.create_app import CreateApp as CreateApp from koyeb.api_async.models.create_app_reply import CreateAppReply as CreateAppReply from koyeb.api_async.models.create_archive import CreateArchive as CreateArchive -from koyeb.api_async.models.create_archive_reply import ( - CreateArchiveReply as CreateArchiveReply, -) -from koyeb.api_async.models.create_budget_reply import ( - CreateBudgetReply as CreateBudgetReply, -) +from koyeb.api_async.models.create_archive_reply import CreateArchiveReply as CreateArchiveReply +from koyeb.api_async.models.create_budget_reply import CreateBudgetReply as CreateBudgetReply from koyeb.api_async.models.create_compose import CreateCompose as CreateCompose -from koyeb.api_async.models.create_credential import ( - CreateCredential as CreateCredential, -) -from koyeb.api_async.models.create_credential_reply import ( - CreateCredentialReply as CreateCredentialReply, -) +from koyeb.api_async.models.create_credential import CreateCredential as CreateCredential +from koyeb.api_async.models.create_credential_reply import CreateCredentialReply as CreateCredentialReply from koyeb.api_async.models.create_domain import CreateDomain as CreateDomain -from koyeb.api_async.models.create_domain_reply import ( - CreateDomainReply as CreateDomainReply, -) -from koyeb.api_async.models.create_instance_snapshot_reply import ( - CreateInstanceSnapshotReply as CreateInstanceSnapshotReply, -) -from koyeb.api_async.models.create_instance_snapshot_request import ( - CreateInstanceSnapshotRequest as CreateInstanceSnapshotRequest, -) -from koyeb.api_async.models.create_organization_invitation_reply import ( - CreateOrganizationInvitationReply as CreateOrganizationInvitationReply, -) -from koyeb.api_async.models.create_organization_invitation_request import ( - CreateOrganizationInvitationRequest as CreateOrganizationInvitationRequest, -) -from koyeb.api_async.models.create_organization_reply import ( - CreateOrganizationReply as CreateOrganizationReply, -) -from koyeb.api_async.models.create_organization_request import ( - CreateOrganizationRequest as CreateOrganizationRequest, -) -from koyeb.api_async.models.create_payment_authorization_reply import ( - CreatePaymentAuthorizationReply as CreatePaymentAuthorizationReply, -) -from koyeb.api_async.models.create_persistent_volume_reply import ( - CreatePersistentVolumeReply as CreatePersistentVolumeReply, -) -from koyeb.api_async.models.create_persistent_volume_request import ( - CreatePersistentVolumeRequest as CreatePersistentVolumeRequest, -) +from koyeb.api_async.models.create_domain_reply import CreateDomainReply as CreateDomainReply +from koyeb.api_async.models.create_instance_snapshot_reply import CreateInstanceSnapshotReply as CreateInstanceSnapshotReply +from koyeb.api_async.models.create_instance_snapshot_request import CreateInstanceSnapshotRequest as CreateInstanceSnapshotRequest +from koyeb.api_async.models.create_organization_invitation_reply import CreateOrganizationInvitationReply as CreateOrganizationInvitationReply +from koyeb.api_async.models.create_organization_invitation_request import CreateOrganizationInvitationRequest as CreateOrganizationInvitationRequest +from koyeb.api_async.models.create_organization_reply import CreateOrganizationReply as CreateOrganizationReply +from koyeb.api_async.models.create_organization_request import CreateOrganizationRequest as CreateOrganizationRequest +from koyeb.api_async.models.create_payment_authorization_reply import CreatePaymentAuthorizationReply as CreatePaymentAuthorizationReply +from koyeb.api_async.models.create_persistent_volume_reply import CreatePersistentVolumeReply as CreatePersistentVolumeReply +from koyeb.api_async.models.create_persistent_volume_request import CreatePersistentVolumeRequest as CreatePersistentVolumeRequest from koyeb.api_async.models.create_project import CreateProject as CreateProject -from koyeb.api_async.models.create_project_reply import ( - CreateProjectReply as CreateProjectReply, -) +from koyeb.api_async.models.create_project_reply import CreateProjectReply as CreateProjectReply from koyeb.api_async.models.create_secret import CreateSecret as CreateSecret -from koyeb.api_async.models.create_secret_reply import ( - CreateSecretReply as CreateSecretReply, -) +from koyeb.api_async.models.create_secret_reply import CreateSecretReply as CreateSecretReply from koyeb.api_async.models.create_service import CreateService as CreateService -from koyeb.api_async.models.create_service_pool import ( - CreateServicePool as CreateServicePool, -) -from koyeb.api_async.models.create_service_pool_reply import ( - CreateServicePoolReply as CreateServicePoolReply, -) -from koyeb.api_async.models.create_service_reply import ( - CreateServiceReply as CreateServiceReply, -) -from koyeb.api_async.models.create_snapshot_reply import ( - CreateSnapshotReply as CreateSnapshotReply, -) -from koyeb.api_async.models.create_snapshot_request import ( - CreateSnapshotRequest as CreateSnapshotRequest, -) -from koyeb.api_async.models.create_stage_attempt_request import ( - CreateStageAttemptRequest as CreateStageAttemptRequest, -) +from koyeb.api_async.models.create_service_pool import CreateServicePool as CreateServicePool +from koyeb.api_async.models.create_service_pool_reply import CreateServicePoolReply as CreateServicePoolReply +from koyeb.api_async.models.create_service_reply import CreateServiceReply as CreateServiceReply +from koyeb.api_async.models.create_snapshot_reply import CreateSnapshotReply as CreateSnapshotReply +from koyeb.api_async.models.create_snapshot_request import CreateSnapshotRequest as CreateSnapshotRequest +from koyeb.api_async.models.create_stage_attempt_request import CreateStageAttemptRequest as CreateStageAttemptRequest from koyeb.api_async.models.credential import Credential as Credential from koyeb.api_async.models.credential_type import CredentialType as CredentialType -from koyeb.api_async.models.database_deployment_metadata import ( - DatabaseDeploymentMetadata as DatabaseDeploymentMetadata, -) -from koyeb.api_async.models.database_role_password import ( - DatabaseRolePassword as DatabaseRolePassword, -) +from koyeb.api_async.models.database_deployment_metadata import DatabaseDeploymentMetadata as DatabaseDeploymentMetadata +from koyeb.api_async.models.database_role_password import DatabaseRolePassword as DatabaseRolePassword from koyeb.api_async.models.database_source import DatabaseSource as DatabaseSource from koyeb.api_async.models.database_usage import DatabaseUsage as DatabaseUsage -from koyeb.api_async.models.database_usage_details import ( - DatabaseUsageDetails as DatabaseUsageDetails, -) -from koyeb.api_async.models.datacenter_list_item import ( - DatacenterListItem as DatacenterListItem, -) -from koyeb.api_async.models.deactivate_organization_reply import ( - DeactivateOrganizationReply as DeactivateOrganizationReply, -) -from koyeb.api_async.models.deactivate_organization_request import ( - DeactivateOrganizationRequest as DeactivateOrganizationRequest, -) -from koyeb.api_async.models.declare_stage_progress_request import ( - DeclareStageProgressRequest as DeclareStageProgressRequest, -) -from koyeb.api_async.models.declare_step_progress_request import ( - DeclareStepProgressRequest as DeclareStepProgressRequest, -) -from koyeb.api_async.models.decline_organization_invitation_reply import ( - DeclineOrganizationInvitationReply as DeclineOrganizationInvitationReply, -) -from koyeb.api_async.models.delete_instance_snapshot_reply import ( - DeleteInstanceSnapshotReply as DeleteInstanceSnapshotReply, -) -from koyeb.api_async.models.delete_organization_reply import ( - DeleteOrganizationReply as DeleteOrganizationReply, -) -from koyeb.api_async.models.delete_persistent_volume_reply import ( - DeletePersistentVolumeReply as DeletePersistentVolumeReply, -) -from koyeb.api_async.models.delete_snapshot_reply import ( - DeleteSnapshotReply as DeleteSnapshotReply, -) +from koyeb.api_async.models.database_usage_details import DatabaseUsageDetails as DatabaseUsageDetails +from koyeb.api_async.models.datacenter_list_item import DatacenterListItem as DatacenterListItem +from koyeb.api_async.models.deactivate_organization_reply import DeactivateOrganizationReply as DeactivateOrganizationReply +from koyeb.api_async.models.deactivate_organization_request import DeactivateOrganizationRequest as DeactivateOrganizationRequest +from koyeb.api_async.models.declare_stage_progress_request import DeclareStageProgressRequest as DeclareStageProgressRequest +from koyeb.api_async.models.declare_step_progress_request import DeclareStepProgressRequest as DeclareStepProgressRequest +from koyeb.api_async.models.decline_organization_invitation_reply import DeclineOrganizationInvitationReply as DeclineOrganizationInvitationReply +from koyeb.api_async.models.delete_instance_snapshot_reply import DeleteInstanceSnapshotReply as DeleteInstanceSnapshotReply +from koyeb.api_async.models.delete_organization_reply import DeleteOrganizationReply as DeleteOrganizationReply +from koyeb.api_async.models.delete_persistent_volume_reply import DeletePersistentVolumeReply as DeletePersistentVolumeReply +from koyeb.api_async.models.delete_snapshot_reply import DeleteSnapshotReply as DeleteSnapshotReply from koyeb.api_async.models.delete_user_reply import DeleteUserReply as DeleteUserReply from koyeb.api_async.models.deployment import Deployment as Deployment -from koyeb.api_async.models.deployment_database_info import ( - DeploymentDatabaseInfo as DeploymentDatabaseInfo, -) -from koyeb.api_async.models.deployment_definition import ( - DeploymentDefinition as DeploymentDefinition, -) -from koyeb.api_async.models.deployment_definition_type import ( - DeploymentDefinitionType as DeploymentDefinitionType, -) +from koyeb.api_async.models.deployment_database_info import DeploymentDatabaseInfo as DeploymentDatabaseInfo +from koyeb.api_async.models.deployment_definition import DeploymentDefinition as DeploymentDefinition +from koyeb.api_async.models.deployment_definition_type import DeploymentDefinitionType as DeploymentDefinitionType from koyeb.api_async.models.deployment_env import DeploymentEnv as DeploymentEnv from koyeb.api_async.models.deployment_event import DeploymentEvent as DeploymentEvent -from koyeb.api_async.models.deployment_health_check import ( - DeploymentHealthCheck as DeploymentHealthCheck, -) -from koyeb.api_async.models.deployment_instance_type import ( - DeploymentInstanceType as DeploymentInstanceType, -) -from koyeb.api_async.models.deployment_list_item import ( - DeploymentListItem as DeploymentListItem, -) +from koyeb.api_async.models.deployment_health_check import DeploymentHealthCheck as DeploymentHealthCheck +from koyeb.api_async.models.deployment_instance_type import DeploymentInstanceType as DeploymentInstanceType +from koyeb.api_async.models.deployment_list_item import DeploymentListItem as DeploymentListItem from koyeb.api_async.models.deployment_mesh import DeploymentMesh as DeploymentMesh -from koyeb.api_async.models.deployment_metadata import ( - DeploymentMetadata as DeploymentMetadata, -) -from koyeb.api_async.models.deployment_neon_postgres_database_info import ( - DeploymentNeonPostgresDatabaseInfo as DeploymentNeonPostgresDatabaseInfo, -) -from koyeb.api_async.models.deployment_neon_postgres_database_info_role import ( - DeploymentNeonPostgresDatabaseInfoRole as DeploymentNeonPostgresDatabaseInfoRole, -) +from koyeb.api_async.models.deployment_metadata import DeploymentMetadata as DeploymentMetadata +from koyeb.api_async.models.deployment_neon_postgres_database_info import DeploymentNeonPostgresDatabaseInfo as DeploymentNeonPostgresDatabaseInfo +from koyeb.api_async.models.deployment_neon_postgres_database_info_role import DeploymentNeonPostgresDatabaseInfoRole as DeploymentNeonPostgresDatabaseInfoRole from koyeb.api_async.models.deployment_port import DeploymentPort as DeploymentPort -from koyeb.api_async.models.deployment_provisioning_info import ( - DeploymentProvisioningInfo as DeploymentProvisioningInfo, -) -from koyeb.api_async.models.deployment_provisioning_info_stage import ( - DeploymentProvisioningInfoStage as DeploymentProvisioningInfoStage, -) -from koyeb.api_async.models.deployment_provisioning_info_stage_build_attempt import ( - DeploymentProvisioningInfoStageBuildAttempt as DeploymentProvisioningInfoStageBuildAttempt, -) -from koyeb.api_async.models.deployment_provisioning_info_stage_build_attempt_build_step import ( - DeploymentProvisioningInfoStageBuildAttemptBuildStep as DeploymentProvisioningInfoStageBuildAttemptBuildStep, -) -from koyeb.api_async.models.deployment_provisioning_info_stage_status import ( - DeploymentProvisioningInfoStageStatus as DeploymentProvisioningInfoStageStatus, -) -from koyeb.api_async.models.deployment_proxy_port import ( - DeploymentProxyPort as DeploymentProxyPort, -) -from koyeb.api_async.models.deployment_proxy_port_metadata import ( - DeploymentProxyPortMetadata as DeploymentProxyPortMetadata, -) +from koyeb.api_async.models.deployment_provisioning_info import DeploymentProvisioningInfo as DeploymentProvisioningInfo +from koyeb.api_async.models.deployment_provisioning_info_stage import DeploymentProvisioningInfoStage as DeploymentProvisioningInfoStage +from koyeb.api_async.models.deployment_provisioning_info_stage_build_attempt import DeploymentProvisioningInfoStageBuildAttempt as DeploymentProvisioningInfoStageBuildAttempt +from koyeb.api_async.models.deployment_provisioning_info_stage_build_attempt_build_step import DeploymentProvisioningInfoStageBuildAttemptBuildStep as DeploymentProvisioningInfoStageBuildAttemptBuildStep +from koyeb.api_async.models.deployment_provisioning_info_stage_status import DeploymentProvisioningInfoStageStatus as DeploymentProvisioningInfoStageStatus +from koyeb.api_async.models.deployment_proxy_port import DeploymentProxyPort as DeploymentProxyPort +from koyeb.api_async.models.deployment_proxy_port_metadata import DeploymentProxyPortMetadata as DeploymentProxyPortMetadata from koyeb.api_async.models.deployment_role import DeploymentRole as DeploymentRole from koyeb.api_async.models.deployment_route import DeploymentRoute as DeploymentRoute -from koyeb.api_async.models.deployment_scaling import ( - DeploymentScaling as DeploymentScaling, -) -from koyeb.api_async.models.deployment_scaling_target import ( - DeploymentScalingTarget as DeploymentScalingTarget, -) -from koyeb.api_async.models.deployment_scaling_target_average_cpu import ( - DeploymentScalingTargetAverageCPU as DeploymentScalingTargetAverageCPU, -) -from koyeb.api_async.models.deployment_scaling_target_average_mem import ( - DeploymentScalingTargetAverageMem as DeploymentScalingTargetAverageMem, -) -from koyeb.api_async.models.deployment_scaling_target_concurrent_requests import ( - DeploymentScalingTargetConcurrentRequests as DeploymentScalingTargetConcurrentRequests, -) -from koyeb.api_async.models.deployment_scaling_target_requests_per_second import ( - DeploymentScalingTargetRequestsPerSecond as DeploymentScalingTargetRequestsPerSecond, -) -from koyeb.api_async.models.deployment_scaling_target_requests_response_time import ( - DeploymentScalingTargetRequestsResponseTime as DeploymentScalingTargetRequestsResponseTime, -) -from koyeb.api_async.models.deployment_scaling_target_sleep_idle_delay import ( - DeploymentScalingTargetSleepIdleDelay as DeploymentScalingTargetSleepIdleDelay, -) -from koyeb.api_async.models.deployment_status import ( - DeploymentStatus as DeploymentStatus, -) -from koyeb.api_async.models.deployment_strategy import ( - DeploymentStrategy as DeploymentStrategy, -) -from koyeb.api_async.models.deployment_strategy_type import ( - DeploymentStrategyType as DeploymentStrategyType, -) -from koyeb.api_async.models.deployment_volume import ( - DeploymentVolume as DeploymentVolume, -) -from koyeb.api_async.models.desired_deployment import ( - DesiredDeployment as DesiredDeployment, -) -from koyeb.api_async.models.desired_deployment_group import ( - DesiredDeploymentGroup as DesiredDeploymentGroup, -) -from koyeb.api_async.models.digital_ocean_registry_configuration import ( - DigitalOceanRegistryConfiguration as DigitalOceanRegistryConfiguration, -) -from koyeb.api_async.models.discourse_auth_reply import ( - DiscourseAuthReply as DiscourseAuthReply, -) -from koyeb.api_async.models.discourse_auth_request import ( - DiscourseAuthRequest as DiscourseAuthRequest, -) +from koyeb.api_async.models.deployment_scaling import DeploymentScaling as DeploymentScaling +from koyeb.api_async.models.deployment_scaling_target import DeploymentScalingTarget as DeploymentScalingTarget +from koyeb.api_async.models.deployment_scaling_target_average_cpu import DeploymentScalingTargetAverageCPU as DeploymentScalingTargetAverageCPU +from koyeb.api_async.models.deployment_scaling_target_average_mem import DeploymentScalingTargetAverageMem as DeploymentScalingTargetAverageMem +from koyeb.api_async.models.deployment_scaling_target_concurrent_requests import DeploymentScalingTargetConcurrentRequests as DeploymentScalingTargetConcurrentRequests +from koyeb.api_async.models.deployment_scaling_target_requests_per_second import DeploymentScalingTargetRequestsPerSecond as DeploymentScalingTargetRequestsPerSecond +from koyeb.api_async.models.deployment_scaling_target_requests_response_time import DeploymentScalingTargetRequestsResponseTime as DeploymentScalingTargetRequestsResponseTime +from koyeb.api_async.models.deployment_scaling_target_sleep_idle_delay import DeploymentScalingTargetSleepIdleDelay as DeploymentScalingTargetSleepIdleDelay +from koyeb.api_async.models.deployment_status import DeploymentStatus as DeploymentStatus +from koyeb.api_async.models.deployment_strategy import DeploymentStrategy as DeploymentStrategy +from koyeb.api_async.models.deployment_strategy_type import DeploymentStrategyType as DeploymentStrategyType +from koyeb.api_async.models.deployment_volume import DeploymentVolume as DeploymentVolume +from koyeb.api_async.models.desired_deployment import DesiredDeployment as DesiredDeployment +from koyeb.api_async.models.desired_deployment_group import DesiredDeploymentGroup as DesiredDeploymentGroup +from koyeb.api_async.models.digital_ocean_registry_configuration import DigitalOceanRegistryConfiguration as DigitalOceanRegistryConfiguration +from koyeb.api_async.models.discourse_auth_reply import DiscourseAuthReply as DiscourseAuthReply +from koyeb.api_async.models.discourse_auth_request import DiscourseAuthRequest as DiscourseAuthRequest from koyeb.api_async.models.docker_builder import DockerBuilder as DockerBuilder -from koyeb.api_async.models.docker_hub_registry_configuration import ( - DockerHubRegistryConfiguration as DockerHubRegistryConfiguration, -) +from koyeb.api_async.models.docker_hub_registry_configuration import DockerHubRegistryConfiguration as DockerHubRegistryConfiguration from koyeb.api_async.models.docker_source import DockerSource as DockerSource from koyeb.api_async.models.domain import Domain as Domain -from koyeb.api_async.models.domain_load_balancer_koyeb import ( - DomainLoadBalancerKoyeb as DomainLoadBalancerKoyeb, -) -from koyeb.api_async.models.domain_load_balancer_quotas import ( - DomainLoadBalancerQuotas as DomainLoadBalancerQuotas, -) +from koyeb.api_async.models.domain_load_balancer_koyeb import DomainLoadBalancerKoyeb as DomainLoadBalancerKoyeb +from koyeb.api_async.models.domain_load_balancer_quotas import DomainLoadBalancerQuotas as DomainLoadBalancerQuotas from koyeb.api_async.models.domain_status import DomainStatus as DomainStatus from koyeb.api_async.models.domain_type import DomainType as DomainType from koyeb.api_async.models.domains_summary import DomainsSummary as DomainsSummary from koyeb.api_async.models.egress_policy import EgressPolicy as EgressPolicy -from koyeb.api_async.models.egress_policy_mode import ( - EgressPolicyMode as EgressPolicyMode, -) +from koyeb.api_async.models.egress_policy_mode import EgressPolicyMode as EgressPolicyMode from koyeb.api_async.models.env import Env as Env from koyeb.api_async.models.error import Error as Error from koyeb.api_async.models.error_field import ErrorField as ErrorField from koyeb.api_async.models.error_with_fields import ErrorWithFields as ErrorWithFields from koyeb.api_async.models.exec_command_io import ExecCommandIO as ExecCommandIO -from koyeb.api_async.models.exec_command_reply import ( - ExecCommandReply as ExecCommandReply, -) -from koyeb.api_async.models.exec_command_request_body import ( - ExecCommandRequestBody as ExecCommandRequestBody, -) -from koyeb.api_async.models.exec_command_request_id_type import ( - ExecCommandRequestIdType as ExecCommandRequestIdType, -) -from koyeb.api_async.models.exec_command_request_terminal_size import ( - ExecCommandRequestTerminalSize as ExecCommandRequestTerminalSize, -) -from koyeb.api_async.models.gcp_container_registry_configuration import ( - GCPContainerRegistryConfiguration as GCPContainerRegistryConfiguration, -) +from koyeb.api_async.models.exec_command_reply import ExecCommandReply as ExecCommandReply +from koyeb.api_async.models.exec_command_request_body import ExecCommandRequestBody as ExecCommandRequestBody +from koyeb.api_async.models.exec_command_request_id_type import ExecCommandRequestIdType as ExecCommandRequestIdType +from koyeb.api_async.models.exec_command_request_terminal_size import ExecCommandRequestTerminalSize as ExecCommandRequestTerminalSize +from koyeb.api_async.models.gcp_container_registry_configuration import GCPContainerRegistryConfiguration as GCPContainerRegistryConfiguration from koyeb.api_async.models.get_app_reply import GetAppReply as GetAppReply from koyeb.api_async.models.get_budget_reply import GetBudgetReply as GetBudgetReply -from koyeb.api_async.models.get_catalog_instance_reply import ( - GetCatalogInstanceReply as GetCatalogInstanceReply, -) -from koyeb.api_async.models.get_credential_reply import ( - GetCredentialReply as GetCredentialReply, -) -from koyeb.api_async.models.get_deployment_reply import ( - GetDeploymentReply as GetDeploymentReply, -) -from koyeb.api_async.models.get_deployment_scaling_reply import ( - GetDeploymentScalingReply as GetDeploymentScalingReply, -) -from koyeb.api_async.models.get_deployment_scaling_reply_item import ( - GetDeploymentScalingReplyItem as GetDeploymentScalingReplyItem, -) +from koyeb.api_async.models.get_catalog_instance_reply import GetCatalogInstanceReply as GetCatalogInstanceReply +from koyeb.api_async.models.get_credential_reply import GetCredentialReply as GetCredentialReply +from koyeb.api_async.models.get_deployment_reply import GetDeploymentReply as GetDeploymentReply +from koyeb.api_async.models.get_deployment_scaling_reply import GetDeploymentScalingReply as GetDeploymentScalingReply +from koyeb.api_async.models.get_deployment_scaling_reply_item import GetDeploymentScalingReplyItem as GetDeploymentScalingReplyItem from koyeb.api_async.models.get_domain_reply import GetDomainReply as GetDomainReply -from koyeb.api_async.models.get_github_installation_reply import ( - GetGithubInstallationReply as GetGithubInstallationReply, -) -from koyeb.api_async.models.get_idenfy_token_reply import ( - GetIdenfyTokenReply as GetIdenfyTokenReply, -) -from koyeb.api_async.models.get_instance_reply import ( - GetInstanceReply as GetInstanceReply, -) -from koyeb.api_async.models.get_instance_snapshot_reply import ( - GetInstanceSnapshotReply as GetInstanceSnapshotReply, -) -from koyeb.api_async.models.get_intercom_profile_reply import ( - GetIntercomProfileReply as GetIntercomProfileReply, -) +from koyeb.api_async.models.get_github_installation_reply import GetGithubInstallationReply as GetGithubInstallationReply +from koyeb.api_async.models.get_idenfy_token_reply import GetIdenfyTokenReply as GetIdenfyTokenReply +from koyeb.api_async.models.get_instance_reply import GetInstanceReply as GetInstanceReply +from koyeb.api_async.models.get_instance_snapshot_reply import GetInstanceSnapshotReply as GetInstanceSnapshotReply +from koyeb.api_async.models.get_intercom_profile_reply import GetIntercomProfileReply as GetIntercomProfileReply from koyeb.api_async.models.get_metrics_reply import GetMetricsReply as GetMetricsReply -from koyeb.api_async.models.get_metrics_reply_metric import ( - GetMetricsReplyMetric as GetMetricsReplyMetric, -) -from koyeb.api_async.models.get_o_auth_options_reply import ( - GetOAuthOptionsReply as GetOAuthOptionsReply, -) -from koyeb.api_async.models.get_organization_invitation_reply import ( - GetOrganizationInvitationReply as GetOrganizationInvitationReply, -) -from koyeb.api_async.models.get_organization_quotas_usage_reply import ( - GetOrganizationQuotasUsageReply as GetOrganizationQuotasUsageReply, -) -from koyeb.api_async.models.get_organization_reply import ( - GetOrganizationReply as GetOrganizationReply, -) -from koyeb.api_async.models.get_organization_summary_reply import ( - GetOrganizationSummaryReply as GetOrganizationSummaryReply, -) -from koyeb.api_async.models.get_organization_usage_details_reply import ( - GetOrganizationUsageDetailsReply as GetOrganizationUsageDetailsReply, -) -from koyeb.api_async.models.get_organization_usage_reply import ( - GetOrganizationUsageReply as GetOrganizationUsageReply, -) -from koyeb.api_async.models.get_payment_method_reply import ( - GetPaymentMethodReply as GetPaymentMethodReply, -) -from koyeb.api_async.models.get_persistent_volume_reply import ( - GetPersistentVolumeReply as GetPersistentVolumeReply, -) -from koyeb.api_async.models.get_pool_claim_reply import ( - GetPoolClaimReply as GetPoolClaimReply, -) +from koyeb.api_async.models.get_metrics_reply_metric import GetMetricsReplyMetric as GetMetricsReplyMetric +from koyeb.api_async.models.get_o_auth_options_reply import GetOAuthOptionsReply as GetOAuthOptionsReply +from koyeb.api_async.models.get_organization_invitation_reply import GetOrganizationInvitationReply as GetOrganizationInvitationReply +from koyeb.api_async.models.get_organization_quotas_usage_reply import GetOrganizationQuotasUsageReply as GetOrganizationQuotasUsageReply +from koyeb.api_async.models.get_organization_reply import GetOrganizationReply as GetOrganizationReply +from koyeb.api_async.models.get_organization_summary_reply import GetOrganizationSummaryReply as GetOrganizationSummaryReply +from koyeb.api_async.models.get_organization_usage_details_reply import GetOrganizationUsageDetailsReply as GetOrganizationUsageDetailsReply +from koyeb.api_async.models.get_organization_usage_reply import GetOrganizationUsageReply as GetOrganizationUsageReply +from koyeb.api_async.models.get_payment_method_reply import GetPaymentMethodReply as GetPaymentMethodReply +from koyeb.api_async.models.get_persistent_volume_reply import GetPersistentVolumeReply as GetPersistentVolumeReply +from koyeb.api_async.models.get_pool_claim_reply import GetPoolClaimReply as GetPoolClaimReply from koyeb.api_async.models.get_project_reply import GetProjectReply as GetProjectReply from koyeb.api_async.models.get_quotas_reply import GetQuotasReply as GetQuotasReply from koyeb.api_async.models.get_region_reply import GetRegionReply as GetRegionReply -from koyeb.api_async.models.get_regional_deployment_reply import ( - GetRegionalDeploymentReply as GetRegionalDeploymentReply, -) +from koyeb.api_async.models.get_regional_deployment_reply import GetRegionalDeploymentReply as GetRegionalDeploymentReply from koyeb.api_async.models.get_secret_reply import GetSecretReply as GetSecretReply -from koyeb.api_async.models.get_service_pool_reply import ( - GetServicePoolReply as GetServicePoolReply, -) +from koyeb.api_async.models.get_service_pool_reply import GetServicePoolReply as GetServicePoolReply from koyeb.api_async.models.get_service_reply import GetServiceReply as GetServiceReply -from koyeb.api_async.models.get_service_scaling_reply import ( - GetServiceScalingReply as GetServiceScalingReply, -) -from koyeb.api_async.models.get_snapshot_reply import ( - GetSnapshotReply as GetSnapshotReply, -) -from koyeb.api_async.models.get_subscription_reply import ( - GetSubscriptionReply as GetSubscriptionReply, -) -from koyeb.api_async.models.get_user_organization_invitation_reply import ( - GetUserOrganizationInvitationReply as GetUserOrganizationInvitationReply, -) -from koyeb.api_async.models.get_user_settings_reply import ( - GetUserSettingsReply as GetUserSettingsReply, -) -from koyeb.api_async.models.git_deployment_metadata import ( - GitDeploymentMetadata as GitDeploymentMetadata, -) -from koyeb.api_async.models.git_env_deployment_metadata import ( - GitEnvDeploymentMetadata as GitEnvDeploymentMetadata, -) -from koyeb.api_async.models.git_hub_registry_configuration import ( - GitHubRegistryConfiguration as GitHubRegistryConfiguration, -) -from koyeb.api_async.models.git_lab_registry_configuration import ( - GitLabRegistryConfiguration as GitLabRegistryConfiguration, -) +from koyeb.api_async.models.get_service_scaling_reply import GetServiceScalingReply as GetServiceScalingReply +from koyeb.api_async.models.get_snapshot_reply import GetSnapshotReply as GetSnapshotReply +from koyeb.api_async.models.get_subscription_reply import GetSubscriptionReply as GetSubscriptionReply +from koyeb.api_async.models.get_user_organization_invitation_reply import GetUserOrganizationInvitationReply as GetUserOrganizationInvitationReply +from koyeb.api_async.models.get_user_settings_reply import GetUserSettingsReply as GetUserSettingsReply +from koyeb.api_async.models.git_deployment_metadata import GitDeploymentMetadata as GitDeploymentMetadata +from koyeb.api_async.models.git_env_deployment_metadata import GitEnvDeploymentMetadata as GitEnvDeploymentMetadata +from koyeb.api_async.models.git_hub_registry_configuration import GitHubRegistryConfiguration as GitHubRegistryConfiguration +from koyeb.api_async.models.git_lab_registry_configuration import GitLabRegistryConfiguration as GitLabRegistryConfiguration from koyeb.api_async.models.git_source import GitSource as GitSource -from koyeb.api_async.models.github_installation_reply import ( - GithubInstallationReply as GithubInstallationReply, -) -from koyeb.api_async.models.github_installation_request import ( - GithubInstallationRequest as GithubInstallationRequest, -) -from koyeb.api_async.models.google_protobuf_any import ( - GoogleProtobufAny as GoogleProtobufAny, -) -from koyeb.api_async.models.google_protobuf_null_value import ( - GoogleProtobufNullValue as GoogleProtobufNullValue, -) +from koyeb.api_async.models.github_installation_reply import GithubInstallationReply as GithubInstallationReply +from koyeb.api_async.models.github_installation_request import GithubInstallationRequest as GithubInstallationRequest +from koyeb.api_async.models.google_protobuf_any import GoogleProtobufAny as GoogleProtobufAny +from koyeb.api_async.models.google_protobuf_null_value import GoogleProtobufNullValue as GoogleProtobufNullValue from koyeb.api_async.models.google_rpc_status import GoogleRpcStatus as GoogleRpcStatus from koyeb.api_async.models.http_header import HTTPHeader as HTTPHeader from koyeb.api_async.models.http_health_check import HTTPHealthCheck as HTTPHealthCheck -from koyeb.api_async.models.has_unpaid_invoices_reply import ( - HasUnpaidInvoicesReply as HasUnpaidInvoicesReply, -) +from koyeb.api_async.models.has_unpaid_invoices_reply import HasUnpaidInvoicesReply as HasUnpaidInvoicesReply from koyeb.api_async.models.instance import Instance as Instance -from koyeb.api_async.models.instance_availability import ( - InstanceAvailability as InstanceAvailability, -) +from koyeb.api_async.models.instance_availability import InstanceAvailability as InstanceAvailability from koyeb.api_async.models.instance_event import InstanceEvent as InstanceEvent -from koyeb.api_async.models.instance_list_item import ( - InstanceListItem as InstanceListItem, -) -from koyeb.api_async.models.instance_snapshot import ( - InstanceSnapshot as InstanceSnapshot, -) -from koyeb.api_async.models.instance_snapshot_event import ( - InstanceSnapshotEvent as InstanceSnapshotEvent, -) -from koyeb.api_async.models.instance_snapshot_quotas import ( - InstanceSnapshotQuotas as InstanceSnapshotQuotas, -) -from koyeb.api_async.models.instance_snapshot_status import ( - InstanceSnapshotStatus as InstanceSnapshotStatus, -) -from koyeb.api_async.models.instance_snapshot_type import ( - InstanceSnapshotType as InstanceSnapshotType, -) -from koyeb.api_async.models.instance_snapshot_type_usage import ( - InstanceSnapshotTypeUsage as InstanceSnapshotTypeUsage, -) +from koyeb.api_async.models.instance_list_item import InstanceListItem as InstanceListItem +from koyeb.api_async.models.instance_snapshot import InstanceSnapshot as InstanceSnapshot +from koyeb.api_async.models.instance_snapshot_event import InstanceSnapshotEvent as InstanceSnapshotEvent +from koyeb.api_async.models.instance_snapshot_quotas import InstanceSnapshotQuotas as InstanceSnapshotQuotas +from koyeb.api_async.models.instance_snapshot_status import InstanceSnapshotStatus as InstanceSnapshotStatus +from koyeb.api_async.models.instance_snapshot_type import InstanceSnapshotType as InstanceSnapshotType +from koyeb.api_async.models.instance_snapshot_type_usage import InstanceSnapshotTypeUsage as InstanceSnapshotTypeUsage from koyeb.api_async.models.instance_status import InstanceStatus as InstanceStatus -from koyeb.api_async.models.instance_type_usage import ( - InstanceTypeUsage as InstanceTypeUsage, -) +from koyeb.api_async.models.instance_type_usage import InstanceTypeUsage as InstanceTypeUsage from koyeb.api_async.models.instance_usage import InstanceUsage as InstanceUsage -from koyeb.api_async.models.instances_summary import ( - InstancesSummary as InstancesSummary, -) -from koyeb.api_async.models.invite_user_request import ( - InviteUserRequest as InviteUserRequest, -) +from koyeb.api_async.models.instances_summary import InstancesSummary as InstancesSummary +from koyeb.api_async.models.invite_user_request import InviteUserRequest as InviteUserRequest from koyeb.api_async.models.kgitproxy_branch import KgitproxyBranch as KgitproxyBranch -from koyeb.api_async.models.kgitproxy_git_hub_repository import ( - KgitproxyGitHubRepository as KgitproxyGitHubRepository, -) -from koyeb.api_async.models.kgitproxy_github_installation_status import ( - KgitproxyGithubInstallationStatus as KgitproxyGithubInstallationStatus, -) -from koyeb.api_async.models.kgitproxy_indexing_status import ( - KgitproxyIndexingStatus as KgitproxyIndexingStatus, -) -from koyeb.api_async.models.kgitproxy_list_branches_reply import ( - KgitproxyListBranchesReply as KgitproxyListBranchesReply, -) -from koyeb.api_async.models.kgitproxy_list_repositories_reply import ( - KgitproxyListRepositoriesReply as KgitproxyListRepositoriesReply, -) -from koyeb.api_async.models.kgitproxy_repository import ( - KgitproxyRepository as KgitproxyRepository, -) -from koyeb.api_async.models.kgitproxy_repository_provider import ( - KgitproxyRepositoryProvider as KgitproxyRepositoryProvider, -) +from koyeb.api_async.models.kgitproxy_git_hub_repository import KgitproxyGitHubRepository as KgitproxyGitHubRepository +from koyeb.api_async.models.kgitproxy_github_installation_status import KgitproxyGithubInstallationStatus as KgitproxyGithubInstallationStatus +from koyeb.api_async.models.kgitproxy_indexing_status import KgitproxyIndexingStatus as KgitproxyIndexingStatus +from koyeb.api_async.models.kgitproxy_list_branches_reply import KgitproxyListBranchesReply as KgitproxyListBranchesReply +from koyeb.api_async.models.kgitproxy_list_repositories_reply import KgitproxyListRepositoriesReply as KgitproxyListRepositoriesReply +from koyeb.api_async.models.kgitproxy_repository import KgitproxyRepository as KgitproxyRepository +from koyeb.api_async.models.kgitproxy_repository_provider import KgitproxyRepositoryProvider as KgitproxyRepositoryProvider from koyeb.api_async.models.ksearch_app import KsearchApp as KsearchApp -from koyeb.api_async.models.ksearch_global_deployment import ( - KsearchGlobalDeployment as KsearchGlobalDeployment, -) +from koyeb.api_async.models.ksearch_global_deployment import KsearchGlobalDeployment as KsearchGlobalDeployment from koyeb.api_async.models.ksearch_instance import KsearchInstance as KsearchInstance -from koyeb.api_async.models.ksearch_organization import ( - KsearchOrganization as KsearchOrganization, -) -from koyeb.api_async.models.ksearch_regional_deployment import ( - KsearchRegionalDeployment as KsearchRegionalDeployment, -) -from koyeb.api_async.models.ksearch_search_reply import ( - KsearchSearchReply as KsearchSearchReply, -) +from koyeb.api_async.models.ksearch_organization import KsearchOrganization as KsearchOrganization +from koyeb.api_async.models.ksearch_regional_deployment import KsearchRegionalDeployment as KsearchRegionalDeployment +from koyeb.api_async.models.ksearch_search_reply import KsearchSearchReply as KsearchSearchReply from koyeb.api_async.models.ksearch_service import KsearchService as KsearchService from koyeb.api_async.models.ksearch_user import KsearchUser as KsearchUser -from koyeb.api_async.models.ktest_test_auth_reply import ( - KtestTestAuthReply as KtestTestAuthReply, -) -from koyeb.api_async.models.ktest_test_auth_request import ( - KtestTestAuthRequest as KtestTestAuthRequest, -) +from koyeb.api_async.models.ktest_test_auth_reply import KtestTestAuthReply as KtestTestAuthReply +from koyeb.api_async.models.ktest_test_auth_request import KtestTestAuthRequest as KtestTestAuthRequest from koyeb.api_async.models.lifecycle_quotas import LifecycleQuotas as LifecycleQuotas -from koyeb.api_async.models.list_app_events_reply import ( - ListAppEventsReply as ListAppEventsReply, -) +from koyeb.api_async.models.list_app_events_reply import ListAppEventsReply as ListAppEventsReply from koyeb.api_async.models.list_apps_reply import ListAppsReply as ListAppsReply -from koyeb.api_async.models.list_catalog_instances_reply import ( - ListCatalogInstancesReply as ListCatalogInstancesReply, -) -from koyeb.api_async.models.list_credentials_reply import ( - ListCredentialsReply as ListCredentialsReply, -) -from koyeb.api_async.models.list_datacenters_reply import ( - ListDatacentersReply as ListDatacentersReply, -) -from koyeb.api_async.models.list_deployment_events_reply import ( - ListDeploymentEventsReply as ListDeploymentEventsReply, -) -from koyeb.api_async.models.list_deployments_reply import ( - ListDeploymentsReply as ListDeploymentsReply, -) -from koyeb.api_async.models.list_domains_reply import ( - ListDomainsReply as ListDomainsReply, -) -from koyeb.api_async.models.list_instance_events_reply import ( - ListInstanceEventsReply as ListInstanceEventsReply, -) -from koyeb.api_async.models.list_instance_snapshot_events_reply import ( - ListInstanceSnapshotEventsReply as ListInstanceSnapshotEventsReply, -) -from koyeb.api_async.models.list_instance_snapshots_reply import ( - ListInstanceSnapshotsReply as ListInstanceSnapshotsReply, -) -from koyeb.api_async.models.list_instances_reply import ( - ListInstancesReply as ListInstancesReply, -) -from koyeb.api_async.models.list_organization_invitations_reply import ( - ListOrganizationInvitationsReply as ListOrganizationInvitationsReply, -) -from koyeb.api_async.models.list_organization_members_reply import ( - ListOrganizationMembersReply as ListOrganizationMembersReply, -) -from koyeb.api_async.models.list_payment_methods_reply import ( - ListPaymentMethodsReply as ListPaymentMethodsReply, -) -from koyeb.api_async.models.list_persistent_volume_events_reply import ( - ListPersistentVolumeEventsReply as ListPersistentVolumeEventsReply, -) -from koyeb.api_async.models.list_persistent_volumes_reply import ( - ListPersistentVolumesReply as ListPersistentVolumesReply, -) -from koyeb.api_async.models.list_pool_claim_reply import ( - ListPoolClaimReply as ListPoolClaimReply, -) -from koyeb.api_async.models.list_projects_reply import ( - ListProjectsReply as ListProjectsReply, -) -from koyeb.api_async.models.list_regional_deployment_events_reply import ( - ListRegionalDeploymentEventsReply as ListRegionalDeploymentEventsReply, -) -from koyeb.api_async.models.list_regional_deployments_reply import ( - ListRegionalDeploymentsReply as ListRegionalDeploymentsReply, -) -from koyeb.api_async.models.list_regions_reply import ( - ListRegionsReply as ListRegionsReply, -) -from koyeb.api_async.models.list_secrets_reply import ( - ListSecretsReply as ListSecretsReply, -) -from koyeb.api_async.models.list_service_events_reply import ( - ListServiceEventsReply as ListServiceEventsReply, -) -from koyeb.api_async.models.list_service_pools_reply import ( - ListServicePoolsReply as ListServicePoolsReply, -) -from koyeb.api_async.models.list_services_reply import ( - ListServicesReply as ListServicesReply, -) -from koyeb.api_async.models.list_snapshots_reply import ( - ListSnapshotsReply as ListSnapshotsReply, -) +from koyeb.api_async.models.list_catalog_instances_reply import ListCatalogInstancesReply as ListCatalogInstancesReply +from koyeb.api_async.models.list_credentials_reply import ListCredentialsReply as ListCredentialsReply +from koyeb.api_async.models.list_datacenters_reply import ListDatacentersReply as ListDatacentersReply +from koyeb.api_async.models.list_deployment_events_reply import ListDeploymentEventsReply as ListDeploymentEventsReply +from koyeb.api_async.models.list_deployments_reply import ListDeploymentsReply as ListDeploymentsReply +from koyeb.api_async.models.list_domains_reply import ListDomainsReply as ListDomainsReply +from koyeb.api_async.models.list_instance_events_reply import ListInstanceEventsReply as ListInstanceEventsReply +from koyeb.api_async.models.list_instance_snapshot_events_reply import ListInstanceSnapshotEventsReply as ListInstanceSnapshotEventsReply +from koyeb.api_async.models.list_instance_snapshots_reply import ListInstanceSnapshotsReply as ListInstanceSnapshotsReply +from koyeb.api_async.models.list_instances_reply import ListInstancesReply as ListInstancesReply +from koyeb.api_async.models.list_organization_invitations_reply import ListOrganizationInvitationsReply as ListOrganizationInvitationsReply +from koyeb.api_async.models.list_organization_members_reply import ListOrganizationMembersReply as ListOrganizationMembersReply +from koyeb.api_async.models.list_payment_methods_reply import ListPaymentMethodsReply as ListPaymentMethodsReply +from koyeb.api_async.models.list_persistent_volume_events_reply import ListPersistentVolumeEventsReply as ListPersistentVolumeEventsReply +from koyeb.api_async.models.list_persistent_volumes_reply import ListPersistentVolumesReply as ListPersistentVolumesReply +from koyeb.api_async.models.list_pool_claim_reply import ListPoolClaimReply as ListPoolClaimReply +from koyeb.api_async.models.list_projects_reply import ListProjectsReply as ListProjectsReply +from koyeb.api_async.models.list_regional_deployment_events_reply import ListRegionalDeploymentEventsReply as ListRegionalDeploymentEventsReply +from koyeb.api_async.models.list_regional_deployments_reply import ListRegionalDeploymentsReply as ListRegionalDeploymentsReply +from koyeb.api_async.models.list_regions_reply import ListRegionsReply as ListRegionsReply +from koyeb.api_async.models.list_secrets_reply import ListSecretsReply as ListSecretsReply +from koyeb.api_async.models.list_service_events_reply import ListServiceEventsReply as ListServiceEventsReply +from koyeb.api_async.models.list_service_pools_reply import ListServicePoolsReply as ListServicePoolsReply +from koyeb.api_async.models.list_services_reply import ListServicesReply as ListServicesReply +from koyeb.api_async.models.list_snapshots_reply import ListSnapshotsReply as ListSnapshotsReply from koyeb.api_async.models.list_usage_reply import ListUsageReply as ListUsageReply -from koyeb.api_async.models.list_user_organization_invitations_reply import ( - ListUserOrganizationInvitationsReply as ListUserOrganizationInvitationsReply, -) -from koyeb.api_async.models.list_user_organizations_reply import ( - ListUserOrganizationsReply as ListUserOrganizationsReply, -) +from koyeb.api_async.models.list_user_organization_invitations_reply import ListUserOrganizationInvitationsReply as ListUserOrganizationInvitationsReply +from koyeb.api_async.models.list_user_organizations_reply import ListUserOrganizationsReply as ListUserOrganizationsReply from koyeb.api_async.models.log_entry import LogEntry as LogEntry -from koyeb.api_async.models.login_method_reply import ( - LoginMethodReply as LoginMethodReply, -) -from koyeb.api_async.models.login_method_reply_method import ( - LoginMethodReplyMethod as LoginMethodReplyMethod, -) +from koyeb.api_async.models.login_method_reply import LoginMethodReply as LoginMethodReply +from koyeb.api_async.models.login_method_reply_method import LoginMethodReplyMethod as LoginMethodReplyMethod from koyeb.api_async.models.login_reply import LoginReply as LoginReply from koyeb.api_async.models.login_request import LoginRequest as LoginRequest from koyeb.api_async.models.manage_reply import ManageReply as ManageReply -from koyeb.api_async.models.manual_service_scaling import ( - ManualServiceScaling as ManualServiceScaling, -) +from koyeb.api_async.models.manual_service_scaling import ManualServiceScaling as ManualServiceScaling from koyeb.api_async.models.members_summary import MembersSummary as MembersSummary from koyeb.api_async.models.mesh import Mesh as Mesh from koyeb.api_async.models.mesh_scope import MeshScope as MeshScope from koyeb.api_async.models.metric_name import MetricName as MetricName -from koyeb.api_async.models.neon_postgres_database import ( - NeonPostgresDatabase as NeonPostgresDatabase, -) -from koyeb.api_async.models.neon_postgres_database_deployment_metadata import ( - NeonPostgresDatabaseDeploymentMetadata as NeonPostgresDatabaseDeploymentMetadata, -) -from koyeb.api_async.models.neon_postgres_database_neon_database import ( - NeonPostgresDatabaseNeonDatabase as NeonPostgresDatabaseNeonDatabase, -) -from koyeb.api_async.models.neon_postgres_database_neon_role import ( - NeonPostgresDatabaseNeonRole as NeonPostgresDatabaseNeonRole, -) -from koyeb.api_async.models.neon_postgres_summary import ( - NeonPostgresSummary as NeonPostgresSummary, -) +from koyeb.api_async.models.neon_postgres_database import NeonPostgresDatabase as NeonPostgresDatabase +from koyeb.api_async.models.neon_postgres_database_deployment_metadata import NeonPostgresDatabaseDeploymentMetadata as NeonPostgresDatabaseDeploymentMetadata +from koyeb.api_async.models.neon_postgres_database_neon_database import NeonPostgresDatabaseNeonDatabase as NeonPostgresDatabaseNeonDatabase +from koyeb.api_async.models.neon_postgres_database_neon_role import NeonPostgresDatabaseNeonRole as NeonPostgresDatabaseNeonRole +from koyeb.api_async.models.neon_postgres_summary import NeonPostgresSummary as NeonPostgresSummary from koyeb.api_async.models.network_policy import NetworkPolicy as NetworkPolicy -from koyeb.api_async.models.network_policy_destination import ( - NetworkPolicyDestination as NetworkPolicyDestination, -) -from koyeb.api_async.models.next_invoice_reply import ( - NextInvoiceReply as NextInvoiceReply, -) -from koyeb.api_async.models.next_invoice_reply_discount import ( - NextInvoiceReplyDiscount as NextInvoiceReplyDiscount, -) -from koyeb.api_async.models.next_invoice_reply_discount_type import ( - NextInvoiceReplyDiscountType as NextInvoiceReplyDiscountType, -) -from koyeb.api_async.models.next_invoice_reply_line import ( - NextInvoiceReplyLine as NextInvoiceReplyLine, -) -from koyeb.api_async.models.next_invoice_reply_line_period import ( - NextInvoiceReplyLinePeriod as NextInvoiceReplyLinePeriod, -) -from koyeb.api_async.models.next_invoice_reply_line_price import ( - NextInvoiceReplyLinePrice as NextInvoiceReplyLinePrice, -) +from koyeb.api_async.models.network_policy_destination import NetworkPolicyDestination as NetworkPolicyDestination +from koyeb.api_async.models.next_invoice_reply import NextInvoiceReply as NextInvoiceReply +from koyeb.api_async.models.next_invoice_reply_discount import NextInvoiceReplyDiscount as NextInvoiceReplyDiscount +from koyeb.api_async.models.next_invoice_reply_discount_type import NextInvoiceReplyDiscountType as NextInvoiceReplyDiscountType +from koyeb.api_async.models.next_invoice_reply_line import NextInvoiceReplyLine as NextInvoiceReplyLine +from koyeb.api_async.models.next_invoice_reply_line_period import NextInvoiceReplyLinePeriod as NextInvoiceReplyLinePeriod +from koyeb.api_async.models.next_invoice_reply_line_price import NextInvoiceReplyLinePrice as NextInvoiceReplyLinePrice from koyeb.api_async.models.notification import Notification as Notification -from koyeb.api_async.models.notification_list import ( - NotificationList as NotificationList, -) -from koyeb.api_async.models.o_auth_callback_reply import ( - OAuthCallbackReply as OAuthCallbackReply, -) -from koyeb.api_async.models.o_auth_callback_request import ( - OAuthCallbackRequest as OAuthCallbackRequest, -) +from koyeb.api_async.models.notification_list import NotificationList as NotificationList +from koyeb.api_async.models.o_auth_callback_reply import OAuthCallbackReply as OAuthCallbackReply +from koyeb.api_async.models.o_auth_callback_request import OAuthCallbackRequest as OAuthCallbackRequest from koyeb.api_async.models.o_auth_provider import OAuthProvider as OAuthProvider from koyeb.api_async.models.object import Object as Object from koyeb.api_async.models.organization import Organization as Organization -from koyeb.api_async.models.organization_deactivation_reason import ( - OrganizationDeactivationReason as OrganizationDeactivationReason, -) -from koyeb.api_async.models.organization_detailed_status import ( - OrganizationDetailedStatus as OrganizationDetailedStatus, -) -from koyeb.api_async.models.organization_invitation import ( - OrganizationInvitation as OrganizationInvitation, -) -from koyeb.api_async.models.organization_invitation_status import ( - OrganizationInvitationStatus as OrganizationInvitationStatus, -) -from koyeb.api_async.models.organization_member import ( - OrganizationMember as OrganizationMember, -) -from koyeb.api_async.models.organization_member_status import ( - OrganizationMemberStatus as OrganizationMemberStatus, -) -from koyeb.api_async.models.organization_status import ( - OrganizationStatus as OrganizationStatus, -) -from koyeb.api_async.models.organization_summary import ( - OrganizationSummary as OrganizationSummary, -) +from koyeb.api_async.models.organization_deactivation_reason import OrganizationDeactivationReason as OrganizationDeactivationReason +from koyeb.api_async.models.organization_detailed_status import OrganizationDetailedStatus as OrganizationDetailedStatus +from koyeb.api_async.models.organization_invitation import OrganizationInvitation as OrganizationInvitation +from koyeb.api_async.models.organization_invitation_status import OrganizationInvitationStatus as OrganizationInvitationStatus +from koyeb.api_async.models.organization_member import OrganizationMember as OrganizationMember +from koyeb.api_async.models.organization_member_status import OrganizationMemberStatus as OrganizationMemberStatus +from koyeb.api_async.models.organization_status import OrganizationStatus as OrganizationStatus +from koyeb.api_async.models.organization_summary import OrganizationSummary as OrganizationSummary from koyeb.api_async.models.payment_method import PaymentMethod as PaymentMethod -from koyeb.api_async.models.payment_method_status import ( - PaymentMethodStatus as PaymentMethodStatus, -) +from koyeb.api_async.models.payment_method_status import PaymentMethodStatus as PaymentMethodStatus from koyeb.api_async.models.period_usage import PeriodUsage as PeriodUsage -from koyeb.api_async.models.persistent_volume import ( - PersistentVolume as PersistentVolume, -) -from koyeb.api_async.models.persistent_volume_backing_store import ( - PersistentVolumeBackingStore as PersistentVolumeBackingStore, -) -from koyeb.api_async.models.persistent_volume_event import ( - PersistentVolumeEvent as PersistentVolumeEvent, -) -from koyeb.api_async.models.persistent_volume_quotas import ( - PersistentVolumeQuotas as PersistentVolumeQuotas, -) -from koyeb.api_async.models.persistent_volume_region_usage import ( - PersistentVolumeRegionUsage as PersistentVolumeRegionUsage, -) -from koyeb.api_async.models.persistent_volume_status import ( - PersistentVolumeStatus as PersistentVolumeStatus, -) +from koyeb.api_async.models.persistent_volume import PersistentVolume as PersistentVolume +from koyeb.api_async.models.persistent_volume_backing_store import PersistentVolumeBackingStore as PersistentVolumeBackingStore +from koyeb.api_async.models.persistent_volume_event import PersistentVolumeEvent as PersistentVolumeEvent +from koyeb.api_async.models.persistent_volume_quotas import PersistentVolumeQuotas as PersistentVolumeQuotas +from koyeb.api_async.models.persistent_volume_region_usage import PersistentVolumeRegionUsage as PersistentVolumeRegionUsage +from koyeb.api_async.models.persistent_volume_status import PersistentVolumeStatus as PersistentVolumeStatus from koyeb.api_async.models.plan import Plan as Plan from koyeb.api_async.models.pool_claim import PoolClaim as PoolClaim from koyeb.api_async.models.pool_claim_reply import PoolClaimReply as PoolClaimReply -from koyeb.api_async.models.pool_claim_request import ( - PoolClaimRequest as PoolClaimRequest, -) +from koyeb.api_async.models.pool_claim_request import PoolClaimRequest as PoolClaimRequest from koyeb.api_async.models.pool_claim_status import PoolClaimStatus as PoolClaimStatus from koyeb.api_async.models.port import Port as Port -from koyeb.api_async.models.private_registry_configuration import ( - PrivateRegistryConfiguration as PrivateRegistryConfiguration, -) +from koyeb.api_async.models.private_registry_configuration import PrivateRegistryConfiguration as PrivateRegistryConfiguration from koyeb.api_async.models.project import Project as Project -from koyeb.api_async.models.proxy_port_protocol import ( - ProxyPortProtocol as ProxyPortProtocol, -) -from koyeb.api_async.models.public_organization import ( - PublicOrganization as PublicOrganization, -) +from koyeb.api_async.models.proxy_port_protocol import ProxyPortProtocol as ProxyPortProtocol +from koyeb.api_async.models.public_organization import PublicOrganization as PublicOrganization from koyeb.api_async.models.public_user import PublicUser as PublicUser from koyeb.api_async.models.query_logs_reply import QueryLogsReply as QueryLogsReply -from koyeb.api_async.models.query_logs_reply_pagination import ( - QueryLogsReplyPagination as QueryLogsReplyPagination, -) +from koyeb.api_async.models.query_logs_reply_pagination import QueryLogsReplyPagination as QueryLogsReplyPagination from koyeb.api_async.models.quota_usage import QuotaUsage as QuotaUsage from koyeb.api_async.models.quotas import Quotas as Quotas -from koyeb.api_async.models.reactivate_organization_reply import ( - ReactivateOrganizationReply as ReactivateOrganizationReply, -) -from koyeb.api_async.models.redeem_coupon_request import ( - RedeemCouponRequest as RedeemCouponRequest, -) +from koyeb.api_async.models.reactivate_organization_reply import ReactivateOrganizationReply as ReactivateOrganizationReply +from koyeb.api_async.models.redeem_coupon_request import RedeemCouponRequest as RedeemCouponRequest from koyeb.api_async.models.redeploy_reply import RedeployReply as RedeployReply -from koyeb.api_async.models.redeploy_request_info import ( - RedeployRequestInfo as RedeployRequestInfo, -) +from koyeb.api_async.models.redeploy_request_info import RedeployRequestInfo as RedeployRequestInfo from koyeb.api_async.models.region import Region as Region -from koyeb.api_async.models.region_availability import ( - RegionAvailability as RegionAvailability, -) +from koyeb.api_async.models.region_availability import RegionAvailability as RegionAvailability from koyeb.api_async.models.region_list_item import RegionListItem as RegionListItem from koyeb.api_async.models.region_usage import RegionUsage as RegionUsage -from koyeb.api_async.models.regional_deployment import ( - RegionalDeployment as RegionalDeployment, -) -from koyeb.api_async.models.regional_deployment_definition import ( - RegionalDeploymentDefinition as RegionalDeploymentDefinition, -) -from koyeb.api_async.models.regional_deployment_definition_type import ( - RegionalDeploymentDefinitionType as RegionalDeploymentDefinitionType, -) -from koyeb.api_async.models.regional_deployment_event import ( - RegionalDeploymentEvent as RegionalDeploymentEvent, -) -from koyeb.api_async.models.regional_deployment_list_item import ( - RegionalDeploymentListItem as RegionalDeploymentListItem, -) -from koyeb.api_async.models.regional_deployment_mesh import ( - RegionalDeploymentMesh as RegionalDeploymentMesh, -) -from koyeb.api_async.models.regional_deployment_role import ( - RegionalDeploymentRole as RegionalDeploymentRole, -) -from koyeb.api_async.models.regional_deployment_status import ( - RegionalDeploymentStatus as RegionalDeploymentStatus, -) -from koyeb.api_async.models.regional_deployment_volume import ( - RegionalDeploymentVolume as RegionalDeploymentVolume, -) -from koyeb.api_async.models.remove_organization_member_reply import ( - RemoveOrganizationMemberReply as RemoveOrganizationMemberReply, -) -from koyeb.api_async.models.resend_organization_invitation_reply import ( - ResendOrganizationInvitationReply as ResendOrganizationInvitationReply, -) -from koyeb.api_async.models.reset_password_request import ( - ResetPasswordRequest as ResetPasswordRequest, -) -from koyeb.api_async.models.reveal_secret_reply import ( - RevealSecretReply as RevealSecretReply, -) -from koyeb.api_async.models.review_organization_capacity_reply import ( - ReviewOrganizationCapacityReply as ReviewOrganizationCapacityReply, -) -from koyeb.api_async.models.review_organization_capacity_request import ( - ReviewOrganizationCapacityRequest as ReviewOrganizationCapacityRequest, -) +from koyeb.api_async.models.regional_deployment import RegionalDeployment as RegionalDeployment +from koyeb.api_async.models.regional_deployment_definition import RegionalDeploymentDefinition as RegionalDeploymentDefinition +from koyeb.api_async.models.regional_deployment_definition_type import RegionalDeploymentDefinitionType as RegionalDeploymentDefinitionType +from koyeb.api_async.models.regional_deployment_event import RegionalDeploymentEvent as RegionalDeploymentEvent +from koyeb.api_async.models.regional_deployment_list_item import RegionalDeploymentListItem as RegionalDeploymentListItem +from koyeb.api_async.models.regional_deployment_mesh import RegionalDeploymentMesh as RegionalDeploymentMesh +from koyeb.api_async.models.regional_deployment_role import RegionalDeploymentRole as RegionalDeploymentRole +from koyeb.api_async.models.regional_deployment_status import RegionalDeploymentStatus as RegionalDeploymentStatus +from koyeb.api_async.models.regional_deployment_volume import RegionalDeploymentVolume as RegionalDeploymentVolume +from koyeb.api_async.models.remove_organization_member_reply import RemoveOrganizationMemberReply as RemoveOrganizationMemberReply +from koyeb.api_async.models.resend_organization_invitation_reply import ResendOrganizationInvitationReply as ResendOrganizationInvitationReply +from koyeb.api_async.models.reset_password_request import ResetPasswordRequest as ResetPasswordRequest +from koyeb.api_async.models.reveal_secret_reply import RevealSecretReply as RevealSecretReply +from koyeb.api_async.models.review_organization_capacity_reply import ReviewOrganizationCapacityReply as ReviewOrganizationCapacityReply +from koyeb.api_async.models.review_organization_capacity_request import ReviewOrganizationCapacityRequest as ReviewOrganizationCapacityRequest from koyeb.api_async.models.route import Route as Route from koyeb.api_async.models.sample import Sample as Sample from koyeb.api_async.models.sandbox_metadata import SandboxMetadata as SandboxMetadata -from koyeb.api_async.models.scale_to_zero_quotas import ( - ScaleToZeroQuotas as ScaleToZeroQuotas, -) +from koyeb.api_async.models.scale_to_zero_quotas import ScaleToZeroQuotas as ScaleToZeroQuotas from koyeb.api_async.models.scaling import Scaling as Scaling from koyeb.api_async.models.secret import Secret as Secret from koyeb.api_async.models.secret_type import SecretType as SecretType from koyeb.api_async.models.secrets_summary import SecretsSummary as SecretsSummary -from koyeb.api_async.models.security_policies import ( - SecurityPolicies as SecurityPolicies, -) +from koyeb.api_async.models.security_policies import SecurityPolicies as SecurityPolicies from koyeb.api_async.models.service import Service as Service from koyeb.api_async.models.service_event import ServiceEvent as ServiceEvent -from koyeb.api_async.models.service_life_cycle import ( - ServiceLifeCycle as ServiceLifeCycle, -) +from koyeb.api_async.models.service_life_cycle import ServiceLifeCycle as ServiceLifeCycle from koyeb.api_async.models.service_list_item import ServiceListItem as ServiceListItem from koyeb.api_async.models.service_pool import ServicePool as ServicePool -from koyeb.api_async.models.service_pool_status import ( - ServicePoolStatus as ServicePoolStatus, -) +from koyeb.api_async.models.service_pool_status import ServicePoolStatus as ServicePoolStatus from koyeb.api_async.models.service_state import ServiceState as ServiceState from koyeb.api_async.models.service_status import ServiceStatus as ServiceStatus from koyeb.api_async.models.service_summary import ServiceSummary as ServiceSummary @@ -1434,124 +924,50 @@ from koyeb.api_async.models.snapshot import Snapshot as Snapshot from koyeb.api_async.models.snapshot_status import SnapshotStatus as SnapshotStatus from koyeb.api_async.models.snapshot_type import SnapshotType as SnapshotType -from koyeb.api_async.models.stream_result_of_exec_command_reply import ( - StreamResultOfExecCommandReply as StreamResultOfExecCommandReply, -) -from koyeb.api_async.models.stream_result_of_log_entry import ( - StreamResultOfLogEntry as StreamResultOfLogEntry, -) +from koyeb.api_async.models.stream_result_of_exec_command_reply import StreamResultOfExecCommandReply as StreamResultOfExecCommandReply +from koyeb.api_async.models.stream_result_of_log_entry import StreamResultOfLogEntry as StreamResultOfLogEntry from koyeb.api_async.models.subscription import Subscription as Subscription -from koyeb.api_async.models.subscription_payment_failure import ( - SubscriptionPaymentFailure as SubscriptionPaymentFailure, -) -from koyeb.api_async.models.subscription_payment_failure_stripe_sdk import ( - SubscriptionPaymentFailureStripeSDK as SubscriptionPaymentFailureStripeSDK, -) -from koyeb.api_async.models.subscription_status import ( - SubscriptionStatus as SubscriptionStatus, -) +from koyeb.api_async.models.subscription_payment_failure import SubscriptionPaymentFailure as SubscriptionPaymentFailure +from koyeb.api_async.models.subscription_payment_failure_stripe_sdk import SubscriptionPaymentFailureStripeSDK as SubscriptionPaymentFailureStripeSDK +from koyeb.api_async.models.subscription_status import SubscriptionStatus as SubscriptionStatus from koyeb.api_async.models.tcp_health_check import TCPHealthCheck as TCPHealthCheck from koyeb.api_async.models.token import Token as Token -from koyeb.api_async.models.trigger_deployment_metadata import ( - TriggerDeploymentMetadata as TriggerDeploymentMetadata, -) -from koyeb.api_async.models.trigger_deployment_metadata_actor_type import ( - TriggerDeploymentMetadataActorType as TriggerDeploymentMetadataActorType, -) -from koyeb.api_async.models.trigger_deployment_metadata_trigger_type import ( - TriggerDeploymentMetadataTriggerType as TriggerDeploymentMetadataTriggerType, -) -from koyeb.api_async.models.trigger_git_deployment_metadata import ( - TriggerGitDeploymentMetadata as TriggerGitDeploymentMetadata, -) -from koyeb.api_async.models.trigger_git_deployment_metadata_provider import ( - TriggerGitDeploymentMetadataProvider as TriggerGitDeploymentMetadataProvider, -) +from koyeb.api_async.models.trigger_deployment_metadata import TriggerDeploymentMetadata as TriggerDeploymentMetadata +from koyeb.api_async.models.trigger_deployment_metadata_actor_type import TriggerDeploymentMetadataActorType as TriggerDeploymentMetadataActorType +from koyeb.api_async.models.trigger_deployment_metadata_trigger_type import TriggerDeploymentMetadataTriggerType as TriggerDeploymentMetadataTriggerType +from koyeb.api_async.models.trigger_git_deployment_metadata import TriggerGitDeploymentMetadata as TriggerGitDeploymentMetadata +from koyeb.api_async.models.trigger_git_deployment_metadata_provider import TriggerGitDeploymentMetadataProvider as TriggerGitDeploymentMetadataProvider from koyeb.api_async.models.update_app import UpdateApp as UpdateApp from koyeb.api_async.models.update_app_reply import UpdateAppReply as UpdateAppReply -from koyeb.api_async.models.update_budget_reply import ( - UpdateBudgetReply as UpdateBudgetReply, -) -from koyeb.api_async.models.update_budget_request import ( - UpdateBudgetRequest as UpdateBudgetRequest, -) -from koyeb.api_async.models.update_credential_reply import ( - UpdateCredentialReply as UpdateCredentialReply, -) +from koyeb.api_async.models.update_budget_reply import UpdateBudgetReply as UpdateBudgetReply +from koyeb.api_async.models.update_budget_request import UpdateBudgetRequest as UpdateBudgetRequest +from koyeb.api_async.models.update_credential_reply import UpdateCredentialReply as UpdateCredentialReply from koyeb.api_async.models.update_domain import UpdateDomain as UpdateDomain -from koyeb.api_async.models.update_domain_reply import ( - UpdateDomainReply as UpdateDomainReply, -) -from koyeb.api_async.models.update_organization_default_project_reply import ( - UpdateOrganizationDefaultProjectReply as UpdateOrganizationDefaultProjectReply, -) -from koyeb.api_async.models.update_organization_default_project_request import ( - UpdateOrganizationDefaultProjectRequest as UpdateOrganizationDefaultProjectRequest, -) -from koyeb.api_async.models.update_organization_name_reply import ( - UpdateOrganizationNameReply as UpdateOrganizationNameReply, -) -from koyeb.api_async.models.update_organization_name_request import ( - UpdateOrganizationNameRequest as UpdateOrganizationNameRequest, -) -from koyeb.api_async.models.update_organization_plan_reply import ( - UpdateOrganizationPlanReply as UpdateOrganizationPlanReply, -) -from koyeb.api_async.models.update_organization_plan_request import ( - UpdateOrganizationPlanRequest as UpdateOrganizationPlanRequest, -) -from koyeb.api_async.models.update_organization_reply import ( - UpdateOrganizationReply as UpdateOrganizationReply, -) -from koyeb.api_async.models.update_password_request import ( - UpdatePasswordRequest as UpdatePasswordRequest, -) -from koyeb.api_async.models.update_persistent_volume_reply import ( - UpdatePersistentVolumeReply as UpdatePersistentVolumeReply, -) -from koyeb.api_async.models.update_persistent_volume_request import ( - UpdatePersistentVolumeRequest as UpdatePersistentVolumeRequest, -) -from koyeb.api_async.models.update_project_reply import ( - UpdateProjectReply as UpdateProjectReply, -) -from koyeb.api_async.models.update_secret_reply import ( - UpdateSecretReply as UpdateSecretReply, -) +from koyeb.api_async.models.update_domain_reply import UpdateDomainReply as UpdateDomainReply +from koyeb.api_async.models.update_organization_default_project_reply import UpdateOrganizationDefaultProjectReply as UpdateOrganizationDefaultProjectReply +from koyeb.api_async.models.update_organization_default_project_request import UpdateOrganizationDefaultProjectRequest as UpdateOrganizationDefaultProjectRequest +from koyeb.api_async.models.update_organization_name_reply import UpdateOrganizationNameReply as UpdateOrganizationNameReply +from koyeb.api_async.models.update_organization_name_request import UpdateOrganizationNameRequest as UpdateOrganizationNameRequest +from koyeb.api_async.models.update_organization_plan_reply import UpdateOrganizationPlanReply as UpdateOrganizationPlanReply +from koyeb.api_async.models.update_organization_plan_request import UpdateOrganizationPlanRequest as UpdateOrganizationPlanRequest +from koyeb.api_async.models.update_organization_reply import UpdateOrganizationReply as UpdateOrganizationReply +from koyeb.api_async.models.update_password_request import UpdatePasswordRequest as UpdatePasswordRequest +from koyeb.api_async.models.update_persistent_volume_reply import UpdatePersistentVolumeReply as UpdatePersistentVolumeReply +from koyeb.api_async.models.update_persistent_volume_request import UpdatePersistentVolumeRequest as UpdatePersistentVolumeRequest +from koyeb.api_async.models.update_project_reply import UpdateProjectReply as UpdateProjectReply +from koyeb.api_async.models.update_secret_reply import UpdateSecretReply as UpdateSecretReply from koyeb.api_async.models.update_service import UpdateService as UpdateService -from koyeb.api_async.models.update_service_pool import ( - UpdateServicePool as UpdateServicePool, -) -from koyeb.api_async.models.update_service_pool_reply import ( - UpdateServicePoolReply as UpdateServicePoolReply, -) -from koyeb.api_async.models.update_service_reply import ( - UpdateServiceReply as UpdateServiceReply, -) -from koyeb.api_async.models.update_service_scaling_request import ( - UpdateServiceScalingRequest as UpdateServiceScalingRequest, -) -from koyeb.api_async.models.update_snapshot_reply import ( - UpdateSnapshotReply as UpdateSnapshotReply, -) -from koyeb.api_async.models.update_snapshot_request import ( - UpdateSnapshotRequest as UpdateSnapshotRequest, -) -from koyeb.api_async.models.update_user_request_user_update_body import ( - UpdateUserRequestUserUpdateBody as UpdateUserRequestUserUpdateBody, -) -from koyeb.api_async.models.update_user_settings_reply import ( - UpdateUserSettingsReply as UpdateUserSettingsReply, -) -from koyeb.api_async.models.update_user_settings_request import ( - UpdateUserSettingsRequest as UpdateUserSettingsRequest, -) -from koyeb.api_async.models.upsert_signup_qualification_reply import ( - UpsertSignupQualificationReply as UpsertSignupQualificationReply, -) -from koyeb.api_async.models.upsert_signup_qualification_request import ( - UpsertSignupQualificationRequest as UpsertSignupQualificationRequest, -) +from koyeb.api_async.models.update_service_pool import UpdateServicePool as UpdateServicePool +from koyeb.api_async.models.update_service_pool_reply import UpdateServicePoolReply as UpdateServicePoolReply +from koyeb.api_async.models.update_service_reply import UpdateServiceReply as UpdateServiceReply +from koyeb.api_async.models.update_service_scaling_request import UpdateServiceScalingRequest as UpdateServiceScalingRequest +from koyeb.api_async.models.update_snapshot_reply import UpdateSnapshotReply as UpdateSnapshotReply +from koyeb.api_async.models.update_snapshot_request import UpdateSnapshotRequest as UpdateSnapshotRequest +from koyeb.api_async.models.update_user_request_user_update_body import UpdateUserRequestUserUpdateBody as UpdateUserRequestUserUpdateBody +from koyeb.api_async.models.update_user_settings_reply import UpdateUserSettingsReply as UpdateUserSettingsReply +from koyeb.api_async.models.update_user_settings_request import UpdateUserSettingsRequest as UpdateUserSettingsRequest +from koyeb.api_async.models.upsert_signup_qualification_reply import UpsertSignupQualificationReply as UpsertSignupQualificationReply +from koyeb.api_async.models.upsert_signup_qualification_request import UpsertSignupQualificationRequest as UpsertSignupQualificationRequest from koyeb.api_async.models.usage import Usage as Usage from koyeb.api_async.models.usage_details import UsageDetails as UsageDetails from koyeb.api_async.models.user import User as User @@ -1559,9 +975,6 @@ from koyeb.api_async.models.user_reply import UserReply as UserReply from koyeb.api_async.models.user_role_role import UserRoleRole as UserRoleRole from koyeb.api_async.models.user_settings import UserSettings as UserSettings -from koyeb.api_async.models.verify_docker_image_reply import ( - VerifyDockerImageReply as VerifyDockerImageReply, -) -from koyeb.api_async.models.verify_docker_image_reply_err_code import ( - VerifyDockerImageReplyErrCode as VerifyDockerImageReplyErrCode, -) +from koyeb.api_async.models.verify_docker_image_reply import VerifyDockerImageReply as VerifyDockerImageReply +from koyeb.api_async.models.verify_docker_image_reply_err_code import VerifyDockerImageReplyErrCode as VerifyDockerImageReplyErrCode + diff --git a/koyeb/api_async/api/__init__.py b/koyeb/api_async/api/__init__.py index fce7b4ac..00b2aedd 100644 --- a/koyeb/api_async/api/__init__.py +++ b/koyeb/api_async/api/__init__.py @@ -18,9 +18,7 @@ from koyeb.api_async.api.intercom_api import IntercomApi from koyeb.api_async.api.logs_api import LogsApi from koyeb.api_async.api.metrics_api import MetricsApi -from koyeb.api_async.api.organization_confirmations_api import ( - OrganizationConfirmationsApi, -) +from koyeb.api_async.api.organization_confirmations_api import OrganizationConfirmationsApi from koyeb.api_async.api.organization_invitations_api import OrganizationInvitationsApi from koyeb.api_async.api.organization_members_api import OrganizationMembersApi from koyeb.api_async.api.organization_quotas_api import OrganizationQuotasApi @@ -49,3 +47,4 @@ from koyeb.api_async.api.invite_api import InviteApi from koyeb.api_async.api.organization_api import OrganizationApi from koyeb.api_async.api.sso_api import SsoApi + diff --git a/koyeb/api_async/api/activity_api.py b/koyeb/api_async/api/activity_api.py index cea1f623..3e2d395d 100644 --- a/koyeb/api_async/api/activity_api.py +++ b/koyeb/api_async/api/activity_api.py @@ -38,6 +38,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def get_account_activities( self, @@ -47,8 +48,9 @@ async def get_account_activities( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -82,7 +84,7 @@ async def get_account_activities( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_account_activities_serialize( limit=limit, @@ -90,21 +92,22 @@ async def get_account_activities( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ActivityList", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ActivityList", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -112,6 +115,7 @@ async def get_account_activities( response_types_map=_response_types_map, ).data + @validate_call async def get_account_activities_with_http_info( self, @@ -121,8 +125,9 @@ async def get_account_activities_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -156,7 +161,7 @@ async def get_account_activities_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_account_activities_serialize( limit=limit, @@ -164,21 +169,22 @@ async def get_account_activities_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ActivityList", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ActivityList", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -186,6 +192,7 @@ async def get_account_activities_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_account_activities_without_preload_content( self, @@ -195,8 +202,9 @@ async def get_account_activities_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -230,7 +238,7 @@ async def get_account_activities_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_account_activities_serialize( limit=limit, @@ -238,24 +246,26 @@ async def get_account_activities_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ActivityList", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ActivityList", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_account_activities_serialize( self, limit, @@ -265,9 +275,11 @@ def _get_account_activities_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -281,25 +293,35 @@ def _get_account_activities_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/account/activities", + method='GET', + resource_path='/v1/account/activities', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -309,24 +331,25 @@ def _get_account_activities_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_activities( self, limit: Optional[StrictStr] = None, offset: Optional[StrictStr] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on object type"), - ] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on object type")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -362,7 +385,7 @@ async def list_activities( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_activities_serialize( limit=limit, @@ -371,21 +394,22 @@ async def list_activities( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ActivityList", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ActivityList", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -393,21 +417,20 @@ async def list_activities( response_types_map=_response_types_map, ).data + @validate_call async def list_activities_with_http_info( self, limit: Optional[StrictStr] = None, offset: Optional[StrictStr] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on object type"), - ] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on object type")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -443,7 +466,7 @@ async def list_activities_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_activities_serialize( limit=limit, @@ -452,21 +475,22 @@ async def list_activities_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ActivityList", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ActivityList", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -474,21 +498,20 @@ async def list_activities_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_activities_without_preload_content( self, limit: Optional[StrictStr] = None, offset: Optional[StrictStr] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on object type"), - ] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on object type")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -524,7 +547,7 @@ async def list_activities_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_activities_serialize( limit=limit, @@ -533,24 +556,26 @@ async def list_activities_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ActivityList", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ActivityList", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_activities_serialize( self, limit, @@ -561,10 +586,11 @@ def _list_activities_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "types": "multi", + 'types': 'multi', } _path_params: Dict[str, str] = {} @@ -579,28 +605,39 @@ def _list_activities_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/activities", + method='GET', + resource_path='/v1/activities', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -610,9 +647,12 @@ def _list_activities_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_notifications( self, @@ -626,8 +666,9 @@ async def list_notifications( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -669,7 +710,7 @@ async def list_notifications( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_notifications_serialize( limit=limit, @@ -681,21 +722,22 @@ async def list_notifications( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NotificationList", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "NotificationList", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -703,6 +745,7 @@ async def list_notifications( response_types_map=_response_types_map, ).data + @validate_call async def list_notifications_with_http_info( self, @@ -716,8 +759,9 @@ async def list_notifications_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -759,7 +803,7 @@ async def list_notifications_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_notifications_serialize( limit=limit, @@ -771,21 +815,22 @@ async def list_notifications_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NotificationList", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "NotificationList", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -793,6 +838,7 @@ async def list_notifications_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_notifications_without_preload_content( self, @@ -806,8 +852,9 @@ async def list_notifications_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -849,7 +896,7 @@ async def list_notifications_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_notifications_serialize( limit=limit, @@ -861,24 +908,26 @@ async def list_notifications_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NotificationList", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "NotificationList", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_notifications_serialize( self, limit, @@ -892,9 +941,11 @@ def _list_notifications_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -908,37 +959,51 @@ def _list_notifications_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if mark_read is not None: - _query_params.append(("mark_read", mark_read)) - + + _query_params.append(('mark_read', mark_read)) + if mark_seen is not None: - _query_params.append(("mark_seen", mark_seen)) - + + _query_params.append(('mark_seen', mark_seen)) + if unread is not None: - _query_params.append(("unread", unread)) - + + _query_params.append(('unread', unread)) + if unseen is not None: - _query_params.append(("unseen", unseen)) - + + _query_params.append(('unseen', unseen)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/notifications", + method='GET', + resource_path='/v1/notifications', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -948,5 +1013,7 @@ def _list_notifications_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/apps_api.py b/koyeb/api_async/api/apps_api.py index 60d213f4..8a949e46 100644 --- a/koyeb/api_async/api/apps_api.py +++ b/koyeb/api_async/api/apps_api.py @@ -43,6 +43,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create_app( self, @@ -51,8 +52,9 @@ async def create_app( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,28 +86,29 @@ async def create_app( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_app_serialize( app=app, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -113,6 +116,7 @@ async def create_app( response_types_map=_response_types_map, ).data + @validate_call async def create_app_with_http_info( self, @@ -121,8 +125,9 @@ async def create_app_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -154,28 +159,29 @@ async def create_app_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_app_serialize( app=app, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -183,6 +189,7 @@ async def create_app_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def create_app_without_preload_content( self, @@ -191,8 +198,9 @@ async def create_app_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -224,31 +232,33 @@ async def create_app_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_app_serialize( app=app, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_app_serialize( self, app, @@ -257,9 +267,11 @@ def _create_app_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -278,16 +290,24 @@ def _create_app_serialize( if app is not None: _body_params = app + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/apps", + method='POST', + resource_path='/v1/apps', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -297,9 +317,12 @@ def _create_app_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_app( self, @@ -308,8 +331,9 @@ async def delete_app( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -342,28 +366,29 @@ async def delete_app( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -371,6 +396,7 @@ async def delete_app( response_types_map=_response_types_map, ).data + @validate_call async def delete_app_with_http_info( self, @@ -379,8 +405,9 @@ async def delete_app_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -413,28 +440,29 @@ async def delete_app_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -442,6 +470,7 @@ async def delete_app_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def delete_app_without_preload_content( self, @@ -450,8 +479,9 @@ async def delete_app_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -484,31 +514,33 @@ async def delete_app_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_app_serialize( self, id, @@ -517,9 +549,11 @@ def _delete_app_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -532,22 +566,30 @@ def _delete_app_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/apps/{id}", + method='DELETE', + resource_path='/v1/apps/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -557,9 +599,12 @@ def _delete_app_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_app( self, @@ -568,8 +613,9 @@ async def get_app( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -601,28 +647,29 @@ async def get_app( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -630,6 +677,7 @@ async def get_app( response_types_map=_response_types_map, ).data + @validate_call async def get_app_with_http_info( self, @@ -638,8 +686,9 @@ async def get_app_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -671,28 +720,29 @@ async def get_app_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -700,6 +750,7 @@ async def get_app_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_app_without_preload_content( self, @@ -708,8 +759,9 @@ async def get_app_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -741,31 +793,33 @@ async def get_app_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_app_serialize( self, id, @@ -774,9 +828,11 @@ def _get_app_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -789,22 +845,30 @@ def _get_app_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/apps/{id}", + method='GET', + resource_path='/v1/apps/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -814,39 +878,27 @@ def _get_app_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_app_events( self, - app_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on app id") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on app event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on app id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on app event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -886,7 +938,7 @@ async def list_app_events( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_app_events_serialize( app_id=app_id, @@ -897,21 +949,22 @@ async def list_app_events( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListAppEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListAppEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -919,36 +972,22 @@ async def list_app_events( response_types_map=_response_types_map, ).data + @validate_call async def list_app_events_with_http_info( self, - app_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on app id") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on app event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on app id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on app event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -988,7 +1027,7 @@ async def list_app_events_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_app_events_serialize( app_id=app_id, @@ -999,21 +1038,22 @@ async def list_app_events_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListAppEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListAppEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1021,36 +1061,22 @@ async def list_app_events_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_app_events_without_preload_content( self, - app_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on app id") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on app event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on app id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on app event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1090,7 +1116,7 @@ async def list_app_events_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_app_events_serialize( app_id=app_id, @@ -1101,24 +1127,26 @@ async def list_app_events_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListAppEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListAppEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_app_events_serialize( self, app_id, @@ -1131,10 +1159,11 @@ def _list_app_events_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "types": "multi", + 'types': 'multi', } _path_params: Dict[str, str] = {} @@ -1149,34 +1178,47 @@ def _list_app_events_serialize( # process the path parameters # process the query parameters if app_id is not None: - _query_params.append(("app_id", app_id)) - + + _query_params.append(('app_id', app_id)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/app_events", + method='GET', + resource_path='/v1/app_events', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1186,32 +1228,26 @@ def _list_app_events_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_apps( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], Field(description="(Optional) Filter on app ids") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on app ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1249,7 +1285,7 @@ async def list_apps( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_apps_serialize( limit=limit, @@ -1259,21 +1295,22 @@ async def list_apps( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListAppsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListAppsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1281,29 +1318,21 @@ async def list_apps( response_types_map=_response_types_map, ).data + @validate_call async def list_apps_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], Field(description="(Optional) Filter on app ids") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on app ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1341,7 +1370,7 @@ async def list_apps_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_apps_serialize( limit=limit, @@ -1351,21 +1380,22 @@ async def list_apps_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListAppsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListAppsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1373,29 +1403,21 @@ async def list_apps_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_apps_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], Field(description="(Optional) Filter on app ids") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on app ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1433,7 +1455,7 @@ async def list_apps_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_apps_serialize( limit=limit, @@ -1443,24 +1465,26 @@ async def list_apps_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListAppsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListAppsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_apps_serialize( self, limit, @@ -1472,10 +1496,11 @@ def _list_apps_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "ids": "multi", + 'ids': 'multi', } _path_params: Dict[str, str] = {} @@ -1490,31 +1515,43 @@ def _list_apps_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if ids is not None: - _query_params.append(("ids", ids)) - + + _query_params.append(('ids', ids)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/apps", + method='GET', + resource_path='/v1/apps', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1524,9 +1561,12 @@ def _list_apps_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def pause_app( self, @@ -1535,8 +1575,9 @@ async def pause_app( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1569,28 +1610,29 @@ async def pause_app( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._pause_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1598,6 +1640,7 @@ async def pause_app( response_types_map=_response_types_map, ).data + @validate_call async def pause_app_with_http_info( self, @@ -1606,8 +1649,9 @@ async def pause_app_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1640,28 +1684,29 @@ async def pause_app_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._pause_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1669,6 +1714,7 @@ async def pause_app_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def pause_app_without_preload_content( self, @@ -1677,8 +1723,9 @@ async def pause_app_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1711,31 +1758,33 @@ async def pause_app_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._pause_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _pause_app_serialize( self, id, @@ -1744,9 +1793,11 @@ def _pause_app_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1759,22 +1810,30 @@ def _pause_app_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/apps/{id}/pause", + method='POST', + resource_path='/v1/apps/{id}/pause', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1784,9 +1843,12 @@ def _pause_app_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def resume_app( self, @@ -1795,8 +1857,9 @@ async def resume_app( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1829,28 +1892,29 @@ async def resume_app( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resume_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1858,6 +1922,7 @@ async def resume_app( response_types_map=_response_types_map, ).data + @validate_call async def resume_app_with_http_info( self, @@ -1866,8 +1931,9 @@ async def resume_app_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1900,28 +1966,29 @@ async def resume_app_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resume_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1929,6 +1996,7 @@ async def resume_app_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def resume_app_without_preload_content( self, @@ -1937,8 +2005,9 @@ async def resume_app_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1971,31 +2040,33 @@ async def resume_app_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resume_app_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _resume_app_serialize( self, id, @@ -2004,9 +2075,11 @@ def _resume_app_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2019,22 +2092,30 @@ def _resume_app_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/apps/{id}/resume", + method='POST', + resource_path='/v1/apps/{id}/resume', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2044,9 +2125,12 @@ def _resume_app_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_app( self, @@ -2057,8 +2141,9 @@ async def update_app( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2094,7 +2179,7 @@ async def update_app( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_app_serialize( id=id, @@ -2103,21 +2188,22 @@ async def update_app( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2125,6 +2211,7 @@ async def update_app( response_types_map=_response_types_map, ).data + @validate_call async def update_app_with_http_info( self, @@ -2135,8 +2222,9 @@ async def update_app_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2172,7 +2260,7 @@ async def update_app_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_app_serialize( id=id, @@ -2181,21 +2269,22 @@ async def update_app_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2203,6 +2292,7 @@ async def update_app_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_app_without_preload_content( self, @@ -2213,8 +2303,9 @@ async def update_app_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2250,7 +2341,7 @@ async def update_app_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_app_serialize( id=id, @@ -2259,24 +2350,26 @@ async def update_app_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_app_serialize( self, id, @@ -2287,9 +2380,11 @@ def _update_app_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2302,27 +2397,36 @@ def _update_app_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if app is not None: _body_params = app + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/apps/{id}", + method='PUT', + resource_path='/v1/apps/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2332,9 +2436,12 @@ def _update_app_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_app2( self, @@ -2345,8 +2452,9 @@ async def update_app2( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2382,7 +2490,7 @@ async def update_app2( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_app2_serialize( id=id, @@ -2391,21 +2499,22 @@ async def update_app2( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2413,6 +2522,7 @@ async def update_app2( response_types_map=_response_types_map, ).data + @validate_call async def update_app2_with_http_info( self, @@ -2423,8 +2533,9 @@ async def update_app2_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2460,7 +2571,7 @@ async def update_app2_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_app2_serialize( id=id, @@ -2469,21 +2580,22 @@ async def update_app2_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2491,6 +2603,7 @@ async def update_app2_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_app2_without_preload_content( self, @@ -2501,8 +2614,9 @@ async def update_app2_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2538,7 +2652,7 @@ async def update_app2_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_app2_serialize( id=id, @@ -2547,24 +2661,26 @@ async def update_app2_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateAppReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateAppReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_app2_serialize( self, id, @@ -2575,9 +2691,11 @@ def _update_app2_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2590,27 +2708,36 @@ def _update_app2_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if app is not None: _body_params = app + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/apps/{id}", + method='PATCH', + resource_path='/v1/apps/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2620,5 +2747,7 @@ def _update_app2_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/archives_api.py b/koyeb/api_async/api/archives_api.py index 1843a825..32320d58 100644 --- a/koyeb/api_async/api/archives_api.py +++ b/koyeb/api_async/api/archives_api.py @@ -35,6 +35,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create_archive( self, @@ -43,8 +44,9 @@ async def create_archive( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -77,28 +79,29 @@ async def create_archive( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_archive_serialize( archive=archive, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateArchiveReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateArchiveReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -106,6 +109,7 @@ async def create_archive( response_types_map=_response_types_map, ).data + @validate_call async def create_archive_with_http_info( self, @@ -114,8 +118,9 @@ async def create_archive_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -148,28 +153,29 @@ async def create_archive_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_archive_serialize( archive=archive, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateArchiveReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateArchiveReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -177,6 +183,7 @@ async def create_archive_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def create_archive_without_preload_content( self, @@ -185,8 +192,9 @@ async def create_archive_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -219,31 +227,33 @@ async def create_archive_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_archive_serialize( archive=archive, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateArchiveReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateArchiveReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_archive_serialize( self, archive, @@ -252,9 +262,11 @@ def _create_archive_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -273,16 +285,24 @@ def _create_archive_serialize( if archive is not None: _body_params = archive + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/archives", + method='POST', + resource_path='/v1/archives', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -292,5 +312,7 @@ def _create_archive_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/billing_api.py b/koyeb/api_async/api/billing_api.py index a35638fe..da951a82 100644 --- a/koyeb/api_async/api/billing_api.py +++ b/koyeb/api_async/api/billing_api.py @@ -36,6 +36,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def has_unpaid_invoices( self, @@ -43,8 +44,9 @@ async def has_unpaid_invoices( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -75,27 +77,28 @@ async def has_unpaid_invoices( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._has_unpaid_invoices_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HasUnpaidInvoicesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "HasUnpaidInvoicesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -103,6 +106,7 @@ async def has_unpaid_invoices( response_types_map=_response_types_map, ).data + @validate_call async def has_unpaid_invoices_with_http_info( self, @@ -110,8 +114,9 @@ async def has_unpaid_invoices_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -142,27 +147,28 @@ async def has_unpaid_invoices_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._has_unpaid_invoices_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HasUnpaidInvoicesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "HasUnpaidInvoicesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -170,6 +176,7 @@ async def has_unpaid_invoices_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def has_unpaid_invoices_without_preload_content( self, @@ -177,8 +184,9 @@ async def has_unpaid_invoices_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -209,30 +217,32 @@ async def has_unpaid_invoices_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._has_unpaid_invoices_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "HasUnpaidInvoicesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "HasUnpaidInvoicesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _has_unpaid_invoices_serialize( self, _request_auth, @@ -240,9 +250,11 @@ def _has_unpaid_invoices_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -259,16 +271,24 @@ def _has_unpaid_invoices_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/billing/has_unpaid_invoices", + method='GET', + resource_path='/v1/billing/has_unpaid_invoices', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -278,9 +298,12 @@ def _has_unpaid_invoices_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def manage( self, @@ -288,8 +311,9 @@ async def manage( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -319,27 +343,28 @@ async def manage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._manage_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ManageReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ManageReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -347,6 +372,7 @@ async def manage( response_types_map=_response_types_map, ).data + @validate_call async def manage_with_http_info( self, @@ -354,8 +380,9 @@ async def manage_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -385,27 +412,28 @@ async def manage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._manage_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ManageReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ManageReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -413,6 +441,7 @@ async def manage_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def manage_without_preload_content( self, @@ -420,8 +449,9 @@ async def manage_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -451,30 +481,32 @@ async def manage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._manage_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ManageReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ManageReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _manage_serialize( self, _request_auth, @@ -482,9 +514,11 @@ def _manage_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -501,16 +535,24 @@ def _manage_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/billing/manage", + method='GET', + resource_path='/v1/billing/manage', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -520,9 +562,12 @@ def _manage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def next_invoice( self, @@ -530,8 +575,9 @@ async def next_invoice( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -562,27 +608,28 @@ async def next_invoice( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._next_invoice_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NextInvoiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "NextInvoiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -590,6 +637,7 @@ async def next_invoice( response_types_map=_response_types_map, ).data + @validate_call async def next_invoice_with_http_info( self, @@ -597,8 +645,9 @@ async def next_invoice_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -629,27 +678,28 @@ async def next_invoice_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._next_invoice_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NextInvoiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "NextInvoiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -657,6 +707,7 @@ async def next_invoice_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def next_invoice_without_preload_content( self, @@ -664,8 +715,9 @@ async def next_invoice_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -696,30 +748,32 @@ async def next_invoice_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._next_invoice_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "NextInvoiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "NextInvoiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _next_invoice_serialize( self, _request_auth, @@ -727,9 +781,11 @@ def _next_invoice_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -746,16 +802,24 @@ def _next_invoice_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/billing/next_invoice", + method='GET', + resource_path='/v1/billing/next_invoice', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -765,5 +829,7 @@ def _next_invoice_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/catalog_datacenters_api.py b/koyeb/api_async/api/catalog_datacenters_api.py index 815c3512..303c032d 100644 --- a/koyeb/api_async/api/catalog_datacenters_api.py +++ b/koyeb/api_async/api/catalog_datacenters_api.py @@ -34,6 +34,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def list_datacenters( self, @@ -41,8 +42,9 @@ async def list_datacenters( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -72,21 +74,22 @@ async def list_datacenters( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_datacenters_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDatacentersReply", - "default": "GoogleRpcStatus", + '200': "ListDatacentersReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -94,6 +97,7 @@ async def list_datacenters( response_types_map=_response_types_map, ).data + @validate_call async def list_datacenters_with_http_info( self, @@ -101,8 +105,9 @@ async def list_datacenters_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -132,21 +137,22 @@ async def list_datacenters_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_datacenters_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDatacentersReply", - "default": "GoogleRpcStatus", + '200': "ListDatacentersReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -154,6 +160,7 @@ async def list_datacenters_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_datacenters_without_preload_content( self, @@ -161,8 +168,9 @@ async def list_datacenters_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -192,24 +200,26 @@ async def list_datacenters_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_datacenters_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDatacentersReply", - "default": "GoogleRpcStatus", + '200': "ListDatacentersReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_datacenters_serialize( self, _request_auth, @@ -217,9 +227,11 @@ def _list_datacenters_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -236,16 +248,24 @@ def _list_datacenters_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/catalog/datacenters", + method='GET', + resource_path='/v1/catalog/datacenters', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -255,5 +275,7 @@ def _list_datacenters_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/catalog_instance_usage_api.py b/koyeb/api_async/api/catalog_instance_usage_api.py index a9c0b828..65a40418 100644 --- a/koyeb/api_async/api/catalog_instance_usage_api.py +++ b/koyeb/api_async/api/catalog_instance_usage_api.py @@ -36,6 +36,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def list_usage( self, @@ -44,8 +45,9 @@ async def list_usage( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -77,22 +79,23 @@ async def list_usage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_usage_serialize( region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUsageReply", - "default": "GoogleRpcStatus", + '200': "ListUsageReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -100,6 +103,7 @@ async def list_usage( response_types_map=_response_types_map, ).data + @validate_call async def list_usage_with_http_info( self, @@ -108,8 +112,9 @@ async def list_usage_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -141,22 +146,23 @@ async def list_usage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_usage_serialize( region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUsageReply", - "default": "GoogleRpcStatus", + '200': "ListUsageReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -164,6 +170,7 @@ async def list_usage_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_usage_without_preload_content( self, @@ -172,8 +179,9 @@ async def list_usage_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -205,25 +213,27 @@ async def list_usage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_usage_serialize( region=region, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUsageReply", - "default": "GoogleRpcStatus", + '200': "ListUsageReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_usage_serialize( self, region, @@ -232,9 +242,11 @@ def _list_usage_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -248,22 +260,31 @@ def _list_usage_serialize( # process the path parameters # process the query parameters if region is not None: - _query_params.append(("region", region)) - + + _query_params.append(('region', region)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/catalog/usage", + method='GET', + resource_path='/v1/catalog/usage', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -273,5 +294,7 @@ def _list_usage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/catalog_instances_api.py b/koyeb/api_async/api/catalog_instances_api.py index a2f2b19e..846f9c3b 100644 --- a/koyeb/api_async/api/catalog_instances_api.py +++ b/koyeb/api_async/api/catalog_instances_api.py @@ -19,9 +19,7 @@ from typing import Optional from typing_extensions import Annotated from koyeb.api_async.models.get_catalog_instance_reply import GetCatalogInstanceReply -from koyeb.api_async.models.list_catalog_instances_reply import ( - ListCatalogInstancesReply, -) +from koyeb.api_async.models.list_catalog_instances_reply import ListCatalogInstancesReply from koyeb.api_async.api_client import ApiClient, RequestSerialized from koyeb.api_async.api_response import ApiResponse @@ -40,6 +38,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def get_catalog_instance( self, @@ -48,8 +47,9 @@ async def get_catalog_instance( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -81,22 +81,23 @@ async def get_catalog_instance( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_catalog_instance_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetCatalogInstanceReply", - "default": "GoogleRpcStatus", + '200': "GetCatalogInstanceReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -104,6 +105,7 @@ async def get_catalog_instance( response_types_map=_response_types_map, ).data + @validate_call async def get_catalog_instance_with_http_info( self, @@ -112,8 +114,9 @@ async def get_catalog_instance_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -145,22 +148,23 @@ async def get_catalog_instance_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_catalog_instance_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetCatalogInstanceReply", - "default": "GoogleRpcStatus", + '200': "GetCatalogInstanceReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -168,6 +172,7 @@ async def get_catalog_instance_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_catalog_instance_without_preload_content( self, @@ -176,8 +181,9 @@ async def get_catalog_instance_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -209,25 +215,27 @@ async def get_catalog_instance_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_catalog_instance_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetCatalogInstanceReply", - "default": "GoogleRpcStatus", + '200': "GetCatalogInstanceReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_catalog_instance_serialize( self, id, @@ -236,9 +244,11 @@ def _get_catalog_instance_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -251,22 +261,30 @@ def _get_catalog_instance_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/catalog/instances/{id}", + method='GET', + resource_path='/v1/catalog/instances/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -276,29 +294,25 @@ def _get_catalog_instance_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_catalog_instances( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - id: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for instances") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + id: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for instances")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -334,7 +348,7 @@ async def list_catalog_instances( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_catalog_instances_serialize( limit=limit, @@ -343,15 +357,16 @@ async def list_catalog_instances( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListCatalogInstancesReply", - "default": "GoogleRpcStatus", + '200': "ListCatalogInstancesReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -359,26 +374,20 @@ async def list_catalog_instances( response_types_map=_response_types_map, ).data + @validate_call async def list_catalog_instances_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - id: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for instances") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + id: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for instances")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -414,7 +423,7 @@ async def list_catalog_instances_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_catalog_instances_serialize( limit=limit, @@ -423,15 +432,16 @@ async def list_catalog_instances_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListCatalogInstancesReply", - "default": "GoogleRpcStatus", + '200': "ListCatalogInstancesReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -439,26 +449,20 @@ async def list_catalog_instances_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_catalog_instances_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - id: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for instances") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + id: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for instances")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -494,7 +498,7 @@ async def list_catalog_instances_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_catalog_instances_serialize( limit=limit, @@ -503,18 +507,20 @@ async def list_catalog_instances_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListCatalogInstancesReply", - "default": "GoogleRpcStatus", + '200': "ListCatalogInstancesReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_catalog_instances_serialize( self, limit, @@ -525,9 +531,11 @@ def _list_catalog_instances_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -541,28 +549,39 @@ def _list_catalog_instances_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if id is not None: - _query_params.append(("id", id)) - + + _query_params.append(('id', id)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/catalog/instances", + method='GET', + resource_path='/v1/catalog/instances', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -572,5 +591,7 @@ def _list_catalog_instances_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/catalog_regions_api.py b/koyeb/api_async/api/catalog_regions_api.py index 44c91f42..93867281 100644 --- a/koyeb/api_async/api/catalog_regions_api.py +++ b/koyeb/api_async/api/catalog_regions_api.py @@ -38,6 +38,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def get_region( self, @@ -46,8 +47,9 @@ async def get_region( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -79,22 +81,23 @@ async def get_region( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_region_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetRegionReply", - "default": "GoogleRpcStatus", + '200': "GetRegionReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -102,6 +105,7 @@ async def get_region( response_types_map=_response_types_map, ).data + @validate_call async def get_region_with_http_info( self, @@ -110,8 +114,9 @@ async def get_region_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -143,22 +148,23 @@ async def get_region_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_region_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetRegionReply", - "default": "GoogleRpcStatus", + '200': "GetRegionReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -166,6 +172,7 @@ async def get_region_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_region_without_preload_content( self, @@ -174,8 +181,9 @@ async def get_region_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -207,25 +215,27 @@ async def get_region_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_region_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetRegionReply", - "default": "GoogleRpcStatus", + '200': "GetRegionReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_region_serialize( self, id, @@ -234,9 +244,11 @@ def _get_region_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -249,22 +261,30 @@ def _get_region_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/catalog/regions/{id}", + method='GET', + resource_path='/v1/catalog/regions/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -274,29 +294,25 @@ def _get_region_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_regions( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - id: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for regions") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + id: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for regions")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -332,7 +348,7 @@ async def list_regions( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_regions_serialize( limit=limit, @@ -341,15 +357,16 @@ async def list_regions( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRegionsReply", - "default": "GoogleRpcStatus", + '200': "ListRegionsReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -357,26 +374,20 @@ async def list_regions( response_types_map=_response_types_map, ).data + @validate_call async def list_regions_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - id: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for regions") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + id: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for regions")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -412,7 +423,7 @@ async def list_regions_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_regions_serialize( limit=limit, @@ -421,15 +432,16 @@ async def list_regions_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRegionsReply", - "default": "GoogleRpcStatus", + '200': "ListRegionsReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -437,26 +449,20 @@ async def list_regions_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_regions_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - id: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for regions") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + id: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for regions")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -492,7 +498,7 @@ async def list_regions_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_regions_serialize( limit=limit, @@ -501,18 +507,20 @@ async def list_regions_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRegionsReply", - "default": "GoogleRpcStatus", + '200': "ListRegionsReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_regions_serialize( self, limit, @@ -523,9 +531,11 @@ def _list_regions_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -539,28 +549,39 @@ def _list_regions_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if id is not None: - _query_params.append(("id", id)) - + + _query_params.append(('id', id)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/catalog/regions", + method='GET', + resource_path='/v1/catalog/regions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -570,5 +591,7 @@ def _list_regions_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/compose_api.py b/koyeb/api_async/api/compose_api.py index f7f732ef..fdea352f 100644 --- a/koyeb/api_async/api/compose_api.py +++ b/koyeb/api_async/api/compose_api.py @@ -35,6 +35,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def compose( self, @@ -43,8 +44,9 @@ async def compose( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -76,28 +78,29 @@ async def compose( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._compose_serialize( compose=compose, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ComposeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ComposeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -105,6 +108,7 @@ async def compose( response_types_map=_response_types_map, ).data + @validate_call async def compose_with_http_info( self, @@ -113,8 +117,9 @@ async def compose_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -146,28 +151,29 @@ async def compose_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._compose_serialize( compose=compose, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ComposeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ComposeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -175,6 +181,7 @@ async def compose_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def compose_without_preload_content( self, @@ -183,8 +190,9 @@ async def compose_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -216,31 +224,33 @@ async def compose_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._compose_serialize( compose=compose, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ComposeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ComposeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _compose_serialize( self, compose, @@ -249,9 +259,11 @@ def _compose_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -270,16 +282,24 @@ def _compose_serialize( if compose is not None: _body_params = compose + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/compose", + method='POST', + resource_path='/v1/compose', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -289,5 +309,7 @@ def _compose_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/coupons_api.py b/koyeb/api_async/api/coupons_api.py index b63b86c2..3cd4d841 100644 --- a/koyeb/api_async/api/coupons_api.py +++ b/koyeb/api_async/api/coupons_api.py @@ -37,6 +37,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def check_coupon( self, @@ -45,8 +46,9 @@ async def check_coupon( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -79,28 +81,29 @@ async def check_coupon( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._check_coupon_serialize( code=code, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CheckCouponReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CheckCouponReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -108,6 +111,7 @@ async def check_coupon( response_types_map=_response_types_map, ).data + @validate_call async def check_coupon_with_http_info( self, @@ -116,8 +120,9 @@ async def check_coupon_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -150,28 +155,29 @@ async def check_coupon_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._check_coupon_serialize( code=code, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CheckCouponReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CheckCouponReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -179,6 +185,7 @@ async def check_coupon_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def check_coupon_without_preload_content( self, @@ -187,8 +194,9 @@ async def check_coupon_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -221,31 +229,33 @@ async def check_coupon_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._check_coupon_serialize( code=code, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CheckCouponReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CheckCouponReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _check_coupon_serialize( self, code, @@ -254,9 +264,11 @@ def _check_coupon_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -269,22 +281,30 @@ def _check_coupon_serialize( # process the path parameters if code is not None: - _path_params["code"] = code + _path_params['code'] = code # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/coupons/{code}", + method='GET', + resource_path='/v1/coupons/{code}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -294,9 +314,12 @@ def _check_coupon_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def redeem_coupon( self, @@ -305,8 +328,9 @@ async def redeem_coupon( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -339,28 +363,29 @@ async def redeem_coupon( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._redeem_coupon_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -368,6 +393,7 @@ async def redeem_coupon( response_types_map=_response_types_map, ).data + @validate_call async def redeem_coupon_with_http_info( self, @@ -376,8 +402,9 @@ async def redeem_coupon_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -410,28 +437,29 @@ async def redeem_coupon_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._redeem_coupon_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -439,6 +467,7 @@ async def redeem_coupon_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def redeem_coupon_without_preload_content( self, @@ -447,8 +476,9 @@ async def redeem_coupon_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -481,31 +511,33 @@ async def redeem_coupon_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._redeem_coupon_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _redeem_coupon_serialize( self, body, @@ -514,9 +546,11 @@ def _redeem_coupon_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -535,16 +569,24 @@ def _redeem_coupon_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/coupons", + method='POST', + resource_path='/v1/coupons', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -554,5 +596,7 @@ def _redeem_coupon_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/credentials_api.py b/koyeb/api_async/api/credentials_api.py index b603a999..0681bb00 100644 --- a/koyeb/api_async/api/credentials_api.py +++ b/koyeb/api_async/api/credentials_api.py @@ -42,6 +42,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create_credential( self, @@ -50,8 +51,9 @@ async def create_credential( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -83,28 +85,29 @@ async def create_credential( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_credential_serialize( credential=credential, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -112,6 +115,7 @@ async def create_credential( response_types_map=_response_types_map, ).data + @validate_call async def create_credential_with_http_info( self, @@ -120,8 +124,9 @@ async def create_credential_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -153,28 +158,29 @@ async def create_credential_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_credential_serialize( credential=credential, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -182,6 +188,7 @@ async def create_credential_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def create_credential_without_preload_content( self, @@ -190,8 +197,9 @@ async def create_credential_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -223,31 +231,33 @@ async def create_credential_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_credential_serialize( credential=credential, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_credential_serialize( self, credential, @@ -256,9 +266,11 @@ def _create_credential_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -277,16 +289,24 @@ def _create_credential_serialize( if credential is not None: _body_params = credential + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/credentials", + method='POST', + resource_path='/v1/credentials', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -296,9 +316,12 @@ def _create_credential_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_credential( self, @@ -307,8 +330,9 @@ async def delete_credential( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -340,28 +364,29 @@ async def delete_credential( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_credential_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -369,6 +394,7 @@ async def delete_credential( response_types_map=_response_types_map, ).data + @validate_call async def delete_credential_with_http_info( self, @@ -377,8 +403,9 @@ async def delete_credential_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -410,28 +437,29 @@ async def delete_credential_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_credential_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -439,6 +467,7 @@ async def delete_credential_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def delete_credential_without_preload_content( self, @@ -447,8 +476,9 @@ async def delete_credential_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -480,31 +510,33 @@ async def delete_credential_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_credential_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_credential_serialize( self, id, @@ -513,9 +545,11 @@ def _delete_credential_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -528,22 +562,30 @@ def _delete_credential_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/credentials/{id}", + method='DELETE', + resource_path='/v1/credentials/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -553,9 +595,12 @@ def _delete_credential_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_credential( self, @@ -564,8 +609,9 @@ async def get_credential( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -597,28 +643,29 @@ async def get_credential( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_credential_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -626,6 +673,7 @@ async def get_credential( response_types_map=_response_types_map, ).data + @validate_call async def get_credential_with_http_info( self, @@ -634,8 +682,9 @@ async def get_credential_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -667,28 +716,29 @@ async def get_credential_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_credential_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -696,6 +746,7 @@ async def get_credential_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_credential_without_preload_content( self, @@ -704,8 +755,9 @@ async def get_credential_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -737,31 +789,33 @@ async def get_credential_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_credential_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_credential_serialize( self, id, @@ -770,9 +824,11 @@ def _get_credential_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -785,22 +841,30 @@ def _get_credential_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/credentials/{id}", + method='GET', + resource_path='/v1/credentials/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -810,39 +874,28 @@ def _get_credential_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_credentials( self, - type: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for type") - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - organization_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter for an organization"), - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter for an user") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, + type: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for type")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + organization_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an organization")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an user")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -884,7 +937,7 @@ async def list_credentials( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_credentials_serialize( type=type, @@ -896,21 +949,22 @@ async def list_credentials( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListCredentialsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListCredentialsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -918,36 +972,23 @@ async def list_credentials( response_types_map=_response_types_map, ).data + @validate_call async def list_credentials_with_http_info( self, - type: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for type") - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - organization_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter for an organization"), - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter for an user") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, + type: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for type")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + organization_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an organization")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an user")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -989,7 +1030,7 @@ async 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 + """ # noqa: E501 _param = self._list_credentials_serialize( type=type, @@ -1001,21 +1042,22 @@ async def list_credentials_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListCredentialsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListCredentialsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1023,36 +1065,23 @@ async def list_credentials_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_credentials_without_preload_content( self, - type: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for type") - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - organization_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter for an organization"), - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter for an user") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, + type: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for type")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + organization_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an organization")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an user")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1094,7 +1123,7 @@ async 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 + """ # noqa: E501 _param = self._list_credentials_serialize( type=type, @@ -1106,24 +1135,26 @@ async def list_credentials_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListCredentialsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListCredentialsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_credentials_serialize( self, type, @@ -1137,9 +1168,11 @@ def _list_credentials_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1153,37 +1186,51 @@ def _list_credentials_serialize( # process the path parameters # process the query parameters if type is not None: - _query_params.append(("type", type)) - + + _query_params.append(('type', type)) + if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if organization_id is not None: - _query_params.append(("organization_id", organization_id)) - + + _query_params.append(('organization_id', organization_id)) + if user_id is not None: - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/credentials", + method='GET', + resource_path='/v1/credentials', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1193,9 +1240,12 @@ def _list_credentials_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_credential( self, @@ -1206,8 +1256,9 @@ async def update_credential( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1243,7 +1294,7 @@ async def update_credential( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_credential_serialize( id=id, @@ -1252,21 +1303,22 @@ async def update_credential( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1274,6 +1326,7 @@ async def update_credential( response_types_map=_response_types_map, ).data + @validate_call async def update_credential_with_http_info( self, @@ -1284,8 +1337,9 @@ async def update_credential_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1321,7 +1375,7 @@ async def update_credential_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_credential_serialize( id=id, @@ -1330,21 +1384,22 @@ async def update_credential_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1352,6 +1407,7 @@ async def update_credential_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_credential_without_preload_content( self, @@ -1362,8 +1418,9 @@ async def update_credential_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1399,7 +1456,7 @@ async def update_credential_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_credential_serialize( id=id, @@ -1408,24 +1465,26 @@ async def update_credential_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_credential_serialize( self, id, @@ -1436,9 +1495,11 @@ def _update_credential_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1451,27 +1512,36 @@ def _update_credential_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if credential is not None: _body_params = credential + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/credentials/{id}", + method='PUT', + resource_path='/v1/credentials/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1481,9 +1551,12 @@ def _update_credential_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_credential2( self, @@ -1494,8 +1567,9 @@ async def update_credential2( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1531,7 +1605,7 @@ async def update_credential2( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_credential2_serialize( id=id, @@ -1540,21 +1614,22 @@ async def update_credential2( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1562,6 +1637,7 @@ async def update_credential2( response_types_map=_response_types_map, ).data + @validate_call async def update_credential2_with_http_info( self, @@ -1572,8 +1648,9 @@ async def update_credential2_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1609,7 +1686,7 @@ async def update_credential2_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_credential2_serialize( id=id, @@ -1618,21 +1695,22 @@ async def update_credential2_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1640,6 +1718,7 @@ async def update_credential2_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_credential2_without_preload_content( self, @@ -1650,8 +1729,9 @@ async def update_credential2_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1687,7 +1767,7 @@ async def update_credential2_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_credential2_serialize( id=id, @@ -1696,24 +1776,26 @@ async def update_credential2_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateCredentialReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateCredentialReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_credential2_serialize( self, id, @@ -1724,9 +1806,11 @@ def _update_credential2_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1739,27 +1823,36 @@ def _update_credential2_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if credential is not None: _body_params = credential + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/credentials/{id}", + method='PATCH', + resource_path='/v1/credentials/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1769,5 +1862,7 @@ def _update_credential2_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/deployments_api.py b/koyeb/api_async/api/deployments_api.py index 177aec91..26c3f2dc 100644 --- a/koyeb/api_async/api/deployments_api.py +++ b/koyeb/api_async/api/deployments_api.py @@ -19,12 +19,8 @@ from typing import Any, Dict, List, Optional from typing_extensions import Annotated from koyeb.api_async.models.get_deployment_reply import GetDeploymentReply -from koyeb.api_async.models.get_deployment_scaling_reply import ( - GetDeploymentScalingReply, -) -from koyeb.api_async.models.list_deployment_events_reply import ( - ListDeploymentEventsReply, -) +from koyeb.api_async.models.get_deployment_scaling_reply import GetDeploymentScalingReply +from koyeb.api_async.models.list_deployment_events_reply import ListDeploymentEventsReply from koyeb.api_async.models.list_deployments_reply import ListDeploymentsReply from koyeb.api_async.api_client import ApiClient, RequestSerialized @@ -44,18 +40,18 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def cancel_deployment( self, - id: Annotated[ - StrictStr, Field(description="The id of the deployment to cancel.") - ], + id: Annotated[StrictStr, Field(description="The id of the deployment to cancel.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -88,28 +84,29 @@ async def cancel_deployment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._cancel_deployment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -117,18 +114,18 @@ async def cancel_deployment( response_types_map=_response_types_map, ).data + @validate_call async def cancel_deployment_with_http_info( self, - id: Annotated[ - StrictStr, Field(description="The id of the deployment to cancel.") - ], + id: Annotated[StrictStr, Field(description="The id of the deployment to cancel.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -161,28 +158,29 @@ async def cancel_deployment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._cancel_deployment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -190,18 +188,18 @@ async def cancel_deployment_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def cancel_deployment_without_preload_content( self, - id: Annotated[ - StrictStr, Field(description="The id of the deployment to cancel.") - ], + id: Annotated[StrictStr, Field(description="The id of the deployment to cancel.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -234,31 +232,33 @@ async def cancel_deployment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._cancel_deployment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _cancel_deployment_serialize( self, id, @@ -267,9 +267,11 @@ def _cancel_deployment_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -282,22 +284,30 @@ def _cancel_deployment_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/deployments/{id}/cancel", + method='POST', + resource_path='/v1/deployments/{id}/cancel', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -307,9 +317,12 @@ def _cancel_deployment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_deployment( self, @@ -318,8 +331,9 @@ async def get_deployment( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -351,28 +365,29 @@ async def get_deployment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_deployment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDeploymentReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetDeploymentReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -380,6 +395,7 @@ async def get_deployment( response_types_map=_response_types_map, ).data + @validate_call async def get_deployment_with_http_info( self, @@ -388,8 +404,9 @@ async def get_deployment_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -421,28 +438,29 @@ async def get_deployment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_deployment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDeploymentReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetDeploymentReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -450,6 +468,7 @@ async def get_deployment_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_deployment_without_preload_content( self, @@ -458,8 +477,9 @@ async def get_deployment_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -491,31 +511,33 @@ async def get_deployment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_deployment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDeploymentReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetDeploymentReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_deployment_serialize( self, id, @@ -524,9 +546,11 @@ def _get_deployment_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -539,22 +563,30 @@ def _get_deployment_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/deployments/{id}", + method='GET', + resource_path='/v1/deployments/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -564,25 +596,25 @@ def _get_deployment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_deployment_scaling( self, id: StrictStr, - region: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on region") - ] = None, - replica_index: Annotated[ - Optional[StrictInt], Field(description="(Optional) Filter on replica_index") - ] = None, + region: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on region")] = None, + replica_index: Annotated[Optional[StrictInt], Field(description="(Optional) Filter on replica_index")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -618,7 +650,7 @@ async def get_deployment_scaling( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_deployment_scaling_serialize( id=id, @@ -627,21 +659,22 @@ async def get_deployment_scaling( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDeploymentScalingReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetDeploymentScalingReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -649,22 +682,20 @@ async def get_deployment_scaling( response_types_map=_response_types_map, ).data + @validate_call async def get_deployment_scaling_with_http_info( self, id: StrictStr, - region: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on region") - ] = None, - replica_index: Annotated[ - Optional[StrictInt], Field(description="(Optional) Filter on replica_index") - ] = None, + region: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on region")] = None, + replica_index: Annotated[Optional[StrictInt], Field(description="(Optional) Filter on replica_index")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -700,7 +731,7 @@ async def get_deployment_scaling_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_deployment_scaling_serialize( id=id, @@ -709,21 +740,22 @@ async def get_deployment_scaling_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDeploymentScalingReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetDeploymentScalingReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -731,22 +763,20 @@ async def get_deployment_scaling_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_deployment_scaling_without_preload_content( self, id: StrictStr, - region: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on region") - ] = None, - replica_index: Annotated[ - Optional[StrictInt], Field(description="(Optional) Filter on replica_index") - ] = None, + region: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on region")] = None, + replica_index: Annotated[Optional[StrictInt], Field(description="(Optional) Filter on replica_index")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -782,7 +812,7 @@ async def get_deployment_scaling_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_deployment_scaling_serialize( id=id, @@ -791,24 +821,26 @@ async def get_deployment_scaling_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDeploymentScalingReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetDeploymentScalingReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_deployment_scaling_serialize( self, id, @@ -819,9 +851,11 @@ def _get_deployment_scaling_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -834,28 +868,38 @@ def _get_deployment_scaling_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if region is not None: - _query_params.append(("region", region)) - + + _query_params.append(('region', region)) + if replica_index is not None: - _query_params.append(("replica_index", replica_index)) - + + _query_params.append(('replica_index', replica_index)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/deployment/{id}/scaling", + method='GET', + resource_path='/v1/deployment/{id}/scaling', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -865,39 +909,27 @@ def _get_deployment_scaling_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_deployment_events( self, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on deployment id") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on deployment event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on deployment id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on deployment event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -937,7 +969,7 @@ async def list_deployment_events( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_deployment_events_serialize( deployment_id=deployment_id, @@ -948,21 +980,22 @@ async def list_deployment_events( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDeploymentEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListDeploymentEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -970,36 +1003,22 @@ async def list_deployment_events( response_types_map=_response_types_map, ).data + @validate_call async def list_deployment_events_with_http_info( self, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on deployment id") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on deployment event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on deployment id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on deployment event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1039,7 +1058,7 @@ async def list_deployment_events_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_deployment_events_serialize( deployment_id=deployment_id, @@ -1050,21 +1069,22 @@ async def list_deployment_events_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDeploymentEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListDeploymentEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1072,36 +1092,22 @@ async def list_deployment_events_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_deployment_events_without_preload_content( self, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on deployment id") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on deployment event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on deployment id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on deployment event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1141,7 +1147,7 @@ async def list_deployment_events_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_deployment_events_serialize( deployment_id=deployment_id, @@ -1152,24 +1158,26 @@ async def list_deployment_events_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDeploymentEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListDeploymentEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_deployment_events_serialize( self, deployment_id, @@ -1182,10 +1190,11 @@ def _list_deployment_events_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "types": "multi", + 'types': 'multi', } _path_params: Dict[str, str] = {} @@ -1200,34 +1209,47 @@ def _list_deployment_events_serialize( # process the path parameters # process the query parameters if deployment_id is not None: - _query_params.append(("deployment_id", deployment_id)) - + + _query_params.append(('deployment_id', deployment_id)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/deployment_events", + method='GET', + resource_path='/v1/deployment_events', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1237,41 +1259,28 @@ def _list_deployment_events_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_deployments( self, - app_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on application id"), - ] = None, - service_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on service id") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on statuses"), - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on deployment ids"), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on application id")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on service id")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on statuses")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on deployment ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1313,7 +1322,7 @@ async def list_deployments( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_deployments_serialize( app_id=app_id, @@ -1325,21 +1334,22 @@ async def list_deployments( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDeploymentsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListDeploymentsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1347,38 +1357,23 @@ async def list_deployments( response_types_map=_response_types_map, ).data + @validate_call async def list_deployments_with_http_info( self, - app_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on application id"), - ] = None, - service_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on service id") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on statuses"), - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on deployment ids"), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on application id")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on service id")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on statuses")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on deployment ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1420,7 +1415,7 @@ async def list_deployments_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_deployments_serialize( app_id=app_id, @@ -1432,21 +1427,22 @@ async def list_deployments_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDeploymentsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListDeploymentsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1454,38 +1450,23 @@ async def list_deployments_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_deployments_without_preload_content( self, - app_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on application id"), - ] = None, - service_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on service id") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on statuses"), - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on deployment ids"), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on application id")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on service id")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on statuses")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on deployment ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1527,7 +1508,7 @@ async def list_deployments_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_deployments_serialize( app_id=app_id, @@ -1539,24 +1520,26 @@ async def list_deployments_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDeploymentsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListDeploymentsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_deployments_serialize( self, app_id, @@ -1570,11 +1553,12 @@ def _list_deployments_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "statuses": "multi", - "ids": "multi", + 'statuses': 'multi', + 'ids': 'multi', } _path_params: Dict[str, str] = {} @@ -1589,37 +1573,51 @@ def _list_deployments_serialize( # process the path parameters # process the query parameters if app_id is not None: - _query_params.append(("app_id", app_id)) - + + _query_params.append(('app_id', app_id)) + if service_id is not None: - _query_params.append(("service_id", service_id)) - + + _query_params.append(('service_id', service_id)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if statuses is not None: - _query_params.append(("statuses", statuses)) - + + _query_params.append(('statuses', statuses)) + if ids is not None: - _query_params.append(("ids", ids)) - + + _query_params.append(('ids', ids)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/deployments", + method='GET', + resource_path='/v1/deployments', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1629,5 +1627,7 @@ def _list_deployments_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/docker_helper_api.py b/koyeb/api_async/api/docker_helper_api.py index 995a9573..621b5b42 100644 --- a/koyeb/api_async/api/docker_helper_api.py +++ b/koyeb/api_async/api/docker_helper_api.py @@ -37,24 +37,19 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def verify_docker_image( self, - image: Annotated[ - Optional[StrictStr], Field(description="The full image uri to be verified") - ] = None, - secret_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) the id of the secret to use to authenticate to the registry" - ), - ] = None, + image: Annotated[Optional[StrictStr], Field(description="The full image uri to be verified")] = None, + secret_id: Annotated[Optional[StrictStr], Field(description="(Optional) the id of the secret to use to authenticate to the registry")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -89,7 +84,7 @@ async def verify_docker_image( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._verify_docker_image_serialize( image=image, @@ -97,21 +92,22 @@ async def verify_docker_image( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VerifyDockerImageReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "VerifyDockerImageReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -119,24 +115,19 @@ async def verify_docker_image( response_types_map=_response_types_map, ).data + @validate_call async def verify_docker_image_with_http_info( self, - image: Annotated[ - Optional[StrictStr], Field(description="The full image uri to be verified") - ] = None, - secret_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) the id of the secret to use to authenticate to the registry" - ), - ] = None, + image: Annotated[Optional[StrictStr], Field(description="The full image uri to be verified")] = None, + secret_id: Annotated[Optional[StrictStr], Field(description="(Optional) the id of the secret to use to authenticate to the registry")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -171,7 +162,7 @@ async def verify_docker_image_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._verify_docker_image_serialize( image=image, @@ -179,21 +170,22 @@ async def verify_docker_image_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VerifyDockerImageReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "VerifyDockerImageReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -201,24 +193,19 @@ async def verify_docker_image_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def verify_docker_image_without_preload_content( self, - image: Annotated[ - Optional[StrictStr], Field(description="The full image uri to be verified") - ] = None, - secret_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) the id of the secret to use to authenticate to the registry" - ), - ] = None, + image: Annotated[Optional[StrictStr], Field(description="The full image uri to be verified")] = None, + secret_id: Annotated[Optional[StrictStr], Field(description="(Optional) the id of the secret to use to authenticate to the registry")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -253,7 +240,7 @@ async def verify_docker_image_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._verify_docker_image_serialize( image=image, @@ -261,24 +248,26 @@ async def verify_docker_image_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "VerifyDockerImageReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "VerifyDockerImageReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _verify_docker_image_serialize( self, image, @@ -288,9 +277,11 @@ def _verify_docker_image_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -304,25 +295,35 @@ def _verify_docker_image_serialize( # process the path parameters # process the query parameters if image is not None: - _query_params.append(("image", image)) - + + _query_params.append(('image', image)) + if secret_id is not None: - _query_params.append(("secret_id", secret_id)) - + + _query_params.append(('secret_id', secret_id)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/docker-helper/verify", + method='GET', + resource_path='/v1/docker-helper/verify', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -332,5 +333,7 @@ def _verify_docker_image_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/domains_api.py b/koyeb/api_async/api/domains_api.py index 917cb5c4..d1988000 100644 --- a/koyeb/api_async/api/domains_api.py +++ b/koyeb/api_async/api/domains_api.py @@ -42,6 +42,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create_domain( self, @@ -50,8 +51,9 @@ async def create_domain( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -83,28 +85,29 @@ async def create_domain( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_domain_serialize( domain=domain, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateDomainReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateDomainReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -112,6 +115,7 @@ async def create_domain( response_types_map=_response_types_map, ).data + @validate_call async def create_domain_with_http_info( self, @@ -120,8 +124,9 @@ async def create_domain_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -153,28 +158,29 @@ async def create_domain_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_domain_serialize( domain=domain, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateDomainReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateDomainReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -182,6 +188,7 @@ async def create_domain_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def create_domain_without_preload_content( self, @@ -190,8 +197,9 @@ async def create_domain_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -223,31 +231,33 @@ async def create_domain_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_domain_serialize( domain=domain, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateDomainReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateDomainReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_domain_serialize( self, domain, @@ -256,9 +266,11 @@ def _create_domain_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -277,16 +289,24 @@ def _create_domain_serialize( if domain is not None: _body_params = domain + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/domains", + method='POST', + resource_path='/v1/domains', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -296,9 +316,12 @@ def _create_domain_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_domain( self, @@ -307,8 +330,9 @@ async def delete_domain( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -340,28 +364,29 @@ async def delete_domain( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_domain_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -369,6 +394,7 @@ async def delete_domain( response_types_map=_response_types_map, ).data + @validate_call async def delete_domain_with_http_info( self, @@ -377,8 +403,9 @@ async def delete_domain_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -410,28 +437,29 @@ async def delete_domain_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_domain_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -439,6 +467,7 @@ async def delete_domain_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def delete_domain_without_preload_content( self, @@ -447,8 +476,9 @@ async def delete_domain_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -480,31 +510,33 @@ async def delete_domain_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_domain_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_domain_serialize( self, id, @@ -513,9 +545,11 @@ def _delete_domain_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -528,22 +562,30 @@ def _delete_domain_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/domains/{id}", + method='DELETE', + resource_path='/v1/domains/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -553,9 +595,12 @@ def _delete_domain_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_domain( self, @@ -564,8 +609,9 @@ async def get_domain( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -597,28 +643,29 @@ async def get_domain( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_domain_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDomainReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetDomainReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -626,6 +673,7 @@ async def get_domain( response_types_map=_response_types_map, ).data + @validate_call async def get_domain_with_http_info( self, @@ -634,8 +682,9 @@ async def get_domain_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -667,28 +716,29 @@ async def get_domain_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_domain_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDomainReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetDomainReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -696,6 +746,7 @@ async def get_domain_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_domain_without_preload_content( self, @@ -704,8 +755,9 @@ async def get_domain_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -737,31 +789,33 @@ async def get_domain_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_domain_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetDomainReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetDomainReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_domain_serialize( self, id, @@ -770,9 +824,11 @@ def _get_domain_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -785,22 +841,30 @@ def _get_domain_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/domains/{id}", + method='GET', + resource_path='/v1/domains/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -810,46 +874,29 @@ def _get_domain_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_domains( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) A filter for types - AUTOASSIGNED: Domain like -.koyeb.app" - ), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) A filter for statuses"), - ] = None, - app_ids: Annotated[ - Optional[List[StrictStr]], Field(description="(Optional) A filter for apps") - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on domain ids"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) A filter for types - AUTOASSIGNED: Domain like -.koyeb.app")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) A filter for statuses")] = None, + app_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) A filter for apps")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on domain ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -893,7 +940,7 @@ async def list_domains( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_domains_serialize( limit=limit, @@ -906,21 +953,22 @@ async def list_domains( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDomainsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListDomainsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -928,43 +976,24 @@ async def list_domains( response_types_map=_response_types_map, ).data + @validate_call async def list_domains_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) A filter for types - AUTOASSIGNED: Domain like -.koyeb.app" - ), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) A filter for statuses"), - ] = None, - app_ids: Annotated[ - Optional[List[StrictStr]], Field(description="(Optional) A filter for apps") - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on domain ids"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) A filter for types - AUTOASSIGNED: Domain like -.koyeb.app")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) A filter for statuses")] = None, + app_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) A filter for apps")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on domain ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1008,7 +1037,7 @@ async def list_domains_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_domains_serialize( limit=limit, @@ -1021,21 +1050,22 @@ async def list_domains_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDomainsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListDomainsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1043,43 +1073,24 @@ async def list_domains_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_domains_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) A filter for types - AUTOASSIGNED: Domain like -.koyeb.app" - ), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) A filter for statuses"), - ] = None, - app_ids: Annotated[ - Optional[List[StrictStr]], Field(description="(Optional) A filter for apps") - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on domain ids"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) A filter for types - AUTOASSIGNED: Domain like -.koyeb.app")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) A filter for statuses")] = None, + app_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) A filter for apps")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on domain ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1123,7 +1134,7 @@ async def list_domains_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_domains_serialize( limit=limit, @@ -1136,24 +1147,26 @@ async def list_domains_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListDomainsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListDomainsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_domains_serialize( self, limit, @@ -1168,13 +1181,14 @@ def _list_domains_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "types": "multi", - "statuses": "multi", - "app_ids": "multi", - "ids": "multi", + 'types': 'multi', + 'statuses': 'multi', + 'app_ids': 'multi', + 'ids': 'multi', } _path_params: Dict[str, str] = {} @@ -1189,40 +1203,55 @@ def _list_domains_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + if statuses is not None: - _query_params.append(("statuses", statuses)) - + + _query_params.append(('statuses', statuses)) + if app_ids is not None: - _query_params.append(("app_ids", app_ids)) - + + _query_params.append(('app_ids', app_ids)) + if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if ids is not None: - _query_params.append(("ids", ids)) - + + _query_params.append(('ids', ids)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/domains", + method='GET', + resource_path='/v1/domains', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1232,9 +1261,12 @@ def _list_domains_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def refresh_domain_status( self, @@ -1243,8 +1275,9 @@ async def refresh_domain_status( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1276,28 +1309,29 @@ async def refresh_domain_status( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._refresh_domain_status_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1305,6 +1339,7 @@ async def refresh_domain_status( response_types_map=_response_types_map, ).data + @validate_call async def refresh_domain_status_with_http_info( self, @@ -1313,8 +1348,9 @@ async def refresh_domain_status_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1346,28 +1382,29 @@ async def refresh_domain_status_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._refresh_domain_status_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1375,6 +1412,7 @@ async def refresh_domain_status_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def refresh_domain_status_without_preload_content( self, @@ -1383,8 +1421,9 @@ async def refresh_domain_status_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1416,31 +1455,33 @@ async def refresh_domain_status_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._refresh_domain_status_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _refresh_domain_status_serialize( self, id, @@ -1449,9 +1490,11 @@ def _refresh_domain_status_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1464,22 +1507,30 @@ def _refresh_domain_status_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/domains/{id}/refresh", + method='POST', + resource_path='/v1/domains/{id}/refresh', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1489,27 +1540,26 @@ def _refresh_domain_status_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_domain( self, id: StrictStr, domain: UpdateDomain, update_mask: Optional[StrictStr] = None, - dry_run: Annotated[ - Optional[StrictBool], - Field( - description="If set, run validation and check that the domain is available." - ), - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set, run validation and check that the domain is available.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1547,7 +1597,7 @@ async def update_domain( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_domain_serialize( id=id, @@ -1557,21 +1607,22 @@ async def update_domain( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateDomainReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateDomainReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1579,24 +1630,21 @@ async def update_domain( response_types_map=_response_types_map, ).data + @validate_call async def update_domain_with_http_info( self, id: StrictStr, domain: UpdateDomain, update_mask: Optional[StrictStr] = None, - dry_run: Annotated[ - Optional[StrictBool], - Field( - description="If set, run validation and check that the domain is available." - ), - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set, run validation and check that the domain is available.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1634,7 +1682,7 @@ async def update_domain_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_domain_serialize( id=id, @@ -1644,21 +1692,22 @@ async def update_domain_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateDomainReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateDomainReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1666,24 +1715,21 @@ async def update_domain_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_domain_without_preload_content( self, id: StrictStr, domain: UpdateDomain, update_mask: Optional[StrictStr] = None, - dry_run: Annotated[ - Optional[StrictBool], - Field( - description="If set, run validation and check that the domain is available." - ), - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set, run validation and check that the domain is available.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1721,7 +1767,7 @@ async def update_domain_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_domain_serialize( id=id, @@ -1731,24 +1777,26 @@ async def update_domain_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateDomainReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateDomainReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_domain_serialize( self, id, @@ -1760,9 +1808,11 @@ def _update_domain_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1775,30 +1825,40 @@ def _update_domain_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + if dry_run is not None: - _query_params.append(("dry_run", dry_run)) - + + _query_params.append(('dry_run', dry_run)) + # process the header parameters # process the form parameters # process the body parameter if domain is not None: _body_params = domain + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/domains/{id}", + method='PATCH', + resource_path='/v1/domains/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1808,5 +1868,7 @@ def _update_domain_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/instance_snapshots_api.py b/koyeb/api_async/api/instance_snapshots_api.py index 5e1712a3..a59c44cd 100644 --- a/koyeb/api_async/api/instance_snapshots_api.py +++ b/koyeb/api_async/api/instance_snapshots_api.py @@ -18,22 +18,12 @@ from pydantic import Field, StrictStr, field_validator from typing import List, Optional from typing_extensions import Annotated -from koyeb.api_async.models.create_instance_snapshot_reply import ( - CreateInstanceSnapshotReply, -) -from koyeb.api_async.models.create_instance_snapshot_request import ( - CreateInstanceSnapshotRequest, -) -from koyeb.api_async.models.delete_instance_snapshot_reply import ( - DeleteInstanceSnapshotReply, -) +from koyeb.api_async.models.create_instance_snapshot_reply import CreateInstanceSnapshotReply +from koyeb.api_async.models.create_instance_snapshot_request import CreateInstanceSnapshotRequest +from koyeb.api_async.models.delete_instance_snapshot_reply import DeleteInstanceSnapshotReply from koyeb.api_async.models.get_instance_snapshot_reply import GetInstanceSnapshotReply -from koyeb.api_async.models.list_instance_snapshot_events_reply import ( - ListInstanceSnapshotEventsReply, -) -from koyeb.api_async.models.list_instance_snapshots_reply import ( - ListInstanceSnapshotsReply, -) +from koyeb.api_async.models.list_instance_snapshot_events_reply import ListInstanceSnapshotEventsReply +from koyeb.api_async.models.list_instance_snapshots_reply import ListInstanceSnapshotsReply from koyeb.api_async.api_client import ApiClient, RequestSerialized from koyeb.api_async.api_response import ApiResponse @@ -52,6 +42,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create_instance_snapshot( self, @@ -60,8 +51,9 @@ async def create_instance_snapshot( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -93,28 +85,29 @@ async def create_instance_snapshot( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_instance_snapshot_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateInstanceSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -122,6 +115,7 @@ async def create_instance_snapshot( response_types_map=_response_types_map, ).data + @validate_call async def create_instance_snapshot_with_http_info( self, @@ -130,8 +124,9 @@ async def create_instance_snapshot_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -163,28 +158,29 @@ async def create_instance_snapshot_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_instance_snapshot_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateInstanceSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -192,6 +188,7 @@ async def create_instance_snapshot_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def create_instance_snapshot_without_preload_content( self, @@ -200,8 +197,9 @@ async def create_instance_snapshot_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -233,31 +231,33 @@ async def create_instance_snapshot_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_instance_snapshot_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateInstanceSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_instance_snapshot_serialize( self, body, @@ -266,9 +266,11 @@ def _create_instance_snapshot_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -287,16 +289,24 @@ def _create_instance_snapshot_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/instance_snapshots", + method='POST', + resource_path='/v1/instance_snapshots', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -306,9 +316,12 @@ def _create_instance_snapshot_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_instance_snapshot( self, @@ -317,8 +330,9 @@ async def delete_instance_snapshot( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -350,28 +364,29 @@ async def delete_instance_snapshot( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_instance_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteInstanceSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -379,6 +394,7 @@ async def delete_instance_snapshot( response_types_map=_response_types_map, ).data + @validate_call async def delete_instance_snapshot_with_http_info( self, @@ -387,8 +403,9 @@ async def delete_instance_snapshot_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -420,28 +437,29 @@ async def delete_instance_snapshot_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_instance_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteInstanceSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -449,6 +467,7 @@ async def delete_instance_snapshot_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def delete_instance_snapshot_without_preload_content( self, @@ -457,8 +476,9 @@ async def delete_instance_snapshot_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -490,31 +510,33 @@ async def delete_instance_snapshot_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_instance_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteInstanceSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_instance_snapshot_serialize( self, id, @@ -523,9 +545,11 @@ def _delete_instance_snapshot_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -538,22 +562,30 @@ def _delete_instance_snapshot_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/instance_snapshots/{id}", + method='DELETE', + resource_path='/v1/instance_snapshots/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -563,9 +595,12 @@ def _delete_instance_snapshot_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_instance_snapshot( self, @@ -574,8 +609,9 @@ async def get_instance_snapshot( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -607,28 +643,29 @@ async def get_instance_snapshot( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_instance_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetInstanceSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -636,6 +673,7 @@ async def get_instance_snapshot( response_types_map=_response_types_map, ).data + @validate_call async def get_instance_snapshot_with_http_info( self, @@ -644,8 +682,9 @@ async def get_instance_snapshot_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -677,28 +716,29 @@ async def get_instance_snapshot_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_instance_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetInstanceSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -706,6 +746,7 @@ async def get_instance_snapshot_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_instance_snapshot_without_preload_content( self, @@ -714,8 +755,9 @@ async def get_instance_snapshot_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -747,31 +789,33 @@ async def get_instance_snapshot_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_instance_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetInstanceSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetInstanceSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_instance_snapshot_serialize( self, id, @@ -780,9 +824,11 @@ def _get_instance_snapshot_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -795,22 +841,30 @@ def _get_instance_snapshot_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/instance_snapshots/{id}", + method='GET', + resource_path='/v1/instance_snapshots/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -820,40 +874,27 @@ def _get_instance_snapshot_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_instance_snapshot_events( self, - instance_snapshot_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on instance snapshot id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance snapshot event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + instance_snapshot_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on instance snapshot id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance snapshot event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -893,7 +934,7 @@ async def list_instance_snapshot_events( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instance_snapshot_events_serialize( instance_snapshot_id=instance_snapshot_id, @@ -904,21 +945,22 @@ async def list_instance_snapshot_events( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstanceSnapshotEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstanceSnapshotEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -926,37 +968,22 @@ async def list_instance_snapshot_events( response_types_map=_response_types_map, ).data + @validate_call async def list_instance_snapshot_events_with_http_info( self, - instance_snapshot_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on instance snapshot id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance snapshot event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + instance_snapshot_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on instance snapshot id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance snapshot event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -996,7 +1023,7 @@ async def list_instance_snapshot_events_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instance_snapshot_events_serialize( instance_snapshot_id=instance_snapshot_id, @@ -1007,21 +1034,22 @@ async def list_instance_snapshot_events_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstanceSnapshotEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstanceSnapshotEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1029,37 +1057,22 @@ async def list_instance_snapshot_events_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_instance_snapshot_events_without_preload_content( self, - instance_snapshot_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on instance snapshot id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance snapshot event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + instance_snapshot_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on instance snapshot id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance snapshot event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1099,7 +1112,7 @@ async def list_instance_snapshot_events_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instance_snapshot_events_serialize( instance_snapshot_id=instance_snapshot_id, @@ -1110,24 +1123,26 @@ async def list_instance_snapshot_events_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstanceSnapshotEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstanceSnapshotEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_instance_snapshot_events_serialize( self, instance_snapshot_id, @@ -1140,10 +1155,11 @@ def _list_instance_snapshot_events_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "types": "multi", + 'types': 'multi', } _path_params: Dict[str, str] = {} @@ -1158,34 +1174,47 @@ def _list_instance_snapshot_events_serialize( # process the path parameters # process the query parameters if instance_snapshot_id is not None: - _query_params.append(("instance_snapshot_id", instance_snapshot_id)) - + + _query_params.append(('instance_snapshot_id', instance_snapshot_id)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/instance_snapshot_events", + method='GET', + resource_path='/v1/instance_snapshot_events', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1195,9 +1224,12 @@ def _list_instance_snapshot_events_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_instance_snapshots( self, @@ -1211,8 +1243,9 @@ async def list_instance_snapshots( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1254,7 +1287,7 @@ async def list_instance_snapshots( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instance_snapshots_serialize( limit=limit, @@ -1266,21 +1299,22 @@ async def list_instance_snapshots( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstanceSnapshotsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstanceSnapshotsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1288,6 +1322,7 @@ async def list_instance_snapshots( response_types_map=_response_types_map, ).data + @validate_call async def list_instance_snapshots_with_http_info( self, @@ -1301,8 +1336,9 @@ async def list_instance_snapshots_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1344,7 +1380,7 @@ async def list_instance_snapshots_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instance_snapshots_serialize( limit=limit, @@ -1356,21 +1392,22 @@ async def list_instance_snapshots_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstanceSnapshotsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstanceSnapshotsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1378,6 +1415,7 @@ async def list_instance_snapshots_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_instance_snapshots_without_preload_content( self, @@ -1391,8 +1429,9 @@ async def list_instance_snapshots_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1434,7 +1473,7 @@ async def list_instance_snapshots_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instance_snapshots_serialize( limit=limit, @@ -1446,24 +1485,26 @@ async def list_instance_snapshots_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstanceSnapshotsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstanceSnapshotsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_instance_snapshots_serialize( self, limit, @@ -1477,11 +1518,12 @@ def _list_instance_snapshots_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "statuses": "multi", - "ids": "multi", + 'statuses': 'multi', + 'ids': 'multi', } _path_params: Dict[str, str] = {} @@ -1496,37 +1538,51 @@ def _list_instance_snapshots_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if statuses is not None: - _query_params.append(("statuses", statuses)) - + + _query_params.append(('statuses', statuses)) + if type is not None: - _query_params.append(("type", type)) - + + _query_params.append(('type', type)) + if ids is not None: - _query_params.append(("ids", ids)) - + + _query_params.append(('ids', ids)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/instance_snapshots", + method='GET', + resource_path='/v1/instance_snapshots', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1536,5 +1592,7 @@ def _list_instance_snapshots_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/instances_api.py b/koyeb/api_async/api/instances_api.py index 3f1939a9..0aa7bf03 100644 --- a/koyeb/api_async/api/instances_api.py +++ b/koyeb/api_async/api/instances_api.py @@ -16,22 +16,13 @@ from typing_extensions import Annotated from datetime import datetime -from pydantic import ( - Field, - StrictBool, - StrictBytes, - StrictInt, - StrictStr, - field_validator, -) +from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr, field_validator from typing import List, Optional, Union from typing_extensions import Annotated from koyeb.api_async.models.get_instance_reply import GetInstanceReply from koyeb.api_async.models.list_instance_events_reply import ListInstanceEventsReply from koyeb.api_async.models.list_instances_reply import ListInstancesReply -from koyeb.api_async.models.stream_result_of_exec_command_reply import ( - StreamResultOfExecCommandReply, -) +from koyeb.api_async.models.stream_result_of_exec_command_reply import StreamResultOfExecCommandReply from koyeb.api_async.api_client import ApiClient, RequestSerialized from koyeb.api_async.api_response import ApiResponse @@ -50,43 +41,25 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def exec_command( self, - id: Annotated[ - Optional[StrictStr], Field(description="ID of the resource to exec on.") - ] = None, - body_command: Annotated[ - Optional[List[StrictStr]], - Field(description="Command to exec. Mandatory in the first frame sent"), - ] = None, + id: Annotated[Optional[StrictStr], Field(description="ID of the resource to exec on.")] = None, + body_command: Annotated[Optional[List[StrictStr]], Field(description="Command to exec. Mandatory in the first frame sent")] = None, body_tty_size_height: Optional[StrictInt] = None, body_tty_size_width: Optional[StrictInt] = None, - body_stdin_data: Annotated[ - Optional[Union[StrictBytes, StrictStr]], - Field(description="Data is base64 encoded"), - ] = None, - body_stdin_close: Annotated[ - Optional[StrictBool], Field(description="Indicate last data frame") - ] = None, - body_disable_tty: Annotated[ - Optional[StrictBool], - Field( - description="Disable TTY. It's enough to specify it in the first frame" - ), - ] = None, - id_type: Annotated[ - Optional[StrictStr], - Field( - description="When specified, it is used to determine if the kind of resource the id refers to. If missing, defaults to the instance id." - ), - ] = None, + body_stdin_data: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="Data is base64 encoded")] = None, + body_stdin_close: Annotated[Optional[StrictBool], Field(description="Indicate last data frame")] = None, + body_disable_tty: Annotated[Optional[StrictBool], Field(description="Disable TTY. It's enough to specify it in the first frame")] = None, + id_type: Annotated[Optional[StrictStr], Field(description="When specified, it is used to determine if the kind of resource the id refers to. If missing, defaults to the instance id.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -133,7 +106,7 @@ async def exec_command( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._exec_command_serialize( id=id, @@ -147,21 +120,22 @@ async def exec_command( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "StreamResultOfExecCommandReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "StreamResultOfExecCommandReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -169,43 +143,25 @@ async def exec_command( response_types_map=_response_types_map, ).data + @validate_call async def exec_command_with_http_info( self, - id: Annotated[ - Optional[StrictStr], Field(description="ID of the resource to exec on.") - ] = None, - body_command: Annotated[ - Optional[List[StrictStr]], - Field(description="Command to exec. Mandatory in the first frame sent"), - ] = None, + id: Annotated[Optional[StrictStr], Field(description="ID of the resource to exec on.")] = None, + body_command: Annotated[Optional[List[StrictStr]], Field(description="Command to exec. Mandatory in the first frame sent")] = None, body_tty_size_height: Optional[StrictInt] = None, body_tty_size_width: Optional[StrictInt] = None, - body_stdin_data: Annotated[ - Optional[Union[StrictBytes, StrictStr]], - Field(description="Data is base64 encoded"), - ] = None, - body_stdin_close: Annotated[ - Optional[StrictBool], Field(description="Indicate last data frame") - ] = None, - body_disable_tty: Annotated[ - Optional[StrictBool], - Field( - description="Disable TTY. It's enough to specify it in the first frame" - ), - ] = None, - id_type: Annotated[ - Optional[StrictStr], - Field( - description="When specified, it is used to determine if the kind of resource the id refers to. If missing, defaults to the instance id." - ), - ] = None, + body_stdin_data: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="Data is base64 encoded")] = None, + body_stdin_close: Annotated[Optional[StrictBool], Field(description="Indicate last data frame")] = None, + body_disable_tty: Annotated[Optional[StrictBool], Field(description="Disable TTY. It's enough to specify it in the first frame")] = None, + id_type: Annotated[Optional[StrictStr], Field(description="When specified, it is used to determine if the kind of resource the id refers to. If missing, defaults to the instance id.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -252,7 +208,7 @@ async def exec_command_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._exec_command_serialize( id=id, @@ -266,21 +222,22 @@ async def exec_command_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "StreamResultOfExecCommandReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "StreamResultOfExecCommandReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -288,43 +245,25 @@ async def exec_command_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def exec_command_without_preload_content( self, - id: Annotated[ - Optional[StrictStr], Field(description="ID of the resource to exec on.") - ] = None, - body_command: Annotated[ - Optional[List[StrictStr]], - Field(description="Command to exec. Mandatory in the first frame sent"), - ] = None, + id: Annotated[Optional[StrictStr], Field(description="ID of the resource to exec on.")] = None, + body_command: Annotated[Optional[List[StrictStr]], Field(description="Command to exec. Mandatory in the first frame sent")] = None, body_tty_size_height: Optional[StrictInt] = None, body_tty_size_width: Optional[StrictInt] = None, - body_stdin_data: Annotated[ - Optional[Union[StrictBytes, StrictStr]], - Field(description="Data is base64 encoded"), - ] = None, - body_stdin_close: Annotated[ - Optional[StrictBool], Field(description="Indicate last data frame") - ] = None, - body_disable_tty: Annotated[ - Optional[StrictBool], - Field( - description="Disable TTY. It's enough to specify it in the first frame" - ), - ] = None, - id_type: Annotated[ - Optional[StrictStr], - Field( - description="When specified, it is used to determine if the kind of resource the id refers to. If missing, defaults to the instance id." - ), - ] = None, + body_stdin_data: Annotated[Optional[Union[StrictBytes, StrictStr]], Field(description="Data is base64 encoded")] = None, + body_stdin_close: Annotated[Optional[StrictBool], Field(description="Indicate last data frame")] = None, + body_disable_tty: Annotated[Optional[StrictBool], Field(description="Disable TTY. It's enough to specify it in the first frame")] = None, + id_type: Annotated[Optional[StrictStr], Field(description="When specified, it is used to determine if the kind of resource the id refers to. If missing, defaults to the instance id.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -371,7 +310,7 @@ async def exec_command_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._exec_command_serialize( id=id, @@ -385,24 +324,26 @@ async def exec_command_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "StreamResultOfExecCommandReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "StreamResultOfExecCommandReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _exec_command_serialize( self, id, @@ -418,10 +359,11 @@ def _exec_command_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "body.command": "multi", + 'body.command': 'multi', } _path_params: Dict[str, str] = {} @@ -436,43 +378,59 @@ def _exec_command_serialize( # process the path parameters # process the query parameters if id is not None: - _query_params.append(("id", id)) - + + _query_params.append(('id', id)) + if body_command is not None: - _query_params.append(("body.command", body_command)) - + + _query_params.append(('body.command', body_command)) + if body_tty_size_height is not None: - _query_params.append(("body.tty_size.height", body_tty_size_height)) - + + _query_params.append(('body.tty_size.height', body_tty_size_height)) + if body_tty_size_width is not None: - _query_params.append(("body.tty_size.width", body_tty_size_width)) - + + _query_params.append(('body.tty_size.width', body_tty_size_width)) + if body_stdin_data is not None: - _query_params.append(("body.stdin.data", body_stdin_data)) - + + _query_params.append(('body.stdin.data', body_stdin_data)) + if body_stdin_close is not None: - _query_params.append(("body.stdin.close", body_stdin_close)) - + + _query_params.append(('body.stdin.close', body_stdin_close)) + if body_disable_tty is not None: - _query_params.append(("body.disableTty", body_disable_tty)) - + + _query_params.append(('body.disableTty', body_disable_tty)) + if id_type is not None: - _query_params.append(("id_type", id_type)) - + + _query_params.append(('id_type', id_type)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/streams/instances/exec", + method='GET', + resource_path='/v1/streams/instances/exec', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -482,9 +440,12 @@ def _exec_command_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_instance( self, @@ -493,8 +454,9 @@ async def get_instance( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -526,28 +488,29 @@ async def get_instance( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_instance_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetInstanceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetInstanceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -555,6 +518,7 @@ async def get_instance( response_types_map=_response_types_map, ).data + @validate_call async def get_instance_with_http_info( self, @@ -563,8 +527,9 @@ async def get_instance_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -596,28 +561,29 @@ async def get_instance_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_instance_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetInstanceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetInstanceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -625,6 +591,7 @@ async def get_instance_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_instance_without_preload_content( self, @@ -633,8 +600,9 @@ async def get_instance_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -666,31 +634,33 @@ async def get_instance_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_instance_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetInstanceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetInstanceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_instance_serialize( self, id, @@ -699,9 +669,11 @@ def _get_instance_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -714,22 +686,30 @@ def _get_instance_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/instances/{id}", + method='GET', + resource_path='/v1/instances/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -739,40 +719,27 @@ def _get_instance_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_instance_events( self, - instance_ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on list of instance id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + instance_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on list of instance id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -812,7 +779,7 @@ async def list_instance_events( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instance_events_serialize( instance_ids=instance_ids, @@ -823,21 +790,22 @@ async def list_instance_events( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstanceEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstanceEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -845,37 +813,22 @@ async def list_instance_events( response_types_map=_response_types_map, ).data + @validate_call async def list_instance_events_with_http_info( self, - instance_ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on list of instance id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + instance_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on list of instance id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -915,7 +868,7 @@ async def list_instance_events_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instance_events_serialize( instance_ids=instance_ids, @@ -926,21 +879,22 @@ async def list_instance_events_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstanceEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstanceEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -948,37 +902,22 @@ async def list_instance_events_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_instance_events_without_preload_content( self, - instance_ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on list of instance id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + instance_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on list of instance id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1018,7 +957,7 @@ async def list_instance_events_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instance_events_serialize( instance_ids=instance_ids, @@ -1029,24 +968,26 @@ async def list_instance_events_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstanceEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstanceEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_instance_events_serialize( self, instance_ids, @@ -1059,11 +1000,12 @@ def _list_instance_events_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "instance_ids": "multi", - "types": "multi", + 'instance_ids': 'multi', + 'types': 'multi', } _path_params: Dict[str, str] = {} @@ -1078,34 +1020,47 @@ def _list_instance_events_serialize( # process the path parameters # process the query parameters if instance_ids is not None: - _query_params.append(("instance_ids", instance_ids)) - + + _query_params.append(('instance_ids', instance_ids)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/instance_events", + method='GET', + resource_path='/v1/instance_events', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1115,72 +1070,35 @@ def _list_instance_events_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_instances( self, - app_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on application id"), - ] = None, - service_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on service id") - ] = None, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on deployment id") - ] = None, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on regional deployment id"), - ] = None, - allocation_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on allocation id") - ] = None, - replica_index: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on replica index") - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance statuses"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, - starting_time: Annotated[ - Optional[datetime], - Field( - description="(Optional) The starting time of the period of running instance" - ), - ] = None, - ending_time: Annotated[ - Optional[datetime], - Field( - description="(Optional) The ending time of the period of running instance" - ), - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance ids"), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on application id")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on service id")] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on deployment id")] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on regional deployment id")] = None, + allocation_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on allocation id")] = None, + replica_index: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on replica index")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance statuses")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + starting_time: Annotated[Optional[datetime], Field(description="(Optional) The starting time of the period of running instance")] = None, + ending_time: Annotated[Optional[datetime], Field(description="(Optional) The ending time of the period of running instance")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1236,7 +1154,7 @@ async def list_instances( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instances_serialize( app_id=app_id, @@ -1255,21 +1173,22 @@ async def list_instances( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstancesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstancesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1277,69 +1196,30 @@ async def list_instances( response_types_map=_response_types_map, ).data + @validate_call async def list_instances_with_http_info( self, - app_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on application id"), - ] = None, - service_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on service id") - ] = None, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on deployment id") - ] = None, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on regional deployment id"), - ] = None, - allocation_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on allocation id") - ] = None, - replica_index: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on replica index") - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance statuses"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, - starting_time: Annotated[ - Optional[datetime], - Field( - description="(Optional) The starting time of the period of running instance" - ), - ] = None, - ending_time: Annotated[ - Optional[datetime], - Field( - description="(Optional) The ending time of the period of running instance" - ), - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance ids"), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on application id")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on service id")] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on deployment id")] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on regional deployment id")] = None, + allocation_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on allocation id")] = None, + replica_index: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on replica index")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance statuses")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + starting_time: Annotated[Optional[datetime], Field(description="(Optional) The starting time of the period of running instance")] = None, + ending_time: Annotated[Optional[datetime], Field(description="(Optional) The ending time of the period of running instance")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1395,7 +1275,7 @@ async def list_instances_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instances_serialize( app_id=app_id, @@ -1414,21 +1294,22 @@ async def list_instances_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstancesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstancesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1436,69 +1317,30 @@ async def list_instances_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_instances_without_preload_content( self, - app_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on application id"), - ] = None, - service_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on service id") - ] = None, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on deployment id") - ] = None, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on regional deployment id"), - ] = None, - allocation_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on allocation id") - ] = None, - replica_index: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on replica index") - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance statuses"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, - starting_time: Annotated[ - Optional[datetime], - Field( - description="(Optional) The starting time of the period of running instance" - ), - ] = None, - ending_time: Annotated[ - Optional[datetime], - Field( - description="(Optional) The ending time of the period of running instance" - ), - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on instance ids"), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on application id")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on service id")] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on deployment id")] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on regional deployment id")] = None, + allocation_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on allocation id")] = None, + replica_index: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on replica index")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance statuses")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + starting_time: Annotated[Optional[datetime], Field(description="(Optional) The starting time of the period of running instance")] = None, + ending_time: Annotated[Optional[datetime], Field(description="(Optional) The ending time of the period of running instance")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on instance ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1554,7 +1396,7 @@ async def list_instances_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_instances_serialize( app_id=app_id, @@ -1573,24 +1415,26 @@ async def list_instances_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListInstancesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListInstancesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_instances_serialize( self, app_id, @@ -1611,11 +1455,12 @@ def _list_instances_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "statuses": "multi", - "ids": "multi", + 'statuses': 'multi', + 'ids': 'multi', } _path_params: Dict[str, str] = {} @@ -1630,78 +1475,97 @@ def _list_instances_serialize( # process the path parameters # process the query parameters if app_id is not None: - _query_params.append(("app_id", app_id)) - + + _query_params.append(('app_id', app_id)) + if service_id is not None: - _query_params.append(("service_id", service_id)) - + + _query_params.append(('service_id', service_id)) + if deployment_id is not None: - _query_params.append(("deployment_id", deployment_id)) - + + _query_params.append(('deployment_id', deployment_id)) + if regional_deployment_id is not None: - _query_params.append(("regional_deployment_id", regional_deployment_id)) - + + _query_params.append(('regional_deployment_id', regional_deployment_id)) + if allocation_id is not None: - _query_params.append(("allocation_id", allocation_id)) - + + _query_params.append(('allocation_id', allocation_id)) + if replica_index is not None: - _query_params.append(("replica_index", replica_index)) - + + _query_params.append(('replica_index', replica_index)) + if statuses is not None: - _query_params.append(("statuses", statuses)) - + + _query_params.append(('statuses', statuses)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + if starting_time is not None: if isinstance(starting_time, datetime): _query_params.append( ( - "starting_time", + 'starting_time', starting_time.strftime( self.api_client.configuration.datetime_format - ), + ) ) ) else: - _query_params.append(("starting_time", starting_time)) - + _query_params.append(('starting_time', starting_time)) + if ending_time is not None: if isinstance(ending_time, datetime): _query_params.append( ( - "ending_time", + 'ending_time', ending_time.strftime( self.api_client.configuration.datetime_format - ), + ) ) ) else: - _query_params.append(("ending_time", ending_time)) - + _query_params.append(('ending_time', ending_time)) + if ids is not None: - _query_params.append(("ids", ids)) - + + _query_params.append(('ids', ids)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/instances", + method='GET', + resource_path='/v1/instances', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1711,5 +1575,7 @@ def _list_instances_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/intercom_api.py b/koyeb/api_async/api/intercom_api.py index 2eed772d..bc78e38f 100644 --- a/koyeb/api_async/api/intercom_api.py +++ b/koyeb/api_async/api/intercom_api.py @@ -34,6 +34,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def get_intercom_profile( self, @@ -41,8 +42,9 @@ async def get_intercom_profile( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -72,27 +74,28 @@ async def get_intercom_profile( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_intercom_profile_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetIntercomProfileReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetIntercomProfileReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -100,6 +103,7 @@ async def get_intercom_profile( response_types_map=_response_types_map, ).data + @validate_call async def get_intercom_profile_with_http_info( self, @@ -107,8 +111,9 @@ async def get_intercom_profile_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -138,27 +143,28 @@ async def get_intercom_profile_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_intercom_profile_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetIntercomProfileReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetIntercomProfileReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -166,6 +172,7 @@ async def get_intercom_profile_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_intercom_profile_without_preload_content( self, @@ -173,8 +180,9 @@ async def get_intercom_profile_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -204,30 +212,32 @@ async def get_intercom_profile_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_intercom_profile_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetIntercomProfileReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetIntercomProfileReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_intercom_profile_serialize( self, _request_auth, @@ -235,9 +245,11 @@ def _get_intercom_profile_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -254,16 +266,24 @@ def _get_intercom_profile_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/intercom/profile", + method='GET', + resource_path='/v1/intercom/profile', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -273,5 +293,7 @@ def _get_intercom_profile_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/invite_api.py b/koyeb/api_async/api/invite_api.py index a77942b6..dc6de1e3 100644 --- a/koyeb/api_async/api/invite_api.py +++ b/koyeb/api_async/api/invite_api.py @@ -35,6 +35,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create_invite( self, @@ -43,8 +44,9 @@ async def create_invite( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -76,28 +78,29 @@ async def create_invite( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_invite_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -105,6 +108,7 @@ async def create_invite( response_types_map=_response_types_map, ).data + @validate_call async def create_invite_with_http_info( self, @@ -113,8 +117,9 @@ async def create_invite_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -146,28 +151,29 @@ async def create_invite_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_invite_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -175,6 +181,7 @@ async def create_invite_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def create_invite_without_preload_content( self, @@ -183,8 +190,9 @@ async def create_invite_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -216,31 +224,33 @@ async def create_invite_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_invite_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_invite_serialize( self, body, @@ -249,9 +259,11 @@ def _create_invite_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -270,16 +282,24 @@ def _create_invite_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/invite", + method='POST', + resource_path='/v1/account/invite', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -289,5 +309,7 @@ def _create_invite_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/logs_api.py b/koyeb/api_async/api/logs_api.py index e7c4ef36..8541928c 100644 --- a/koyeb/api_async/api/logs_api.py +++ b/koyeb/api_async/api/logs_api.py @@ -39,103 +39,33 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def query_logs( self, - type: Annotated[ - Optional[StrictStr], - Field( - description='Type of logs to retrieve, either "build" or "runtime". Defaults to "runtime".' - ), - ] = None, - app_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - service_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - instance_id: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using instance_ids instead."), - ] = None, - instance_ids: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - stream: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using streams instead."), - ] = None, - streams: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on stream: either "stdout", "stderr" or "koyeb" (for system logs).' - ), - ] = None, - start: Annotated[ - Optional[datetime], - Field( - description="(Optional) Must always be before `end`. Defaults to 15 minutes ago." - ), - ] = None, - end: Annotated[ - Optional[datetime], - Field( - description="(Optional) Must always be after `start`. Defaults to now." - ), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field(description="(Optional) `asc` or `desc`. Defaults to `desc`."), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Defaults to 100. Maximum of 1000."), - ] = None, - regex: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Apply a regex to filter logs. Can't be used with `text`." - ), - ] = None, - text: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Looks for this string in logs. Can't be used with `regex`." - ), - ] = None, - regions: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on the provided regions (e.g. ["fra", "was"]).' - ), - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Type of logs to retrieve, either \"build\" or \"runtime\". Defaults to \"runtime\".")] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using instance_ids instead.")] = None, + instance_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + stream: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using streams instead.")] = None, + streams: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on stream: either \"stdout\", \"stderr\" or \"koyeb\" (for system logs).")] = None, + start: Annotated[Optional[datetime], Field(description="(Optional) Must always be before `end`. Defaults to 15 minutes ago.")] = None, + end: Annotated[Optional[datetime], Field(description="(Optional) Must always be after `start`. Defaults to now.")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) `asc` or `desc`. Defaults to `desc`.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) Defaults to 100. Maximum of 1000.")] = None, + regex: Annotated[Optional[StrictStr], Field(description="(Optional) Apply a regex to filter logs. Can't be used with `text`.")] = None, + text: Annotated[Optional[StrictStr], Field(description="(Optional) Looks for this string in logs. Can't be used with `regex`.")] = None, + regions: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided regions (e.g. [\"fra\", \"was\"]).")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -197,7 +127,7 @@ async def query_logs( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._query_logs_serialize( type=type, @@ -219,21 +149,22 @@ async def query_logs( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "QueryLogsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "QueryLogsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -241,103 +172,33 @@ async def query_logs( response_types_map=_response_types_map, ).data + @validate_call async def query_logs_with_http_info( self, - type: Annotated[ - Optional[StrictStr], - Field( - description='Type of logs to retrieve, either "build" or "runtime". Defaults to "runtime".' - ), - ] = None, - app_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - service_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - instance_id: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using instance_ids instead."), - ] = None, - instance_ids: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - stream: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using streams instead."), - ] = None, - streams: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on stream: either "stdout", "stderr" or "koyeb" (for system logs).' - ), - ] = None, - start: Annotated[ - Optional[datetime], - Field( - description="(Optional) Must always be before `end`. Defaults to 15 minutes ago." - ), - ] = None, - end: Annotated[ - Optional[datetime], - Field( - description="(Optional) Must always be after `start`. Defaults to now." - ), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field(description="(Optional) `asc` or `desc`. Defaults to `desc`."), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Defaults to 100. Maximum of 1000."), - ] = None, - regex: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Apply a regex to filter logs. Can't be used with `text`." - ), - ] = None, - text: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Looks for this string in logs. Can't be used with `regex`." - ), - ] = None, - regions: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on the provided regions (e.g. ["fra", "was"]).' - ), - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Type of logs to retrieve, either \"build\" or \"runtime\". Defaults to \"runtime\".")] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using instance_ids instead.")] = None, + instance_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + stream: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using streams instead.")] = None, + streams: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on stream: either \"stdout\", \"stderr\" or \"koyeb\" (for system logs).")] = None, + start: Annotated[Optional[datetime], Field(description="(Optional) Must always be before `end`. Defaults to 15 minutes ago.")] = None, + end: Annotated[Optional[datetime], Field(description="(Optional) Must always be after `start`. Defaults to now.")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) `asc` or `desc`. Defaults to `desc`.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) Defaults to 100. Maximum of 1000.")] = None, + regex: Annotated[Optional[StrictStr], Field(description="(Optional) Apply a regex to filter logs. Can't be used with `text`.")] = None, + text: Annotated[Optional[StrictStr], Field(description="(Optional) Looks for this string in logs. Can't be used with `regex`.")] = None, + regions: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided regions (e.g. [\"fra\", \"was\"]).")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -399,7 +260,7 @@ async def query_logs_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._query_logs_serialize( type=type, @@ -421,21 +282,22 @@ async def query_logs_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "QueryLogsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "QueryLogsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -443,103 +305,33 @@ async def query_logs_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def query_logs_without_preload_content( self, - type: Annotated[ - Optional[StrictStr], - Field( - description='Type of logs to retrieve, either "build" or "runtime". Defaults to "runtime".' - ), - ] = None, - app_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - service_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - instance_id: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using instance_ids instead."), - ] = None, - instance_ids: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - stream: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using streams instead."), - ] = None, - streams: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on stream: either "stdout", "stderr" or "koyeb" (for system logs).' - ), - ] = None, - start: Annotated[ - Optional[datetime], - Field( - description="(Optional) Must always be before `end`. Defaults to 15 minutes ago." - ), - ] = None, - end: Annotated[ - Optional[datetime], - Field( - description="(Optional) Must always be after `start`. Defaults to now." - ), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field(description="(Optional) `asc` or `desc`. Defaults to `desc`."), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Defaults to 100. Maximum of 1000."), - ] = None, - regex: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Apply a regex to filter logs. Can't be used with `text`." - ), - ] = None, - text: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Looks for this string in logs. Can't be used with `regex`." - ), - ] = None, - regions: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on the provided regions (e.g. ["fra", "was"]).' - ), - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Type of logs to retrieve, either \"build\" or \"runtime\". Defaults to \"runtime\".")] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using instance_ids instead.")] = None, + instance_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + stream: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using streams instead.")] = None, + streams: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on stream: either \"stdout\", \"stderr\" or \"koyeb\" (for system logs).")] = None, + start: Annotated[Optional[datetime], Field(description="(Optional) Must always be before `end`. Defaults to 15 minutes ago.")] = None, + end: Annotated[Optional[datetime], Field(description="(Optional) Must always be after `start`. Defaults to now.")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) `asc` or `desc`. Defaults to `desc`.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) Defaults to 100. Maximum of 1000.")] = None, + regex: Annotated[Optional[StrictStr], Field(description="(Optional) Apply a regex to filter logs. Can't be used with `text`.")] = None, + text: Annotated[Optional[StrictStr], Field(description="(Optional) Looks for this string in logs. Can't be used with `regex`.")] = None, + regions: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided regions (e.g. [\"fra\", \"was\"]).")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -601,7 +393,7 @@ async def query_logs_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._query_logs_serialize( type=type, @@ -623,24 +415,26 @@ async def query_logs_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "QueryLogsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "QueryLogsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _query_logs_serialize( self, type, @@ -664,12 +458,13 @@ def _query_logs_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "instance_ids": "multi", - "streams": "multi", - "regions": "multi", + 'instance_ids': 'multi', + 'streams': 'multi', + 'regions': 'multi', } _path_params: Dict[str, str] = {} @@ -684,80 +479,109 @@ def _query_logs_serialize( # process the path parameters # process the query parameters if type is not None: - _query_params.append(("type", type)) - + + _query_params.append(('type', type)) + if app_id is not None: - _query_params.append(("app_id", app_id)) - + + _query_params.append(('app_id', app_id)) + if service_id is not None: - _query_params.append(("service_id", service_id)) - + + _query_params.append(('service_id', service_id)) + if deployment_id is not None: - _query_params.append(("deployment_id", deployment_id)) - + + _query_params.append(('deployment_id', deployment_id)) + if regional_deployment_id is not None: - _query_params.append(("regional_deployment_id", regional_deployment_id)) - + + _query_params.append(('regional_deployment_id', regional_deployment_id)) + if instance_id is not None: - _query_params.append(("instance_id", instance_id)) - + + _query_params.append(('instance_id', instance_id)) + if instance_ids is not None: - _query_params.append(("instance_ids", instance_ids)) - + + _query_params.append(('instance_ids', instance_ids)) + if stream is not None: - _query_params.append(("stream", stream)) - + + _query_params.append(('stream', stream)) + if streams is not None: - _query_params.append(("streams", streams)) - + + _query_params.append(('streams', streams)) + if start is not None: if isinstance(start, datetime): _query_params.append( ( - "start", - start.strftime(self.api_client.configuration.datetime_format), + 'start', + start.strftime( + self.api_client.configuration.datetime_format + ) ) ) else: - _query_params.append(("start", start)) - + _query_params.append(('start', start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ("end", end.strftime(self.api_client.configuration.datetime_format)) + ( + 'end', + end.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("end", end)) - + _query_params.append(('end', end)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if regex is not None: - _query_params.append(("regex", regex)) - + + _query_params.append(('regex', regex)) + if text is not None: - _query_params.append(("text", text)) - + + _query_params.append(('text', text)) + if regions is not None: - _query_params.append(("regions", regions)) - + + _query_params.append(('regions', regions)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/streams/logs/query", + method='GET', + resource_path='/v1/streams/logs/query', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -767,94 +591,36 @@ def _query_logs_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def tail_logs( self, - type: Annotated[ - Optional[StrictStr], - Field( - description='Type of logs to retrieve, either "build" or "runtime". Defaults to "runtime".' - ), - ] = None, - app_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - service_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - instance_id: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using instance_ids instead."), - ] = None, - instance_ids: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - stream: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using streams instead."), - ] = None, - streams: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on stream: either "stdout", "stderr" or "koyeb" (for system logs).' - ), - ] = None, - start: Annotated[ - Optional[datetime], - Field(description="(Optional) Defaults to 24 hours ago."), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Defaults to 1000. Maximum of 1000."), - ] = None, - regex: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Apply a regex to filter logs. Can't be used with `text`." - ), - ] = None, - text: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Looks for this string in logs. Can't be used with `regex`." - ), - ] = None, - regions: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on the provided regions (e.g. ["fra", "was"]).' - ), - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Type of logs to retrieve, either \"build\" or \"runtime\". Defaults to \"runtime\".")] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using instance_ids instead.")] = None, + instance_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + stream: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using streams instead.")] = None, + streams: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on stream: either \"stdout\", \"stderr\" or \"koyeb\" (for system logs).")] = None, + start: Annotated[Optional[datetime], Field(description="(Optional) Defaults to 24 hours ago.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) Defaults to 1000. Maximum of 1000.")] = None, + regex: Annotated[Optional[StrictStr], Field(description="(Optional) Apply a regex to filter logs. Can't be used with `text`.")] = None, + text: Annotated[Optional[StrictStr], Field(description="(Optional) Looks for this string in logs. Can't be used with `regex`.")] = None, + regions: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided regions (e.g. [\"fra\", \"was\"]).")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -912,7 +678,7 @@ async def tail_logs( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._tail_logs_serialize( type=type, @@ -932,21 +698,22 @@ async def tail_logs( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "StreamResultOfLogEntry", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "StreamResultOfLogEntry", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -954,91 +721,31 @@ async def tail_logs( response_types_map=_response_types_map, ).data + @validate_call async def tail_logs_with_http_info( self, - type: Annotated[ - Optional[StrictStr], - Field( - description='Type of logs to retrieve, either "build" or "runtime". Defaults to "runtime".' - ), - ] = None, - app_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - service_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - instance_id: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using instance_ids instead."), - ] = None, - instance_ids: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - stream: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using streams instead."), - ] = None, - streams: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on stream: either "stdout", "stderr" or "koyeb" (for system logs).' - ), - ] = None, - start: Annotated[ - Optional[datetime], - Field(description="(Optional) Defaults to 24 hours ago."), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Defaults to 1000. Maximum of 1000."), - ] = None, - regex: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Apply a regex to filter logs. Can't be used with `text`." - ), - ] = None, - text: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Looks for this string in logs. Can't be used with `regex`." - ), - ] = None, - regions: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on the provided regions (e.g. ["fra", "was"]).' - ), - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Type of logs to retrieve, either \"build\" or \"runtime\". Defaults to \"runtime\".")] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using instance_ids instead.")] = None, + instance_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + stream: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using streams instead.")] = None, + streams: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on stream: either \"stdout\", \"stderr\" or \"koyeb\" (for system logs).")] = None, + start: Annotated[Optional[datetime], Field(description="(Optional) Defaults to 24 hours ago.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) Defaults to 1000. Maximum of 1000.")] = None, + regex: Annotated[Optional[StrictStr], Field(description="(Optional) Apply a regex to filter logs. Can't be used with `text`.")] = None, + text: Annotated[Optional[StrictStr], Field(description="(Optional) Looks for this string in logs. Can't be used with `regex`.")] = None, + regions: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided regions (e.g. [\"fra\", \"was\"]).")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1096,7 +803,7 @@ async def tail_logs_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._tail_logs_serialize( type=type, @@ -1116,21 +823,22 @@ async def tail_logs_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "StreamResultOfLogEntry", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "StreamResultOfLogEntry", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1138,91 +846,31 @@ async def tail_logs_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def tail_logs_without_preload_content( self, - type: Annotated[ - Optional[StrictStr], - Field( - description='Type of logs to retrieve, either "build" or "runtime". Defaults to "runtime".' - ), - ] = None, - app_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - service_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - instance_id: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using instance_ids instead."), - ] = None, - instance_ids: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set." - ), - ] = None, - stream: Annotated[ - Optional[StrictStr], - Field(description="Deprecated, prefer using streams instead."), - ] = None, - streams: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on stream: either "stdout", "stderr" or "koyeb" (for system logs).' - ), - ] = None, - start: Annotated[ - Optional[datetime], - Field(description="(Optional) Defaults to 24 hours ago."), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Defaults to 1000. Maximum of 1000."), - ] = None, - regex: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Apply a regex to filter logs. Can't be used with `text`." - ), - ] = None, - text: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Looks for this string in logs. Can't be used with `regex`." - ), - ] = None, - regions: Annotated[ - Optional[List[StrictStr]], - Field( - description='(Optional) Filter on the provided regions (e.g. ["fra", "was"]).' - ), - ] = None, + type: Annotated[Optional[StrictStr], Field(description="Type of logs to retrieve, either \"build\" or \"runtime\". Defaults to \"runtime\".")] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided app_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided service_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on the provided regional_deployment_id. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using instance_ids instead.")] = None, + instance_ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided instance_ids. At least one of app_id, service_id, deployment_id, regional_deployment_id or instance_ids must be set.")] = None, + stream: Annotated[Optional[StrictStr], Field(description="Deprecated, prefer using streams instead.")] = None, + streams: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on stream: either \"stdout\", \"stderr\" or \"koyeb\" (for system logs).")] = None, + start: Annotated[Optional[datetime], Field(description="(Optional) Defaults to 24 hours ago.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) Defaults to 1000. Maximum of 1000.")] = None, + regex: Annotated[Optional[StrictStr], Field(description="(Optional) Apply a regex to filter logs. Can't be used with `text`.")] = None, + text: Annotated[Optional[StrictStr], Field(description="(Optional) Looks for this string in logs. Can't be used with `regex`.")] = None, + regions: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on the provided regions (e.g. [\"fra\", \"was\"]).")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1280,7 +928,7 @@ async def tail_logs_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._tail_logs_serialize( type=type, @@ -1300,24 +948,26 @@ async def tail_logs_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "StreamResultOfLogEntry", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "StreamResultOfLogEntry", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _tail_logs_serialize( self, type, @@ -1339,12 +989,13 @@ def _tail_logs_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "instance_ids": "multi", - "streams": "multi", - "regions": "multi", + 'instance_ids': 'multi', + 'streams': 'multi', + 'regions': 'multi', } _path_params: Dict[str, str] = {} @@ -1359,69 +1010,92 @@ def _tail_logs_serialize( # process the path parameters # process the query parameters if type is not None: - _query_params.append(("type", type)) - + + _query_params.append(('type', type)) + if app_id is not None: - _query_params.append(("app_id", app_id)) - + + _query_params.append(('app_id', app_id)) + if service_id is not None: - _query_params.append(("service_id", service_id)) - + + _query_params.append(('service_id', service_id)) + if deployment_id is not None: - _query_params.append(("deployment_id", deployment_id)) - + + _query_params.append(('deployment_id', deployment_id)) + if regional_deployment_id is not None: - _query_params.append(("regional_deployment_id", regional_deployment_id)) - + + _query_params.append(('regional_deployment_id', regional_deployment_id)) + if instance_id is not None: - _query_params.append(("instance_id", instance_id)) - + + _query_params.append(('instance_id', instance_id)) + if instance_ids is not None: - _query_params.append(("instance_ids", instance_ids)) - + + _query_params.append(('instance_ids', instance_ids)) + if stream is not None: - _query_params.append(("stream", stream)) - + + _query_params.append(('stream', stream)) + if streams is not None: - _query_params.append(("streams", streams)) - + + _query_params.append(('streams', streams)) + if start is not None: if isinstance(start, datetime): _query_params.append( ( - "start", - start.strftime(self.api_client.configuration.datetime_format), + 'start', + start.strftime( + self.api_client.configuration.datetime_format + ) ) ) else: - _query_params.append(("start", start)) - + _query_params.append(('start', start)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if regex is not None: - _query_params.append(("regex", regex)) - + + _query_params.append(('regex', regex)) + if text is not None: - _query_params.append(("text", text)) - + + _query_params.append(('text', text)) + if regions is not None: - _query_params.append(("regions", regions)) - + + _query_params.append(('regions', regions)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/streams/logs/tail", + method='GET', + resource_path='/v1/streams/logs/tail', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1431,5 +1105,7 @@ def _tail_logs_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/metrics_api.py b/koyeb/api_async/api/metrics_api.py index 296a3753..6dfca484 100644 --- a/koyeb/api_async/api/metrics_api.py +++ b/koyeb/api_async/api/metrics_api.py @@ -38,41 +38,23 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def get_metrics( self, - service_id: Annotated[ - Optional[StrictStr], - Field( - description="ID of the service to query instances metrics for. Ignored if instance_id is set." - ), - ] = None, - instance_id: Annotated[ - Optional[StrictStr], - Field(description="ID of the instance to query metrics for."), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="Metric to query.") - ] = None, - start: Annotated[ - Optional[datetime], - Field(description="(Optional) Defaults to an hour prior to end."), - ] = None, - end: Annotated[ - Optional[datetime], Field(description="(Optional) Defaults to now.") - ] = None, - step: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Must be a valid duration in hours (h) or minutes (m). Defaulst to 5m." - ), - ] = None, + service_id: Annotated[Optional[StrictStr], Field(description="ID of the service to query instances metrics for. Ignored if instance_id is set.")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="ID of the instance to query metrics for.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Metric to query.")] = None, + start: Annotated[Optional[datetime], Field(description="(Optional) Defaults to an hour prior to end.")] = None, + end: Annotated[Optional[datetime], Field(description="(Optional) Defaults to now.")] = None, + step: Annotated[Optional[StrictStr], Field(description="(Optional) Must be a valid duration in hours (h) or minutes (m). Defaulst to 5m.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -114,7 +96,7 @@ async def get_metrics( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( service_id=service_id, @@ -126,21 +108,22 @@ async def get_metrics( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetMetricsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetMetricsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -148,41 +131,23 @@ async def get_metrics( response_types_map=_response_types_map, ).data + @validate_call async def get_metrics_with_http_info( self, - service_id: Annotated[ - Optional[StrictStr], - Field( - description="ID of the service to query instances metrics for. Ignored if instance_id is set." - ), - ] = None, - instance_id: Annotated[ - Optional[StrictStr], - Field(description="ID of the instance to query metrics for."), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="Metric to query.") - ] = None, - start: Annotated[ - Optional[datetime], - Field(description="(Optional) Defaults to an hour prior to end."), - ] = None, - end: Annotated[ - Optional[datetime], Field(description="(Optional) Defaults to now.") - ] = None, - step: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Must be a valid duration in hours (h) or minutes (m). Defaulst to 5m." - ), - ] = None, + service_id: Annotated[Optional[StrictStr], Field(description="ID of the service to query instances metrics for. Ignored if instance_id is set.")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="ID of the instance to query metrics for.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Metric to query.")] = None, + start: Annotated[Optional[datetime], Field(description="(Optional) Defaults to an hour prior to end.")] = None, + end: Annotated[Optional[datetime], Field(description="(Optional) Defaults to now.")] = None, + step: Annotated[Optional[StrictStr], Field(description="(Optional) Must be a valid duration in hours (h) or minutes (m). Defaulst to 5m.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -224,7 +189,7 @@ async def get_metrics_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( service_id=service_id, @@ -236,21 +201,22 @@ async def get_metrics_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetMetricsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetMetricsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -258,41 +224,23 @@ async def get_metrics_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_metrics_without_preload_content( self, - service_id: Annotated[ - Optional[StrictStr], - Field( - description="ID of the service to query instances metrics for. Ignored if instance_id is set." - ), - ] = None, - instance_id: Annotated[ - Optional[StrictStr], - Field(description="ID of the instance to query metrics for."), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="Metric to query.") - ] = None, - start: Annotated[ - Optional[datetime], - Field(description="(Optional) Defaults to an hour prior to end."), - ] = None, - end: Annotated[ - Optional[datetime], Field(description="(Optional) Defaults to now.") - ] = None, - step: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Must be a valid duration in hours (h) or minutes (m). Defaulst to 5m." - ), - ] = None, + service_id: Annotated[Optional[StrictStr], Field(description="ID of the service to query instances metrics for. Ignored if instance_id is set.")] = None, + instance_id: Annotated[Optional[StrictStr], Field(description="ID of the instance to query metrics for.")] = None, + name: Annotated[Optional[StrictStr], Field(description="Metric to query.")] = None, + start: Annotated[Optional[datetime], Field(description="(Optional) Defaults to an hour prior to end.")] = None, + end: Annotated[Optional[datetime], Field(description="(Optional) Defaults to now.")] = None, + step: Annotated[Optional[StrictStr], Field(description="(Optional) Must be a valid duration in hours (h) or minutes (m). Defaulst to 5m.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -334,7 +282,7 @@ async def get_metrics_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_metrics_serialize( service_id=service_id, @@ -346,24 +294,26 @@ async def get_metrics_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetMetricsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetMetricsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_metrics_serialize( self, service_id, @@ -377,9 +327,11 @@ def _get_metrics_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -393,50 +345,69 @@ def _get_metrics_serialize( # process the path parameters # process the query parameters if service_id is not None: - _query_params.append(("service_id", service_id)) - + + _query_params.append(('service_id', service_id)) + if instance_id is not None: - _query_params.append(("instance_id", instance_id)) - + + _query_params.append(('instance_id', instance_id)) + if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if start is not None: if isinstance(start, datetime): _query_params.append( ( - "start", - start.strftime(self.api_client.configuration.datetime_format), + 'start', + start.strftime( + self.api_client.configuration.datetime_format + ) ) ) else: - _query_params.append(("start", start)) - + _query_params.append(('start', start)) + if end is not None: if isinstance(end, datetime): _query_params.append( - ("end", end.strftime(self.api_client.configuration.datetime_format)) + ( + 'end', + end.strftime( + self.api_client.configuration.datetime_format + ) + ) ) else: - _query_params.append(("end", end)) - + _query_params.append(('end', end)) + if step is not None: - _query_params.append(("step", step)) - + + _query_params.append(('step', step)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/streams/metrics", + method='GET', + resource_path='/v1/streams/metrics', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -446,5 +417,7 @@ def _get_metrics_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/organization_api.py b/koyeb/api_async/api/organization_api.py index 8ebd8552..c9a9fedf 100644 --- a/koyeb/api_async/api/organization_api.py +++ b/koyeb/api_async/api/organization_api.py @@ -23,52 +23,28 @@ from koyeb.api_async.models.create_budget_reply import CreateBudgetReply from koyeb.api_async.models.create_organization_reply import CreateOrganizationReply from koyeb.api_async.models.create_organization_request import CreateOrganizationRequest -from koyeb.api_async.models.deactivate_organization_reply import ( - DeactivateOrganizationReply, -) -from koyeb.api_async.models.deactivate_organization_request import ( - DeactivateOrganizationRequest, -) +from koyeb.api_async.models.deactivate_organization_reply import DeactivateOrganizationReply +from koyeb.api_async.models.deactivate_organization_request import DeactivateOrganizationRequest from koyeb.api_async.models.delete_organization_reply import DeleteOrganizationReply from koyeb.api_async.models.get_budget_reply import GetBudgetReply -from koyeb.api_async.models.get_github_installation_reply import ( - GetGithubInstallationReply, -) +from koyeb.api_async.models.get_github_installation_reply import GetGithubInstallationReply from koyeb.api_async.models.get_organization_reply import GetOrganizationReply from koyeb.api_async.models.github_installation_reply import GithubInstallationReply from koyeb.api_async.models.github_installation_request import GithubInstallationRequest from koyeb.api_async.models.login_reply import LoginReply from koyeb.api_async.models.organization import Organization -from koyeb.api_async.models.reactivate_organization_reply import ( - ReactivateOrganizationReply, -) +from koyeb.api_async.models.reactivate_organization_reply import ReactivateOrganizationReply from koyeb.api_async.models.update_budget_reply import UpdateBudgetReply from koyeb.api_async.models.update_budget_request import UpdateBudgetRequest -from koyeb.api_async.models.update_organization_default_project_reply import ( - UpdateOrganizationDefaultProjectReply, -) -from koyeb.api_async.models.update_organization_default_project_request import ( - UpdateOrganizationDefaultProjectRequest, -) -from koyeb.api_async.models.update_organization_name_reply import ( - UpdateOrganizationNameReply, -) -from koyeb.api_async.models.update_organization_name_request import ( - UpdateOrganizationNameRequest, -) -from koyeb.api_async.models.update_organization_plan_reply import ( - UpdateOrganizationPlanReply, -) -from koyeb.api_async.models.update_organization_plan_request import ( - UpdateOrganizationPlanRequest, -) +from koyeb.api_async.models.update_organization_default_project_reply import UpdateOrganizationDefaultProjectReply +from koyeb.api_async.models.update_organization_default_project_request import UpdateOrganizationDefaultProjectRequest +from koyeb.api_async.models.update_organization_name_reply import UpdateOrganizationNameReply +from koyeb.api_async.models.update_organization_name_request import UpdateOrganizationNameRequest +from koyeb.api_async.models.update_organization_plan_reply import UpdateOrganizationPlanReply +from koyeb.api_async.models.update_organization_plan_request import UpdateOrganizationPlanRequest from koyeb.api_async.models.update_organization_reply import UpdateOrganizationReply -from koyeb.api_async.models.upsert_signup_qualification_reply import ( - UpsertSignupQualificationReply, -) -from koyeb.api_async.models.upsert_signup_qualification_request import ( - UpsertSignupQualificationRequest, -) +from koyeb.api_async.models.upsert_signup_qualification_reply import UpsertSignupQualificationReply +from koyeb.api_async.models.upsert_signup_qualification_request import UpsertSignupQualificationRequest from koyeb.api_async.api_client import ApiClient, RequestSerialized from koyeb.api_async.api_response import ApiResponse @@ -87,19 +63,19 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create_access_token( self, - id: Annotated[ - StrictStr, Field(description="Organization id for ephemeral credential") - ], + id: Annotated[StrictStr, Field(description="Organization id for ephemeral credential")], body: CreateAccessTokenRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -134,7 +110,7 @@ async def create_access_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_access_token_serialize( id=id, @@ -142,21 +118,22 @@ async def create_access_token( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateAccessTokenReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateAccessTokenReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -164,19 +141,19 @@ async def create_access_token( response_types_map=_response_types_map, ).data + @validate_call async def create_access_token_with_http_info( self, - id: Annotated[ - StrictStr, Field(description="Organization id for ephemeral credential") - ], + id: Annotated[StrictStr, Field(description="Organization id for ephemeral credential")], body: CreateAccessTokenRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -211,7 +188,7 @@ async def create_access_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_access_token_serialize( id=id, @@ -219,21 +196,22 @@ async def create_access_token_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateAccessTokenReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateAccessTokenReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -241,19 +219,19 @@ async def create_access_token_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def create_access_token_without_preload_content( self, - id: Annotated[ - StrictStr, Field(description="Organization id for ephemeral credential") - ], + id: Annotated[StrictStr, Field(description="Organization id for ephemeral credential")], body: CreateAccessTokenRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -288,7 +266,7 @@ async def create_access_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_access_token_serialize( id=id, @@ -296,24 +274,26 @@ async def create_access_token_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateAccessTokenReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateAccessTokenReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_access_token_serialize( self, id, @@ -323,9 +303,11 @@ def _create_access_token_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -338,7 +320,7 @@ def _create_access_token_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -346,16 +328,24 @@ def _create_access_token_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organizations/{id}/access_token", + method='POST', + resource_path='/v1/organizations/{id}/access_token', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -365,9 +355,12 @@ def _create_access_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create_budget( self, @@ -377,8 +370,9 @@ async def create_budget( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -412,7 +406,7 @@ async def create_budget( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_budget_serialize( organization_id=organization_id, @@ -420,21 +414,22 @@ async def create_budget( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateBudgetReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateBudgetReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -442,6 +437,7 @@ async def create_budget( response_types_map=_response_types_map, ).data + @validate_call async def create_budget_with_http_info( self, @@ -451,8 +447,9 @@ async def create_budget_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -486,7 +483,7 @@ async def create_budget_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_budget_serialize( organization_id=organization_id, @@ -494,21 +491,22 @@ async def create_budget_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateBudgetReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateBudgetReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -516,6 +514,7 @@ async def create_budget_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def create_budget_without_preload_content( self, @@ -525,8 +524,9 @@ async def create_budget_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -560,7 +560,7 @@ async def create_budget_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_budget_serialize( organization_id=organization_id, @@ -568,24 +568,26 @@ async def create_budget_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateBudgetReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateBudgetReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_budget_serialize( self, organization_id, @@ -595,9 +597,11 @@ def _create_budget_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -610,7 +614,7 @@ def _create_budget_serialize( # process the path parameters if organization_id is not None: - _path_params["organization_id"] = organization_id + _path_params['organization_id'] = organization_id # process the query parameters # process the header parameters # process the form parameters @@ -618,16 +622,24 @@ def _create_budget_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organizations/{organization_id}/budget", + method='POST', + resource_path='/v1/organizations/{organization_id}/budget', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -637,9 +649,12 @@ def _create_budget_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create_organization( self, @@ -648,8 +663,9 @@ async def create_organization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -681,28 +697,29 @@ async def create_organization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_organization_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -710,6 +727,7 @@ async def create_organization( response_types_map=_response_types_map, ).data + @validate_call async def create_organization_with_http_info( self, @@ -718,8 +736,9 @@ async def create_organization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -751,28 +770,29 @@ async def create_organization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_organization_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -780,6 +800,7 @@ async def create_organization_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def create_organization_without_preload_content( self, @@ -788,8 +809,9 @@ async def create_organization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -821,31 +843,33 @@ async def create_organization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_organization_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_organization_serialize( self, body, @@ -854,9 +878,11 @@ def _create_organization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -875,16 +901,24 @@ def _create_organization_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organizations", + method='POST', + resource_path='/v1/organizations', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -894,9 +928,12 @@ def _create_organization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def deactivate_organization( self, @@ -906,8 +943,9 @@ async def deactivate_organization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -941,7 +979,7 @@ async def deactivate_organization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._deactivate_organization_serialize( id=id, @@ -949,21 +987,22 @@ async def deactivate_organization( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeactivateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeactivateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -971,6 +1010,7 @@ async def deactivate_organization( response_types_map=_response_types_map, ).data + @validate_call async def deactivate_organization_with_http_info( self, @@ -980,8 +1020,9 @@ async def deactivate_organization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1015,7 +1056,7 @@ async def deactivate_organization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._deactivate_organization_serialize( id=id, @@ -1023,21 +1064,22 @@ async def deactivate_organization_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeactivateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeactivateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1045,6 +1087,7 @@ async def deactivate_organization_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def deactivate_organization_without_preload_content( self, @@ -1054,8 +1097,9 @@ async def deactivate_organization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1089,7 +1133,7 @@ async def deactivate_organization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._deactivate_organization_serialize( id=id, @@ -1097,24 +1141,26 @@ async def deactivate_organization_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeactivateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeactivateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _deactivate_organization_serialize( self, id, @@ -1124,9 +1170,11 @@ def _deactivate_organization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1139,7 +1187,7 @@ def _deactivate_organization_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -1147,16 +1195,24 @@ def _deactivate_organization_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organizations/{id}/deactivate", + method='POST', + resource_path='/v1/organizations/{id}/deactivate', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1166,9 +1222,12 @@ def _deactivate_organization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_budget( self, @@ -1177,8 +1236,9 @@ async def delete_budget( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1210,28 +1270,29 @@ async def delete_budget( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_budget_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1239,6 +1300,7 @@ async def delete_budget( response_types_map=_response_types_map, ).data + @validate_call async def delete_budget_with_http_info( self, @@ -1247,8 +1309,9 @@ async def delete_budget_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1280,28 +1343,29 @@ async def delete_budget_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_budget_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1309,6 +1373,7 @@ async def delete_budget_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def delete_budget_without_preload_content( self, @@ -1317,8 +1382,9 @@ async def delete_budget_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1350,31 +1416,33 @@ async def delete_budget_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_budget_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_budget_serialize( self, organization_id, @@ -1383,9 +1451,11 @@ def _delete_budget_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1398,22 +1468,30 @@ def _delete_budget_serialize( # process the path parameters if organization_id is not None: - _path_params["organization_id"] = organization_id + _path_params['organization_id'] = organization_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/organizations/{organization_id}/budget", + method='DELETE', + resource_path='/v1/organizations/{organization_id}/budget', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1423,9 +1501,12 @@ def _delete_budget_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_organization( self, @@ -1434,8 +1515,9 @@ async def delete_organization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1467,28 +1549,29 @@ async def delete_organization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_organization_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1496,6 +1579,7 @@ async def delete_organization( response_types_map=_response_types_map, ).data + @validate_call async def delete_organization_with_http_info( self, @@ -1504,8 +1588,9 @@ async def delete_organization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1537,28 +1622,29 @@ async def delete_organization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_organization_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1566,6 +1652,7 @@ async def delete_organization_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def delete_organization_without_preload_content( self, @@ -1574,8 +1661,9 @@ async def delete_organization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1607,31 +1695,33 @@ async def delete_organization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_organization_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_organization_serialize( self, id, @@ -1640,9 +1730,11 @@ def _delete_organization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1655,22 +1747,30 @@ def _delete_organization_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/organizations/{id}", + method='DELETE', + resource_path='/v1/organizations/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1680,9 +1780,12 @@ def _delete_organization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_budget( self, @@ -1691,8 +1794,9 @@ async def get_budget( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1724,28 +1828,29 @@ async def get_budget( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_budget_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetBudgetReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetBudgetReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1753,6 +1858,7 @@ async def get_budget( response_types_map=_response_types_map, ).data + @validate_call async def get_budget_with_http_info( self, @@ -1761,8 +1867,9 @@ async def get_budget_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1794,28 +1901,29 @@ async def get_budget_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_budget_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetBudgetReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetBudgetReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1823,6 +1931,7 @@ async def get_budget_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_budget_without_preload_content( self, @@ -1831,8 +1940,9 @@ async def get_budget_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1864,31 +1974,33 @@ async def get_budget_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_budget_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetBudgetReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetBudgetReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_budget_serialize( self, organization_id, @@ -1897,9 +2009,11 @@ def _get_budget_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1912,22 +2026,30 @@ def _get_budget_serialize( # process the path parameters if organization_id is not None: - _path_params["organization_id"] = organization_id + _path_params['organization_id'] = organization_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/organizations/{organization_id}/budget", + method='GET', + resource_path='/v1/organizations/{organization_id}/budget', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1937,9 +2059,12 @@ def _get_budget_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_github_installation( self, @@ -1947,8 +2072,9 @@ async def get_github_installation( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1978,27 +2104,28 @@ async def get_github_installation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_github_installation_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetGithubInstallationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetGithubInstallationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2006,6 +2133,7 @@ async def get_github_installation( response_types_map=_response_types_map, ).data + @validate_call async def get_github_installation_with_http_info( self, @@ -2013,8 +2141,9 @@ async def get_github_installation_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2044,27 +2173,28 @@ async def get_github_installation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_github_installation_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetGithubInstallationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetGithubInstallationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2072,6 +2202,7 @@ async def get_github_installation_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_github_installation_without_preload_content( self, @@ -2079,8 +2210,9 @@ async def get_github_installation_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2110,30 +2242,32 @@ async def get_github_installation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_github_installation_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetGithubInstallationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetGithubInstallationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_github_installation_serialize( self, _request_auth, @@ -2141,9 +2275,11 @@ def _get_github_installation_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2160,16 +2296,24 @@ def _get_github_installation_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/github/installation", + method='GET', + resource_path='/v1/github/installation', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2179,9 +2323,12 @@ def _get_github_installation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_organization( self, @@ -2190,8 +2337,9 @@ async def get_organization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2223,28 +2371,29 @@ async def get_organization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2252,6 +2401,7 @@ async def get_organization( response_types_map=_response_types_map, ).data + @validate_call async def get_organization_with_http_info( self, @@ -2260,8 +2410,9 @@ async def get_organization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2293,28 +2444,29 @@ async def get_organization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2322,6 +2474,7 @@ async def get_organization_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_organization_without_preload_content( self, @@ -2330,8 +2483,9 @@ async def get_organization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2363,31 +2517,33 @@ async def get_organization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_organization_serialize( self, id, @@ -2396,9 +2552,11 @@ def _get_organization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2411,22 +2569,30 @@ def _get_organization_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/organizations/{id}", + method='GET', + resource_path='/v1/organizations/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2436,9 +2602,12 @@ def _get_organization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def github_installation( self, @@ -2447,8 +2616,9 @@ async def github_installation( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2480,28 +2650,29 @@ async def github_installation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._github_installation_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GithubInstallationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GithubInstallationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2509,6 +2680,7 @@ async def github_installation( response_types_map=_response_types_map, ).data + @validate_call async def github_installation_with_http_info( self, @@ -2517,8 +2689,9 @@ async def github_installation_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2550,28 +2723,29 @@ async def github_installation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._github_installation_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GithubInstallationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GithubInstallationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2579,6 +2753,7 @@ async def github_installation_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def github_installation_without_preload_content( self, @@ -2587,8 +2762,9 @@ async def github_installation_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2620,31 +2796,33 @@ async def github_installation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._github_installation_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GithubInstallationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GithubInstallationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _github_installation_serialize( self, body, @@ -2653,9 +2831,11 @@ def _github_installation_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2674,16 +2854,24 @@ def _github_installation_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/github/installation", + method='POST', + resource_path='/v1/github/installation', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2693,9 +2881,12 @@ def _github_installation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def reactivate_organization( self, @@ -2705,8 +2896,9 @@ async def reactivate_organization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2740,7 +2932,7 @@ async def reactivate_organization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._reactivate_organization_serialize( id=id, @@ -2748,21 +2940,22 @@ async def reactivate_organization( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ReactivateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ReactivateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2770,6 +2963,7 @@ async def reactivate_organization( response_types_map=_response_types_map, ).data + @validate_call async def reactivate_organization_with_http_info( self, @@ -2779,8 +2973,9 @@ async def reactivate_organization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2814,7 +3009,7 @@ async def reactivate_organization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._reactivate_organization_serialize( id=id, @@ -2822,21 +3017,22 @@ async def reactivate_organization_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ReactivateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ReactivateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2844,6 +3040,7 @@ async def reactivate_organization_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def reactivate_organization_without_preload_content( self, @@ -2853,8 +3050,9 @@ async def reactivate_organization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2888,7 +3086,7 @@ async def reactivate_organization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._reactivate_organization_serialize( id=id, @@ -2896,24 +3094,26 @@ async def reactivate_organization_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ReactivateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ReactivateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _reactivate_organization_serialize( self, id, @@ -2923,9 +3123,11 @@ def _reactivate_organization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2938,7 +3140,7 @@ def _reactivate_organization_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -2946,16 +3148,24 @@ def _reactivate_organization_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organizations/{id}/reactivate", + method='POST', + resource_path='/v1/organizations/{id}/reactivate', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2965,23 +3175,25 @@ def _reactivate_organization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def switch_organization( self, id: StrictStr, body: Dict[str, Any], - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3017,7 +3229,7 @@ async def switch_organization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._switch_organization_serialize( id=id, @@ -3026,21 +3238,22 @@ async def switch_organization( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3048,20 +3261,20 @@ async def switch_organization( response_types_map=_response_types_map, ).data + @validate_call async def switch_organization_with_http_info( self, id: StrictStr, body: Dict[str, Any], - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3097,7 +3310,7 @@ async def switch_organization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._switch_organization_serialize( id=id, @@ -3106,21 +3319,22 @@ async def switch_organization_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3128,20 +3342,20 @@ async def switch_organization_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def switch_organization_without_preload_content( self, id: StrictStr, body: Dict[str, Any], - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3177,7 +3391,7 @@ async def switch_organization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._switch_organization_serialize( id=id, @@ -3186,24 +3400,26 @@ async def switch_organization_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _switch_organization_serialize( self, id, @@ -3214,9 +3430,11 @@ def _switch_organization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3229,26 +3447,34 @@ def _switch_organization_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters if seon_fp is not None: - _header_params["seon-fp"] = seon_fp + _header_params['seon-fp'] = seon_fp # process the form parameters # process the body parameter if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organizations/{id}/switch", + method='POST', + resource_path='/v1/organizations/{id}/switch', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3258,22 +3484,24 @@ def _switch_organization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def unscope_organization_token( self, body: Dict[str, Any], - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3308,7 +3536,7 @@ async def unscope_organization_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unscope_organization_token_serialize( body=body, @@ -3316,21 +3544,22 @@ async def unscope_organization_token( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3338,19 +3567,19 @@ async def unscope_organization_token( response_types_map=_response_types_map, ).data + @validate_call async def unscope_organization_token_with_http_info( self, body: Dict[str, Any], - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3385,7 +3614,7 @@ async def unscope_organization_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unscope_organization_token_serialize( body=body, @@ -3393,21 +3622,22 @@ async def unscope_organization_token_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3415,19 +3645,19 @@ async def unscope_organization_token_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def unscope_organization_token_without_preload_content( self, body: Dict[str, Any], - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3462,7 +3692,7 @@ async def unscope_organization_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._unscope_organization_token_serialize( body=body, @@ -3470,24 +3700,26 @@ async def unscope_organization_token_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _unscope_organization_token_serialize( self, body, @@ -3497,9 +3729,11 @@ def _unscope_organization_token_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3514,22 +3748,30 @@ def _unscope_organization_token_serialize( # process the query parameters # process the header parameters if seon_fp is not None: - _header_params["seon-fp"] = seon_fp + _header_params['seon-fp'] = seon_fp # process the form parameters # process the body parameter if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/unscope_organization_token", + method='POST', + resource_path='/v1/unscope_organization_token', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3539,9 +3781,12 @@ def _unscope_organization_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_budget( self, @@ -3551,8 +3796,9 @@ async def update_budget( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3586,7 +3832,7 @@ async def update_budget( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_budget_serialize( organization_id=organization_id, @@ -3594,21 +3840,22 @@ async def update_budget( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateBudgetReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateBudgetReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3616,6 +3863,7 @@ async def update_budget( response_types_map=_response_types_map, ).data + @validate_call async def update_budget_with_http_info( self, @@ -3625,8 +3873,9 @@ async def update_budget_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3660,7 +3909,7 @@ async def update_budget_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_budget_serialize( organization_id=organization_id, @@ -3668,21 +3917,22 @@ async def update_budget_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateBudgetReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateBudgetReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3690,6 +3940,7 @@ async def update_budget_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_budget_without_preload_content( self, @@ -3699,8 +3950,9 @@ async def update_budget_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3734,7 +3986,7 @@ async def update_budget_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_budget_serialize( organization_id=organization_id, @@ -3742,24 +3994,26 @@ async def update_budget_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateBudgetReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateBudgetReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_budget_serialize( self, organization_id, @@ -3769,9 +4023,11 @@ def _update_budget_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3784,7 +4040,7 @@ def _update_budget_serialize( # process the path parameters if organization_id is not None: - _path_params["organization_id"] = organization_id + _path_params['organization_id'] = organization_id # process the query parameters # process the header parameters # process the form parameters @@ -3792,16 +4048,24 @@ def _update_budget_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/organizations/{organization_id}/budget", + method='PUT', + resource_path='/v1/organizations/{organization_id}/budget', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3811,9 +4075,12 @@ def _update_budget_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_organization( self, @@ -3824,8 +4091,9 @@ async def update_organization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3861,7 +4129,7 @@ async def update_organization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_serialize( id=id, @@ -3870,21 +4138,22 @@ async def update_organization( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3892,6 +4161,7 @@ async def update_organization( response_types_map=_response_types_map, ).data + @validate_call async def update_organization_with_http_info( self, @@ -3902,8 +4172,9 @@ async def update_organization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3939,7 +4210,7 @@ async def update_organization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_serialize( id=id, @@ -3948,21 +4219,22 @@ async def update_organization_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3970,6 +4242,7 @@ async def update_organization_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_organization_without_preload_content( self, @@ -3980,8 +4253,9 @@ async def update_organization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4017,7 +4291,7 @@ async def update_organization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_serialize( id=id, @@ -4026,24 +4300,26 @@ async def update_organization_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_organization_serialize( self, id, @@ -4054,9 +4330,11 @@ def _update_organization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4069,27 +4347,36 @@ def _update_organization_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if organization is not None: _body_params = organization + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/organizations/{id}", + method='PUT', + resource_path='/v1/organizations/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4099,9 +4386,12 @@ def _update_organization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_organization2( self, @@ -4112,8 +4402,9 @@ async def update_organization2( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4149,7 +4440,7 @@ async def update_organization2( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization2_serialize( id=id, @@ -4158,21 +4449,22 @@ async def update_organization2( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -4180,6 +4472,7 @@ async def update_organization2( response_types_map=_response_types_map, ).data + @validate_call async def update_organization2_with_http_info( self, @@ -4190,8 +4483,9 @@ async def update_organization2_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4227,7 +4521,7 @@ async def update_organization2_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization2_serialize( id=id, @@ -4236,21 +4530,22 @@ async def update_organization2_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -4258,6 +4553,7 @@ async def update_organization2_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_organization2_without_preload_content( self, @@ -4268,8 +4564,9 @@ async def update_organization2_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4305,7 +4602,7 @@ async def update_organization2_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization2_serialize( id=id, @@ -4314,24 +4611,26 @@ async def update_organization2_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_organization2_serialize( self, id, @@ -4342,9 +4641,11 @@ def _update_organization2_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4357,27 +4658,36 @@ def _update_organization2_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if organization is not None: _body_params = organization + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/organizations/{id}", + method='PATCH', + resource_path='/v1/organizations/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4387,9 +4697,12 @@ def _update_organization2_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_organization_default_project( self, @@ -4399,8 +4712,9 @@ async def update_organization_default_project( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4434,7 +4748,7 @@ async def update_organization_default_project( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_default_project_serialize( id=id, @@ -4442,21 +4756,22 @@ async def update_organization_default_project( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationDefaultProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationDefaultProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -4464,6 +4779,7 @@ async def update_organization_default_project( response_types_map=_response_types_map, ).data + @validate_call async def update_organization_default_project_with_http_info( self, @@ -4473,8 +4789,9 @@ async def update_organization_default_project_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4508,7 +4825,7 @@ async def update_organization_default_project_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_default_project_serialize( id=id, @@ -4516,21 +4833,22 @@ async def update_organization_default_project_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationDefaultProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationDefaultProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -4538,6 +4856,7 @@ async def update_organization_default_project_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_organization_default_project_without_preload_content( self, @@ -4547,8 +4866,9 @@ async def update_organization_default_project_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4582,7 +4902,7 @@ async def update_organization_default_project_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_default_project_serialize( id=id, @@ -4590,24 +4910,26 @@ async def update_organization_default_project_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationDefaultProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationDefaultProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_organization_default_project_serialize( self, id, @@ -4617,9 +4939,11 @@ def _update_organization_default_project_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4632,7 +4956,7 @@ def _update_organization_default_project_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -4640,16 +4964,24 @@ def _update_organization_default_project_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/organizations/{id}/default_project", + method='PUT', + resource_path='/v1/organizations/{id}/default_project', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4659,9 +4991,12 @@ def _update_organization_default_project_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_organization_name( self, @@ -4671,8 +5006,9 @@ async def update_organization_name( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4706,7 +5042,7 @@ async def update_organization_name( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_name_serialize( id=id, @@ -4714,21 +5050,22 @@ async def update_organization_name( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationNameReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationNameReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -4736,6 +5073,7 @@ async def update_organization_name( response_types_map=_response_types_map, ).data + @validate_call async def update_organization_name_with_http_info( self, @@ -4745,8 +5083,9 @@ async def update_organization_name_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4780,7 +5119,7 @@ async def update_organization_name_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_name_serialize( id=id, @@ -4788,21 +5127,22 @@ async def update_organization_name_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationNameReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationNameReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -4810,6 +5150,7 @@ async def update_organization_name_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_organization_name_without_preload_content( self, @@ -4819,8 +5160,9 @@ async def update_organization_name_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4854,7 +5196,7 @@ async def update_organization_name_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_name_serialize( id=id, @@ -4862,24 +5204,26 @@ async def update_organization_name_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationNameReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationNameReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_organization_name_serialize( self, id, @@ -4889,9 +5233,11 @@ def _update_organization_name_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4904,7 +5250,7 @@ def _update_organization_name_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -4912,16 +5258,24 @@ def _update_organization_name_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/organizations/{id}/name", + method='PUT', + resource_path='/v1/organizations/{id}/name', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4931,9 +5285,12 @@ def _update_organization_name_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_organization_plan( self, @@ -4943,8 +5300,9 @@ async def update_organization_plan( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4978,7 +5336,7 @@ async def update_organization_plan( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_plan_serialize( id=id, @@ -4986,21 +5344,22 @@ async def update_organization_plan( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationPlanReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationPlanReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -5008,6 +5367,7 @@ async def update_organization_plan( response_types_map=_response_types_map, ).data + @validate_call async def update_organization_plan_with_http_info( self, @@ -5017,8 +5377,9 @@ async def update_organization_plan_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5052,7 +5413,7 @@ async def update_organization_plan_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_plan_serialize( id=id, @@ -5060,21 +5421,22 @@ async def update_organization_plan_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationPlanReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationPlanReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -5082,6 +5444,7 @@ async def update_organization_plan_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_organization_plan_without_preload_content( self, @@ -5091,8 +5454,9 @@ async def update_organization_plan_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5126,7 +5490,7 @@ async def update_organization_plan_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_organization_plan_serialize( id=id, @@ -5134,24 +5498,26 @@ async def update_organization_plan_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateOrganizationPlanReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateOrganizationPlanReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_organization_plan_serialize( self, id, @@ -5161,9 +5527,11 @@ def _update_organization_plan_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -5176,7 +5544,7 @@ def _update_organization_plan_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -5184,16 +5552,24 @@ def _update_organization_plan_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organizations/{id}/plan", + method='POST', + resource_path='/v1/organizations/{id}/plan', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5203,9 +5579,12 @@ def _update_organization_plan_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def upsert_signup_qualification( self, @@ -5215,8 +5594,9 @@ async def upsert_signup_qualification( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5250,7 +5630,7 @@ async def upsert_signup_qualification( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._upsert_signup_qualification_serialize( id=id, @@ -5258,21 +5638,22 @@ async def upsert_signup_qualification( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpsertSignupQualificationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpsertSignupQualificationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -5280,6 +5661,7 @@ async def upsert_signup_qualification( response_types_map=_response_types_map, ).data + @validate_call async def upsert_signup_qualification_with_http_info( self, @@ -5289,8 +5671,9 @@ async def upsert_signup_qualification_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5324,7 +5707,7 @@ async def upsert_signup_qualification_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._upsert_signup_qualification_serialize( id=id, @@ -5332,21 +5715,22 @@ async def upsert_signup_qualification_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpsertSignupQualificationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpsertSignupQualificationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -5354,6 +5738,7 @@ async def upsert_signup_qualification_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def upsert_signup_qualification_without_preload_content( self, @@ -5363,8 +5748,9 @@ async def upsert_signup_qualification_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5398,7 +5784,7 @@ async def upsert_signup_qualification_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._upsert_signup_qualification_serialize( id=id, @@ -5406,24 +5792,26 @@ async def upsert_signup_qualification_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpsertSignupQualificationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpsertSignupQualificationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _upsert_signup_qualification_serialize( self, id, @@ -5433,9 +5821,11 @@ def _upsert_signup_qualification_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -5448,7 +5838,7 @@ def _upsert_signup_qualification_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -5456,16 +5846,24 @@ def _upsert_signup_qualification_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organizations/{id}/signup_qualification", + method='POST', + resource_path='/v1/organizations/{id}/signup_qualification', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5475,5 +5873,7 @@ def _upsert_signup_qualification_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/organization_confirmations_api.py b/koyeb/api_async/api/organization_confirmations_api.py index 27235eef..6df4b3db 100644 --- a/koyeb/api_async/api/organization_confirmations_api.py +++ b/koyeb/api_async/api/organization_confirmations_api.py @@ -35,6 +35,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def confirm_organization_action( self, @@ -43,8 +44,9 @@ async def confirm_organization_action( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -76,28 +78,29 @@ async def confirm_organization_action( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._confirm_organization_action_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -105,6 +108,7 @@ async def confirm_organization_action( response_types_map=_response_types_map, ).data + @validate_call async def confirm_organization_action_with_http_info( self, @@ -113,8 +117,9 @@ async def confirm_organization_action_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -146,28 +151,29 @@ async def confirm_organization_action_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._confirm_organization_action_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -175,6 +181,7 @@ async def confirm_organization_action_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def confirm_organization_action_without_preload_content( self, @@ -183,8 +190,9 @@ async def confirm_organization_action_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -216,31 +224,33 @@ async def confirm_organization_action_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._confirm_organization_action_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _confirm_organization_action_serialize( self, id, @@ -249,9 +259,11 @@ def _confirm_organization_action_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -264,22 +276,30 @@ def _confirm_organization_action_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organization_confirmations/{id}", + method='POST', + resource_path='/v1/organization_confirmations/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -289,5 +309,7 @@ def _confirm_organization_action_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/organization_invitations_api.py b/koyeb/api_async/api/organization_invitations_api.py index 73da46f8..72ca6dab 100644 --- a/koyeb/api_async/api/organization_invitations_api.py +++ b/koyeb/api_async/api/organization_invitations_api.py @@ -18,21 +18,11 @@ from pydantic import Field, StrictStr, field_validator from typing import Any, Dict, List, Optional from typing_extensions import Annotated -from koyeb.api_async.models.create_organization_invitation_reply import ( - CreateOrganizationInvitationReply, -) -from koyeb.api_async.models.create_organization_invitation_request import ( - CreateOrganizationInvitationRequest, -) -from koyeb.api_async.models.get_organization_invitation_reply import ( - GetOrganizationInvitationReply, -) -from koyeb.api_async.models.list_organization_invitations_reply import ( - ListOrganizationInvitationsReply, -) -from koyeb.api_async.models.resend_organization_invitation_reply import ( - ResendOrganizationInvitationReply, -) +from koyeb.api_async.models.create_organization_invitation_reply import CreateOrganizationInvitationReply +from koyeb.api_async.models.create_organization_invitation_request import CreateOrganizationInvitationRequest +from koyeb.api_async.models.get_organization_invitation_reply import GetOrganizationInvitationReply +from koyeb.api_async.models.list_organization_invitations_reply import ListOrganizationInvitationsReply +from koyeb.api_async.models.resend_organization_invitation_reply import ResendOrganizationInvitationReply from koyeb.api_async.api_client import ApiClient, RequestSerialized from koyeb.api_async.api_response import ApiResponse @@ -51,6 +41,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create_organization_invitation( self, @@ -59,8 +50,9 @@ async def create_organization_invitation( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -92,28 +84,29 @@ async def create_organization_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_organization_invitation_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -121,6 +114,7 @@ async def create_organization_invitation( response_types_map=_response_types_map, ).data + @validate_call async def create_organization_invitation_with_http_info( self, @@ -129,8 +123,9 @@ async def create_organization_invitation_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -162,28 +157,29 @@ async def create_organization_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_organization_invitation_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -191,6 +187,7 @@ async def create_organization_invitation_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def create_organization_invitation_without_preload_content( self, @@ -199,8 +196,9 @@ async def create_organization_invitation_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -232,31 +230,33 @@ async def create_organization_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_organization_invitation_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_organization_invitation_serialize( self, body, @@ -265,9 +265,11 @@ def _create_organization_invitation_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -286,16 +288,24 @@ def _create_organization_invitation_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organization_invitations", + method='POST', + resource_path='/v1/organization_invitations', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -305,22 +315,23 @@ def _create_organization_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_organization_invitation( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to delete"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to delete")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -352,28 +363,29 @@ async def delete_organization_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_organization_invitation_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -381,19 +393,18 @@ async def delete_organization_invitation( response_types_map=_response_types_map, ).data + @validate_call async def delete_organization_invitation_with_http_info( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to delete"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to delete")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -425,28 +436,29 @@ async def delete_organization_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_organization_invitation_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -454,19 +466,18 @@ async def delete_organization_invitation_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def delete_organization_invitation_without_preload_content( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to delete"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to delete")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -498,31 +509,33 @@ async def delete_organization_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_organization_invitation_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_organization_invitation_serialize( self, id, @@ -531,9 +544,11 @@ def _delete_organization_invitation_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -546,22 +561,30 @@ def _delete_organization_invitation_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/organization_invitations/{id}", + method='DELETE', + resource_path='/v1/organization_invitations/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -571,9 +594,12 @@ def _delete_organization_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_organization_invitation( self, @@ -582,8 +608,9 @@ async def get_organization_invitation( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -615,28 +642,29 @@ async def get_organization_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_invitation_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -644,6 +672,7 @@ async def get_organization_invitation( response_types_map=_response_types_map, ).data + @validate_call async def get_organization_invitation_with_http_info( self, @@ -652,8 +681,9 @@ async def get_organization_invitation_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -685,28 +715,29 @@ async def get_organization_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_invitation_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -714,6 +745,7 @@ async def get_organization_invitation_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_organization_invitation_without_preload_content( self, @@ -722,8 +754,9 @@ async def get_organization_invitation_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -755,31 +788,33 @@ async def get_organization_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_invitation_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_organization_invitation_serialize( self, id, @@ -788,9 +823,11 @@ def _get_organization_invitation_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -803,22 +840,30 @@ def _get_organization_invitation_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/organization_invitations/{id}", + method='GET', + resource_path='/v1/organization_invitations/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -828,36 +873,26 @@ def _get_organization_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_organization_invitations( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on organization invitation statuses"), - ] = None, - user_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on invitee ID. Will match both invitations sent to that user_id and invitations sent to the email of that user_id. The only valid value is the requester's user_id" - ), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on organization invitation statuses")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on invitee ID. Will match both invitations sent to that user_id and invitations sent to the email of that user_id. The only valid value is the requester's user_id")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -895,7 +930,7 @@ async def list_organization_invitations( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_organization_invitations_serialize( limit=limit, @@ -905,21 +940,22 @@ async def list_organization_invitations( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListOrganizationInvitationsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListOrganizationInvitationsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -927,33 +963,21 @@ async def list_organization_invitations( response_types_map=_response_types_map, ).data + @validate_call async def list_organization_invitations_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on organization invitation statuses"), - ] = None, - user_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on invitee ID. Will match both invitations sent to that user_id and invitations sent to the email of that user_id. The only valid value is the requester's user_id" - ), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on organization invitation statuses")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on invitee ID. Will match both invitations sent to that user_id and invitations sent to the email of that user_id. The only valid value is the requester's user_id")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -991,7 +1015,7 @@ async def list_organization_invitations_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_organization_invitations_serialize( limit=limit, @@ -1001,21 +1025,22 @@ async def list_organization_invitations_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListOrganizationInvitationsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListOrganizationInvitationsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1023,33 +1048,21 @@ async def list_organization_invitations_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_organization_invitations_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on organization invitation statuses"), - ] = None, - user_id: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on invitee ID. Will match both invitations sent to that user_id and invitations sent to the email of that user_id. The only valid value is the requester's user_id" - ), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on organization invitation statuses")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on invitee ID. Will match both invitations sent to that user_id and invitations sent to the email of that user_id. The only valid value is the requester's user_id")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1087,7 +1100,7 @@ async def list_organization_invitations_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_organization_invitations_serialize( limit=limit, @@ -1097,24 +1110,26 @@ async def list_organization_invitations_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListOrganizationInvitationsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListOrganizationInvitationsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_organization_invitations_serialize( self, limit, @@ -1126,10 +1141,11 @@ def _list_organization_invitations_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "statuses": "multi", + 'statuses': 'multi', } _path_params: Dict[str, str] = {} @@ -1144,31 +1160,43 @@ def _list_organization_invitations_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if statuses is not None: - _query_params.append(("statuses", statuses)) - + + _query_params.append(('statuses', statuses)) + if user_id is not None: - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/organization_invitations", + method='GET', + resource_path='/v1/organization_invitations', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1178,23 +1206,24 @@ def _list_organization_invitations_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def resend_organization_invitation( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to resend"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to resend")], body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1228,7 +1257,7 @@ async def resend_organization_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resend_organization_invitation_serialize( id=id, @@ -1236,21 +1265,22 @@ async def resend_organization_invitation( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResendOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ResendOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1258,20 +1288,19 @@ async def resend_organization_invitation( response_types_map=_response_types_map, ).data + @validate_call async def resend_organization_invitation_with_http_info( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to resend"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to resend")], body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1305,7 +1334,7 @@ async def resend_organization_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resend_organization_invitation_serialize( id=id, @@ -1313,21 +1342,22 @@ async def resend_organization_invitation_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResendOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ResendOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1335,20 +1365,19 @@ async def resend_organization_invitation_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def resend_organization_invitation_without_preload_content( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to resend"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to resend")], body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1382,7 +1411,7 @@ async def resend_organization_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resend_organization_invitation_serialize( id=id, @@ -1390,24 +1419,26 @@ async def resend_organization_invitation_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ResendOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ResendOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _resend_organization_invitation_serialize( self, id, @@ -1417,9 +1448,11 @@ def _resend_organization_invitation_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1432,7 +1465,7 @@ def _resend_organization_invitation_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -1440,16 +1473,24 @@ def _resend_organization_invitation_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/organization_invitations/{id}/resend", + method='POST', + resource_path='/v1/organization_invitations/{id}/resend', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1459,5 +1500,7 @@ def _resend_organization_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/organization_members_api.py b/koyeb/api_async/api/organization_members_api.py index ddb78eb3..908521b3 100644 --- a/koyeb/api_async/api/organization_members_api.py +++ b/koyeb/api_async/api/organization_members_api.py @@ -18,12 +18,8 @@ from pydantic import Field, StrictStr, field_validator from typing import List, Optional from typing_extensions import Annotated -from koyeb.api_async.models.list_organization_members_reply import ( - ListOrganizationMembersReply, -) -from koyeb.api_async.models.remove_organization_member_reply import ( - RemoveOrganizationMemberReply, -) +from koyeb.api_async.models.list_organization_members_reply import ListOrganizationMembersReply +from koyeb.api_async.models.remove_organization_member_reply import RemoveOrganizationMemberReply from koyeb.api_async.api_client import ApiClient, RequestSerialized from koyeb.api_async.api_response import ApiResponse @@ -42,34 +38,22 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def list_organization_members( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - organization_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter for an organization"), - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter for an user") - ] = None, - organization_statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter for organization statuses"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + organization_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an organization")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an user")] = None, + organization_statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter for organization statuses")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -109,7 +93,7 @@ async def list_organization_members( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_organization_members_serialize( limit=limit, @@ -120,21 +104,22 @@ async def list_organization_members( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListOrganizationMembersReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListOrganizationMembersReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -142,34 +127,22 @@ async def list_organization_members( response_types_map=_response_types_map, ).data + @validate_call async def list_organization_members_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - organization_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter for an organization"), - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter for an user") - ] = None, - organization_statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter for organization statuses"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + organization_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an organization")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an user")] = None, + organization_statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter for organization statuses")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -209,7 +182,7 @@ async def list_organization_members_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_organization_members_serialize( limit=limit, @@ -220,21 +193,22 @@ async def list_organization_members_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListOrganizationMembersReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListOrganizationMembersReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -242,34 +216,22 @@ async def list_organization_members_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_organization_members_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - organization_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter for an organization"), - ] = None, - user_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter for an user") - ] = None, - organization_statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter for organization statuses"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + organization_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an organization")] = None, + user_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter for an user")] = None, + organization_statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter for organization statuses")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -309,7 +271,7 @@ async def list_organization_members_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_organization_members_serialize( limit=limit, @@ -320,24 +282,26 @@ async def list_organization_members_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListOrganizationMembersReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListOrganizationMembersReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_organization_members_serialize( self, limit, @@ -350,10 +314,11 @@ def _list_organization_members_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "organization_statuses": "multi", + 'organization_statuses': 'multi', } _path_params: Dict[str, str] = {} @@ -368,34 +333,47 @@ def _list_organization_members_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if organization_id is not None: - _query_params.append(("organization_id", organization_id)) - + + _query_params.append(('organization_id', organization_id)) + if user_id is not None: - _query_params.append(("user_id", user_id)) - + + _query_params.append(('user_id', user_id)) + if organization_statuses is not None: - _query_params.append(("organization_statuses", organization_statuses)) - + + _query_params.append(('organization_statuses', organization_statuses)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/organization_members", + method='GET', + resource_path='/v1/organization_members', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -405,9 +383,12 @@ def _list_organization_members_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def remove_organization_member( self, @@ -416,8 +397,9 @@ async def remove_organization_member( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -449,28 +431,29 @@ async def remove_organization_member( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._remove_organization_member_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RemoveOrganizationMemberReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "RemoveOrganizationMemberReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -478,6 +461,7 @@ async def remove_organization_member( response_types_map=_response_types_map, ).data + @validate_call async def remove_organization_member_with_http_info( self, @@ -486,8 +470,9 @@ async def remove_organization_member_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -519,28 +504,29 @@ async def remove_organization_member_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._remove_organization_member_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RemoveOrganizationMemberReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "RemoveOrganizationMemberReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -548,6 +534,7 @@ async def remove_organization_member_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def remove_organization_member_without_preload_content( self, @@ -556,8 +543,9 @@ async def remove_organization_member_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -589,31 +577,33 @@ async def remove_organization_member_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._remove_organization_member_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RemoveOrganizationMemberReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "RemoveOrganizationMemberReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _remove_organization_member_serialize( self, id, @@ -622,9 +612,11 @@ def _remove_organization_member_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -637,22 +629,30 @@ def _remove_organization_member_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/organization_members/{id}", + method='DELETE', + resource_path='/v1/organization_members/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -662,5 +662,7 @@ def _remove_organization_member_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/organization_quotas_api.py b/koyeb/api_async/api/organization_quotas_api.py index 3de6ec44..ddd2f5ac 100644 --- a/koyeb/api_async/api/organization_quotas_api.py +++ b/koyeb/api_async/api/organization_quotas_api.py @@ -35,6 +35,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def get_quotas( self, @@ -43,8 +44,9 @@ async def get_quotas( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -76,28 +78,29 @@ async def get_quotas( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_quotas_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetQuotasReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetQuotasReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -105,6 +108,7 @@ async def get_quotas( response_types_map=_response_types_map, ).data + @validate_call async def get_quotas_with_http_info( self, @@ -113,8 +117,9 @@ async def get_quotas_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -146,28 +151,29 @@ async def get_quotas_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_quotas_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetQuotasReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetQuotasReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -175,6 +181,7 @@ async def get_quotas_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_quotas_without_preload_content( self, @@ -183,8 +190,9 @@ async def get_quotas_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -216,31 +224,33 @@ async def get_quotas_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_quotas_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetQuotasReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetQuotasReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_quotas_serialize( self, organization_id, @@ -249,9 +259,11 @@ def _get_quotas_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -264,22 +276,30 @@ def _get_quotas_serialize( # process the path parameters if organization_id is not None: - _path_params["organization_id"] = organization_id + _path_params['organization_id'] = organization_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/organizations/{organization_id}/quotas", + method='GET', + resource_path='/v1/organizations/{organization_id}/quotas', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -289,5 +309,7 @@ def _get_quotas_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/payment_methods_api.py b/koyeb/api_async/api/payment_methods_api.py index 066980a1..fc5b7e6a 100644 --- a/koyeb/api_async/api/payment_methods_api.py +++ b/koyeb/api_async/api/payment_methods_api.py @@ -18,12 +18,8 @@ from pydantic import Field, StrictStr, field_validator from typing import Any, Dict, List, Optional from typing_extensions import Annotated -from koyeb.api_async.models.confirm_payment_authorization_reply import ( - ConfirmPaymentAuthorizationReply, -) -from koyeb.api_async.models.create_payment_authorization_reply import ( - CreatePaymentAuthorizationReply, -) +from koyeb.api_async.models.confirm_payment_authorization_reply import ConfirmPaymentAuthorizationReply +from koyeb.api_async.models.create_payment_authorization_reply import CreatePaymentAuthorizationReply from koyeb.api_async.models.get_payment_method_reply import GetPaymentMethodReply from koyeb.api_async.models.list_payment_methods_reply import ListPaymentMethodsReply @@ -44,6 +40,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def confirm_payment_authorization( self, @@ -53,8 +50,9 @@ async def confirm_payment_authorization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -88,7 +86,7 @@ async def confirm_payment_authorization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._confirm_payment_authorization_serialize( id=id, @@ -96,21 +94,22 @@ async def confirm_payment_authorization( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ConfirmPaymentAuthorizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ConfirmPaymentAuthorizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -118,6 +117,7 @@ async def confirm_payment_authorization( response_types_map=_response_types_map, ).data + @validate_call async def confirm_payment_authorization_with_http_info( self, @@ -127,8 +127,9 @@ async def confirm_payment_authorization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -162,7 +163,7 @@ async def confirm_payment_authorization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._confirm_payment_authorization_serialize( id=id, @@ -170,21 +171,22 @@ async def confirm_payment_authorization_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ConfirmPaymentAuthorizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ConfirmPaymentAuthorizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -192,6 +194,7 @@ async def confirm_payment_authorization_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def confirm_payment_authorization_without_preload_content( self, @@ -201,8 +204,9 @@ async def confirm_payment_authorization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -236,7 +240,7 @@ async def confirm_payment_authorization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._confirm_payment_authorization_serialize( id=id, @@ -244,24 +248,26 @@ async def confirm_payment_authorization_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ConfirmPaymentAuthorizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ConfirmPaymentAuthorizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _confirm_payment_authorization_serialize( self, id, @@ -271,9 +277,11 @@ def _confirm_payment_authorization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -286,7 +294,7 @@ def _confirm_payment_authorization_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -294,16 +302,24 @@ def _confirm_payment_authorization_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/payment_methods/{id}/confirm", + method='POST', + resource_path='/v1/payment_methods/{id}/confirm', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -313,9 +329,12 @@ def _confirm_payment_authorization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create_payment_authorization( self, @@ -324,8 +343,9 @@ async def create_payment_authorization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -357,28 +377,29 @@ async def create_payment_authorization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_payment_authorization_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreatePaymentAuthorizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreatePaymentAuthorizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -386,6 +407,7 @@ async def create_payment_authorization( response_types_map=_response_types_map, ).data + @validate_call async def create_payment_authorization_with_http_info( self, @@ -394,8 +416,9 @@ async def create_payment_authorization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -427,28 +450,29 @@ async def create_payment_authorization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_payment_authorization_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreatePaymentAuthorizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreatePaymentAuthorizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -456,6 +480,7 @@ async def create_payment_authorization_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def create_payment_authorization_without_preload_content( self, @@ -464,8 +489,9 @@ async def create_payment_authorization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -497,31 +523,33 @@ async def create_payment_authorization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_payment_authorization_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreatePaymentAuthorizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreatePaymentAuthorizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_payment_authorization_serialize( self, body, @@ -530,9 +558,11 @@ def _create_payment_authorization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -551,16 +581,24 @@ def _create_payment_authorization_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/payment_methods", + method='POST', + resource_path='/v1/payment_methods', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -570,9 +608,12 @@ def _create_payment_authorization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_payment_method( self, @@ -581,8 +622,9 @@ async def delete_payment_method( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -614,28 +656,29 @@ async def delete_payment_method( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_payment_method_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -643,6 +686,7 @@ async def delete_payment_method( response_types_map=_response_types_map, ).data + @validate_call async def delete_payment_method_with_http_info( self, @@ -651,8 +695,9 @@ async def delete_payment_method_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -684,28 +729,29 @@ async def delete_payment_method_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_payment_method_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -713,6 +759,7 @@ async def delete_payment_method_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def delete_payment_method_without_preload_content( self, @@ -721,8 +768,9 @@ async def delete_payment_method_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -754,31 +802,33 @@ async def delete_payment_method_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_payment_method_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_payment_method_serialize( self, id, @@ -787,9 +837,11 @@ def _delete_payment_method_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -802,22 +854,30 @@ def _delete_payment_method_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/payment_methods/{id}", + method='DELETE', + resource_path='/v1/payment_methods/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -827,9 +887,12 @@ def _delete_payment_method_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_payment_method( self, @@ -838,8 +901,9 @@ async def get_payment_method( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -871,28 +935,29 @@ async def get_payment_method( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_payment_method_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetPaymentMethodReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetPaymentMethodReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -900,6 +965,7 @@ async def get_payment_method( response_types_map=_response_types_map, ).data + @validate_call async def get_payment_method_with_http_info( self, @@ -908,8 +974,9 @@ async def get_payment_method_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -941,28 +1008,29 @@ async def get_payment_method_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_payment_method_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetPaymentMethodReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetPaymentMethodReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -970,6 +1038,7 @@ async def get_payment_method_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_payment_method_without_preload_content( self, @@ -978,8 +1047,9 @@ async def get_payment_method_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1011,31 +1081,33 @@ async def get_payment_method_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_payment_method_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetPaymentMethodReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetPaymentMethodReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_payment_method_serialize( self, id, @@ -1044,9 +1116,11 @@ def _get_payment_method_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1059,22 +1133,30 @@ def _get_payment_method_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/payment_methods/{id}", + method='GET', + resource_path='/v1/payment_methods/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1084,30 +1166,25 @@ def _get_payment_method_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_payment_methods( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on payment method statuses"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on payment method statuses")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1143,7 +1220,7 @@ async def list_payment_methods( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_payment_methods_serialize( limit=limit, @@ -1152,21 +1229,22 @@ async def list_payment_methods( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPaymentMethodsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPaymentMethodsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1174,27 +1252,20 @@ async def list_payment_methods( response_types_map=_response_types_map, ).data + @validate_call async def list_payment_methods_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on payment method statuses"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on payment method statuses")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1230,7 +1301,7 @@ async def list_payment_methods_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_payment_methods_serialize( limit=limit, @@ -1239,21 +1310,22 @@ async def list_payment_methods_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPaymentMethodsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPaymentMethodsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1261,27 +1333,20 @@ async def list_payment_methods_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_payment_methods_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on payment method statuses"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on payment method statuses")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1317,7 +1382,7 @@ async def list_payment_methods_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_payment_methods_serialize( limit=limit, @@ -1326,24 +1391,26 @@ async def list_payment_methods_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPaymentMethodsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPaymentMethodsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_payment_methods_serialize( self, limit, @@ -1354,10 +1421,11 @@ def _list_payment_methods_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "statuses": "multi", + 'statuses': 'multi', } _path_params: Dict[str, str] = {} @@ -1372,28 +1440,39 @@ def _list_payment_methods_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if statuses is not None: - _query_params.append(("statuses", statuses)) - + + _query_params.append(('statuses', statuses)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/payment_methods", + method='GET', + resource_path='/v1/payment_methods', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1403,5 +1482,7 @@ def _list_payment_methods_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/persistent_volumes_api.py b/koyeb/api_async/api/persistent_volumes_api.py index 9d124042..22b89c70 100644 --- a/koyeb/api_async/api/persistent_volumes_api.py +++ b/koyeb/api_async/api/persistent_volumes_api.py @@ -18,28 +18,14 @@ from pydantic import Field, StrictStr from typing import List, Optional from typing_extensions import Annotated -from koyeb.api_async.models.create_persistent_volume_reply import ( - CreatePersistentVolumeReply, -) -from koyeb.api_async.models.create_persistent_volume_request import ( - CreatePersistentVolumeRequest, -) -from koyeb.api_async.models.delete_persistent_volume_reply import ( - DeletePersistentVolumeReply, -) +from koyeb.api_async.models.create_persistent_volume_reply import CreatePersistentVolumeReply +from koyeb.api_async.models.create_persistent_volume_request import CreatePersistentVolumeRequest +from koyeb.api_async.models.delete_persistent_volume_reply import DeletePersistentVolumeReply from koyeb.api_async.models.get_persistent_volume_reply import GetPersistentVolumeReply -from koyeb.api_async.models.list_persistent_volume_events_reply import ( - ListPersistentVolumeEventsReply, -) -from koyeb.api_async.models.list_persistent_volumes_reply import ( - ListPersistentVolumesReply, -) -from koyeb.api_async.models.update_persistent_volume_reply import ( - UpdatePersistentVolumeReply, -) -from koyeb.api_async.models.update_persistent_volume_request import ( - UpdatePersistentVolumeRequest, -) +from koyeb.api_async.models.list_persistent_volume_events_reply import ListPersistentVolumeEventsReply +from koyeb.api_async.models.list_persistent_volumes_reply import ListPersistentVolumesReply +from koyeb.api_async.models.update_persistent_volume_reply import UpdatePersistentVolumeReply +from koyeb.api_async.models.update_persistent_volume_request import UpdatePersistentVolumeRequest from koyeb.api_async.api_client import ApiClient, RequestSerialized from koyeb.api_async.api_response import ApiResponse @@ -58,6 +44,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create_persistent_volume( self, @@ -66,8 +53,9 @@ async def create_persistent_volume( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -99,28 +87,29 @@ async def create_persistent_volume( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_persistent_volume_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreatePersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreatePersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -128,6 +117,7 @@ async def create_persistent_volume( response_types_map=_response_types_map, ).data + @validate_call async def create_persistent_volume_with_http_info( self, @@ -136,8 +126,9 @@ async def create_persistent_volume_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -169,28 +160,29 @@ async def create_persistent_volume_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_persistent_volume_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreatePersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreatePersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -198,6 +190,7 @@ async def create_persistent_volume_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def create_persistent_volume_without_preload_content( self, @@ -206,8 +199,9 @@ async def create_persistent_volume_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -239,31 +233,33 @@ async def create_persistent_volume_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_persistent_volume_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreatePersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreatePersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_persistent_volume_serialize( self, body, @@ -272,9 +268,11 @@ def _create_persistent_volume_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -293,16 +291,24 @@ def _create_persistent_volume_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/volumes", + method='POST', + resource_path='/v1/volumes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -312,9 +318,12 @@ def _create_persistent_volume_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_persistent_volume( self, @@ -323,8 +332,9 @@ async def delete_persistent_volume( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -356,28 +366,29 @@ async def delete_persistent_volume( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_persistent_volume_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeletePersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeletePersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -385,6 +396,7 @@ async def delete_persistent_volume( response_types_map=_response_types_map, ).data + @validate_call async def delete_persistent_volume_with_http_info( self, @@ -393,8 +405,9 @@ async def delete_persistent_volume_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -426,28 +439,29 @@ async def delete_persistent_volume_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_persistent_volume_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeletePersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeletePersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -455,6 +469,7 @@ async def delete_persistent_volume_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def delete_persistent_volume_without_preload_content( self, @@ -463,8 +478,9 @@ async def delete_persistent_volume_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -496,31 +512,33 @@ async def delete_persistent_volume_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_persistent_volume_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeletePersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeletePersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_persistent_volume_serialize( self, id, @@ -529,9 +547,11 @@ def _delete_persistent_volume_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -544,22 +564,30 @@ def _delete_persistent_volume_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/volumes/{id}", + method='DELETE', + resource_path='/v1/volumes/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -569,9 +597,12 @@ def _delete_persistent_volume_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_persistent_volume( self, @@ -580,8 +611,9 @@ async def get_persistent_volume( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -613,28 +645,29 @@ async def get_persistent_volume( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_persistent_volume_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetPersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetPersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -642,6 +675,7 @@ async def get_persistent_volume( response_types_map=_response_types_map, ).data + @validate_call async def get_persistent_volume_with_http_info( self, @@ -650,8 +684,9 @@ async def get_persistent_volume_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -683,28 +718,29 @@ async def get_persistent_volume_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_persistent_volume_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetPersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetPersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -712,6 +748,7 @@ async def get_persistent_volume_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_persistent_volume_without_preload_content( self, @@ -720,8 +757,9 @@ async def get_persistent_volume_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -753,31 +791,33 @@ async def get_persistent_volume_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_persistent_volume_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetPersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetPersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_persistent_volume_serialize( self, id, @@ -786,9 +826,11 @@ def _get_persistent_volume_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -801,22 +843,30 @@ def _get_persistent_volume_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/volumes/{id}", + method='GET', + resource_path='/v1/volumes/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -826,40 +876,27 @@ def _get_persistent_volume_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_persistent_volume_events( self, - persistent_volume_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on persistent volume id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on persistent volume event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + persistent_volume_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on persistent volume id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on persistent volume event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -899,7 +936,7 @@ async def list_persistent_volume_events( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_persistent_volume_events_serialize( persistent_volume_id=persistent_volume_id, @@ -910,21 +947,22 @@ async def list_persistent_volume_events( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPersistentVolumeEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPersistentVolumeEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -932,37 +970,22 @@ async def list_persistent_volume_events( response_types_map=_response_types_map, ).data + @validate_call async def list_persistent_volume_events_with_http_info( self, - persistent_volume_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on persistent volume id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on persistent volume event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + persistent_volume_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on persistent volume id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on persistent volume event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1002,7 +1025,7 @@ async def list_persistent_volume_events_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_persistent_volume_events_serialize( persistent_volume_id=persistent_volume_id, @@ -1013,21 +1036,22 @@ async def list_persistent_volume_events_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPersistentVolumeEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPersistentVolumeEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1035,37 +1059,22 @@ async def list_persistent_volume_events_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_persistent_volume_events_without_preload_content( self, - persistent_volume_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on persistent volume id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on persistent volume event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + persistent_volume_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on persistent volume id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on persistent volume event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1105,7 +1114,7 @@ async def list_persistent_volume_events_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_persistent_volume_events_serialize( persistent_volume_id=persistent_volume_id, @@ -1116,24 +1125,26 @@ async def list_persistent_volume_events_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPersistentVolumeEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPersistentVolumeEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_persistent_volume_events_serialize( self, persistent_volume_id, @@ -1146,10 +1157,11 @@ def _list_persistent_volume_events_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "types": "multi", + 'types': 'multi', } _path_params: Dict[str, str] = {} @@ -1164,34 +1176,47 @@ def _list_persistent_volume_events_serialize( # process the path parameters # process the query parameters if persistent_volume_id is not None: - _query_params.append(("persistent_volume_id", persistent_volume_id)) - + + _query_params.append(('persistent_volume_id', persistent_volume_id)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/volume_events", + method='GET', + resource_path='/v1/volume_events', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1201,40 +1226,28 @@ def _list_persistent_volume_events_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_persistent_volumes( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - service_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the service id"), - ] = None, - region: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for the region") - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for the name") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on volume ids"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the service id")] = None, + region: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the region")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the name")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on volume ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1276,7 +1289,7 @@ async def list_persistent_volumes( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_persistent_volumes_serialize( limit=limit, @@ -1288,21 +1301,22 @@ async def list_persistent_volumes( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPersistentVolumesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPersistentVolumesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1310,37 +1324,23 @@ async def list_persistent_volumes( response_types_map=_response_types_map, ).data + @validate_call async def list_persistent_volumes_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - service_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the service id"), - ] = None, - region: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for the region") - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for the name") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on volume ids"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the service id")] = None, + region: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the region")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the name")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on volume ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1382,7 +1382,7 @@ async def list_persistent_volumes_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_persistent_volumes_serialize( limit=limit, @@ -1394,21 +1394,22 @@ async def list_persistent_volumes_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPersistentVolumesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPersistentVolumesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1416,37 +1417,23 @@ async def list_persistent_volumes_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_persistent_volumes_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - service_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) A filter for the service id"), - ] = None, - region: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for the region") - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for the name") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on volume ids"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the service id")] = None, + region: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the region")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the name")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on volume ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1488,7 +1475,7 @@ async def list_persistent_volumes_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_persistent_volumes_serialize( limit=limit, @@ -1500,24 +1487,26 @@ async def list_persistent_volumes_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPersistentVolumesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPersistentVolumesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_persistent_volumes_serialize( self, limit, @@ -1531,10 +1520,11 @@ def _list_persistent_volumes_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "ids": "multi", + 'ids': 'multi', } _path_params: Dict[str, str] = {} @@ -1549,37 +1539,51 @@ def _list_persistent_volumes_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if service_id is not None: - _query_params.append(("service_id", service_id)) - + + _query_params.append(('service_id', service_id)) + if region is not None: - _query_params.append(("region", region)) - + + _query_params.append(('region', region)) + if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if ids is not None: - _query_params.append(("ids", ids)) - + + _query_params.append(('ids', ids)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/volumes", + method='GET', + resource_path='/v1/volumes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1589,9 +1593,12 @@ def _list_persistent_volumes_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_persistent_volume( self, @@ -1601,8 +1608,9 @@ async def update_persistent_volume( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1636,7 +1644,7 @@ async def update_persistent_volume( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_persistent_volume_serialize( id=id, @@ -1644,21 +1652,22 @@ async def update_persistent_volume( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdatePersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdatePersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1666,6 +1675,7 @@ async def update_persistent_volume( response_types_map=_response_types_map, ).data + @validate_call async def update_persistent_volume_with_http_info( self, @@ -1675,8 +1685,9 @@ async def update_persistent_volume_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1710,7 +1721,7 @@ async def update_persistent_volume_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_persistent_volume_serialize( id=id, @@ -1718,21 +1729,22 @@ async def update_persistent_volume_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdatePersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdatePersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1740,6 +1752,7 @@ async def update_persistent_volume_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_persistent_volume_without_preload_content( self, @@ -1749,8 +1762,9 @@ async def update_persistent_volume_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1784,7 +1798,7 @@ async def update_persistent_volume_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_persistent_volume_serialize( id=id, @@ -1792,24 +1806,26 @@ async def update_persistent_volume_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdatePersistentVolumeReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdatePersistentVolumeReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_persistent_volume_serialize( self, id, @@ -1819,9 +1835,11 @@ def _update_persistent_volume_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1834,7 +1852,7 @@ def _update_persistent_volume_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -1842,16 +1860,24 @@ def _update_persistent_volume_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/volumes/{id}", + method='POST', + resource_path='/v1/volumes/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1861,5 +1887,7 @@ def _update_persistent_volume_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/pool_claims_api.py b/koyeb/api_async/api/pool_claims_api.py index 4f806745..3ee26c5b 100644 --- a/koyeb/api_async/api/pool_claims_api.py +++ b/koyeb/api_async/api/pool_claims_api.py @@ -39,6 +39,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def claim( self, @@ -47,8 +48,9 @@ async def claim( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -80,28 +82,29 @@ async def claim( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._claim_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PoolClaimReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "PoolClaimReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -109,6 +112,7 @@ async def claim( response_types_map=_response_types_map, ).data + @validate_call async def claim_with_http_info( self, @@ -117,8 +121,9 @@ async def claim_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -150,28 +155,29 @@ async def claim_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._claim_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PoolClaimReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "PoolClaimReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -179,6 +185,7 @@ async def claim_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def claim_without_preload_content( self, @@ -187,8 +194,9 @@ async def claim_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -220,31 +228,33 @@ async def claim_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._claim_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "PoolClaimReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "PoolClaimReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _claim_serialize( self, body, @@ -253,9 +263,11 @@ def _claim_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -274,16 +286,24 @@ def _claim_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/claim", + method='POST', + resource_path='/v1/claim', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -293,19 +313,24 @@ def _claim_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_claim( self, claim_id: StrictStr, + request_id: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -317,6 +342,8 @@ async def get_claim( :param claim_id: (required) :type claim_id: str + :param request_id: + :type request_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -337,28 +364,30 @@ async def get_claim( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_claim_serialize( claim_id=claim_id, + request_id=request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetPoolClaimReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetPoolClaimReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -366,16 +395,19 @@ async def get_claim( response_types_map=_response_types_map, ).data + @validate_call async def get_claim_with_http_info( self, claim_id: StrictStr, + request_id: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -387,6 +419,8 @@ async def get_claim_with_http_info( :param claim_id: (required) :type claim_id: str + :param request_id: + :type request_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -407,28 +441,30 @@ async def get_claim_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_claim_serialize( claim_id=claim_id, + request_id=request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetPoolClaimReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetPoolClaimReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -436,16 +472,19 @@ async def get_claim_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_claim_without_preload_content( self, claim_id: StrictStr, + request_id: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -457,6 +496,8 @@ async def get_claim_without_preload_content( :param claim_id: (required) :type claim_id: str + :param request_id: + :type request_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -477,42 +518,48 @@ async def get_claim_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_claim_serialize( claim_id=claim_id, + request_id=request_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetPoolClaimReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetPoolClaimReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_claim_serialize( self, claim_id, + request_id, _request_auth, _content_type, _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -525,22 +572,34 @@ def _get_claim_serialize( # process the path parameters if claim_id is not None: - _path_params["claim_id"] = claim_id + _path_params['claim_id'] = claim_id # process the query parameters + if request_id is not None: + + _query_params.append(('request_id', request_id)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/claims/{claim_id}", + method='GET', + resource_path='/v1/claims/{claim_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -550,9 +609,12 @@ def _get_claim_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_claim( self, @@ -564,8 +626,9 @@ async def list_claim( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -603,7 +666,7 @@ async def list_claim( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_claim_serialize( pool_id=pool_id, @@ -613,21 +676,22 @@ async def list_claim( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPoolClaimReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPoolClaimReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -635,6 +699,7 @@ async def list_claim( response_types_map=_response_types_map, ).data + @validate_call async def list_claim_with_http_info( self, @@ -646,8 +711,9 @@ async def list_claim_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -685,7 +751,7 @@ async def list_claim_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_claim_serialize( pool_id=pool_id, @@ -695,21 +761,22 @@ async def list_claim_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPoolClaimReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPoolClaimReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -717,6 +784,7 @@ async def list_claim_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_claim_without_preload_content( self, @@ -728,8 +796,9 @@ async def list_claim_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -767,7 +836,7 @@ async def list_claim_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_claim_serialize( pool_id=pool_id, @@ -777,24 +846,26 @@ async def list_claim_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListPoolClaimReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListPoolClaimReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_claim_serialize( self, pool_id, @@ -806,9 +877,11 @@ def _list_claim_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -821,31 +894,42 @@ def _list_claim_serialize( # process the path parameters if pool_id is not None: - _path_params["pool_id"] = pool_id + _path_params['pool_id'] = pool_id # process the query parameters if status is not None: - _query_params.append(("status", status)) - + + _query_params.append(('status', status)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/service_pools/{pool_id}/claims", + method='GET', + resource_path='/v1/service_pools/{pool_id}/claims', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -855,5 +939,7 @@ def _list_claim_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/profile_api.py b/koyeb/api_async/api/profile_api.py index 98409d9f..27f2b87b 100644 --- a/koyeb/api_async/api/profile_api.py +++ b/koyeb/api_async/api/profile_api.py @@ -18,42 +18,26 @@ from pydantic import Field, StrictStr, field_validator from typing import Any, Dict, List, Optional from typing_extensions import Annotated -from koyeb.api_async.models.accept_organization_invitation_reply import ( - AcceptOrganizationInvitationReply, -) -from koyeb.api_async.models.clear_idenfy_verification_result_request import ( - ClearIdenfyVerificationResultRequest, -) +from koyeb.api_async.models.accept_organization_invitation_reply import AcceptOrganizationInvitationReply +from koyeb.api_async.models.clear_idenfy_verification_result_request import ClearIdenfyVerificationResultRequest from koyeb.api_async.models.create_account_request import CreateAccountRequest -from koyeb.api_async.models.decline_organization_invitation_reply import ( - DeclineOrganizationInvitationReply, -) +from koyeb.api_async.models.decline_organization_invitation_reply import DeclineOrganizationInvitationReply from koyeb.api_async.models.get_idenfy_token_reply import GetIdenfyTokenReply from koyeb.api_async.models.get_o_auth_options_reply import GetOAuthOptionsReply from koyeb.api_async.models.get_organization_reply import GetOrganizationReply -from koyeb.api_async.models.get_user_organization_invitation_reply import ( - GetUserOrganizationInvitationReply, -) +from koyeb.api_async.models.get_user_organization_invitation_reply import GetUserOrganizationInvitationReply from koyeb.api_async.models.get_user_settings_reply import GetUserSettingsReply -from koyeb.api_async.models.list_user_organization_invitations_reply import ( - ListUserOrganizationInvitationsReply, -) -from koyeb.api_async.models.list_user_organizations_reply import ( - ListUserOrganizationsReply, -) +from koyeb.api_async.models.list_user_organization_invitations_reply import ListUserOrganizationInvitationsReply +from koyeb.api_async.models.list_user_organizations_reply import ListUserOrganizationsReply from koyeb.api_async.models.login_method_reply import LoginMethodReply from koyeb.api_async.models.login_reply import LoginReply from koyeb.api_async.models.o_auth_callback_reply import OAuthCallbackReply from koyeb.api_async.models.o_auth_callback_request import OAuthCallbackRequest from koyeb.api_async.models.reset_password_request import ResetPasswordRequest from koyeb.api_async.models.update_password_request import UpdatePasswordRequest -from koyeb.api_async.models.update_user_request_user_update_body import ( - UpdateUserRequestUserUpdateBody, -) +from koyeb.api_async.models.update_user_request_user_update_body import UpdateUserRequestUserUpdateBody from koyeb.api_async.models.update_user_settings_reply import UpdateUserSettingsReply -from koyeb.api_async.models.update_user_settings_request import ( - UpdateUserSettingsRequest, -) +from koyeb.api_async.models.update_user_settings_request import UpdateUserSettingsRequest from koyeb.api_async.models.user_reply import UserReply from koyeb.api_async.api_client import ApiClient, RequestSerialized @@ -73,20 +57,19 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def accept_organization_invitation( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to accept"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to accept")], body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -120,7 +103,7 @@ async def accept_organization_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._accept_organization_invitation_serialize( id=id, @@ -128,21 +111,22 @@ async def accept_organization_invitation( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AcceptOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "AcceptOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -150,20 +134,19 @@ async def accept_organization_invitation( response_types_map=_response_types_map, ).data + @validate_call async def accept_organization_invitation_with_http_info( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to accept"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to accept")], body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -197,7 +180,7 @@ async def accept_organization_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._accept_organization_invitation_serialize( id=id, @@ -205,21 +188,22 @@ async def accept_organization_invitation_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AcceptOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "AcceptOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -227,20 +211,19 @@ async def accept_organization_invitation_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def accept_organization_invitation_without_preload_content( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to accept"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to accept")], body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -274,7 +257,7 @@ async def accept_organization_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._accept_organization_invitation_serialize( id=id, @@ -282,24 +265,26 @@ async def accept_organization_invitation_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AcceptOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "AcceptOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _accept_organization_invitation_serialize( self, id, @@ -309,9 +294,11 @@ def _accept_organization_invitation_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -324,7 +311,7 @@ def _accept_organization_invitation_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -332,16 +319,24 @@ def _accept_organization_invitation_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/organization_invitations/{id}/accept", + method='POST', + resource_path='/v1/account/organization_invitations/{id}/accept', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -351,9 +346,12 @@ def _accept_organization_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def clear_idenfy_verification_result( self, @@ -362,8 +360,9 @@ async def clear_idenfy_verification_result( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -395,28 +394,29 @@ async def clear_idenfy_verification_result( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._clear_idenfy_verification_result_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -424,6 +424,7 @@ async def clear_idenfy_verification_result( response_types_map=_response_types_map, ).data + @validate_call async def clear_idenfy_verification_result_with_http_info( self, @@ -432,8 +433,9 @@ async def clear_idenfy_verification_result_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -465,28 +467,29 @@ async def clear_idenfy_verification_result_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._clear_idenfy_verification_result_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -494,6 +497,7 @@ async def clear_idenfy_verification_result_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def clear_idenfy_verification_result_without_preload_content( self, @@ -502,8 +506,9 @@ async def clear_idenfy_verification_result_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -535,31 +540,33 @@ async def clear_idenfy_verification_result_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._clear_idenfy_verification_result_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _clear_idenfy_verification_result_serialize( self, body, @@ -568,9 +575,11 @@ def _clear_idenfy_verification_result_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -589,16 +598,24 @@ def _clear_idenfy_verification_result_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/idenfy", + method='POST', + resource_path='/v1/account/idenfy', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -608,23 +625,24 @@ def _clear_idenfy_verification_result_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def decline_organization_invitation( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to decline"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to decline")], body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -658,7 +676,7 @@ async def decline_organization_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._decline_organization_invitation_serialize( id=id, @@ -666,21 +684,22 @@ async def decline_organization_invitation( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeclineOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeclineOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -688,20 +707,19 @@ async def decline_organization_invitation( response_types_map=_response_types_map, ).data + @validate_call async def decline_organization_invitation_with_http_info( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to decline"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to decline")], body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -735,7 +753,7 @@ async def decline_organization_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._decline_organization_invitation_serialize( id=id, @@ -743,21 +761,22 @@ async def decline_organization_invitation_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeclineOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeclineOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -765,20 +784,19 @@ async def decline_organization_invitation_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def decline_organization_invitation_without_preload_content( self, - id: Annotated[ - StrictStr, - Field(description="The id of the organization invitation to decline"), - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to decline")], body: Dict[str, Any], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -812,7 +830,7 @@ async def decline_organization_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._decline_organization_invitation_serialize( id=id, @@ -820,24 +838,26 @@ async def decline_organization_invitation_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeclineOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeclineOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _decline_organization_invitation_serialize( self, id, @@ -847,9 +867,11 @@ def _decline_organization_invitation_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -862,7 +884,7 @@ def _decline_organization_invitation_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -870,16 +892,24 @@ def _decline_organization_invitation_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/organization_invitations/{id}/decline", + method='POST', + resource_path='/v1/account/organization_invitations/{id}/decline', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -889,9 +919,12 @@ def _decline_organization_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_current_organization( self, @@ -899,8 +932,9 @@ async def get_current_organization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -930,27 +964,28 @@ async def get_current_organization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_current_organization_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -958,6 +993,7 @@ async def get_current_organization( response_types_map=_response_types_map, ).data + @validate_call async def get_current_organization_with_http_info( self, @@ -965,8 +1001,9 @@ async def get_current_organization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -996,27 +1033,28 @@ async def get_current_organization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_current_organization_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1024,6 +1062,7 @@ async def get_current_organization_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_current_organization_without_preload_content( self, @@ -1031,8 +1070,9 @@ async def get_current_organization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1062,30 +1102,32 @@ async def get_current_organization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_current_organization_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_current_organization_serialize( self, _request_auth, @@ -1093,9 +1135,11 @@ def _get_current_organization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1112,16 +1156,24 @@ def _get_current_organization_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/account/organization", + method='GET', + resource_path='/v1/account/organization', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1131,21 +1183,23 @@ def _get_current_organization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_current_user( self, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1177,28 +1231,29 @@ async def get_current_user( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_current_user_serialize( seon_fp=seon_fp, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1206,18 +1261,18 @@ async def get_current_user( response_types_map=_response_types_map, ).data + @validate_call async def get_current_user_with_http_info( self, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1249,28 +1304,29 @@ async def get_current_user_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_current_user_serialize( seon_fp=seon_fp, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1278,18 +1334,18 @@ async def get_current_user_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_current_user_without_preload_content( self, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1321,31 +1377,33 @@ async def get_current_user_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_current_user_serialize( seon_fp=seon_fp, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_current_user_serialize( self, seon_fp, @@ -1354,9 +1412,11 @@ def _get_current_user_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1371,20 +1431,28 @@ def _get_current_user_serialize( # process the query parameters # process the header parameters if seon_fp is not None: - _header_params["seon-fp"] = seon_fp + _header_params['seon-fp'] = seon_fp # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/account/profile", + method='GET', + resource_path='/v1/account/profile', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1394,9 +1462,12 @@ def _get_current_user_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_idenfy_token( self, @@ -1404,8 +1475,9 @@ async def get_idenfy_token( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1435,27 +1507,28 @@ async def get_idenfy_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_idenfy_token_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetIdenfyTokenReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetIdenfyTokenReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1463,6 +1536,7 @@ async def get_idenfy_token( response_types_map=_response_types_map, ).data + @validate_call async def get_idenfy_token_with_http_info( self, @@ -1470,8 +1544,9 @@ async def get_idenfy_token_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1501,27 +1576,28 @@ async def get_idenfy_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_idenfy_token_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetIdenfyTokenReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetIdenfyTokenReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1529,6 +1605,7 @@ async def get_idenfy_token_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_idenfy_token_without_preload_content( self, @@ -1536,8 +1613,9 @@ async def get_idenfy_token_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1567,30 +1645,32 @@ async def get_idenfy_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_idenfy_token_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetIdenfyTokenReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetIdenfyTokenReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_idenfy_token_serialize( self, _request_auth, @@ -1598,9 +1678,11 @@ def _get_idenfy_token_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1617,16 +1699,24 @@ def _get_idenfy_token_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/account/idenfy", + method='GET', + resource_path='/v1/account/idenfy', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1636,28 +1726,24 @@ def _get_idenfy_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_o_auth_options( self, - action: Annotated[ - Optional[StrictStr], - Field(description="Which authentication flow is being initiated"), - ] = None, - metadata: Annotated[ - Optional[StrictStr], - Field( - description="A small (limited to 400 characters) string of arbitrary metadata which will be encoded in the state" - ), - ] = None, + action: Annotated[Optional[StrictStr], Field(description="Which authentication flow is being initiated")] = None, + metadata: Annotated[Optional[StrictStr], Field(description="A small (limited to 400 characters) string of arbitrary metadata which will be encoded in the state")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1691,7 +1777,7 @@ async def get_o_auth_options( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_o_auth_options_serialize( action=action, @@ -1699,21 +1785,22 @@ async def get_o_auth_options( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOAuthOptionsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOAuthOptionsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1721,25 +1808,19 @@ async def get_o_auth_options( response_types_map=_response_types_map, ).data + @validate_call async def get_o_auth_options_with_http_info( self, - action: Annotated[ - Optional[StrictStr], - Field(description="Which authentication flow is being initiated"), - ] = None, - metadata: Annotated[ - Optional[StrictStr], - Field( - description="A small (limited to 400 characters) string of arbitrary metadata which will be encoded in the state" - ), - ] = None, + action: Annotated[Optional[StrictStr], Field(description="Which authentication flow is being initiated")] = None, + metadata: Annotated[Optional[StrictStr], Field(description="A small (limited to 400 characters) string of arbitrary metadata which will be encoded in the state")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1773,7 +1854,7 @@ async def get_o_auth_options_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_o_auth_options_serialize( action=action, @@ -1781,21 +1862,22 @@ async def get_o_auth_options_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOAuthOptionsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOAuthOptionsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1803,25 +1885,19 @@ async def get_o_auth_options_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_o_auth_options_without_preload_content( self, - action: Annotated[ - Optional[StrictStr], - Field(description="Which authentication flow is being initiated"), - ] = None, - metadata: Annotated[ - Optional[StrictStr], - Field( - description="A small (limited to 400 characters) string of arbitrary metadata which will be encoded in the state" - ), - ] = None, + action: Annotated[Optional[StrictStr], Field(description="Which authentication flow is being initiated")] = None, + metadata: Annotated[Optional[StrictStr], Field(description="A small (limited to 400 characters) string of arbitrary metadata which will be encoded in the state")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1855,7 +1931,7 @@ async def get_o_auth_options_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_o_auth_options_serialize( action=action, @@ -1863,24 +1939,26 @@ async def get_o_auth_options_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOAuthOptionsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOAuthOptionsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_o_auth_options_serialize( self, action, @@ -1890,9 +1968,11 @@ def _get_o_auth_options_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1906,25 +1986,35 @@ def _get_o_auth_options_serialize( # process the path parameters # process the query parameters if action is not None: - _query_params.append(("action", action)) - + + _query_params.append(('action', action)) + if metadata is not None: - _query_params.append(("metadata", metadata)) - + + _query_params.append(('metadata', metadata)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/account/oauth", + method='GET', + resource_path='/v1/account/oauth', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1934,21 +2024,23 @@ def _get_o_auth_options_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_user_organization_invitation( self, - id: Annotated[ - StrictStr, Field(description="The id of the organization invitation to get") - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to get")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1980,28 +2072,29 @@ async def get_user_organization_invitation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_user_organization_invitation_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetUserOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetUserOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2009,18 +2102,18 @@ async def get_user_organization_invitation( response_types_map=_response_types_map, ).data + @validate_call async def get_user_organization_invitation_with_http_info( self, - id: Annotated[ - StrictStr, Field(description="The id of the organization invitation to get") - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to get")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2052,28 +2145,29 @@ async def get_user_organization_invitation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_user_organization_invitation_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetUserOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetUserOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2081,18 +2175,18 @@ async def get_user_organization_invitation_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_user_organization_invitation_without_preload_content( self, - id: Annotated[ - StrictStr, Field(description="The id of the organization invitation to get") - ], + id: Annotated[StrictStr, Field(description="The id of the organization invitation to get")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2124,31 +2218,33 @@ async def get_user_organization_invitation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_user_organization_invitation_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetUserOrganizationInvitationReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetUserOrganizationInvitationReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_user_organization_invitation_serialize( self, id, @@ -2157,9 +2253,11 @@ def _get_user_organization_invitation_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2172,22 +2270,30 @@ def _get_user_organization_invitation_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/account/organization_invitations/{id}", + method='GET', + resource_path='/v1/account/organization_invitations/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2197,9 +2303,12 @@ def _get_user_organization_invitation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_user_settings( self, @@ -2207,8 +2316,9 @@ async def get_user_settings( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2238,27 +2348,28 @@ async def get_user_settings( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_user_settings_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetUserSettingsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetUserSettingsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2266,6 +2377,7 @@ async def get_user_settings( response_types_map=_response_types_map, ).data + @validate_call async def get_user_settings_with_http_info( self, @@ -2273,8 +2385,9 @@ async def get_user_settings_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2304,27 +2417,28 @@ async def get_user_settings_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_user_settings_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetUserSettingsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetUserSettingsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2332,6 +2446,7 @@ async def get_user_settings_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_user_settings_without_preload_content( self, @@ -2339,8 +2454,9 @@ async def get_user_settings_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2370,30 +2486,32 @@ async def get_user_settings_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_user_settings_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetUserSettingsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetUserSettingsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_user_settings_serialize( self, _request_auth, @@ -2401,9 +2519,11 @@ def _get_user_settings_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2420,16 +2540,24 @@ def _get_user_settings_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/account/settings", + method='GET', + resource_path='/v1/account/settings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2439,30 +2567,25 @@ def _get_user_settings_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_user_organization_invitations( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on organization invitation statuses"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on organization invitation statuses")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2498,7 +2621,7 @@ async def list_user_organization_invitations( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_user_organization_invitations_serialize( limit=limit, @@ -2507,21 +2630,22 @@ async def list_user_organization_invitations( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUserOrganizationInvitationsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListUserOrganizationInvitationsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2529,27 +2653,20 @@ async def list_user_organization_invitations( response_types_map=_response_types_map, ).data + @validate_call async def list_user_organization_invitations_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on organization invitation statuses"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on organization invitation statuses")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2585,7 +2702,7 @@ async def list_user_organization_invitations_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_user_organization_invitations_serialize( limit=limit, @@ -2594,21 +2711,22 @@ async def list_user_organization_invitations_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUserOrganizationInvitationsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListUserOrganizationInvitationsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2616,27 +2734,20 @@ async def list_user_organization_invitations_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_user_organization_invitations_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on organization invitation statuses"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on organization invitation statuses")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2672,7 +2783,7 @@ async def list_user_organization_invitations_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_user_organization_invitations_serialize( limit=limit, @@ -2681,24 +2792,26 @@ async def list_user_organization_invitations_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUserOrganizationInvitationsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListUserOrganizationInvitationsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_user_organization_invitations_serialize( self, limit, @@ -2709,10 +2822,11 @@ def _list_user_organization_invitations_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "statuses": "multi", + 'statuses': 'multi', } _path_params: Dict[str, str] = {} @@ -2727,28 +2841,39 @@ def _list_user_organization_invitations_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if statuses is not None: - _query_params.append(("statuses", statuses)) - + + _query_params.append(('statuses', statuses)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/account/organization_invitations", + method='GET', + resource_path='/v1/account/organization_invitations', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2758,43 +2883,27 @@ def _list_user_organization_invitations_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_user_organizations( self, - limit: Annotated[ - Optional[StrictStr], Field(description="(Optional) Define pagination limit") - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Define pagination offset"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, - search: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Fuzzy case-insensitive search based on organization name or organization id" - ), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Only return organizations which status match one in the list" - ), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) Define pagination limit")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) Define pagination offset")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + search: Annotated[Optional[StrictStr], Field(description="(Optional) Fuzzy case-insensitive search based on organization name or organization id")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Only return organizations which status match one in the list")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2835,7 +2944,7 @@ async def list_user_organizations( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_user_organizations_serialize( limit=limit, @@ -2846,21 +2955,22 @@ async def list_user_organizations( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUserOrganizationsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListUserOrganizationsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2868,40 +2978,22 @@ async def list_user_organizations( response_types_map=_response_types_map, ).data + @validate_call async def list_user_organizations_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], Field(description="(Optional) Define pagination limit") - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Define pagination offset"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, - search: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Fuzzy case-insensitive search based on organization name or organization id" - ), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Only return organizations which status match one in the list" - ), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) Define pagination limit")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) Define pagination offset")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + search: Annotated[Optional[StrictStr], Field(description="(Optional) Fuzzy case-insensitive search based on organization name or organization id")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Only return organizations which status match one in the list")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2942,7 +3034,7 @@ async def list_user_organizations_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_user_organizations_serialize( limit=limit, @@ -2953,21 +3045,22 @@ async def list_user_organizations_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUserOrganizationsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListUserOrganizationsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2975,40 +3068,22 @@ async def list_user_organizations_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_user_organizations_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], Field(description="(Optional) Define pagination limit") - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Define pagination offset"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, - search: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Fuzzy case-insensitive search based on organization name or organization id" - ), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Only return organizations which status match one in the list" - ), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) Define pagination limit")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) Define pagination offset")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + search: Annotated[Optional[StrictStr], Field(description="(Optional) Fuzzy case-insensitive search based on organization name or organization id")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Only return organizations which status match one in the list")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3049,7 +3124,7 @@ async def list_user_organizations_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_user_organizations_serialize( limit=limit, @@ -3060,24 +3135,26 @@ async def list_user_organizations_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListUserOrganizationsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListUserOrganizationsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_user_organizations_serialize( self, limit, @@ -3090,10 +3167,11 @@ def _list_user_organizations_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "statuses": "multi", + 'statuses': 'multi', } _path_params: Dict[str, str] = {} @@ -3108,34 +3186,47 @@ def _list_user_organizations_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + if search is not None: - _query_params.append(("search", search)) - + + _query_params.append(('search', search)) + if statuses is not None: - _query_params.append(("statuses", statuses)) - + + _query_params.append(('statuses', statuses)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/account/organizations", + method='GET', + resource_path='/v1/account/organizations', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3145,9 +3236,12 @@ def _list_user_organizations_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def login_method( self, @@ -3156,8 +3250,9 @@ async def login_method( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3189,28 +3284,29 @@ async def login_method( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._login_method_serialize( email=email, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginMethodReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginMethodReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3218,6 +3314,7 @@ async def login_method( response_types_map=_response_types_map, ).data + @validate_call async def login_method_with_http_info( self, @@ -3226,8 +3323,9 @@ async def login_method_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3259,28 +3357,29 @@ async def login_method_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._login_method_serialize( email=email, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginMethodReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginMethodReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3288,6 +3387,7 @@ async def login_method_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def login_method_without_preload_content( self, @@ -3296,8 +3396,9 @@ async def login_method_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3329,31 +3430,33 @@ async def login_method_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._login_method_serialize( email=email, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginMethodReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginMethodReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _login_method_serialize( self, email, @@ -3362,9 +3465,11 @@ def _login_method_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3378,22 +3483,31 @@ def _login_method_serialize( # process the path parameters # process the query parameters if email is not None: - _query_params.append(("email", email)) - + + _query_params.append(('email', email)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/account/login_method", + method='GET', + resource_path='/v1/account/login_method', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3403,22 +3517,24 @@ def _login_method_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def o_auth_callback( self, body: OAuthCallbackRequest, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3452,7 +3568,7 @@ async def o_auth_callback( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._o_auth_callback_serialize( body=body, @@ -3460,21 +3576,22 @@ async def o_auth_callback( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OAuthCallbackReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "OAuthCallbackReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3482,19 +3599,19 @@ async def o_auth_callback( response_types_map=_response_types_map, ).data + @validate_call async def o_auth_callback_with_http_info( self, body: OAuthCallbackRequest, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3528,7 +3645,7 @@ async def o_auth_callback_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._o_auth_callback_serialize( body=body, @@ -3536,21 +3653,22 @@ async def o_auth_callback_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OAuthCallbackReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "OAuthCallbackReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3558,19 +3676,19 @@ async def o_auth_callback_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def o_auth_callback_without_preload_content( self, body: OAuthCallbackRequest, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3604,7 +3722,7 @@ async def o_auth_callback_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._o_auth_callback_serialize( body=body, @@ -3612,24 +3730,26 @@ async def o_auth_callback_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "OAuthCallbackReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "OAuthCallbackReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _o_auth_callback_serialize( self, body, @@ -3639,9 +3759,11 @@ def _o_auth_callback_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3656,22 +3778,30 @@ def _o_auth_callback_serialize( # process the query parameters # process the header parameters if seon_fp is not None: - _header_params["seon-fp"] = seon_fp + _header_params['seon-fp'] = seon_fp # process the form parameters # process the body parameter if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/oauth", + method='POST', + resource_path='/v1/account/oauth', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3681,9 +3811,12 @@ def _o_auth_callback_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def resend_email_validation( self, @@ -3692,8 +3825,9 @@ async def resend_email_validation( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3725,28 +3859,29 @@ async def resend_email_validation( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resend_email_validation_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3754,6 +3889,7 @@ async def resend_email_validation( response_types_map=_response_types_map, ).data + @validate_call async def resend_email_validation_with_http_info( self, @@ -3762,8 +3898,9 @@ async def resend_email_validation_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3795,28 +3932,29 @@ async def resend_email_validation_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resend_email_validation_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3824,6 +3962,7 @@ async def resend_email_validation_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def resend_email_validation_without_preload_content( self, @@ -3832,8 +3971,9 @@ async def resend_email_validation_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3865,31 +4005,33 @@ async def resend_email_validation_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resend_email_validation_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _resend_email_validation_serialize( self, body, @@ -3898,9 +4040,11 @@ def _resend_email_validation_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3919,16 +4063,24 @@ def _resend_email_validation_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/resend_validation", + method='POST', + resource_path='/v1/account/resend_validation', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3938,9 +4090,12 @@ def _resend_email_validation_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def reset_password( self, @@ -3949,8 +4104,9 @@ async def reset_password( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3982,28 +4138,29 @@ async def reset_password( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._reset_password_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -4011,6 +4168,7 @@ async def reset_password( response_types_map=_response_types_map, ).data + @validate_call async def reset_password_with_http_info( self, @@ -4019,8 +4177,9 @@ async def reset_password_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4052,28 +4211,29 @@ async def reset_password_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._reset_password_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -4081,6 +4241,7 @@ async def reset_password_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def reset_password_without_preload_content( self, @@ -4089,8 +4250,9 @@ async def reset_password_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4122,31 +4284,33 @@ async def reset_password_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._reset_password_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _reset_password_serialize( self, body, @@ -4155,9 +4319,11 @@ def _reset_password_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4176,16 +4342,24 @@ def _reset_password_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/reset_password", + method='POST', + resource_path='/v1/account/reset_password', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4195,22 +4369,24 @@ def _reset_password_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def signup( self, body: Annotated[CreateAccountRequest, Field(description="Create new account")], - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4244,7 +4420,7 @@ async def signup( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signup_serialize( body=body, @@ -4252,21 +4428,22 @@ async def signup( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -4274,19 +4451,19 @@ async def signup( response_types_map=_response_types_map, ).data + @validate_call async def signup_with_http_info( self, body: Annotated[CreateAccountRequest, Field(description="Create new account")], - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4320,7 +4497,7 @@ async def signup_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signup_serialize( body=body, @@ -4328,21 +4505,22 @@ async def signup_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -4350,19 +4528,19 @@ async def signup_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def signup_without_preload_content( self, body: Annotated[CreateAccountRequest, Field(description="Create new account")], - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4396,7 +4574,7 @@ async def signup_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._signup_serialize( body=body, @@ -4404,24 +4582,26 @@ async def signup_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _signup_serialize( self, body, @@ -4431,9 +4611,11 @@ def _signup_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4448,22 +4630,30 @@ def _signup_serialize( # process the query parameters # process the header parameters if seon_fp is not None: - _header_params["seon-fp"] = seon_fp + _header_params['seon-fp'] = seon_fp # process the form parameters # process the body parameter if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/signup", + method='POST', + resource_path='/v1/account/signup', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4473,22 +4663,24 @@ def _signup_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_password( self, body: UpdatePasswordRequest, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4522,7 +4714,7 @@ async def update_password( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_password_serialize( body=body, @@ -4530,21 +4722,22 @@ async def update_password( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -4552,19 +4745,19 @@ async def update_password( response_types_map=_response_types_map, ).data + @validate_call async def update_password_with_http_info( self, body: UpdatePasswordRequest, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4598,7 +4791,7 @@ async def update_password_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_password_serialize( body=body, @@ -4606,21 +4799,22 @@ async def update_password_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -4628,19 +4822,19 @@ async def update_password_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_password_without_preload_content( self, body: UpdatePasswordRequest, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4674,7 +4868,7 @@ async def update_password_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_password_serialize( body=body, @@ -4682,24 +4876,26 @@ async def update_password_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_password_serialize( self, body, @@ -4709,9 +4905,11 @@ def _update_password_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4726,22 +4924,30 @@ def _update_password_serialize( # process the query parameters # process the header parameters if seon_fp is not None: - _header_params["seon-fp"] = seon_fp + _header_params['seon-fp'] = seon_fp # process the form parameters # process the body parameter if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/update_password", + method='POST', + resource_path='/v1/account/update_password', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4751,9 +4957,12 @@ def _update_password_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_user( self, @@ -4763,8 +4972,9 @@ async def update_user( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4798,7 +5008,7 @@ async def update_user( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_serialize( user=user, @@ -4806,21 +5016,22 @@ async def update_user( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -4828,6 +5039,7 @@ async def update_user( response_types_map=_response_types_map, ).data + @validate_call async def update_user_with_http_info( self, @@ -4837,8 +5049,9 @@ async def update_user_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4872,7 +5085,7 @@ async def update_user_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_serialize( user=user, @@ -4880,21 +5093,22 @@ async def update_user_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -4902,6 +5116,7 @@ async def update_user_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_user_without_preload_content( self, @@ -4911,8 +5126,9 @@ async def update_user_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4946,7 +5162,7 @@ async def update_user_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_serialize( user=user, @@ -4954,24 +5170,26 @@ async def update_user_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_user_serialize( self, user, @@ -4981,9 +5199,11 @@ def _update_user_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4997,24 +5217,33 @@ def _update_user_serialize( # process the path parameters # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if user is not None: _body_params = user + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/account/profile", + method='PUT', + resource_path='/v1/account/profile', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5024,9 +5253,12 @@ def _update_user_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_user2( self, @@ -5036,8 +5268,9 @@ async def update_user2( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5071,7 +5304,7 @@ async def update_user2( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user2_serialize( user=user, @@ -5079,21 +5312,22 @@ async def update_user2( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -5101,6 +5335,7 @@ async def update_user2( response_types_map=_response_types_map, ).data + @validate_call async def update_user2_with_http_info( self, @@ -5110,8 +5345,9 @@ async def update_user2_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5145,7 +5381,7 @@ async def update_user2_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user2_serialize( user=user, @@ -5153,21 +5389,22 @@ async def update_user2_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -5175,6 +5412,7 @@ async def update_user2_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_user2_without_preload_content( self, @@ -5184,8 +5422,9 @@ async def update_user2_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5219,7 +5458,7 @@ async def update_user2_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user2_serialize( user=user, @@ -5227,24 +5466,26 @@ async def update_user2_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_user2_serialize( self, user, @@ -5254,9 +5495,11 @@ def _update_user2_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -5270,24 +5513,33 @@ def _update_user2_serialize( # process the path parameters # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if user is not None: _body_params = user + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/account/profile", + method='PATCH', + resource_path='/v1/account/profile', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5297,9 +5549,12 @@ def _update_user2_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_user_settings( self, @@ -5308,8 +5563,9 @@ async def update_user_settings( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5341,28 +5597,29 @@ async def update_user_settings( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_settings_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateUserSettingsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateUserSettingsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -5370,6 +5627,7 @@ async def update_user_settings( response_types_map=_response_types_map, ).data + @validate_call async def update_user_settings_with_http_info( self, @@ -5378,8 +5636,9 @@ async def update_user_settings_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5411,28 +5670,29 @@ async def update_user_settings_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_settings_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateUserSettingsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateUserSettingsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -5440,6 +5700,7 @@ async def update_user_settings_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_user_settings_without_preload_content( self, @@ -5448,8 +5709,9 @@ async def update_user_settings_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5481,31 +5743,33 @@ async def update_user_settings_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_settings_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateUserSettingsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateUserSettingsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_user_settings_serialize( self, body, @@ -5514,9 +5778,11 @@ def _update_user_settings_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -5535,16 +5801,24 @@ def _update_user_settings_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/account/settings", + method='PATCH', + resource_path='/v1/account/settings', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5554,9 +5828,12 @@ def _update_user_settings_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_user_v2( self, @@ -5566,8 +5843,9 @@ async def update_user_v2( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5601,7 +5879,7 @@ async def update_user_v2( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_v2_serialize( user=user, @@ -5609,21 +5887,22 @@ async def update_user_v2( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -5631,6 +5910,7 @@ async def update_user_v2( response_types_map=_response_types_map, ).data + @validate_call async def update_user_v2_with_http_info( self, @@ -5640,8 +5920,9 @@ async def update_user_v2_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5675,7 +5956,7 @@ async def update_user_v2_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_v2_serialize( user=user, @@ -5683,21 +5964,22 @@ async def update_user_v2_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -5705,6 +5987,7 @@ async def update_user_v2_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_user_v2_without_preload_content( self, @@ -5714,8 +5997,9 @@ async def update_user_v2_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5749,7 +6033,7 @@ async def update_user_v2_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_v2_serialize( user=user, @@ -5757,24 +6041,26 @@ async def update_user_v2_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_user_v2_serialize( self, user, @@ -5784,9 +6070,11 @@ def _update_user_v2_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -5800,24 +6088,33 @@ def _update_user_v2_serialize( # process the path parameters # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if user is not None: _body_params = user + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v2/account/profile", + method='PUT', + resource_path='/v2/account/profile', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -5827,9 +6124,12 @@ def _update_user_v2_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_user_v22( self, @@ -5839,8 +6139,9 @@ async def update_user_v22( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5874,7 +6175,7 @@ async def update_user_v22( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_v22_serialize( user=user, @@ -5882,21 +6183,22 @@ async def update_user_v22( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -5904,6 +6206,7 @@ async def update_user_v22( response_types_map=_response_types_map, ).data + @validate_call async def update_user_v22_with_http_info( self, @@ -5913,8 +6216,9 @@ async def update_user_v22_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -5948,7 +6252,7 @@ async def update_user_v22_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_v22_serialize( user=user, @@ -5956,21 +6260,22 @@ async def update_user_v22_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -5978,6 +6283,7 @@ async def update_user_v22_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_user_v22_without_preload_content( self, @@ -5987,8 +6293,9 @@ async def update_user_v22_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6022,7 +6329,7 @@ async def update_user_v22_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_user_v22_serialize( user=user, @@ -6030,24 +6337,26 @@ async def update_user_v22_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_user_v22_serialize( self, user, @@ -6057,9 +6366,11 @@ def _update_user_v22_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -6073,24 +6384,33 @@ def _update_user_v22_serialize( # process the path parameters # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if user is not None: _body_params = user + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v2/account/profile", + method='PATCH', + resource_path='/v2/account/profile', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6100,22 +6420,24 @@ def _update_user_v22_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def validate( self, id: StrictStr, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6149,7 +6471,7 @@ async def validate( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._validate_serialize( id=id, @@ -6157,21 +6479,22 @@ async def validate( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -6179,19 +6502,19 @@ async def validate( response_types_map=_response_types_map, ).data + @validate_call async def validate_with_http_info( self, id: StrictStr, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6225,7 +6548,7 @@ async def validate_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._validate_serialize( id=id, @@ -6233,21 +6556,22 @@ async def validate_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -6255,19 +6579,19 @@ async def validate_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def validate_without_preload_content( self, id: StrictStr, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -6301,7 +6625,7 @@ async def validate_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._validate_serialize( id=id, @@ -6309,24 +6633,26 @@ async def validate_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _validate_serialize( self, id, @@ -6336,9 +6662,11 @@ def _validate_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -6351,24 +6679,32 @@ def _validate_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters if seon_fp is not None: - _header_params["seon-fp"] = seon_fp + _header_params['seon-fp'] = seon_fp # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/validate/{id}", + method='POST', + resource_path='/v1/account/validate/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -6378,5 +6714,7 @@ def _validate_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/projects_api.py b/koyeb/api_async/api/projects_api.py index 338dfb49..0bce6658 100644 --- a/koyeb/api_async/api/projects_api.py +++ b/koyeb/api_async/api/projects_api.py @@ -42,6 +42,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create_project( self, @@ -50,8 +51,9 @@ async def create_project( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -83,28 +85,29 @@ async def create_project( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_project_serialize( project=project, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -112,6 +115,7 @@ async def create_project( response_types_map=_response_types_map, ).data + @validate_call async def create_project_with_http_info( self, @@ -120,8 +124,9 @@ async def create_project_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -153,28 +158,29 @@ async def create_project_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_project_serialize( project=project, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -182,6 +188,7 @@ async def create_project_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def create_project_without_preload_content( self, @@ -190,8 +197,9 @@ async def create_project_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -223,31 +231,33 @@ async def create_project_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_project_serialize( project=project, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_project_serialize( self, project, @@ -256,9 +266,11 @@ def _create_project_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -277,16 +289,24 @@ def _create_project_serialize( if project is not None: _body_params = project + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/projects", + method='POST', + resource_path='/v1/projects', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -296,9 +316,12 @@ def _create_project_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_project( self, @@ -307,8 +330,9 @@ async def delete_project( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -340,28 +364,29 @@ async def delete_project( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_project_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -369,6 +394,7 @@ async def delete_project( response_types_map=_response_types_map, ).data + @validate_call async def delete_project_with_http_info( self, @@ -377,8 +403,9 @@ async def delete_project_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -410,28 +437,29 @@ async def delete_project_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_project_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -439,6 +467,7 @@ async def delete_project_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def delete_project_without_preload_content( self, @@ -447,8 +476,9 @@ async def delete_project_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -480,31 +510,33 @@ async def delete_project_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_project_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_project_serialize( self, id, @@ -513,9 +545,11 @@ def _delete_project_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -528,22 +562,30 @@ def _delete_project_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/projects/{id}", + method='DELETE', + resource_path='/v1/projects/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -553,9 +595,12 @@ def _delete_project_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_project( self, @@ -564,8 +609,9 @@ async def get_project( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -597,28 +643,29 @@ async def get_project( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_project_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -626,6 +673,7 @@ async def get_project( response_types_map=_response_types_map, ).data + @validate_call async def get_project_with_http_info( self, @@ -634,8 +682,9 @@ async def get_project_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -667,28 +716,29 @@ async def get_project_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_project_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -696,6 +746,7 @@ async def get_project_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_project_without_preload_content( self, @@ -704,8 +755,9 @@ async def get_project_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -737,31 +789,33 @@ async def get_project_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_project_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_project_serialize( self, id, @@ -770,9 +824,11 @@ def _get_project_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -785,22 +841,30 @@ def _get_project_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/projects/{id}", + method='GET', + resource_path='/v1/projects/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -810,29 +874,25 @@ def _get_project_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_projects( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter by project name") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) Filter by project name")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -868,7 +928,7 @@ async def list_projects( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_projects_serialize( limit=limit, @@ -877,21 +937,22 @@ async def list_projects( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListProjectsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListProjectsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -899,26 +960,20 @@ async def list_projects( response_types_map=_response_types_map, ).data + @validate_call async def list_projects_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter by project name") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) Filter by project name")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -954,7 +1009,7 @@ async def list_projects_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_projects_serialize( limit=limit, @@ -963,21 +1018,22 @@ async def list_projects_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListProjectsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListProjectsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -985,26 +1041,20 @@ async def list_projects_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_projects_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter by project name") - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) Filter by project name")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1040,7 +1090,7 @@ async def list_projects_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_projects_serialize( limit=limit, @@ -1049,24 +1099,26 @@ async def list_projects_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListProjectsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListProjectsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_projects_serialize( self, limit, @@ -1077,9 +1129,11 @@ def _list_projects_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1093,28 +1147,39 @@ def _list_projects_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/projects", + method='GET', + resource_path='/v1/projects', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1124,9 +1189,12 @@ def _list_projects_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_project( self, @@ -1137,8 +1205,9 @@ async def update_project( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1174,7 +1243,7 @@ async def update_project( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_project_serialize( id=id, @@ -1183,21 +1252,22 @@ async def update_project( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1205,6 +1275,7 @@ async def update_project( response_types_map=_response_types_map, ).data + @validate_call async def update_project_with_http_info( self, @@ -1215,8 +1286,9 @@ async def update_project_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1252,7 +1324,7 @@ async def update_project_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_project_serialize( id=id, @@ -1261,21 +1333,22 @@ async def update_project_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1283,6 +1356,7 @@ async def update_project_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_project_without_preload_content( self, @@ -1293,8 +1367,9 @@ async def update_project_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1330,7 +1405,7 @@ async def update_project_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_project_serialize( id=id, @@ -1339,24 +1414,26 @@ async def update_project_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_project_serialize( self, id, @@ -1367,9 +1444,11 @@ def _update_project_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1382,27 +1461,36 @@ def _update_project_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if project is not None: _body_params = project + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/projects/{id}", + method='PUT', + resource_path='/v1/projects/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1412,9 +1500,12 @@ def _update_project_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_project2( self, @@ -1425,8 +1516,9 @@ async def update_project2( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1462,7 +1554,7 @@ async def update_project2( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_project2_serialize( id=id, @@ -1471,21 +1563,22 @@ async def update_project2( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1493,6 +1586,7 @@ async def update_project2( response_types_map=_response_types_map, ).data + @validate_call async def update_project2_with_http_info( self, @@ -1503,8 +1597,9 @@ async def update_project2_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1540,7 +1635,7 @@ async def update_project2_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_project2_serialize( id=id, @@ -1549,21 +1644,22 @@ async def update_project2_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1571,6 +1667,7 @@ async def update_project2_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_project2_without_preload_content( self, @@ -1581,8 +1678,9 @@ async def update_project2_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1618,7 +1716,7 @@ async def update_project2_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_project2_serialize( id=id, @@ -1627,24 +1725,26 @@ async def update_project2_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateProjectReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateProjectReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_project2_serialize( self, id, @@ -1655,9 +1755,11 @@ def _update_project2_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1670,27 +1772,36 @@ def _update_project2_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if project is not None: _body_params = project + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/projects/{id}", + method='PATCH', + resource_path='/v1/projects/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1700,5 +1811,7 @@ def _update_project2_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/provisioning_api.py b/koyeb/api_async/api/provisioning_api.py index 842f1df4..66d5e39a 100644 --- a/koyeb/api_async/api/provisioning_api.py +++ b/koyeb/api_async/api/provisioning_api.py @@ -17,15 +17,9 @@ from pydantic import StrictStr from typing import Any, Dict -from koyeb.api_async.models.create_stage_attempt_request import ( - CreateStageAttemptRequest, -) -from koyeb.api_async.models.declare_stage_progress_request import ( - DeclareStageProgressRequest, -) -from koyeb.api_async.models.declare_step_progress_request import ( - DeclareStepProgressRequest, -) +from koyeb.api_async.models.create_stage_attempt_request import CreateStageAttemptRequest +from koyeb.api_async.models.declare_stage_progress_request import DeclareStageProgressRequest +from koyeb.api_async.models.declare_step_progress_request import DeclareStepProgressRequest from koyeb.api_async.api_client import ApiClient, RequestSerialized from koyeb.api_async.api_response import ApiResponse @@ -44,6 +38,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create_stage_attempt( self, @@ -55,8 +50,9 @@ async def create_stage_attempt( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -94,7 +90,7 @@ async def create_stage_attempt( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_stage_attempt_serialize( deployment_id=deployment_id, @@ -104,21 +100,22 @@ async def create_stage_attempt( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -126,6 +123,7 @@ async def create_stage_attempt( response_types_map=_response_types_map, ).data + @validate_call async def create_stage_attempt_with_http_info( self, @@ -137,8 +135,9 @@ async def create_stage_attempt_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -176,7 +175,7 @@ async def create_stage_attempt_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_stage_attempt_serialize( deployment_id=deployment_id, @@ -186,21 +185,22 @@ async def create_stage_attempt_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -208,6 +208,7 @@ async def create_stage_attempt_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def create_stage_attempt_without_preload_content( self, @@ -219,8 +220,9 @@ async def create_stage_attempt_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -258,7 +260,7 @@ async def create_stage_attempt_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_stage_attempt_serialize( deployment_id=deployment_id, @@ -268,24 +270,26 @@ async def create_stage_attempt_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_stage_attempt_serialize( self, deployment_id, @@ -297,9 +301,11 @@ def _create_stage_attempt_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -312,11 +318,11 @@ def _create_stage_attempt_serialize( # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id if stage is not None: - _path_params["stage"] = stage + _path_params['stage'] = stage if attempt is not None: - _path_params["attempt"] = attempt + _path_params['attempt'] = attempt # process the query parameters # process the header parameters # process the form parameters @@ -324,16 +330,24 @@ def _create_stage_attempt_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/provisioning/{deployment_id}/status/{stage}/{attempt}", + method='POST', + resource_path='/v1/provisioning/{deployment_id}/status/{stage}/{attempt}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -343,9 +357,12 @@ def _create_stage_attempt_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def declare_stage_progress( self, @@ -357,8 +374,9 @@ async def declare_stage_progress( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -396,7 +414,7 @@ async def declare_stage_progress( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._declare_stage_progress_serialize( deployment_id=deployment_id, @@ -406,21 +424,22 @@ async def declare_stage_progress( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -428,6 +447,7 @@ async def declare_stage_progress( response_types_map=_response_types_map, ).data + @validate_call async def declare_stage_progress_with_http_info( self, @@ -439,8 +459,9 @@ async def declare_stage_progress_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -478,7 +499,7 @@ async def declare_stage_progress_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._declare_stage_progress_serialize( deployment_id=deployment_id, @@ -488,21 +509,22 @@ async def declare_stage_progress_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -510,6 +532,7 @@ async def declare_stage_progress_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def declare_stage_progress_without_preload_content( self, @@ -521,8 +544,9 @@ async def declare_stage_progress_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -560,7 +584,7 @@ async def declare_stage_progress_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._declare_stage_progress_serialize( deployment_id=deployment_id, @@ -570,24 +594,26 @@ async def declare_stage_progress_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _declare_stage_progress_serialize( self, deployment_id, @@ -599,9 +625,11 @@ def _declare_stage_progress_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -614,11 +642,11 @@ def _declare_stage_progress_serialize( # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id if stage is not None: - _path_params["stage"] = stage + _path_params['stage'] = stage if attempt is not None: - _path_params["attempt"] = attempt + _path_params['attempt'] = attempt # process the query parameters # process the header parameters # process the form parameters @@ -626,16 +654,24 @@ def _declare_stage_progress_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/provisioning/{deployment_id}/status/{stage}/{attempt}", + method='PATCH', + resource_path='/v1/provisioning/{deployment_id}/status/{stage}/{attempt}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -645,9 +681,12 @@ def _declare_stage_progress_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def declare_step_progress( self, @@ -660,8 +699,9 @@ async def declare_step_progress( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -701,7 +741,7 @@ async def declare_step_progress( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._declare_step_progress_serialize( deployment_id=deployment_id, @@ -712,21 +752,22 @@ async def declare_step_progress( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -734,6 +775,7 @@ async def declare_step_progress( response_types_map=_response_types_map, ).data + @validate_call async def declare_step_progress_with_http_info( self, @@ -746,8 +788,9 @@ async def declare_step_progress_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -787,7 +830,7 @@ async def declare_step_progress_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._declare_step_progress_serialize( deployment_id=deployment_id, @@ -798,21 +841,22 @@ async def declare_step_progress_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -820,6 +864,7 @@ async def declare_step_progress_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def declare_step_progress_without_preload_content( self, @@ -832,8 +877,9 @@ async def declare_step_progress_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -873,7 +919,7 @@ async def declare_step_progress_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._declare_step_progress_serialize( deployment_id=deployment_id, @@ -884,24 +930,26 @@ async def declare_step_progress_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _declare_step_progress_serialize( self, deployment_id, @@ -914,9 +962,11 @@ def _declare_step_progress_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -929,13 +979,13 @@ def _declare_step_progress_serialize( # process the path parameters if deployment_id is not None: - _path_params["deployment_id"] = deployment_id + _path_params['deployment_id'] = deployment_id if stage is not None: - _path_params["stage"] = stage + _path_params['stage'] = stage if attempt is not None: - _path_params["attempt"] = attempt + _path_params['attempt'] = attempt if step is not None: - _path_params["step"] = step + _path_params['step'] = step # process the query parameters # process the header parameters # process the form parameters @@ -943,16 +993,24 @@ def _declare_step_progress_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/provisioning/{deployment_id}/status/{stage}/{attempt}/{step}", + method='PATCH', + resource_path='/v1/provisioning/{deployment_id}/status/{stage}/{attempt}/{step}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -962,5 +1020,7 @@ def _declare_step_progress_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/quotas_api.py b/koyeb/api_async/api/quotas_api.py index 127bc0aa..edf62612 100644 --- a/koyeb/api_async/api/quotas_api.py +++ b/koyeb/api_async/api/quotas_api.py @@ -16,15 +16,9 @@ from typing_extensions import Annotated from pydantic import StrictStr -from koyeb.api_async.models.get_organization_quotas_usage_reply import ( - GetOrganizationQuotasUsageReply, -) -from koyeb.api_async.models.review_organization_capacity_reply import ( - ReviewOrganizationCapacityReply, -) -from koyeb.api_async.models.review_organization_capacity_request import ( - ReviewOrganizationCapacityRequest, -) +from koyeb.api_async.models.get_organization_quotas_usage_reply import GetOrganizationQuotasUsageReply +from koyeb.api_async.models.review_organization_capacity_reply import ReviewOrganizationCapacityReply +from koyeb.api_async.models.review_organization_capacity_request import ReviewOrganizationCapacityRequest from koyeb.api_async.api_client import ApiClient, RequestSerialized from koyeb.api_async.api_response import ApiResponse @@ -43,6 +37,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def get_organization_quotas_usage( self, @@ -51,8 +46,9 @@ async def get_organization_quotas_usage( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,28 +80,29 @@ async def get_organization_quotas_usage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_quotas_usage_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationQuotasUsageReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationQuotasUsageReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -113,6 +110,7 @@ async def get_organization_quotas_usage( response_types_map=_response_types_map, ).data + @validate_call async def get_organization_quotas_usage_with_http_info( self, @@ -121,8 +119,9 @@ async def get_organization_quotas_usage_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -154,28 +153,29 @@ async def get_organization_quotas_usage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_quotas_usage_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationQuotasUsageReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationQuotasUsageReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -183,6 +183,7 @@ async def get_organization_quotas_usage_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_organization_quotas_usage_without_preload_content( self, @@ -191,8 +192,9 @@ async def get_organization_quotas_usage_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -224,31 +226,33 @@ async def get_organization_quotas_usage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_quotas_usage_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationQuotasUsageReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationQuotasUsageReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_organization_quotas_usage_serialize( self, organization_id, @@ -257,9 +261,11 @@ def _get_organization_quotas_usage_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -272,22 +278,30 @@ def _get_organization_quotas_usage_serialize( # process the path parameters if organization_id is not None: - _path_params["organization_id"] = organization_id + _path_params['organization_id'] = organization_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/quotas/organizations/{organization_id}/usage", + method='GET', + resource_path='/v1/quotas/organizations/{organization_id}/usage', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -297,9 +311,12 @@ def _get_organization_quotas_usage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def review_organization_capacity( self, @@ -308,8 +325,9 @@ async def review_organization_capacity( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -341,28 +359,29 @@ async def review_organization_capacity( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._review_organization_capacity_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ReviewOrganizationCapacityReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ReviewOrganizationCapacityReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -370,6 +389,7 @@ async def review_organization_capacity( response_types_map=_response_types_map, ).data + @validate_call async def review_organization_capacity_with_http_info( self, @@ -378,8 +398,9 @@ async def review_organization_capacity_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -411,28 +432,29 @@ async def review_organization_capacity_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._review_organization_capacity_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ReviewOrganizationCapacityReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ReviewOrganizationCapacityReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -440,6 +462,7 @@ async def review_organization_capacity_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def review_organization_capacity_without_preload_content( self, @@ -448,8 +471,9 @@ async def review_organization_capacity_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -481,31 +505,33 @@ async def review_organization_capacity_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._review_organization_capacity_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ReviewOrganizationCapacityReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ReviewOrganizationCapacityReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _review_organization_capacity_serialize( self, body, @@ -514,9 +540,11 @@ def _review_organization_capacity_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -535,16 +563,24 @@ def _review_organization_capacity_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/quotas/capacity", + method='POST', + resource_path='/v1/quotas/capacity', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -554,5 +590,7 @@ def _review_organization_capacity_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/regional_deployments_api.py b/koyeb/api_async/api/regional_deployments_api.py index fc2bda0e..05dca228 100644 --- a/koyeb/api_async/api/regional_deployments_api.py +++ b/koyeb/api_async/api/regional_deployments_api.py @@ -18,15 +18,9 @@ from pydantic import Field, StrictStr from typing import List, Optional from typing_extensions import Annotated -from koyeb.api_async.models.get_regional_deployment_reply import ( - GetRegionalDeploymentReply, -) -from koyeb.api_async.models.list_regional_deployment_events_reply import ( - ListRegionalDeploymentEventsReply, -) -from koyeb.api_async.models.list_regional_deployments_reply import ( - ListRegionalDeploymentsReply, -) +from koyeb.api_async.models.get_regional_deployment_reply import GetRegionalDeploymentReply +from koyeb.api_async.models.list_regional_deployment_events_reply import ListRegionalDeploymentEventsReply +from koyeb.api_async.models.list_regional_deployments_reply import ListRegionalDeploymentsReply from koyeb.api_async.api_client import ApiClient, RequestSerialized from koyeb.api_async.api_response import ApiResponse @@ -45,18 +39,18 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def get_regional_deployment( self, - id: Annotated[ - StrictStr, Field(description="The id of the regional deployment") - ], + id: Annotated[StrictStr, Field(description="The id of the regional deployment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -89,28 +83,29 @@ async def get_regional_deployment( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_regional_deployment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetRegionalDeploymentReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetRegionalDeploymentReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -118,18 +113,18 @@ async def get_regional_deployment( response_types_map=_response_types_map, ).data + @validate_call async def get_regional_deployment_with_http_info( self, - id: Annotated[ - StrictStr, Field(description="The id of the regional deployment") - ], + id: Annotated[StrictStr, Field(description="The id of the regional deployment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -162,28 +157,29 @@ async def get_regional_deployment_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_regional_deployment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetRegionalDeploymentReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetRegionalDeploymentReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -191,18 +187,18 @@ async def get_regional_deployment_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_regional_deployment_without_preload_content( self, - id: Annotated[ - StrictStr, Field(description="The id of the regional deployment") - ], + id: Annotated[StrictStr, Field(description="The id of the regional deployment")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -235,31 +231,33 @@ async def get_regional_deployment_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_regional_deployment_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetRegionalDeploymentReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetRegionalDeploymentReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_regional_deployment_serialize( self, id, @@ -268,9 +266,11 @@ def _get_regional_deployment_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -283,22 +283,30 @@ def _get_regional_deployment_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/regional_deployments/{id}", + method='GET', + resource_path='/v1/regional_deployments/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -308,40 +316,27 @@ def _get_regional_deployment_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_regional_deployment_events( self, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on regional deployment id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on regional deployment event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on regional deployment id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on regional deployment event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -381,7 +376,7 @@ async def list_regional_deployment_events( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_regional_deployment_events_serialize( regional_deployment_id=regional_deployment_id, @@ -392,21 +387,22 @@ async def list_regional_deployment_events( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRegionalDeploymentEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListRegionalDeploymentEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -414,37 +410,22 @@ async def list_regional_deployment_events( response_types_map=_response_types_map, ).data + @validate_call async def list_regional_deployment_events_with_http_info( self, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on regional deployment id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on regional deployment event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on regional deployment id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on regional deployment event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -484,7 +465,7 @@ async def list_regional_deployment_events_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_regional_deployment_events_serialize( regional_deployment_id=regional_deployment_id, @@ -495,21 +476,22 @@ async def list_regional_deployment_events_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRegionalDeploymentEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListRegionalDeploymentEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -517,37 +499,22 @@ async def list_regional_deployment_events_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_regional_deployment_events_without_preload_content( self, - regional_deployment_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on regional deployment id"), - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on regional deployment event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + regional_deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on regional deployment id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on regional deployment event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -587,7 +554,7 @@ async def list_regional_deployment_events_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_regional_deployment_events_serialize( regional_deployment_id=regional_deployment_id, @@ -598,24 +565,26 @@ async def list_regional_deployment_events_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRegionalDeploymentEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListRegionalDeploymentEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_regional_deployment_events_serialize( self, regional_deployment_id, @@ -628,10 +597,11 @@ def _list_regional_deployment_events_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "types": "multi", + 'types': 'multi', } _path_params: Dict[str, str] = {} @@ -646,34 +616,47 @@ def _list_regional_deployment_events_serialize( # process the path parameters # process the query parameters if regional_deployment_id is not None: - _query_params.append(("regional_deployment_id", regional_deployment_id)) - + + _query_params.append(('regional_deployment_id', regional_deployment_id)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/regional_deployment_events", + method='GET', + resource_path='/v1/regional_deployment_events', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -683,33 +666,26 @@ def _list_regional_deployment_events_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_regional_deployments( self, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on deployment id") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on regional deployment ids"), - ] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on deployment id")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on regional deployment ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -748,7 +724,7 @@ async def list_regional_deployments( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_regional_deployments_serialize( deployment_id=deployment_id, @@ -758,21 +734,22 @@ async def list_regional_deployments( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRegionalDeploymentsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListRegionalDeploymentsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -780,30 +757,21 @@ async def list_regional_deployments( response_types_map=_response_types_map, ).data + @validate_call async def list_regional_deployments_with_http_info( self, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on deployment id") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on regional deployment ids"), - ] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on deployment id")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on regional deployment ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -842,7 +810,7 @@ async def list_regional_deployments_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_regional_deployments_serialize( deployment_id=deployment_id, @@ -852,21 +820,22 @@ async def list_regional_deployments_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRegionalDeploymentsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListRegionalDeploymentsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -874,30 +843,21 @@ async def list_regional_deployments_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_regional_deployments_without_preload_content( self, - deployment_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on deployment id") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on regional deployment ids"), - ] = None, + deployment_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on deployment id")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on regional deployment ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -936,7 +896,7 @@ async def list_regional_deployments_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_regional_deployments_serialize( deployment_id=deployment_id, @@ -946,24 +906,26 @@ async def list_regional_deployments_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListRegionalDeploymentsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListRegionalDeploymentsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_regional_deployments_serialize( self, deployment_id, @@ -975,10 +937,11 @@ def _list_regional_deployments_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "ids": "multi", + 'ids': 'multi', } _path_params: Dict[str, str] = {} @@ -993,31 +956,43 @@ def _list_regional_deployments_serialize( # process the path parameters # process the query parameters if deployment_id is not None: - _query_params.append(("deployment_id", deployment_id)) - + + _query_params.append(('deployment_id', deployment_id)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if ids is not None: - _query_params.append(("ids", ids)) - + + _query_params.append(('ids', ids)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/regional_deployments", + method='GET', + resource_path='/v1/regional_deployments', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1027,5 +1002,7 @@ def _list_regional_deployments_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/repositories_api.py b/koyeb/api_async/api/repositories_api.py index f19690af..0e6c78c9 100644 --- a/koyeb/api_async/api/repositories_api.py +++ b/koyeb/api_async/api/repositories_api.py @@ -18,12 +18,8 @@ from pydantic import Field, StrictStr from typing import Any, Dict, Optional from typing_extensions import Annotated -from koyeb.api_async.models.kgitproxy_list_branches_reply import ( - KgitproxyListBranchesReply, -) -from koyeb.api_async.models.kgitproxy_list_repositories_reply import ( - KgitproxyListRepositoriesReply, -) +from koyeb.api_async.models.kgitproxy_list_branches_reply import KgitproxyListBranchesReply +from koyeb.api_async.models.kgitproxy_list_repositories_reply import KgitproxyListRepositoriesReply from koyeb.api_async.api_client import ApiClient, RequestSerialized from koyeb.api_async.api_response import ApiResponse @@ -42,33 +38,21 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def list_branches( self, - repository_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on one repository."), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on branch name using a fuzzy search. Repository filter is required to enable this filter." - ), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return."), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return."), - ] = None, + repository_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on one repository.")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on branch name using a fuzzy search. Repository filter is required to enable this filter.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return.")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -106,7 +90,7 @@ async def list_branches( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_branches_serialize( repository_id=repository_id, @@ -116,21 +100,22 @@ async def list_branches( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KgitproxyListBranchesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KgitproxyListBranchesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -138,33 +123,21 @@ async def list_branches( response_types_map=_response_types_map, ).data + @validate_call async def list_branches_with_http_info( self, - repository_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on one repository."), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on branch name using a fuzzy search. Repository filter is required to enable this filter." - ), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return."), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return."), - ] = None, + repository_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on one repository.")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on branch name using a fuzzy search. Repository filter is required to enable this filter.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return.")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -202,7 +175,7 @@ async def list_branches_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_branches_serialize( repository_id=repository_id, @@ -212,21 +185,22 @@ async def list_branches_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KgitproxyListBranchesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KgitproxyListBranchesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -234,33 +208,21 @@ async def list_branches_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_branches_without_preload_content( self, - repository_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter on one repository."), - ] = None, - name: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on branch name using a fuzzy search. Repository filter is required to enable this filter." - ), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return."), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return."), - ] = None, + repository_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on one repository.")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on branch name using a fuzzy search. Repository filter is required to enable this filter.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return.")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -298,7 +260,7 @@ async def list_branches_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_branches_serialize( repository_id=repository_id, @@ -308,24 +270,26 @@ async def list_branches_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KgitproxyListBranchesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KgitproxyListBranchesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_branches_serialize( self, repository_id, @@ -337,9 +301,11 @@ def _list_branches_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -353,31 +319,43 @@ def _list_branches_serialize( # process the path parameters # process the query parameters if repository_id is not None: - _query_params.append(("repository_id", repository_id)) - + + _query_params.append(('repository_id', repository_id)) + if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/git/branches", + method='GET', + resource_path='/v1/git/branches', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -387,38 +365,26 @@ def _list_branches_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_repositories( self, - name: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on repository name using a fuzzy search." - ), - ] = None, - name_search_op: Annotated[ - Optional[StrictStr], - Field( - description='(Optional) Define search operation for repository name. Accept either "fuzzy" or "equality", use "fuzzy" by default.' - ), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return."), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return."), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on repository name using a fuzzy search.")] = None, + name_search_op: Annotated[Optional[StrictStr], Field(description="(Optional) Define search operation for repository name. Accept either \"fuzzy\" or \"equality\", use \"fuzzy\" by default.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return.")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -456,7 +422,7 @@ async def list_repositories( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_repositories_serialize( name=name, @@ -466,21 +432,22 @@ async def list_repositories( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KgitproxyListRepositoriesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KgitproxyListRepositoriesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -488,35 +455,21 @@ async def list_repositories( response_types_map=_response_types_map, ).data + @validate_call async def list_repositories_with_http_info( self, - name: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on repository name using a fuzzy search." - ), - ] = None, - name_search_op: Annotated[ - Optional[StrictStr], - Field( - description='(Optional) Define search operation for repository name. Accept either "fuzzy" or "equality", use "fuzzy" by default.' - ), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return."), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return."), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on repository name using a fuzzy search.")] = None, + name_search_op: Annotated[Optional[StrictStr], Field(description="(Optional) Define search operation for repository name. Accept either \"fuzzy\" or \"equality\", use \"fuzzy\" by default.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return.")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -554,7 +507,7 @@ async def list_repositories_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_repositories_serialize( name=name, @@ -564,21 +517,22 @@ async def list_repositories_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KgitproxyListRepositoriesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KgitproxyListRepositoriesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -586,35 +540,21 @@ async def list_repositories_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_repositories_without_preload_content( self, - name: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Filter on repository name using a fuzzy search." - ), - ] = None, - name_search_op: Annotated[ - Optional[StrictStr], - Field( - description='(Optional) Define search operation for repository name. Accept either "fuzzy" or "equality", use "fuzzy" by default.' - ), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return."), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return."), - ] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on repository name using a fuzzy search.")] = None, + name_search_op: Annotated[Optional[StrictStr], Field(description="(Optional) Define search operation for repository name. Accept either \"fuzzy\" or \"equality\", use \"fuzzy\" by default.")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return.")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -652,7 +592,7 @@ async def list_repositories_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_repositories_serialize( name=name, @@ -662,24 +602,26 @@ async def list_repositories_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KgitproxyListRepositoriesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KgitproxyListRepositoriesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_repositories_serialize( self, name, @@ -691,9 +633,11 @@ def _list_repositories_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -707,31 +651,43 @@ def _list_repositories_serialize( # process the path parameters # process the query parameters if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if name_search_op is not None: - _query_params.append(("name_search_op", name_search_op)) - + + _query_params.append(('name_search_op', name_search_op)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/git/repositories", + method='GET', + resource_path='/v1/git/repositories', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -741,9 +697,12 @@ def _list_repositories_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def resync_organization( self, @@ -752,8 +711,9 @@ async def resync_organization( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -785,28 +745,29 @@ async def resync_organization( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resync_organization_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -814,6 +775,7 @@ async def resync_organization( response_types_map=_response_types_map, ).data + @validate_call async def resync_organization_with_http_info( self, @@ -822,8 +784,9 @@ async def resync_organization_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -855,28 +818,29 @@ async def resync_organization_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resync_organization_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -884,6 +848,7 @@ async def resync_organization_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def resync_organization_without_preload_content( self, @@ -892,8 +857,9 @@ async def resync_organization_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -925,31 +891,33 @@ async def resync_organization_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resync_organization_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _resync_organization_serialize( self, organization_id, @@ -958,9 +926,11 @@ def _resync_organization_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -973,22 +943,30 @@ def _resync_organization_serialize( # process the path parameters if organization_id is not None: - _path_params["organization_id"] = organization_id + _path_params['organization_id'] = organization_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/git/sync/organization/{organization_id}", + method='POST', + resource_path='/v1/git/sync/organization/{organization_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -998,5 +976,7 @@ def _resync_organization_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/search_api.py b/koyeb/api_async/api/search_api.py index 2cb67c17..a50c3361 100644 --- a/koyeb/api_async/api/search_api.py +++ b/koyeb/api_async/api/search_api.py @@ -37,18 +37,18 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def search( self, - query: Annotated[ - Optional[StrictStr], Field(description="(Optional) Search query") - ] = None, + query: Annotated[Optional[StrictStr], Field(description="(Optional) Search query")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -80,28 +80,29 @@ async def search( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._search_serialize( query=query, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KsearchSearchReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KsearchSearchReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -109,18 +110,18 @@ async def search( response_types_map=_response_types_map, ).data + @validate_call async def search_with_http_info( self, - query: Annotated[ - Optional[StrictStr], Field(description="(Optional) Search query") - ] = None, + query: Annotated[Optional[StrictStr], Field(description="(Optional) Search query")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -152,28 +153,29 @@ async def search_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._search_serialize( query=query, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KsearchSearchReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KsearchSearchReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -181,18 +183,18 @@ async def search_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def search_without_preload_content( self, - query: Annotated[ - Optional[StrictStr], Field(description="(Optional) Search query") - ] = None, + query: Annotated[Optional[StrictStr], Field(description="(Optional) Search query")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -224,31 +226,33 @@ async def search_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._search_serialize( query=query, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KsearchSearchReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KsearchSearchReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _search_serialize( self, query, @@ -257,9 +261,11 @@ def _search_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -273,22 +279,31 @@ def _search_serialize( # process the path parameters # process the query parameters if query is not None: - _query_params.append(("query", query)) - + + _query_params.append(('query', query)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/search", + method='GET', + resource_path='/v1/search', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -298,5 +313,7 @@ def _search_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/secrets_api.py b/koyeb/api_async/api/secrets_api.py index ea67d42e..43eca6fc 100644 --- a/koyeb/api_async/api/secrets_api.py +++ b/koyeb/api_async/api/secrets_api.py @@ -43,6 +43,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create_secret( self, @@ -51,8 +52,9 @@ async def create_secret( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,28 +86,29 @@ async def create_secret( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_serialize( secret=secret, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -113,6 +116,7 @@ async def create_secret( response_types_map=_response_types_map, ).data + @validate_call async def create_secret_with_http_info( self, @@ -121,8 +125,9 @@ async def create_secret_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -154,28 +159,29 @@ async def create_secret_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_serialize( secret=secret, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -183,6 +189,7 @@ async def create_secret_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def create_secret_without_preload_content( self, @@ -191,8 +198,9 @@ async def create_secret_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -224,31 +232,33 @@ async def create_secret_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_secret_serialize( secret=secret, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_secret_serialize( self, secret, @@ -257,9 +267,11 @@ def _create_secret_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -278,16 +290,24 @@ def _create_secret_serialize( if secret is not None: _body_params = secret + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/secrets", + method='POST', + resource_path='/v1/secrets', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -297,9 +317,12 @@ def _create_secret_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_secret( self, @@ -308,8 +331,9 @@ async def delete_secret( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -341,28 +365,29 @@ async def delete_secret( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -370,6 +395,7 @@ async def delete_secret( response_types_map=_response_types_map, ).data + @validate_call async def delete_secret_with_http_info( self, @@ -378,8 +404,9 @@ async def delete_secret_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -411,28 +438,29 @@ async def delete_secret_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -440,6 +468,7 @@ async def delete_secret_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def delete_secret_without_preload_content( self, @@ -448,8 +477,9 @@ async def delete_secret_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -481,31 +511,33 @@ async def delete_secret_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_secret_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_secret_serialize( self, id, @@ -514,9 +546,11 @@ def _delete_secret_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -529,22 +563,30 @@ def _delete_secret_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/secrets/{id}", + method='DELETE', + resource_path='/v1/secrets/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -554,9 +596,12 @@ def _delete_secret_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_secret( self, @@ -565,8 +610,9 @@ async def get_secret( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -598,28 +644,29 @@ async def get_secret( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -627,6 +674,7 @@ async def get_secret( response_types_map=_response_types_map, ).data + @validate_call async def get_secret_with_http_info( self, @@ -635,8 +683,9 @@ async def get_secret_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -668,28 +717,29 @@ async def get_secret_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -697,6 +747,7 @@ async def get_secret_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_secret_without_preload_content( self, @@ -705,8 +756,9 @@ async def get_secret_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -738,31 +790,33 @@ async def get_secret_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_secret_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_secret_serialize( self, id, @@ -771,9 +825,11 @@ def _get_secret_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -786,22 +842,30 @@ def _get_secret_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/secrets/{id}", + method='GET', + resource_path='/v1/secrets/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -811,28 +875,27 @@ def _get_secret_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_secrets( self, name: Optional[StrictStr] = None, limit: Optional[StrictStr] = None, offset: Optional[StrictStr] = None, - types: Annotated[ - Optional[List[StrictStr]], Field(description="Filter by secret types") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on secret ids"), - ] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="Filter by secret types")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on secret ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -872,7 +935,7 @@ async def list_secrets( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secrets_serialize( name=name, @@ -883,21 +946,22 @@ async def list_secrets( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListSecretsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListSecretsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -905,25 +969,22 @@ async def list_secrets( response_types_map=_response_types_map, ).data + @validate_call async def list_secrets_with_http_info( self, name: Optional[StrictStr] = None, limit: Optional[StrictStr] = None, offset: Optional[StrictStr] = None, - types: Annotated[ - Optional[List[StrictStr]], Field(description="Filter by secret types") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on secret ids"), - ] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="Filter by secret types")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on secret ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -963,7 +1024,7 @@ async def list_secrets_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secrets_serialize( name=name, @@ -974,21 +1035,22 @@ async def list_secrets_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListSecretsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListSecretsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -996,25 +1058,22 @@ async def list_secrets_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_secrets_without_preload_content( self, name: Optional[StrictStr] = None, limit: Optional[StrictStr] = None, offset: Optional[StrictStr] = None, - types: Annotated[ - Optional[List[StrictStr]], Field(description="Filter by secret types") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on secret ids"), - ] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="Filter by secret types")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on secret ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1054,7 +1113,7 @@ async def list_secrets_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_secrets_serialize( name=name, @@ -1065,24 +1124,26 @@ async def list_secrets_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListSecretsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListSecretsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_secrets_serialize( self, name, @@ -1095,11 +1156,12 @@ def _list_secrets_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "types": "multi", - "ids": "multi", + 'types': 'multi', + 'ids': 'multi', } _path_params: Dict[str, str] = {} @@ -1114,34 +1176,47 @@ def _list_secrets_serialize( # process the path parameters # process the query parameters if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + if ids is not None: - _query_params.append(("ids", ids)) - + + _query_params.append(('ids', ids)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/secrets", + method='GET', + resource_path='/v1/secrets', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1151,9 +1226,12 @@ def _list_secrets_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def reveal_secret( self, @@ -1163,8 +1241,9 @@ async def reveal_secret( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1198,7 +1277,7 @@ async def reveal_secret( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._reveal_secret_serialize( id=id, @@ -1206,21 +1285,22 @@ async def reveal_secret( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RevealSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "RevealSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1228,6 +1308,7 @@ async def reveal_secret( response_types_map=_response_types_map, ).data + @validate_call async def reveal_secret_with_http_info( self, @@ -1237,8 +1318,9 @@ async def reveal_secret_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1272,7 +1354,7 @@ async def reveal_secret_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._reveal_secret_serialize( id=id, @@ -1280,21 +1362,22 @@ async def reveal_secret_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RevealSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "RevealSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1302,6 +1385,7 @@ async def reveal_secret_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def reveal_secret_without_preload_content( self, @@ -1311,8 +1395,9 @@ async def reveal_secret_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1346,7 +1431,7 @@ async def reveal_secret_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._reveal_secret_serialize( id=id, @@ -1354,24 +1439,26 @@ async def reveal_secret_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RevealSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "RevealSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _reveal_secret_serialize( self, id, @@ -1381,9 +1468,11 @@ def _reveal_secret_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1396,7 +1485,7 @@ def _reveal_secret_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -1404,16 +1493,24 @@ def _reveal_secret_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/secrets/{id}/reveal", + method='POST', + resource_path='/v1/secrets/{id}/reveal', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1423,9 +1520,12 @@ def _reveal_secret_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_secret( self, @@ -1436,8 +1536,9 @@ async def update_secret( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1473,7 +1574,7 @@ async def update_secret( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_serialize( id=id, @@ -1482,21 +1583,22 @@ async def update_secret( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1504,6 +1606,7 @@ async def update_secret( response_types_map=_response_types_map, ).data + @validate_call async def update_secret_with_http_info( self, @@ -1514,8 +1617,9 @@ async def update_secret_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1551,7 +1655,7 @@ async def update_secret_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_serialize( id=id, @@ -1560,21 +1664,22 @@ async def update_secret_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1582,6 +1687,7 @@ async def update_secret_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_secret_without_preload_content( self, @@ -1592,8 +1698,9 @@ async def update_secret_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1629,7 +1736,7 @@ async def update_secret_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret_serialize( id=id, @@ -1638,24 +1745,26 @@ async def update_secret_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_secret_serialize( self, id, @@ -1666,9 +1775,11 @@ def _update_secret_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1681,27 +1792,36 @@ def _update_secret_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if secret is not None: _body_params = secret + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/secrets/{id}", + method='PUT', + resource_path='/v1/secrets/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1711,9 +1831,12 @@ def _update_secret_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_secret2( self, @@ -1724,8 +1847,9 @@ async def update_secret2( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1761,7 +1885,7 @@ async def update_secret2( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret2_serialize( id=id, @@ -1770,21 +1894,22 @@ async def update_secret2( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1792,6 +1917,7 @@ async def update_secret2( response_types_map=_response_types_map, ).data + @validate_call async def update_secret2_with_http_info( self, @@ -1802,8 +1928,9 @@ async def update_secret2_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1839,7 +1966,7 @@ async def update_secret2_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret2_serialize( id=id, @@ -1848,21 +1975,22 @@ async def update_secret2_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1870,6 +1998,7 @@ async def update_secret2_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_secret2_without_preload_content( self, @@ -1880,8 +2009,9 @@ async def update_secret2_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1917,7 +2047,7 @@ async def update_secret2_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_secret2_serialize( id=id, @@ -1926,24 +2056,26 @@ async def update_secret2_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateSecretReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateSecretReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_secret2_serialize( self, id, @@ -1954,9 +2086,11 @@ def _update_secret2_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1969,27 +2103,36 @@ def _update_secret2_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if secret is not None: _body_params = secret + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/secrets/{id}", + method='PATCH', + resource_path='/v1/secrets/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1999,5 +2142,7 @@ def _update_secret2_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/service_pools_api.py b/koyeb/api_async/api/service_pools_api.py index abec566c..2daf7076 100644 --- a/koyeb/api_async/api/service_pools_api.py +++ b/koyeb/api_async/api/service_pools_api.py @@ -16,7 +16,7 @@ from typing_extensions import Annotated from pydantic import StrictStr -from typing import Optional +from typing import Any, Dict, Optional from koyeb.api_async.models.create_service_pool import CreateServicePool from koyeb.api_async.models.create_service_pool_reply import CreateServicePoolReply from koyeb.api_async.models.get_service_pool_reply import GetServicePoolReply @@ -41,6 +41,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create_service_pool( self, @@ -49,8 +50,9 @@ async def create_service_pool( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -82,28 +84,29 @@ async def create_service_pool( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_pool_serialize( service_pool=service_pool, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateServicePoolReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateServicePoolReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -111,6 +114,7 @@ async def create_service_pool( response_types_map=_response_types_map, ).data + @validate_call async def create_service_pool_with_http_info( self, @@ -119,8 +123,9 @@ async def create_service_pool_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -152,28 +157,29 @@ async def create_service_pool_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_pool_serialize( service_pool=service_pool, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateServicePoolReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateServicePoolReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -181,6 +187,7 @@ async def create_service_pool_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def create_service_pool_without_preload_content( self, @@ -189,8 +196,9 @@ async def create_service_pool_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -222,31 +230,33 @@ async def create_service_pool_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_pool_serialize( service_pool=service_pool, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateServicePoolReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateServicePoolReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_service_pool_serialize( self, service_pool, @@ -255,9 +265,11 @@ def _create_service_pool_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -276,16 +288,24 @@ def _create_service_pool_serialize( if service_pool is not None: _body_params = service_pool + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/service_pools", + method='POST', + resource_path='/v1/service_pools', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -295,8 +315,290 @@ def _create_service_pool_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def delete_service_pool( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Delete a ServicePool + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_service_pool_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def delete_service_pool_with_http_info( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Delete a ServicePool + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_service_pool_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def delete_service_pool_without_preload_content( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete a ServicePool + + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._delete_service_pool_serialize( + id=id, _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout ) + return response_data.response + + + def _delete_service_pool_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _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, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'Bearer' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/service_pools/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + @validate_call async def get_service_pool( @@ -306,8 +608,9 @@ async def get_service_pool( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -339,28 +642,29 @@ async def get_service_pool( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_pool_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServicePoolReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetServicePoolReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -368,6 +672,7 @@ async def get_service_pool( response_types_map=_response_types_map, ).data + @validate_call async def get_service_pool_with_http_info( self, @@ -376,8 +681,9 @@ async def get_service_pool_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -409,28 +715,29 @@ async def get_service_pool_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_pool_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServicePoolReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetServicePoolReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -438,6 +745,7 @@ async def get_service_pool_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_service_pool_without_preload_content( self, @@ -446,8 +754,9 @@ async def get_service_pool_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -479,31 +788,33 @@ async def get_service_pool_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_pool_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServicePoolReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetServicePoolReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_service_pool_serialize( self, id, @@ -512,9 +823,11 @@ def _get_service_pool_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -527,22 +840,30 @@ def _get_service_pool_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/service_pools/{id}", + method='GET', + resource_path='/v1/service_pools/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -552,9 +873,12 @@ def _get_service_pool_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_service_pools( self, @@ -565,8 +889,9 @@ async def list_service_pools( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -602,7 +927,7 @@ async def list_service_pools( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_service_pools_serialize( name=name, @@ -611,21 +936,22 @@ async def list_service_pools( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListServicePoolsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListServicePoolsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -633,6 +959,7 @@ async def list_service_pools( response_types_map=_response_types_map, ).data + @validate_call async def list_service_pools_with_http_info( self, @@ -643,8 +970,9 @@ async def list_service_pools_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -680,7 +1008,7 @@ async def list_service_pools_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_service_pools_serialize( name=name, @@ -689,21 +1017,22 @@ async def list_service_pools_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListServicePoolsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListServicePoolsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -711,6 +1040,7 @@ async def list_service_pools_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_service_pools_without_preload_content( self, @@ -721,8 +1051,9 @@ async def list_service_pools_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -758,7 +1089,7 @@ async def list_service_pools_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_service_pools_serialize( name=name, @@ -767,24 +1098,26 @@ async def list_service_pools_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListServicePoolsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListServicePoolsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_service_pools_serialize( self, name, @@ -795,9 +1128,11 @@ def _list_service_pools_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -811,28 +1146,39 @@ def _list_service_pools_serialize( # process the path parameters # process the query parameters if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/service_pools", + method='GET', + resource_path='/v1/service_pools', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -842,9 +1188,12 @@ def _list_service_pools_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_service_pool( self, @@ -855,8 +1204,9 @@ async def update_service_pool( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -892,7 +1242,7 @@ async def update_service_pool( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service_pool_serialize( id=id, @@ -901,21 +1251,22 @@ async def update_service_pool( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateServicePoolReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateServicePoolReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -923,6 +1274,7 @@ async def update_service_pool( response_types_map=_response_types_map, ).data + @validate_call async def update_service_pool_with_http_info( self, @@ -933,8 +1285,9 @@ async def update_service_pool_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -970,7 +1323,7 @@ async def update_service_pool_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service_pool_serialize( id=id, @@ -979,21 +1332,22 @@ async def update_service_pool_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateServicePoolReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateServicePoolReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1001,6 +1355,7 @@ async def update_service_pool_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_service_pool_without_preload_content( self, @@ -1011,8 +1366,9 @@ async def update_service_pool_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1048,7 +1404,7 @@ async def update_service_pool_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service_pool_serialize( id=id, @@ -1057,24 +1413,26 @@ async def update_service_pool_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateServicePoolReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateServicePoolReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_service_pool_serialize( self, id, @@ -1085,9 +1443,11 @@ def _update_service_pool_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1100,27 +1460,36 @@ def _update_service_pool_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + # process the header parameters # process the form parameters # process the body parameter if service_pool is not None: _body_params = service_pool + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/service_pools/{id}", + method='PUT', + resource_path='/v1/service_pools/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1130,5 +1499,7 @@ def _update_service_pool_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/services_api.py b/koyeb/api_async/api/services_api.py index 6aa86f93..307bb2da 100644 --- a/koyeb/api_async/api/services_api.py +++ b/koyeb/api_async/api/services_api.py @@ -30,9 +30,7 @@ from koyeb.api_async.models.redeploy_request_info import RedeployRequestInfo from koyeb.api_async.models.update_service import UpdateService from koyeb.api_async.models.update_service_reply import UpdateServiceReply -from koyeb.api_async.models.update_service_scaling_request import ( - UpdateServiceScalingRequest, -) +from koyeb.api_async.models.update_service_scaling_request import UpdateServiceScalingRequest from koyeb.api_async.api_client import ApiClient, RequestSerialized from koyeb.api_async.api_response import ApiResponse @@ -51,6 +49,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def autocomplete( self, @@ -59,8 +58,9 @@ async def autocomplete( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -93,28 +93,29 @@ async def autocomplete( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._autocomplete_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AutocompleteReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "AutocompleteReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -122,6 +123,7 @@ async def autocomplete( response_types_map=_response_types_map, ).data + @validate_call async def autocomplete_with_http_info( self, @@ -130,8 +132,9 @@ async def autocomplete_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -164,28 +167,29 @@ async def autocomplete_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._autocomplete_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AutocompleteReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "AutocompleteReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -193,6 +197,7 @@ async def autocomplete_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def autocomplete_without_preload_content( self, @@ -201,8 +206,9 @@ async def autocomplete_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -235,31 +241,33 @@ async def autocomplete_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._autocomplete_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "AutocompleteReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "AutocompleteReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _autocomplete_serialize( self, body, @@ -268,9 +276,11 @@ def _autocomplete_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -289,16 +299,24 @@ def _autocomplete_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/services-autocomplete", + method='POST', + resource_path='/v1/services-autocomplete', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -308,22 +326,24 @@ def _autocomplete_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def create_service( self, service: CreateService, - dry_run: Annotated[ - Optional[StrictBool], Field(description="If set only run validation") - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set only run validation")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -357,7 +377,7 @@ async def create_service( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_serialize( service=service, @@ -365,21 +385,22 @@ async def create_service( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -387,19 +408,19 @@ async def create_service( response_types_map=_response_types_map, ).data + @validate_call async def create_service_with_http_info( self, service: CreateService, - dry_run: Annotated[ - Optional[StrictBool], Field(description="If set only run validation") - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set only run validation")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -433,7 +454,7 @@ async def create_service_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_serialize( service=service, @@ -441,21 +462,22 @@ async def create_service_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -463,19 +485,19 @@ async def create_service_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def create_service_without_preload_content( self, service: CreateService, - dry_run: Annotated[ - Optional[StrictBool], Field(description="If set only run validation") - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set only run validation")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -509,7 +531,7 @@ async def create_service_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_service_serialize( service=service, @@ -517,24 +539,26 @@ async def create_service_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_service_serialize( self, service, @@ -544,9 +568,11 @@ def _create_service_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -560,24 +586,33 @@ def _create_service_serialize( # process the path parameters # process the query parameters if dry_run is not None: - _query_params.append(("dry_run", dry_run)) - + + _query_params.append(('dry_run', dry_run)) + # process the header parameters # process the form parameters # process the body parameter if service is not None: _body_params = service + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/services", + method='POST', + resource_path='/v1/services', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -587,9 +622,12 @@ def _create_service_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_service( self, @@ -598,8 +636,9 @@ async def delete_service( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -632,28 +671,29 @@ async def delete_service( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -661,6 +701,7 @@ async def delete_service( response_types_map=_response_types_map, ).data + @validate_call async def delete_service_with_http_info( self, @@ -669,8 +710,9 @@ async def delete_service_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -703,28 +745,29 @@ async def delete_service_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -732,6 +775,7 @@ async def delete_service_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def delete_service_without_preload_content( self, @@ -740,8 +784,9 @@ async def delete_service_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -774,31 +819,33 @@ async def delete_service_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_service_serialize( self, id, @@ -807,9 +854,11 @@ def _delete_service_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -822,22 +871,30 @@ def _delete_service_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/services/{id}", + method='DELETE', + resource_path='/v1/services/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -847,9 +904,12 @@ def _delete_service_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_service_scaling( self, @@ -858,8 +918,9 @@ async def delete_service_scaling( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -892,28 +953,29 @@ async def delete_service_scaling( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_scaling_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -921,6 +983,7 @@ async def delete_service_scaling( response_types_map=_response_types_map, ).data + @validate_call async def delete_service_scaling_with_http_info( self, @@ -929,8 +992,9 @@ async def delete_service_scaling_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -963,28 +1027,29 @@ async def delete_service_scaling_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_scaling_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -992,6 +1057,7 @@ async def delete_service_scaling_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def delete_service_scaling_without_preload_content( self, @@ -1000,8 +1066,9 @@ async def delete_service_scaling_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1034,31 +1101,33 @@ async def delete_service_scaling_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_service_scaling_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_service_scaling_serialize( self, id, @@ -1067,9 +1136,11 @@ def _delete_service_scaling_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1082,22 +1153,30 @@ def _delete_service_scaling_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/services/{id}/scale", + method='DELETE', + resource_path='/v1/services/{id}/scale', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1107,9 +1186,12 @@ def _delete_service_scaling_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_service( self, @@ -1118,8 +1200,9 @@ async def get_service( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1151,28 +1234,29 @@ async def get_service( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1180,6 +1264,7 @@ async def get_service( response_types_map=_response_types_map, ).data + @validate_call async def get_service_with_http_info( self, @@ -1188,8 +1273,9 @@ async def get_service_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1221,28 +1307,29 @@ async def get_service_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1250,6 +1337,7 @@ async def get_service_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_service_without_preload_content( self, @@ -1258,8 +1346,9 @@ async def get_service_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1291,31 +1380,33 @@ async def get_service_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_service_serialize( self, id, @@ -1324,9 +1415,11 @@ def _get_service_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1339,22 +1432,30 @@ def _get_service_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/services/{id}", + method='GET', + resource_path='/v1/services/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1364,9 +1465,12 @@ def _get_service_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_service_scaling( self, @@ -1375,8 +1479,9 @@ async def get_service_scaling( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1409,28 +1514,29 @@ async def get_service_scaling( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_scaling_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServiceScalingReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetServiceScalingReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1438,6 +1544,7 @@ async def get_service_scaling( response_types_map=_response_types_map, ).data + @validate_call async def get_service_scaling_with_http_info( self, @@ -1446,8 +1553,9 @@ async def get_service_scaling_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1480,28 +1588,29 @@ async def get_service_scaling_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_scaling_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServiceScalingReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetServiceScalingReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1509,6 +1618,7 @@ async def get_service_scaling_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_service_scaling_without_preload_content( self, @@ -1517,8 +1627,9 @@ async def get_service_scaling_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1551,31 +1662,33 @@ async def get_service_scaling_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_service_scaling_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetServiceScalingReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetServiceScalingReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_service_scaling_serialize( self, id, @@ -1584,9 +1697,11 @@ def _get_service_scaling_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1599,22 +1714,30 @@ def _get_service_scaling_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/services/{id}/scale", + method='GET', + resource_path='/v1/services/{id}/scale', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1624,39 +1747,27 @@ def _get_service_scaling_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_service_events( self, - service_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on service id") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on service id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1696,7 +1807,7 @@ async def list_service_events( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_service_events_serialize( service_id=service_id, @@ -1707,21 +1818,22 @@ async def list_service_events( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListServiceEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListServiceEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1729,36 +1841,22 @@ async def list_service_events( response_types_map=_response_types_map, ).data + @validate_call async def list_service_events_with_http_info( self, - service_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on service id") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on service id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1798,7 +1896,7 @@ async def list_service_events_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_service_events_serialize( service_id=service_id, @@ -1809,21 +1907,22 @@ async def list_service_events_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListServiceEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListServiceEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1831,36 +1930,22 @@ async def list_service_events_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_service_events_without_preload_content( self, - service_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) Filter on service id") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service event types"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, + service_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter on service id")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service event types")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1900,7 +1985,7 @@ async def list_service_events_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_service_events_serialize( service_id=service_id, @@ -1911,24 +1996,26 @@ async def list_service_events_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListServiceEventsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListServiceEventsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_service_events_serialize( self, service_id, @@ -1941,10 +2028,11 @@ def _list_service_events_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "types": "multi", + 'types': 'multi', } _path_params: Dict[str, str] = {} @@ -1959,34 +2047,47 @@ def _list_service_events_serialize( # process the path parameters # process the query parameters if service_id is not None: - _query_params.append(("service_id", service_id)) - + + _query_params.append(('service_id', service_id)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/service_events", + method='GET', + resource_path='/v1/service_events', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1996,47 +2097,30 @@ def _list_service_events_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_services( self, - app_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) The id of the app") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service types"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service statuses"), - ] = None, - regions: Annotated[ - Optional[List[StrictStr]], Field(description="(Optional) Filter on regions") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service ids"), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) The id of the app")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service types")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service statuses")] = None, + regions: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on regions")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2082,7 +2166,7 @@ async def list_services( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_services_serialize( app_id=app_id, @@ -2096,21 +2180,22 @@ async def list_services( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListServicesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListServicesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2118,44 +2203,25 @@ async def list_services( response_types_map=_response_types_map, ).data + @validate_call async def list_services_with_http_info( self, - app_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) The id of the app") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service types"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service statuses"), - ] = None, - regions: Annotated[ - Optional[List[StrictStr]], Field(description="(Optional) Filter on regions") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service ids"), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) The id of the app")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service types")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service statuses")] = None, + regions: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on regions")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2201,7 +2267,7 @@ async def list_services_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_services_serialize( app_id=app_id, @@ -2215,21 +2281,22 @@ async def list_services_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListServicesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListServicesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2237,44 +2304,25 @@ async def list_services_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_services_without_preload_content( self, - app_id: Annotated[ - Optional[StrictStr], Field(description="(Optional) The id of the app") - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - name: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for name") - ] = None, - types: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service types"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service statuses"), - ] = None, - regions: Annotated[ - Optional[List[StrictStr]], Field(description="(Optional) Filter on regions") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on service ids"), - ] = None, + app_id: Annotated[Optional[StrictStr], Field(description="(Optional) The id of the app")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + name: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for name")] = None, + types: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service types")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service statuses")] = None, + regions: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on regions")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on service ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2320,7 +2368,7 @@ async def list_services_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_services_serialize( app_id=app_id, @@ -2334,24 +2382,26 @@ async def list_services_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListServicesReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListServicesReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_services_serialize( self, app_id, @@ -2367,13 +2417,14 @@ def _list_services_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "types": "multi", - "statuses": "multi", - "regions": "multi", - "ids": "multi", + 'types': 'multi', + 'statuses': 'multi', + 'regions': 'multi', + 'ids': 'multi', } _path_params: Dict[str, str] = {} @@ -2388,43 +2439,59 @@ def _list_services_serialize( # process the path parameters # process the query parameters if app_id is not None: - _query_params.append(("app_id", app_id)) - + + _query_params.append(('app_id', app_id)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if name is not None: - _query_params.append(("name", name)) - + + _query_params.append(('name', name)) + if types is not None: - _query_params.append(("types", types)) - + + _query_params.append(('types', types)) + if statuses is not None: - _query_params.append(("statuses", statuses)) - + + _query_params.append(('statuses', statuses)) + if regions is not None: - _query_params.append(("regions", regions)) - + + _query_params.append(('regions', regions)) + if ids is not None: - _query_params.append(("ids", ids)) - + + _query_params.append(('ids', ids)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/services", + method='GET', + resource_path='/v1/services', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2434,9 +2501,12 @@ def _list_services_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def pause_service( self, @@ -2445,8 +2515,9 @@ async def pause_service( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2479,28 +2550,29 @@ async def pause_service( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._pause_service_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2508,6 +2580,7 @@ async def pause_service( response_types_map=_response_types_map, ).data + @validate_call async def pause_service_with_http_info( self, @@ -2516,8 +2589,9 @@ async def pause_service_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2550,28 +2624,29 @@ async def pause_service_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._pause_service_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2579,6 +2654,7 @@ async def pause_service_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def pause_service_without_preload_content( self, @@ -2587,8 +2663,9 @@ async def pause_service_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2621,31 +2698,33 @@ async def pause_service_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._pause_service_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _pause_service_serialize( self, id, @@ -2654,9 +2733,11 @@ def _pause_service_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2669,22 +2750,30 @@ def _pause_service_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/services/{id}/pause", + method='POST', + resource_path='/v1/services/{id}/pause', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2694,9 +2783,12 @@ def _pause_service_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def re_deploy( self, @@ -2706,8 +2798,9 @@ async def re_deploy( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2741,7 +2834,7 @@ async def re_deploy( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._re_deploy_serialize( id=id, @@ -2749,21 +2842,22 @@ async def re_deploy( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RedeployReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "RedeployReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2771,6 +2865,7 @@ async def re_deploy( response_types_map=_response_types_map, ).data + @validate_call async def re_deploy_with_http_info( self, @@ -2780,8 +2875,9 @@ async def re_deploy_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2815,7 +2911,7 @@ async def re_deploy_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._re_deploy_serialize( id=id, @@ -2823,21 +2919,22 @@ async def re_deploy_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RedeployReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "RedeployReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -2845,6 +2942,7 @@ async def re_deploy_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def re_deploy_without_preload_content( self, @@ -2854,8 +2952,9 @@ async def re_deploy_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -2889,7 +2988,7 @@ async def re_deploy_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._re_deploy_serialize( id=id, @@ -2897,24 +2996,26 @@ async def re_deploy_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "RedeployReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "RedeployReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _re_deploy_serialize( self, id, @@ -2924,9 +3025,11 @@ def _re_deploy_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -2939,7 +3042,7 @@ def _re_deploy_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -2947,16 +3050,24 @@ def _re_deploy_serialize( if info is not None: _body_params = info + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/services/{id}/redeploy", + method='POST', + resource_path='/v1/services/{id}/redeploy', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2966,26 +3077,25 @@ def _re_deploy_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def resume_service( self, id: Annotated[StrictStr, Field(description="The id of the service to pause.")], - skip_build: Annotated[ - Optional[StrictBool], - Field( - description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened." - ), - ] = None, + skip_build: Annotated[Optional[StrictBool], Field(description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened.")] = None, use_cache: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3022,7 +3132,7 @@ async def resume_service( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resume_service_serialize( id=id, @@ -3031,21 +3141,22 @@ async def resume_service( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3053,23 +3164,20 @@ async def resume_service( response_types_map=_response_types_map, ).data + @validate_call async def resume_service_with_http_info( self, id: Annotated[StrictStr, Field(description="The id of the service to pause.")], - skip_build: Annotated[ - Optional[StrictBool], - Field( - description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened." - ), - ] = None, + skip_build: Annotated[Optional[StrictBool], Field(description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened.")] = None, use_cache: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3106,7 +3214,7 @@ async def resume_service_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resume_service_serialize( id=id, @@ -3115,21 +3223,22 @@ async def resume_service_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3137,23 +3246,20 @@ async def resume_service_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def resume_service_without_preload_content( self, id: Annotated[StrictStr, Field(description="The id of the service to pause.")], - skip_build: Annotated[ - Optional[StrictBool], - Field( - description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened." - ), - ] = None, + skip_build: Annotated[Optional[StrictBool], Field(description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened.")] = None, use_cache: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3190,7 +3296,7 @@ async def resume_service_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._resume_service_serialize( id=id, @@ -3199,24 +3305,26 @@ async def resume_service_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _resume_service_serialize( self, id, @@ -3227,9 +3335,11 @@ def _resume_service_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3242,28 +3352,38 @@ def _resume_service_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if skip_build is not None: - _query_params.append(("skip_build", skip_build)) - + + _query_params.append(('skip_build', skip_build)) + if use_cache is not None: - _query_params.append(("use_cache", use_cache)) - + + _query_params.append(('use_cache', use_cache)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/services/{id}/resume", + method='POST', + resource_path='/v1/services/{id}/resume', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3273,27 +3393,26 @@ def _resume_service_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_service( self, id: Annotated[StrictStr, Field(description="The id of the entity to update")], service: UpdateService, update_mask: Optional[StrictStr] = None, - dry_run: Annotated[ - Optional[StrictBool], - Field( - description="If set, run validation and check that the service exists" - ), - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set, run validation and check that the service exists")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3331,7 +3450,7 @@ async def update_service( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service_serialize( id=id, @@ -3341,21 +3460,22 @@ async def update_service( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3363,24 +3483,21 @@ async def update_service( response_types_map=_response_types_map, ).data + @validate_call async def update_service_with_http_info( self, id: Annotated[StrictStr, Field(description="The id of the entity to update")], service: UpdateService, update_mask: Optional[StrictStr] = None, - dry_run: Annotated[ - Optional[StrictBool], - Field( - description="If set, run validation and check that the service exists" - ), - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set, run validation and check that the service exists")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3418,7 +3535,7 @@ async def update_service_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service_serialize( id=id, @@ -3428,21 +3545,22 @@ async def update_service_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3450,24 +3568,21 @@ async def update_service_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_service_without_preload_content( self, id: Annotated[StrictStr, Field(description="The id of the entity to update")], service: UpdateService, update_mask: Optional[StrictStr] = None, - dry_run: Annotated[ - Optional[StrictBool], - Field( - description="If set, run validation and check that the service exists" - ), - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set, run validation and check that the service exists")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3505,7 +3620,7 @@ async def update_service_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service_serialize( id=id, @@ -3515,24 +3630,26 @@ async def update_service_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_service_serialize( self, id, @@ -3544,9 +3661,11 @@ def _update_service_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3559,30 +3678,40 @@ def _update_service_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + if dry_run is not None: - _query_params.append(("dry_run", dry_run)) - + + _query_params.append(('dry_run', dry_run)) + # process the header parameters # process the form parameters # process the body parameter if service is not None: _body_params = service + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/services/{id}", + method='PUT', + resource_path='/v1/services/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3592,27 +3721,26 @@ def _update_service_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_service2( self, id: Annotated[StrictStr, Field(description="The id of the entity to update")], service: UpdateService, update_mask: Optional[StrictStr] = None, - dry_run: Annotated[ - Optional[StrictBool], - Field( - description="If set, run validation and check that the service exists" - ), - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set, run validation and check that the service exists")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3650,7 +3778,7 @@ async def update_service2( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service2_serialize( id=id, @@ -3660,21 +3788,22 @@ async def update_service2( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3682,24 +3811,21 @@ async def update_service2( response_types_map=_response_types_map, ).data + @validate_call async def update_service2_with_http_info( self, id: Annotated[StrictStr, Field(description="The id of the entity to update")], service: UpdateService, update_mask: Optional[StrictStr] = None, - dry_run: Annotated[ - Optional[StrictBool], - Field( - description="If set, run validation and check that the service exists" - ), - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set, run validation and check that the service exists")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3737,7 +3863,7 @@ async def update_service2_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service2_serialize( id=id, @@ -3747,21 +3873,22 @@ async def update_service2_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3769,24 +3896,21 @@ async def update_service2_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_service2_without_preload_content( self, id: Annotated[StrictStr, Field(description="The id of the entity to update")], service: UpdateService, update_mask: Optional[StrictStr] = None, - dry_run: Annotated[ - Optional[StrictBool], - Field( - description="If set, run validation and check that the service exists" - ), - ] = None, + dry_run: Annotated[Optional[StrictBool], Field(description="If set, run validation and check that the service exists")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3824,7 +3948,7 @@ async def update_service2_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service2_serialize( id=id, @@ -3834,24 +3958,26 @@ async def update_service2_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateServiceReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateServiceReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_service2_serialize( self, id, @@ -3863,9 +3989,11 @@ def _update_service2_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -3878,30 +4006,40 @@ def _update_service2_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters if update_mask is not None: - _query_params.append(("update_mask", update_mask)) - + + _query_params.append(('update_mask', update_mask)) + if dry_run is not None: - _query_params.append(("dry_run", dry_run)) - + + _query_params.append(('dry_run', dry_run)) + # process the header parameters # process the form parameters # process the body parameter if service is not None: _body_params = service + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PATCH", - resource_path="/v1/services/{id}", + method='PATCH', + resource_path='/v1/services/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3911,9 +4049,12 @@ def _update_service2_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_service_scaling( self, @@ -3923,8 +4064,9 @@ async def update_service_scaling( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -3959,7 +4101,7 @@ async def update_service_scaling( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service_scaling_serialize( id=id, @@ -3967,21 +4109,22 @@ async def update_service_scaling( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -3989,6 +4132,7 @@ async def update_service_scaling( response_types_map=_response_types_map, ).data + @validate_call async def update_service_scaling_with_http_info( self, @@ -3998,8 +4142,9 @@ async def update_service_scaling_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4034,7 +4179,7 @@ async def update_service_scaling_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service_scaling_serialize( id=id, @@ -4042,21 +4187,22 @@ async def update_service_scaling_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -4064,6 +4210,7 @@ async def update_service_scaling_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_service_scaling_without_preload_content( self, @@ -4073,8 +4220,9 @@ async def update_service_scaling_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -4109,7 +4257,7 @@ async def update_service_scaling_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_service_scaling_serialize( id=id, @@ -4117,24 +4265,26 @@ async def update_service_scaling_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_service_scaling_serialize( self, id, @@ -4144,9 +4294,11 @@ def _update_service_scaling_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -4159,7 +4311,7 @@ def _update_service_scaling_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -4167,16 +4319,24 @@ def _update_service_scaling_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/services/{id}/scale", + method='PUT', + resource_path='/v1/services/{id}/scale', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -4186,5 +4346,7 @@ def _update_service_scaling_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/sessions_api.py b/koyeb/api_async/api/sessions_api.py index 35a5d8eb..eea3c008 100644 --- a/koyeb/api_async/api/sessions_api.py +++ b/koyeb/api_async/api/sessions_api.py @@ -38,19 +38,19 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def login( self, body: LoginRequest, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,7 +84,7 @@ async def login( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._login_serialize( body=body, @@ -92,21 +92,22 @@ async def login( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -114,19 +115,19 @@ async def login( response_types_map=_response_types_map, ).data + @validate_call async def login_with_http_info( self, body: LoginRequest, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -160,7 +161,7 @@ async def login_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._login_serialize( body=body, @@ -168,21 +169,22 @@ async def login_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -190,19 +192,19 @@ async def login_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def login_without_preload_content( self, body: LoginRequest, - seon_fp: Annotated[ - Optional[StrictStr], Field(description="Seon Fingerprint") - ] = None, + seon_fp: Annotated[Optional[StrictStr], Field(description="Seon Fingerprint")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -236,7 +238,7 @@ async def login_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._login_serialize( body=body, @@ -244,24 +246,26 @@ async def login_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _login_serialize( self, body, @@ -271,9 +275,11 @@ def _login_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -288,22 +294,30 @@ def _login_serialize( # process the query parameters # process the header parameters if seon_fp is not None: - _header_params["seon-fp"] = seon_fp + _header_params['seon-fp'] = seon_fp # process the form parameters # process the body parameter if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/login", + method='POST', + resource_path='/v1/account/login', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -313,9 +327,12 @@ def _login_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def logout( self, @@ -323,8 +340,9 @@ async def logout( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -354,27 +372,28 @@ async def logout( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._logout_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -382,6 +401,7 @@ async def logout( response_types_map=_response_types_map, ).data + @validate_call async def logout_with_http_info( self, @@ -389,8 +409,9 @@ async def logout_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -420,27 +441,28 @@ async def logout_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._logout_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -448,6 +470,7 @@ async def logout_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def logout_without_preload_content( self, @@ -455,8 +478,9 @@ async def logout_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -486,30 +510,32 @@ async def logout_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._logout_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _logout_serialize( self, _request_auth, @@ -517,9 +543,11 @@ def _logout_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -536,16 +564,24 @@ def _logout_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/account/logout", + method='DELETE', + resource_path='/v1/account/logout', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -555,9 +591,12 @@ def _logout_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def new_session( self, @@ -565,8 +604,9 @@ async def new_session( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -597,27 +637,28 @@ async def new_session( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._new_session_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -625,6 +666,7 @@ async def new_session( response_types_map=_response_types_map, ).data + @validate_call async def new_session_with_http_info( self, @@ -632,8 +674,9 @@ async def new_session_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -664,27 +707,28 @@ async def new_session_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._new_session_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -692,6 +736,7 @@ async def new_session_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def new_session_without_preload_content( self, @@ -699,8 +744,9 @@ async def new_session_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -731,30 +777,32 @@ async def new_session_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._new_session_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _new_session_serialize( self, _request_auth, @@ -762,9 +810,11 @@ def _new_session_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -781,16 +831,24 @@ def _new_session_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/account/session", + method='POST', + resource_path='/v1/account/session', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -800,9 +858,12 @@ def _new_session_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def refresh_token( self, @@ -810,8 +871,9 @@ async def refresh_token( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -841,27 +903,28 @@ async def refresh_token( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._refresh_token_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -869,6 +932,7 @@ async def refresh_token( response_types_map=_response_types_map, ).data + @validate_call async def refresh_token_with_http_info( self, @@ -876,8 +940,9 @@ async def refresh_token_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -907,27 +972,28 @@ async def refresh_token_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._refresh_token_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -935,6 +1001,7 @@ async def refresh_token_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def refresh_token_without_preload_content( self, @@ -942,8 +1009,9 @@ async def refresh_token_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -973,30 +1041,32 @@ async def refresh_token_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._refresh_token_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "LoginReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "LoginReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _refresh_token_serialize( self, _request_auth, @@ -1004,9 +1074,11 @@ def _refresh_token_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1023,16 +1095,24 @@ def _refresh_token_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="PUT", - resource_path="/v1/account/refresh", + method='PUT', + resource_path='/v1/account/refresh', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1042,5 +1122,7 @@ def _refresh_token_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/snapshots_api.py b/koyeb/api_async/api/snapshots_api.py index e259dce1..f8c6bbb1 100644 --- a/koyeb/api_async/api/snapshots_api.py +++ b/koyeb/api_async/api/snapshots_api.py @@ -43,6 +43,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def create_snapshot( self, @@ -51,8 +52,9 @@ async def create_snapshot( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -84,28 +86,29 @@ async def create_snapshot( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_snapshot_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -113,6 +116,7 @@ async def create_snapshot( response_types_map=_response_types_map, ).data + @validate_call async def create_snapshot_with_http_info( self, @@ -121,8 +125,9 @@ async def create_snapshot_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -154,28 +159,29 @@ async def create_snapshot_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_snapshot_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -183,6 +189,7 @@ async def create_snapshot_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def create_snapshot_without_preload_content( self, @@ -191,8 +198,9 @@ async def create_snapshot_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -224,31 +232,33 @@ async def create_snapshot_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._create_snapshot_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CreateSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CreateSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _create_snapshot_serialize( self, body, @@ -257,9 +267,11 @@ def _create_snapshot_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -278,16 +290,24 @@ def _create_snapshot_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/snapshots", + method='POST', + resource_path='/v1/snapshots', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -297,9 +317,12 @@ def _create_snapshot_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_snapshot( self, @@ -308,8 +331,9 @@ async def delete_snapshot( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -341,28 +365,29 @@ async def delete_snapshot( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -370,6 +395,7 @@ async def delete_snapshot( response_types_map=_response_types_map, ).data + @validate_call async def delete_snapshot_with_http_info( self, @@ -378,8 +404,9 @@ async def delete_snapshot_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -411,28 +438,29 @@ async def delete_snapshot_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -440,6 +468,7 @@ async def delete_snapshot_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def delete_snapshot_without_preload_content( self, @@ -448,8 +477,9 @@ async def delete_snapshot_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -481,31 +511,33 @@ async def delete_snapshot_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_snapshot_serialize( self, id, @@ -514,9 +546,11 @@ def _delete_snapshot_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -529,22 +563,30 @@ def _delete_snapshot_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/snapshots/{id}", + method='DELETE', + resource_path='/v1/snapshots/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -554,9 +596,12 @@ def _delete_snapshot_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_snapshot( self, @@ -565,8 +610,9 @@ async def get_snapshot( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -598,28 +644,29 @@ async def get_snapshot( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -627,6 +674,7 @@ async def get_snapshot( response_types_map=_response_types_map, ).data + @validate_call async def get_snapshot_with_http_info( self, @@ -635,8 +683,9 @@ async def get_snapshot_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -668,28 +717,29 @@ async def get_snapshot_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -697,6 +747,7 @@ async def get_snapshot_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_snapshot_without_preload_content( self, @@ -705,8 +756,9 @@ async def get_snapshot_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -738,31 +790,33 @@ async def get_snapshot_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_snapshot_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_snapshot_serialize( self, id, @@ -771,9 +825,11 @@ def _get_snapshot_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -786,22 +842,30 @@ def _get_snapshot_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/snapshots/{id}", + method='GET', + resource_path='/v1/snapshots/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -811,43 +875,28 @@ def _get_snapshot_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def list_snapshots( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - organization_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter by organization_id"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Filter by status - SNAPSHOT_STATUS_INVALID: zero value, invalid - SNAPSHOT_STATUS_CREATING: the snapshot is being created - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted - SNAPSHOT_STATUS_DELETED: the snapshot is deleted" - ), - ] = None, - region: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for the region") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on snapshot ids"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + organization_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter by organization_id")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter by status - SNAPSHOT_STATUS_INVALID: zero value, invalid - SNAPSHOT_STATUS_CREATING: the snapshot is being created - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted - SNAPSHOT_STATUS_DELETED: the snapshot is deleted")] = None, + region: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the region")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on snapshot ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -889,7 +938,7 @@ async def list_snapshots( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_snapshots_serialize( limit=limit, @@ -901,21 +950,22 @@ async def list_snapshots( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListSnapshotsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListSnapshotsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -923,40 +973,23 @@ async def list_snapshots( response_types_map=_response_types_map, ).data + @validate_call async def list_snapshots_with_http_info( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - organization_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter by organization_id"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Filter by status - SNAPSHOT_STATUS_INVALID: zero value, invalid - SNAPSHOT_STATUS_CREATING: the snapshot is being created - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted - SNAPSHOT_STATUS_DELETED: the snapshot is deleted" - ), - ] = None, - region: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for the region") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on snapshot ids"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + organization_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter by organization_id")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter by status - SNAPSHOT_STATUS_INVALID: zero value, invalid - SNAPSHOT_STATUS_CREATING: the snapshot is being created - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted - SNAPSHOT_STATUS_DELETED: the snapshot is deleted")] = None, + region: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the region")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on snapshot ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -998,7 +1031,7 @@ async def list_snapshots_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_snapshots_serialize( limit=limit, @@ -1010,21 +1043,22 @@ async def list_snapshots_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListSnapshotsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListSnapshotsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1032,40 +1066,23 @@ async def list_snapshots_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def list_snapshots_without_preload_content( self, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - organization_id: Annotated[ - Optional[StrictStr], - Field(description="(Optional) Filter by organization_id"), - ] = None, - statuses: Annotated[ - Optional[List[StrictStr]], - Field( - description="(Optional) Filter by status - SNAPSHOT_STATUS_INVALID: zero value, invalid - SNAPSHOT_STATUS_CREATING: the snapshot is being created - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted - SNAPSHOT_STATUS_DELETED: the snapshot is deleted" - ), - ] = None, - region: Annotated[ - Optional[StrictStr], Field(description="(Optional) A filter for the region") - ] = None, - ids: Annotated[ - Optional[List[StrictStr]], - Field(description="(Optional) Filter on snapshot ids"), - ] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + organization_id: Annotated[Optional[StrictStr], Field(description="(Optional) Filter by organization_id")] = None, + statuses: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter by status - SNAPSHOT_STATUS_INVALID: zero value, invalid - SNAPSHOT_STATUS_CREATING: the snapshot is being created - SNAPSHOT_STATUS_AVAILABLE: the snapshot is complete and available - SNAPSHOT_STATUS_MIGRATING: the snapshot is being migrated - SNAPSHOT_STATUS_DELETING: the snapshot is being deleted - SNAPSHOT_STATUS_DELETED: the snapshot is deleted")] = None, + region: Annotated[Optional[StrictStr], Field(description="(Optional) A filter for the region")] = None, + ids: Annotated[Optional[List[StrictStr]], Field(description="(Optional) Filter on snapshot ids")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1107,7 +1124,7 @@ async def list_snapshots_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._list_snapshots_serialize( limit=limit, @@ -1119,24 +1136,26 @@ async def list_snapshots_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "ListSnapshotsReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "ListSnapshotsReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _list_snapshots_serialize( self, limit, @@ -1150,11 +1169,12 @@ def _list_snapshots_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None _collection_formats: Dict[str, str] = { - "statuses": "multi", - "ids": "multi", + 'statuses': 'multi', + 'ids': 'multi', } _path_params: Dict[str, str] = {} @@ -1169,37 +1189,51 @@ def _list_snapshots_serialize( # process the path parameters # process the query parameters if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if organization_id is not None: - _query_params.append(("organization_id", organization_id)) - + + _query_params.append(('organization_id', organization_id)) + if statuses is not None: - _query_params.append(("statuses", statuses)) - + + _query_params.append(('statuses', statuses)) + if region is not None: - _query_params.append(("region", region)) - + + _query_params.append(('region', region)) + if ids is not None: - _query_params.append(("ids", ids)) - + + _query_params.append(('ids', ids)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/snapshots", + method='GET', + resource_path='/v1/snapshots', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1209,9 +1243,12 @@ def _list_snapshots_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def update_snapshot( self, @@ -1221,8 +1258,9 @@ async def update_snapshot( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1256,7 +1294,7 @@ async def update_snapshot( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_snapshot_serialize( id=id, @@ -1264,21 +1302,22 @@ async def update_snapshot( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1286,6 +1325,7 @@ async def update_snapshot( response_types_map=_response_types_map, ).data + @validate_call async def update_snapshot_with_http_info( self, @@ -1295,8 +1335,9 @@ async def update_snapshot_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1330,7 +1371,7 @@ async def update_snapshot_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_snapshot_serialize( id=id, @@ -1338,21 +1379,22 @@ async def update_snapshot_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -1360,6 +1402,7 @@ async def update_snapshot_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def update_snapshot_without_preload_content( self, @@ -1369,8 +1412,9 @@ async def update_snapshot_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -1404,7 +1448,7 @@ async def update_snapshot_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._update_snapshot_serialize( id=id, @@ -1412,24 +1456,26 @@ async def update_snapshot_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "UpdateSnapshotReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "UpdateSnapshotReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _update_snapshot_serialize( self, id, @@ -1439,9 +1485,11 @@ def _update_snapshot_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -1454,7 +1502,7 @@ def _update_snapshot_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -1462,16 +1510,24 @@ def _update_snapshot_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/snapshots/{id}", + method='POST', + resource_path='/v1/snapshots/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1481,5 +1537,7 @@ def _update_snapshot_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/sso_api.py b/koyeb/api_async/api/sso_api.py index 2f6a5689..3406bcbe 100644 --- a/koyeb/api_async/api/sso_api.py +++ b/koyeb/api_async/api/sso_api.py @@ -37,6 +37,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def canny_auth( self, @@ -45,8 +46,9 @@ async def canny_auth( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -78,28 +80,29 @@ async def canny_auth( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._canny_auth_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CannyAuthReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CannyAuthReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -107,6 +110,7 @@ async def canny_auth( response_types_map=_response_types_map, ).data + @validate_call async def canny_auth_with_http_info( self, @@ -115,8 +119,9 @@ async def canny_auth_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -148,28 +153,29 @@ async def canny_auth_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._canny_auth_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CannyAuthReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CannyAuthReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -177,6 +183,7 @@ async def canny_auth_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def canny_auth_without_preload_content( self, @@ -185,8 +192,9 @@ async def canny_auth_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -218,31 +226,33 @@ async def canny_auth_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._canny_auth_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "CannyAuthReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "CannyAuthReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _canny_auth_serialize( self, body, @@ -251,9 +261,11 @@ def _canny_auth_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -272,16 +284,24 @@ def _canny_auth_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/sso/canny", + method='POST', + resource_path='/v1/sso/canny', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -291,9 +311,12 @@ def _canny_auth_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def discourse_auth( self, @@ -302,8 +325,9 @@ async def discourse_auth( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -335,28 +359,29 @@ async def discourse_auth( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._discourse_auth_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DiscourseAuthReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DiscourseAuthReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -364,6 +389,7 @@ async def discourse_auth( response_types_map=_response_types_map, ).data + @validate_call async def discourse_auth_with_http_info( self, @@ -372,8 +398,9 @@ async def discourse_auth_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -405,28 +432,29 @@ async def discourse_auth_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._discourse_auth_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DiscourseAuthReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DiscourseAuthReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -434,6 +462,7 @@ async def discourse_auth_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def discourse_auth_without_preload_content( self, @@ -442,8 +471,9 @@ async def discourse_auth_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -475,31 +505,33 @@ async def discourse_auth_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._discourse_auth_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DiscourseAuthReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DiscourseAuthReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _discourse_auth_serialize( self, body, @@ -508,9 +540,11 @@ def _discourse_auth_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -529,16 +563,24 @@ def _discourse_auth_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/sso/discourse", + method='POST', + resource_path='/v1/sso/discourse', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -548,5 +590,7 @@ def _discourse_auth_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/subscriptions_api.py b/koyeb/api_async/api/subscriptions_api.py index 61a765fe..05df72e0 100644 --- a/koyeb/api_async/api/subscriptions_api.py +++ b/koyeb/api_async/api/subscriptions_api.py @@ -36,6 +36,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def get_subscription( self, @@ -44,8 +45,9 @@ async def get_subscription( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -77,28 +79,29 @@ async def get_subscription( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_subscription_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetSubscriptionReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetSubscriptionReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -106,6 +109,7 @@ async def get_subscription( response_types_map=_response_types_map, ).data + @validate_call async def get_subscription_with_http_info( self, @@ -114,8 +118,9 @@ async def get_subscription_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -147,28 +152,29 @@ async def get_subscription_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_subscription_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetSubscriptionReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetSubscriptionReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -176,6 +182,7 @@ async def get_subscription_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_subscription_without_preload_content( self, @@ -184,8 +191,9 @@ async def get_subscription_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -217,31 +225,33 @@ async def get_subscription_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_subscription_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetSubscriptionReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetSubscriptionReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_subscription_serialize( self, id, @@ -250,9 +260,11 @@ def _get_subscription_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -265,22 +277,30 @@ def _get_subscription_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/subscriptions/{id}", + method='GET', + resource_path='/v1/subscriptions/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -290,5 +310,7 @@ def _get_subscription_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/summary_api.py b/koyeb/api_async/api/summary_api.py index 2dd05c59..3681ce27 100644 --- a/koyeb/api_async/api/summary_api.py +++ b/koyeb/api_async/api/summary_api.py @@ -17,9 +17,7 @@ from pydantic import Field, StrictStr from typing_extensions import Annotated -from koyeb.api_async.models.get_organization_summary_reply import ( - GetOrganizationSummaryReply, -) +from koyeb.api_async.models.get_organization_summary_reply import GetOrganizationSummaryReply from koyeb.api_async.api_client import ApiClient, RequestSerialized from koyeb.api_async.api_response import ApiResponse @@ -38,6 +36,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def get_organization_summary( self, @@ -46,8 +45,9 @@ async def get_organization_summary( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -79,28 +79,29 @@ async def get_organization_summary( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_summary_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationSummaryReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationSummaryReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -108,6 +109,7 @@ async def get_organization_summary( response_types_map=_response_types_map, ).data + @validate_call async def get_organization_summary_with_http_info( self, @@ -116,8 +118,9 @@ async def get_organization_summary_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -149,28 +152,29 @@ async def get_organization_summary_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_summary_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationSummaryReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationSummaryReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -178,6 +182,7 @@ async def get_organization_summary_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_organization_summary_without_preload_content( self, @@ -186,8 +191,9 @@ async def get_organization_summary_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -219,31 +225,33 @@ async def get_organization_summary_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_summary_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationSummaryReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "GetOrganizationSummaryReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_organization_summary_serialize( self, organization_id, @@ -252,9 +260,11 @@ def _get_organization_summary_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -267,22 +277,30 @@ def _get_organization_summary_serialize( # process the path parameters if organization_id is not None: - _path_params["organization_id"] = organization_id + _path_params['organization_id'] = organization_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/organizations/{organization_id}/summary", + method='GET', + resource_path='/v1/organizations/{organization_id}/summary', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -292,5 +310,7 @@ def _get_organization_summary_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/test_api.py b/koyeb/api_async/api/test_api.py index 26093fe1..1e2cb631 100644 --- a/koyeb/api_async/api/test_api.py +++ b/koyeb/api_async/api/test_api.py @@ -36,6 +36,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def test_anon( self, @@ -43,8 +44,9 @@ async def test_anon( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -74,27 +76,28 @@ async def test_anon( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._test_anon_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -102,6 +105,7 @@ async def test_anon( response_types_map=_response_types_map, ).data + @validate_call async def test_anon_with_http_info( self, @@ -109,8 +113,9 @@ async def test_anon_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -140,27 +145,28 @@ async def test_anon_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._test_anon_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -168,6 +174,7 @@ async def test_anon_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def test_anon_without_preload_content( self, @@ -175,8 +182,9 @@ async def test_anon_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -206,30 +214,32 @@ async def test_anon_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._test_anon_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "object", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "object", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _test_anon_serialize( self, _request_auth, @@ -237,9 +247,11 @@ def _test_anon_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -256,16 +268,24 @@ def _test_anon_serialize( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/test/anon", + method='GET', + resource_path='/v1/test/anon', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -275,9 +295,12 @@ def _test_anon_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def test_auth( self, @@ -286,8 +309,9 @@ async def test_auth( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -319,28 +343,29 @@ async def test_auth( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._test_auth_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KtestTestAuthReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KtestTestAuthReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -348,6 +373,7 @@ async def test_auth( response_types_map=_response_types_map, ).data + @validate_call async def test_auth_with_http_info( self, @@ -356,8 +382,9 @@ async def test_auth_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -389,28 +416,29 @@ async def test_auth_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._test_auth_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KtestTestAuthReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KtestTestAuthReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -418,6 +446,7 @@ async def test_auth_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def test_auth_without_preload_content( self, @@ -426,8 +455,9 @@ async def test_auth_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -459,31 +489,33 @@ async def test_auth_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._test_auth_serialize( body=body, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "KtestTestAuthReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "KtestTestAuthReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _test_auth_serialize( self, body, @@ -492,9 +524,11 @@ def _test_auth_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -513,16 +547,24 @@ def _test_auth_serialize( if body is not None: _body_params = body + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="POST", - resource_path="/v1/test/auth", + method='POST', + resource_path='/v1/test/auth', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -532,5 +574,7 @@ def _test_auth_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/usages_api.py b/koyeb/api_async/api/usages_api.py index d8914d31..7cc63c59 100644 --- a/koyeb/api_async/api/usages_api.py +++ b/koyeb/api_async/api/usages_api.py @@ -19,12 +19,8 @@ from pydantic import Field, StrictStr from typing import Optional from typing_extensions import Annotated -from koyeb.api_async.models.get_organization_usage_details_reply import ( - GetOrganizationUsageDetailsReply, -) -from koyeb.api_async.models.get_organization_usage_reply import ( - GetOrganizationUsageReply, -) +from koyeb.api_async.models.get_organization_usage_details_reply import GetOrganizationUsageDetailsReply +from koyeb.api_async.models.get_organization_usage_reply import GetOrganizationUsageReply from koyeb.api_async.api_client import ApiClient, RequestSerialized from koyeb.api_async.api_response import ApiResponse @@ -43,23 +39,19 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def get_organization_usage( self, - starting_time: Annotated[ - Optional[datetime], - Field(description="The starting time of the period to get data from"), - ] = None, - ending_time: Annotated[ - Optional[datetime], - Field(description="The ending time of the period to get data from"), - ] = None, + starting_time: Annotated[Optional[datetime], Field(description="The starting time of the period to get data from")] = None, + ending_time: Annotated[Optional[datetime], Field(description="The ending time of the period to get data from")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -93,7 +85,7 @@ async def get_organization_usage( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_usage_serialize( starting_time=starting_time, @@ -101,15 +93,16 @@ async def get_organization_usage( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationUsageReply", - "default": "GoogleRpcStatus", + '200': "GetOrganizationUsageReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -117,23 +110,19 @@ async def get_organization_usage( response_types_map=_response_types_map, ).data + @validate_call async def get_organization_usage_with_http_info( self, - starting_time: Annotated[ - Optional[datetime], - Field(description="The starting time of the period to get data from"), - ] = None, - ending_time: Annotated[ - Optional[datetime], - Field(description="The ending time of the period to get data from"), - ] = None, + starting_time: Annotated[Optional[datetime], Field(description="The starting time of the period to get data from")] = None, + ending_time: Annotated[Optional[datetime], Field(description="The ending time of the period to get data from")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -167,7 +156,7 @@ async def get_organization_usage_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_usage_serialize( starting_time=starting_time, @@ -175,15 +164,16 @@ async def get_organization_usage_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationUsageReply", - "default": "GoogleRpcStatus", + '200': "GetOrganizationUsageReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -191,23 +181,19 @@ async def get_organization_usage_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_organization_usage_without_preload_content( self, - starting_time: Annotated[ - Optional[datetime], - Field(description="The starting time of the period to get data from"), - ] = None, - ending_time: Annotated[ - Optional[datetime], - Field(description="The ending time of the period to get data from"), - ] = None, + starting_time: Annotated[Optional[datetime], Field(description="The starting time of the period to get data from")] = None, + ending_time: Annotated[Optional[datetime], Field(description="The ending time of the period to get data from")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -241,7 +227,7 @@ async def get_organization_usage_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_usage_serialize( starting_time=starting_time, @@ -249,18 +235,20 @@ async def get_organization_usage_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationUsageReply", - "default": "GoogleRpcStatus", + '200': "GetOrganizationUsageReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_organization_usage_serialize( self, starting_time, @@ -270,9 +258,11 @@ def _get_organization_usage_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -289,42 +279,50 @@ def _get_organization_usage_serialize( if isinstance(starting_time, datetime): _query_params.append( ( - "starting_time", + 'starting_time', starting_time.strftime( self.api_client.configuration.datetime_format - ), + ) ) ) else: - _query_params.append(("starting_time", starting_time)) - + _query_params.append(('starting_time', starting_time)) + if ending_time is not None: if isinstance(ending_time, datetime): _query_params.append( ( - "ending_time", + 'ending_time', ending_time.strftime( self.api_client.configuration.datetime_format - ), + ) ) ) else: - _query_params.append(("ending_time", ending_time)) - + _query_params.append(('ending_time', ending_time)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/usages", + method='GET', + resource_path='/v1/usages', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -334,46 +332,28 @@ def _get_organization_usage_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def get_organization_usage_details( self, - starting_time: Annotated[ - Optional[datetime], - Field(description="The starting time of the period to get data from"), - ] = None, - ending_time: Annotated[ - Optional[datetime], - Field(description="The ending time of the period to get data from"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, - accept: Annotated[ - Optional[StrictStr], - Field( - description="If defined with the value 'text/csv', a csv file is returned" - ), - ] = None, + starting_time: Annotated[Optional[datetime], Field(description="The starting time of the period to get data from")] = None, + ending_time: Annotated[Optional[datetime], Field(description="The ending time of the period to get data from")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + accept: Annotated[Optional[StrictStr], Field(description="If defined with the value 'text/csv', a csv file is returned")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -415,7 +395,7 @@ async def get_organization_usage_details( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_usage_details_serialize( starting_time=starting_time, @@ -427,15 +407,16 @@ async def get_organization_usage_details( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationUsageDetailsReply", - "default": "GoogleRpcStatus", + '200': "GetOrganizationUsageDetailsReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -443,43 +424,23 @@ async def get_organization_usage_details( response_types_map=_response_types_map, ).data + @validate_call async def get_organization_usage_details_with_http_info( self, - starting_time: Annotated[ - Optional[datetime], - Field(description="The starting time of the period to get data from"), - ] = None, - ending_time: Annotated[ - Optional[datetime], - Field(description="The ending time of the period to get data from"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, - accept: Annotated[ - Optional[StrictStr], - Field( - description="If defined with the value 'text/csv', a csv file is returned" - ), - ] = None, + starting_time: Annotated[Optional[datetime], Field(description="The starting time of the period to get data from")] = None, + ending_time: Annotated[Optional[datetime], Field(description="The ending time of the period to get data from")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + accept: Annotated[Optional[StrictStr], Field(description="If defined with the value 'text/csv', a csv file is returned")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -521,7 +482,7 @@ async def get_organization_usage_details_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_usage_details_serialize( starting_time=starting_time, @@ -533,15 +494,16 @@ async def get_organization_usage_details_with_http_info( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationUsageDetailsReply", - "default": "GoogleRpcStatus", + '200': "GetOrganizationUsageDetailsReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -549,43 +511,23 @@ async def get_organization_usage_details_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def get_organization_usage_details_without_preload_content( self, - starting_time: Annotated[ - Optional[datetime], - Field(description="The starting time of the period to get data from"), - ] = None, - ending_time: Annotated[ - Optional[datetime], - Field(description="The ending time of the period to get data from"), - ] = None, - limit: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The number of items to return"), - ] = None, - offset: Annotated[ - Optional[StrictStr], - Field(description="(Optional) The offset in the list of item to return"), - ] = None, - order: Annotated[ - Optional[StrictStr], - Field( - description="(Optional) Sorts the list in the ascending or the descending order" - ), - ] = None, - accept: Annotated[ - Optional[StrictStr], - Field( - description="If defined with the value 'text/csv', a csv file is returned" - ), - ] = None, + starting_time: Annotated[Optional[datetime], Field(description="The starting time of the period to get data from")] = None, + ending_time: Annotated[Optional[datetime], Field(description="The ending time of the period to get data from")] = None, + limit: Annotated[Optional[StrictStr], Field(description="(Optional) The number of items to return")] = None, + offset: Annotated[Optional[StrictStr], Field(description="(Optional) The offset in the list of item to return")] = None, + order: Annotated[Optional[StrictStr], Field(description="(Optional) Sorts the list in the ascending or the descending order")] = None, + accept: Annotated[Optional[StrictStr], Field(description="If defined with the value 'text/csv', a csv file is returned")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -627,7 +569,7 @@ async def get_organization_usage_details_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._get_organization_usage_details_serialize( starting_time=starting_time, @@ -639,18 +581,20 @@ async def get_organization_usage_details_without_preload_content( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "GetOrganizationUsageDetailsReply", - "default": "GoogleRpcStatus", + '200': "GetOrganizationUsageDetailsReply", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _get_organization_usage_details_serialize( self, starting_time, @@ -664,9 +608,11 @@ def _get_organization_usage_details_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -683,53 +629,64 @@ def _get_organization_usage_details_serialize( if isinstance(starting_time, datetime): _query_params.append( ( - "starting_time", + 'starting_time', starting_time.strftime( self.api_client.configuration.datetime_format - ), + ) ) ) else: - _query_params.append(("starting_time", starting_time)) - + _query_params.append(('starting_time', starting_time)) + if ending_time is not None: if isinstance(ending_time, datetime): _query_params.append( ( - "ending_time", + 'ending_time', ending_time.strftime( self.api_client.configuration.datetime_format - ), + ) ) ) else: - _query_params.append(("ending_time", ending_time)) - + _query_params.append(('ending_time', ending_time)) + if limit is not None: - _query_params.append(("limit", limit)) - + + _query_params.append(('limit', limit)) + if offset is not None: - _query_params.append(("offset", offset)) - + + _query_params.append(('offset', offset)) + if order is not None: - _query_params.append(("order", order)) - + + _query_params.append(('order', order)) + # process the header parameters if accept is not None: - _header_params["Accept"] = accept + _header_params['Accept'] = accept # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="GET", - resource_path="/v1/usages/details", + method='GET', + resource_path='/v1/usages/details', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -739,5 +696,7 @@ def _get_organization_usage_details_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api/users_api.py b/koyeb/api_async/api/users_api.py index 82fc347b..e91e75c9 100644 --- a/koyeb/api_async/api/users_api.py +++ b/koyeb/api_async/api/users_api.py @@ -36,6 +36,7 @@ def __init__(self, api_client=None) -> None: api_client = ApiClient.get_default() self.api_client = api_client + @validate_call async def delete_user( self, @@ -44,8 +45,9 @@ async def delete_user( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -77,28 +79,29 @@ async def delete_user( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_user_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteUserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteUserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -106,6 +109,7 @@ async def delete_user( response_types_map=_response_types_map, ).data + @validate_call async def delete_user_with_http_info( self, @@ -114,8 +118,9 @@ async def delete_user_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -147,28 +152,29 @@ async def delete_user_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_user_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteUserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteUserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -176,6 +182,7 @@ async def delete_user_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def delete_user_without_preload_content( self, @@ -184,8 +191,9 @@ async def delete_user_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -217,31 +225,33 @@ async def delete_user_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_user_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteUserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteUserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_user_serialize( self, id, @@ -250,9 +260,11 @@ def _delete_user_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -265,22 +277,30 @@ def _delete_user_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v1/users/{id}", + method='DELETE', + resource_path='/v1/users/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -290,9 +310,12 @@ def _delete_user_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + + @validate_call async def delete_user_v2( self, @@ -301,8 +324,9 @@ async def delete_user_v2( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -334,28 +358,29 @@ async def delete_user_v2( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_user_v2_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteUserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteUserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -363,6 +388,7 @@ async def delete_user_v2( response_types_map=_response_types_map, ).data + @validate_call async def delete_user_v2_with_http_info( self, @@ -371,8 +397,9 @@ async def delete_user_v2_with_http_info( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -404,28 +431,29 @@ async def delete_user_v2_with_http_info( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_user_v2_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteUserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteUserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) await response_data.read() return self.api_client.response_deserialize( @@ -433,6 +461,7 @@ async def delete_user_v2_with_http_info( response_types_map=_response_types_map, ) + @validate_call async def delete_user_v2_without_preload_content( self, @@ -441,8 +470,9 @@ async def delete_user_v2_without_preload_content( None, Annotated[StrictFloat, Field(gt=0)], Tuple[ - Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)] - ], + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, @@ -474,31 +504,33 @@ async def delete_user_v2_without_preload_content( in the spec for a single request. :type _host_index: int, optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _param = self._delete_user_v2_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, - _host_index=_host_index, + _host_index=_host_index ) _response_types_map: Dict[str, Optional[str]] = { - "200": "DeleteUserReply", - "400": "ErrorWithFields", - "401": "Error", - "403": "Error", - "404": "Error", - "500": "Error", - "503": "Error", - "default": "GoogleRpcStatus", + '200': "DeleteUserReply", + '400': "ErrorWithFields", + '401': "Error", + '403': "Error", + '404': "Error", + '500': "Error", + '503': "Error", + 'default': "GoogleRpcStatus", } response_data = await self.api_client.call_api( - *_param, _request_timeout=_request_timeout + *_param, + _request_timeout=_request_timeout ) return response_data.response + def _delete_user_v2_serialize( self, id, @@ -507,9 +539,11 @@ def _delete_user_v2_serialize( _headers, _host_index, ) -> RequestSerialized: + _host = None - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, str]] = [] @@ -522,22 +556,30 @@ def _delete_user_v2_serialize( # process the path parameters if id is not None: - _path_params["id"] = id + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - if "Accept" not in _header_params: - _header_params["Accept"] = self.api_client.select_header_accept(["*/*"]) + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["Bearer"] + _auth_settings: List[str] = [ + 'Bearer' + ] return self.api_client.param_serialize( - method="DELETE", - resource_path="/v2/users/{id}", + method='DELETE', + resource_path='/v2/users/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -547,5 +589,7 @@ def _delete_user_v2_serialize( auth_settings=_auth_settings, collection_formats=_collection_formats, _host=_host, - _request_auth=_request_auth, + _request_auth=_request_auth ) + + diff --git a/koyeb/api_async/api_client.py b/koyeb/api_async/api_client.py index 91076827..e529341e 100644 --- a/koyeb/api_async/api_client.py +++ b/koyeb/api_async/api_client.py @@ -10,6 +10,7 @@ """ # noqa: E501 + import datetime from dateutil.parser import parse from enum import Enum @@ -36,12 +37,11 @@ UnauthorizedException, ForbiddenException, NotFoundException, - ServiceException, + ServiceException ) RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] - class ApiClient: """Generic API client for OpenAPI client library builds. @@ -60,21 +60,25 @@ class ApiClient: PRIMITIVE_TYPES = (float, bool, bytes, str, int) NATIVE_TYPES_MAPPING = { - "int": int, - "long": int, # TODO remove as only py3 is supported? - "float": float, - "str": str, - "bool": bool, - "date": datetime.date, - "datetime": datetime.datetime, - "decimal": decimal.Decimal, - "UUID": uuid.UUID, - "object": object, + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'decimal': decimal.Decimal, + 'UUID': uuid.UUID, + 'object': object, } _pool = None def __init__( - self, configuration=None, header_name=None, header_value=None, cookie=None + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None ) -> None: # use default configuration if none is provided if configuration is None: @@ -87,7 +91,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "OpenAPI-Generator/1.5.3/python" + self.user_agent = 'OpenAPI-Generator/1.5.3/python' self.client_side_validation = configuration.client_side_validation async def __aenter__(self): @@ -102,15 +106,16 @@ async def close(self): @property def user_agent(self): """User agent for this API client""" - return self.default_headers["User-Agent"] + return self.default_headers['User-Agent'] @user_agent.setter def user_agent(self, value): - self.default_headers["User-Agent"] = value + self.default_headers['User-Agent'] = value def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value + _default = None @classmethod @@ -146,12 +151,12 @@ def param_serialize( header_params=None, body=None, post_params=None, - files=None, - auth_settings=None, + files=None, auth_settings=None, collection_formats=None, _host=None, - _request_auth=None, + _request_auth=None ) -> RequestSerialized: + """Builds the HTTP request params needed by the request. :param method: Method to call. :param resource_path: Path to method endpoint. @@ -180,28 +185,35 @@ def param_serialize( header_params = header_params or {} header_params.update(self.default_headers) if self.cookie: - header_params["Cookie"] = self.cookie + header_params['Cookie'] = self.cookie if header_params: header_params = self.sanitize_for_serialization(header_params) header_params = dict( - self.parameters_to_tuples(header_params, collection_formats) + self.parameters_to_tuples(header_params,collection_formats) ) # path parameters if path_params: path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, collection_formats) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) for k, v in path_params: # specified safe chars, encode everything resource_path = resource_path.replace( - "{%s}" % k, quote(str(v), safe=config.safe_chars_for_path_param) + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) ) # post parameters if post_params or files: post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, collection_formats) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) if files: post_params.extend(self.files_parameters(files)) @@ -213,7 +225,7 @@ def param_serialize( resource_path, method, body, - request_auth=_request_auth, + request_auth=_request_auth ) # body @@ -230,11 +242,15 @@ def param_serialize( # query parameters if query_params: query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query(query_params, collection_formats) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) url += "?" + url_query return method, url, header_params, body, post_params + async def call_api( self, method, @@ -242,7 +258,7 @@ async def call_api( header_params=None, body=None, post_params=None, - _request_timeout=None, + _request_timeout=None ) -> rest.RESTResponse: """Makes the HTTP request (synchronous) :param method: Method to call. @@ -259,12 +275,10 @@ async def call_api( try: # perform request and return response response_data = await self.rest_client.request( - method, - url, + method, url, headers=header_params, - body=body, - post_params=post_params, - _request_timeout=_request_timeout, + body=body, post_params=post_params, + _request_timeout=_request_timeout ) except ApiException as e: @@ -275,7 +289,7 @@ async def call_api( def response_deserialize( self, response_data: rest.RESTResponse, - response_types_map: Optional[Dict[str, ApiResponseT]] = None, + response_types_map: Optional[Dict[str, ApiResponseT]]=None ) -> ApiResponse[ApiResponseT]: """Deserializes response into an object. :param response_data: RESTResponse object to be deserialized. @@ -287,28 +301,15 @@ def response_deserialize( assert response_data.data is not None, msg response_type = response_types_map.get(str(response_data.status), None) - if ( - not response_type - and isinstance(response_data.status, int) - and 100 <= response_data.status <= 599 - ): + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get( - str(response_data.status)[0] + "XX", None - ) + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) # If the response_type has not matched (eg. did not match the previous if statements) and the default response is available, use it. - if ( - response_type is None - and str(response_data.status) not in response_types_map - and ( - not isinstance(response_data.status, int) - or not 100 <= response_data.status <= 599 - or str(response_data.status)[0] + "XX" not in response_types_map - ) - and "default" in response_types_map - ): - response_type = response_types_map["default"] + if response_type is None and str(response_data.status) not in response_types_map \ + and (not isinstance(response_data.status, int) or not 100 <= response_data.status <= 599 or str(response_data.status)[0] + "XX" not in response_types_map) \ + and 'default' in response_types_map: + response_type = response_types_map['default'] # deserialize response data response_text = None @@ -320,14 +321,12 @@ def response_deserialize( return_data = self.__deserialize_file(response_data) elif response_type is not None: match = None - content_type = response_data.headers.get("content-type") + content_type = response_data.headers.get('content-type') if content_type is not None: match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) encoding = match.group(1) if match else "utf-8" response_text = response_data.data.decode(encoding) - return_data = self.deserialize( - response_text, response_type, content_type - ) + return_data = self.deserialize(response_text, response_type, content_type) finally: if not 200 <= response_data.status <= 299: raise ApiException.from_response( @@ -337,10 +336,10 @@ def response_deserialize( ) return ApiResponse( - status_code=response_data.status, - data=return_data, - headers=response_data.headers, - raw_data=response_data.data, + status_code = response_data.status, + data = return_data, + headers = response_data.headers, + raw_data = response_data.data ) def sanitize_for_serialization(self, obj): @@ -370,16 +369,21 @@ def sanitize_for_serialization(self, obj): elif isinstance(obj, uuid.UUID): return str(obj) elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj] + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() elif isinstance(obj, decimal.Decimal): return str(obj) elif isinstance(obj, dict): return { - key: self.sanitize_for_serialization(val) for key, val in obj.items() + key: self.sanitize_for_serialization(val) + for key, val in obj.items() } # Convert model obj to dict except @@ -387,16 +391,15 @@ def sanitize_for_serialization(self, obj): # and attributes which value is not None. # Convert attribute name to json key in # model definition for request. - if hasattr(obj, "to_dict") and callable(getattr(obj, "to_dict")): + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): obj_dict = obj.to_dict() else: obj_dict = obj.__dict__ return self.sanitize_for_serialization(obj_dict) - def deserialize( - self, response_text: str, response_type: str, content_type: Optional[str] - ): + + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): """Deserializes response into an object. :param response: RESTResponse object to be deserialized. @@ -413,20 +416,17 @@ def deserialize( data = json.loads(response_text) except ValueError: data = response_text - elif re.match( - r"^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)", - content_type, - re.IGNORECASE, - ): + elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): if response_text == "": data = "" else: data = json.loads(response_text) - elif re.match(r"^text\/[a-z.+-]+\s*(;|$)", content_type, re.IGNORECASE): + 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) + status=0, + reason="Unsupported content type: {0}".format(content_type) ) return self.__deserialize(data, response_type) @@ -443,23 +443,19 @@ def __deserialize(self, data, klass): return None if isinstance(klass, str): - if klass.startswith("Optional["): - m = re.match(r"Optional\[(.*)]", klass) - assert m is not None, "Malformed Optional type definition" - # data is not None here, so the optionality is already resolved - return self.__deserialize(data, m.group(1)) - - if klass.startswith("List["): - m = re.match(r"List\[(.*)]", klass) + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) assert m is not None, "Malformed List type definition" sub_kls = m.group(1) - return [self.__deserialize(sub_data, sub_kls) for sub_data in data] + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] - if klass.startswith("Dict["): - m = re.match(r"Dict\[([^,]*), (.*)]", klass) + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) assert m is not None, "Malformed Dict type definition" sub_kls = m.group(2) - return {k: self.__deserialize(v, sub_kls) for k, v in data.items()} + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} # convert str to class if klass in self.NATIVE_TYPES_MAPPING: @@ -495,35 +491,21 @@ def parameters_to_tuples(self, params, collection_formats): if collection_formats is None: collection_formats = {} for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() if k in collection_formats: collection_format = collection_formats[k] - if collection_format == "multi": - new_params.extend( - (k, str(value).lower() if isinstance(value, bool) else value) - for value in v - ) + if collection_format == 'multi': + new_params.extend((k, value) for value in v) else: - if collection_format == "ssv": - delimiter = " " - elif collection_format == "tsv": - delimiter = "\t" - elif collection_format == "pipes": - delimiter = "|" + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' else: # csv is the default - delimiter = "," + delimiter = ',' new_params.append( - ( - k, - delimiter.join( - str(value).lower() - if isinstance(value, bool) - else str(value) - for value in v - ), - ) - ) + (k, delimiter.join(str(value) for value in v))) else: new_params.append((k, v)) return new_params @@ -548,39 +530,19 @@ 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, - quote( - str(value).lower() - if isinstance(value, bool) - else str(value) - ), - ) - for value in v - ) + if collection_format == 'multi': + new_params.extend((k, quote(str(value))) for value in v) else: - if collection_format == "ssv": - delimiter = " " - elif collection_format == "tsv": - delimiter = "\t" - elif collection_format == "pipes": - delimiter = "|" + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' else: # csv is the default - delimiter = "," + delimiter = ',' new_params.append( - ( - k, - delimiter.join( - quote( - str(value).lower() - if isinstance(value, bool) - else str(value) - ) - for value in v - ), - ) + (k, delimiter.join(quote(str(value)) for value in v)) ) else: new_params.append((k, quote(str(v)))) @@ -599,7 +561,7 @@ def files_parameters( params = [] for k, v in files.items(): if isinstance(v, str): - with open(v, "rb") as f: + with open(v, 'rb') as f: filename = os.path.basename(f.name) filedata = f.read() elif isinstance(v, bytes): @@ -613,8 +575,13 @@ def files_parameters( continue else: raise ValueError("Unsupported file value") - mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream" - params.append(tuple([k, tuple([filename, filedata, mimetype])])) + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) return params def select_header_accept(self, accepts: List[str]) -> Optional[str]: @@ -627,7 +594,7 @@ def select_header_accept(self, accepts: List[str]) -> Optional[str]: return None for accept in accepts: - if re.search("json", accept, re.IGNORECASE): + if re.search('json', accept, re.IGNORECASE): return accept return accepts[0] @@ -642,7 +609,7 @@ def select_header_content_type(self, content_types): return None for content_type in content_types: - if re.search("json", content_type, re.IGNORECASE): + if re.search('json', content_type, re.IGNORECASE): return content_type return content_types[0] @@ -655,7 +622,7 @@ def update_params_for_auth( resource_path, method, body, - request_auth=None, + request_auth=None ) -> None: """Updates header and query params based on authentication setting. @@ -674,18 +641,34 @@ def update_params_for_auth( if request_auth: self._apply_auth_params( - headers, queries, resource_path, method, body, request_auth + headers, + queries, + resource_path, + method, + body, + request_auth ) else: for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: self._apply_auth_params( - headers, queries, resource_path, method, body, auth_setting + headers, + queries, + resource_path, + method, + body, + auth_setting ) def _apply_auth_params( - self, headers, queries, resource_path, method, body, auth_setting + self, + headers, + queries, + resource_path, + method, + body, + auth_setting ) -> None: """Updates the request parameters based on a single auth_setting @@ -697,23 +680,26 @@ def _apply_auth_params( The object type is the return value of sanitize_for_serialization(). :param auth_setting: auth settings for the endpoint """ - if auth_setting["in"] == "cookie": - if not "Cookie" in headers: - headers["Cookie"] = "" + if auth_setting['in'] == 'cookie': + if not 'Cookie' in headers: + headers['Cookie'] = "" else: - headers["Cookie"] += "; " - # Account for cookie value containing spaces and special characters, excluding base64 delimiters - cookie_value = quote( - str(auth_setting["value"]), safe="!#$%&'()*+-./:<=>?@[]^_`{|}~%+/=" - ) - headers["Cookie"] += f"{auth_setting['key']}={cookie_value}" - elif auth_setting["in"] == "header": - if auth_setting["type"] != "http-signature": - headers[auth_setting["key"]] = auth_setting["value"] - elif auth_setting["in"] == "query": - queries.append((auth_setting["key"], auth_setting["value"])) + headers['Cookie'] += "; " + # Account for cookie value containing spaces and special characters + cookie_value = str(auth_setting['value']) + if not re.match("^\".*\"$", cookie_value): + cookie_value = cookie_value.replace("\"", "\\\"") + cookie_value = f"\"{cookie_value}\"" + headers['Cookie'] += f"{auth_setting['key']}={cookie_value}" + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) else: - raise ApiValueError("Authentication token must be in `query` or `header`") + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) def __deserialize_file(self, response): """Deserializes body to file @@ -733,7 +719,10 @@ def __deserialize_file(self, response): content_disposition = response.headers.get("Content-Disposition") if content_disposition: - m = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition) + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) assert m is not None, "Unexpected 'content-disposition' header value" filename = os.path.basename(m.group(1)) # Strip any directory traversal if filename in ("", ".", ".."): # fall back to tmp filename @@ -779,7 +768,8 @@ def __deserialize_date(self, string): return string except ValueError: raise rest.ApiException( - status=0, reason="Failed to parse `{0}` as date object".format(string) + status=0, + reason="Failed to parse `{0}` as date object".format(string) ) def __deserialize_datetime(self, string): @@ -797,7 +787,10 @@ def __deserialize_datetime(self, string): except ValueError: raise rest.ApiException( status=0, - reason=("Failed to parse `{0}` as datetime object".format(string)), + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) ) def __deserialize_enum(self, data, klass): @@ -811,7 +804,11 @@ def __deserialize_enum(self, data, klass): return klass(data) except ValueError: raise rest.ApiException( - status=0, reason=("Failed to parse `{0}` as `{1}`".format(data, klass)) + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) ) def __deserialize_model(self, data, klass): diff --git a/koyeb/api_async/api_response.py b/koyeb/api_async/api_response.py index 1ce13729..9bc7c11f 100644 --- a/koyeb/api_async/api_response.py +++ b/koyeb/api_async/api_response.py @@ -6,7 +6,6 @@ T = TypeVar("T") - class ApiResponse(BaseModel, Generic[T]): """ API response object @@ -17,4 +16,6 @@ class ApiResponse(BaseModel, Generic[T]): data: T = Field(description="Deserialized data given the data type") raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - model_config = {"arbitrary_types_allowed": True} + model_config = { + "arbitrary_types_allowed": True + } diff --git a/koyeb/api_async/configuration.py b/koyeb/api_async/configuration.py index ad850739..1ea3bf4c 100644 --- a/koyeb/api_async/configuration.py +++ b/koyeb/api_async/configuration.py @@ -20,17 +20,11 @@ from typing_extensions import NotRequired, Self + JSON_SCHEMA_VALIDATION_KEYWORDS = { - "multipleOf", - "maximum", - "exclusiveMaximum", - "minimum", - "exclusiveMinimum", - "maxLength", - "minLength", - "pattern", - "maxItems", - "minItems", + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' } ServerVariablesT = Dict[str, str] @@ -137,107 +131,108 @@ class HostSetting(TypedDict): class Configuration: """This class contains various settings of the API client. - :param host: Base url. - :param ignore_operation_servers - Boolean to ignore operation servers for the API client. - Config will use `host` as the base url regardless of the operation servers. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param verify_ssl: bool - Set this to false to skip verifying SSL certificate - when calling API from https server. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - :param retries: int - Retry configuration. - :param ca_cert_data: verify the peer using concatenated CA certificate data - in PEM (str) or DER (bytes) format. - :param cert_file: the path to a client certificate file, for mTLS. - :param key_file: the path to a client key file, for mTLS. - :param assert_hostname: Set this to True/False to enable/disable SSL hostname verification. - :param tls_server_name: SSL/TLS Server Name Indication (SNI). Set this to the SNI value expected by the server. - :param connection_pool_maxsize: Connection pool max size. None in the constructor is coerced to 100 for async and cpu_count * 5 for sync. - :param proxy: Proxy URL. - :param proxy_headers: Proxy headers. - :param safe_chars_for_path_param: Safe characters for path parameter encoding. - :param client_side_validation: Enable client-side validation. Default True. - :param socket_options: Options to pass down to the underlying urllib3 socket. - :param datetime_format: Datetime format string for serialization. - :param date_format: Date format string for serialization. - - :Example: - - API Key Authentication Example. - Given the following security scheme in the OpenAPI specification: - components: - securitySchemes: - cookieAuth: # name for the security scheme - type: apiKey - in: cookie - name: JSESSIONID # cookie name - - You can programmatically set the cookie: - - conf = koyeb.api_async.Configuration( - api_key={'cookieAuth': 'abc123'} - api_key_prefix={'cookieAuth': 'JSESSIONID'} - ) - - The following cookie will be added to the HTTP request: - Cookie: JSESSIONID abc123 + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param verify_ssl: bool - Set this to false to skip verifying SSL certificate + when calling API from https server. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + :param retries: int - Retry configuration. + :param ca_cert_data: verify the peer using concatenated CA certificate data + in PEM (str) or DER (bytes) format. + :param cert_file: the path to a client certificate file, for mTLS. + :param key_file: the path to a client key file, for mTLS. + :param assert_hostname: Set this to True/False to enable/disable SSL hostname verification. + :param tls_server_name: SSL/TLS Server Name Indication (SNI). Set this to the SNI value expected by the server. + :param connection_pool_maxsize: Connection pool max size. None in the constructor is coerced to 100 for async and cpu_count * 5 for sync. + :param proxy: Proxy URL. + :param proxy_headers: Proxy headers. + :param safe_chars_for_path_param: Safe characters for path parameter encoding. + :param client_side_validation: Enable client-side validation. Default True. + :param socket_options: Options to pass down to the underlying urllib3 socket. + :param datetime_format: Datetime format string for serialization. + :param date_format: Date format string for serialization. + + :Example: + + API Key Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + +conf = koyeb.api_async.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} +) + + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 """ _default: ClassVar[Optional[Self]] = None def __init__( self, - host: Optional[str] = None, - api_key: Optional[Dict[str, str]] = None, - api_key_prefix: Optional[Dict[str, str]] = None, - username: Optional[str] = None, - password: Optional[str] = None, - access_token: Optional[str] = None, - server_index: Optional[int] = None, - server_variables: Optional[ServerVariablesT] = None, - server_operation_index: Optional[Dict[int, int]] = None, - server_operation_variables: Optional[Dict[int, ServerVariablesT]] = None, - ignore_operation_servers: bool = False, - ssl_ca_cert: Optional[str] = None, + host: Optional[str]=None, + api_key: Optional[Dict[str, str]]=None, + api_key_prefix: Optional[Dict[str, str]]=None, + username: Optional[str]=None, + password: Optional[str]=None, + access_token: Optional[str]=None, + server_index: Optional[int]=None, + server_variables: Optional[ServerVariablesT]=None, + server_operation_index: Optional[Dict[int, int]]=None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, + ignore_operation_servers: bool=False, + ssl_ca_cert: Optional[str]=None, retries: Optional[int] = None, ca_cert_data: Optional[Union[str, bytes]] = None, - cert_file: Optional[str] = None, - key_file: Optional[str] = None, - verify_ssl: bool = True, - assert_hostname: Optional[bool] = None, - tls_server_name: Optional[str] = None, - connection_pool_maxsize: Optional[int] = None, - proxy: Optional[str] = None, - proxy_headers: Optional[Any] = None, - safe_chars_for_path_param: str = "", - client_side_validation: bool = True, - socket_options: Optional[Any] = None, - datetime_format: str = "%Y-%m-%dT%H:%M:%S.%f%z", - date_format: str = "%Y-%m-%d", + cert_file: Optional[str]=None, + key_file: Optional[str]=None, + verify_ssl: bool=True, + assert_hostname: Optional[bool]=None, + tls_server_name: Optional[str]=None, + connection_pool_maxsize: Optional[int]=None, + proxy: Optional[str]=None, + proxy_headers: Optional[Any]=None, + safe_chars_for_path_param: str='', + client_side_validation: bool=True, + socket_options: Optional[Any]=None, + datetime_format: str="%Y-%m-%dT%H:%M:%S.%f%z", + date_format: str="%Y-%m-%d", *, debug: Optional[bool] = None, ) -> None: - """Constructor""" + """Constructor + """ self._base_path = "https://app.koyeb.com" if host is None else host """Default Base url """ @@ -282,7 +277,7 @@ def __init__( """Logging Settings """ self.logger["package_logger"] = logging.getLogger("koyeb.api_async") - self.logger_format = "%(asctime)s %(levelname)s %(message)s" + self.logger_format = '%(asctime)s %(levelname)s %(message)s' """Log format """ self.logger_stream_handler = None @@ -327,9 +322,7 @@ def __init__( Set this to the SNI value expected by the server. """ - self.connection_pool_maxsize = ( - connection_pool_maxsize if connection_pool_maxsize is not None else 100 - ) + self.connection_pool_maxsize = connection_pool_maxsize if connection_pool_maxsize is not None else 100 """This value is passed to the aiohttp to limit simultaneous connections. None in the constructor is coerced to default 100. """ @@ -361,12 +354,12 @@ def __init__( """date format """ - def __deepcopy__(self, memo: Dict[int, Any]) -> Self: + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: cls = self.__class__ result = cls.__new__(cls) memo[id(self)] = result for k, v in self.__dict__.items(): - if k not in ("logger", "logger_file_handler"): + if k not in ('logger', 'logger_file_handler'): setattr(result, k, copy.deepcopy(v, memo)) # shallow copy of loggers result.logger = copy.copy(self.logger) @@ -498,9 +491,7 @@ def logger_format(self, value: str) -> None: self.__logger_format = value self.logger_formatter = logging.Formatter(self.__logger_format) - def get_api_key_with_prefix( - self, identifier: str, alias: Optional[str] = None - ) -> Optional[str]: + def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: """Gets API key (with prefix if set). :param identifier: The identifier of apiKey. @@ -509,14 +500,10 @@ def get_api_key_with_prefix( """ if self.refresh_api_key_hook is not None: self.refresh_api_key_hook(self) - key = self.api_key.get( - identifier, self.api_key.get(alias) if alias is not None else None - ) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) if key: prefix = self.api_key_prefix.get( - identifier, - self.api_key_prefix.get(alias) if alias is not None else None, - ) + identifier, self.api_key_prefix.get(alias) if alias is not None else None) if prefix: return "%s %s" % (prefix, key) else: @@ -537,22 +524,22 @@ def get_basic_auth_token(self) -> Optional[str]: password = self.password return "Basic " + base64.b64encode( - (username + ":" + password).encode("utf-8") - ).decode("utf-8") + (username + ":" + password).encode('utf-8') + ).decode('utf-8') - def auth_settings(self) -> AuthSettings: + def auth_settings(self)-> AuthSettings: """Gets Auth Settings dict for api client. :return: The Auth Settings information dict. """ auth: AuthSettings = {} - if "Bearer" in self.api_key: - auth["Bearer"] = { - "type": "api_key", - "in": "header", - "key": "Authorization", - "value": self.get_api_key_with_prefix( - "Bearer", + if 'Bearer' in self.api_key: + auth['Bearer'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'Authorization', + 'value': self.get_api_key_with_prefix( + 'Bearer', ), } return auth @@ -562,13 +549,12 @@ def to_debug_report(self) -> str: :return: The report for debugging. """ - return ( - "Python SDK Debug Report:\n" - "OS: {env}\n" - "Python Version: {pyversion}\n" - "Version of the API: 1.0.0\n" - "SDK Package Version: 1.5.3".format(env=sys.platform, pyversion=sys.version) - ) + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 1.0.0\n"\ + "SDK Package Version: 1.5.3".\ + format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: """Gets an array of host settings @@ -577,16 +563,16 @@ def get_host_settings(self) -> List[HostSetting]: """ return [ { - "url": "https://app.koyeb.com", - "description": "No description provided", + 'url': "https://app.koyeb.com", + 'description': "No description provided", } ] def get_host_from_settings( self, index: Optional[int], - variables: Optional[ServerVariablesT] = None, - servers: Optional[List[HostSetting]] = None, + 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 @@ -605,26 +591,23 @@ def get_host_from_settings( except IndexError: raise ValueError( "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers)) - ) + "Must be less than {1}".format(index, len(servers))) - url = server["url"] + url = server['url'] # go through variables and replace placeholders - for variable_name, variable in server.get("variables", {}).items(): - used_value = variables.get(variable_name, variable["default_value"]) - - if ( - "enum_values" in variable - and variable["enum_values"] - and used_value not in variable["enum_values"] - ): + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and variable['enum_values'] \ + and used_value not in variable['enum_values']: raise ValueError( "The variable `{0}` in the host URL has invalid value " "{1}. Must be {2}.".format( - variable_name, variables[variable_name], variable["enum_values"] - ) - ) + variable_name, variables[variable_name], + variable['enum_values'])) url = url.replace("{" + variable_name + "}", used_value) @@ -633,9 +616,7 @@ def get_host_from_settings( @property def host(self) -> str: """Return generated host.""" - return self.get_host_from_settings( - self.server_index, variables=self.server_variables - ) + return self.get_host_from_settings(self.server_index, variables=self.server_variables) @host.setter def host(self, value: str) -> None: diff --git a/koyeb/api_async/docs/PoolClaimsApi.md b/koyeb/api_async/docs/PoolClaimsApi.md index a322369a..c2cf71b7 100644 --- a/koyeb/api_async/docs/PoolClaimsApi.md +++ b/koyeb/api_async/docs/PoolClaimsApi.md @@ -95,7 +95,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_claim** -> GetPoolClaimReply get_claim(claim_id) +> GetPoolClaimReply get_claim(claim_id, request_id=request_id) Get a claim @@ -131,10 +131,11 @@ async with koyeb.api_async.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = koyeb.api_async.PoolClaimsApi(api_client) claim_id = 'claim_id_example' # str | + request_id = 'request_id_example' # str | (optional) try: # Get a claim - api_response = await api_instance.get_claim(claim_id) + api_response = await api_instance.get_claim(claim_id, request_id=request_id) print("The response of PoolClaimsApi->get_claim:\n") pprint(api_response) except Exception as e: @@ -149,6 +150,7 @@ async with koyeb.api_async.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **claim_id** | **str**| | + **request_id** | **str**| | [optional] ### Return type diff --git a/koyeb/api_async/docs/ServicePoolsApi.md b/koyeb/api_async/docs/ServicePoolsApi.md index 8331fbda..bd2bf31d 100644 --- a/koyeb/api_async/docs/ServicePoolsApi.md +++ b/koyeb/api_async/docs/ServicePoolsApi.md @@ -5,6 +5,7 @@ All URIs are relative to *https://app.koyeb.com* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_service_pool**](ServicePoolsApi.md#create_service_pool) | **POST** /v1/service_pools | Create a ServicePool +[**delete_service_pool**](ServicePoolsApi.md#delete_service_pool) | **DELETE** /v1/service_pools/{id} | Delete a ServicePool [**get_service_pool**](ServicePoolsApi.md#get_service_pool) | **GET** /v1/service_pools/{id} | Get a ServicePool [**list_service_pools**](ServicePoolsApi.md#list_service_pools) | **GET** /v1/service_pools | List ServicePools [**update_service_pool**](ServicePoolsApi.md#update_service_pool) | **PUT** /v1/service_pools/{id} | @@ -95,6 +96,89 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **delete_service_pool** +> object delete_service_pool(id) + +Delete a ServicePool + +### Example + +* Api Key Authentication (Bearer): + +```python +import koyeb.api_async +from koyeb.api_async.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.koyeb.com +# See configuration.py for a list of all supported configuration parameters. +configuration = koyeb.api_async.Configuration( + host = "https://app.koyeb.com" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: Bearer +configuration.api_key['Bearer'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Bearer'] = 'Bearer' + +# Enter a context with an instance of the API client +async with koyeb.api_async.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = koyeb.api_async.ServicePoolsApi(api_client) + id = 'id_example' # str | + + try: + # Delete a ServicePool + api_response = await api_instance.delete_service_pool(id) + print("The response of ServicePoolsApi->delete_service_pool:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ServicePoolsApi->delete_service_pool: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| | + +### Return type + +**object** + +### Authorization + +[Bearer](../README.md#Bearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | A successful response. | - | +**400** | Validation error | - | +**401** | Returned when the token is not valid. | - | +**403** | Returned when the user does not have permission to access the resource. | - | +**404** | Returned when the resource does not exist. | - | +**500** | Returned in case of server error. | - | +**503** | Service is unavailable. | - | +**0** | An unexpected error response. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_service_pool** > GetServicePoolReply get_service_pool(id) diff --git a/koyeb/api_async/exceptions.py b/koyeb/api_async/exceptions.py index 5e517cf3..1caa226e 100644 --- a/koyeb/api_async/exceptions.py +++ b/koyeb/api_async/exceptions.py @@ -13,16 +13,14 @@ from typing import Any, Optional from typing_extensions import Self - class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" class ApiTypeError(OpenApiException, TypeError): - def __init__( - self, msg, path_to_item=None, valid_classes=None, key_type=None - ) -> None: - """Raises an exception for TypeErrors + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors Args: msg (str): the exception message @@ -103,10 +101,11 @@ def __init__(self, msg, path_to_item=None) -> None: class ApiException(OpenApiException): + def __init__( - self, - status=None, - reason=None, + self, + status=None, + reason=None, http_resp=None, *, body: Optional[str] = None, @@ -125,17 +124,17 @@ def __init__( self.reason = http_resp.reason if self.body is None: try: - self.body = http_resp.data.decode("utf-8") + self.body = http_resp.data.decode('utf-8') except Exception: pass self.headers = http_resp.headers @classmethod def from_response( - cls, - *, - http_resp, - body: Optional[str], + cls, + *, + http_resp, + body: Optional[str], data: Optional[Any], ) -> Self: if http_resp.status == 400: @@ -155,9 +154,7 @@ def from_response( 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 - ) + 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) @@ -165,9 +162,11 @@ def from_response( def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n" "Reason: {1}\n".format(self.status, self.reason) + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) if self.headers: - error_message += "HTTP response headers: {0}\n".format(self.headers) + error_message += "HTTP response headers: {0}\n".format( + self.headers) if self.body: error_message += "HTTP response body: {0}\n".format(self.body) @@ -200,13 +199,11 @@ class ServiceException(ApiException): class ConflictException(ApiException): """Exception for HTTP 409 Conflict.""" - pass class UnprocessableEntityException(ApiException): """Exception for HTTP 422 Unprocessable Entity.""" - pass diff --git a/koyeb/api_async/models/__init__.py b/koyeb/api_async/models/__init__.py index 826e7954..f3ad115c 100644 --- a/koyeb/api_async/models/__init__.py +++ b/koyeb/api_async/models/__init__.py @@ -13,9 +13,7 @@ """ # noqa: E501 # import models into model package -from koyeb.api_async.models.accept_organization_invitation_reply import ( - AcceptOrganizationInvitationReply, -) +from koyeb.api_async.models.accept_organization_invitation_reply import AcceptOrganizationInvitationReply from koyeb.api_async.models.action import Action from koyeb.api_async.models.activity import Activity from koyeb.api_async.models.activity_list import ActivityList @@ -34,9 +32,7 @@ from koyeb.api_async.models.autocomplete_reply import AutocompleteReply from koyeb.api_async.models.autocomplete_request import AutocompleteRequest from koyeb.api_async.models.availability_level import AvailabilityLevel -from koyeb.api_async.models.azure_container_registry_configuration import ( - AzureContainerRegistryConfiguration, -) +from koyeb.api_async.models.azure_container_registry_configuration import AzureContainerRegistryConfiguration from koyeb.api_async.models.basic_auth_policy import BasicAuthPolicy from koyeb.api_async.models.budget import Budget from koyeb.api_async.models.buildpack_builder import BuildpackBuilder @@ -46,14 +42,10 @@ from koyeb.api_async.models.catalog_instance_list_item import CatalogInstanceListItem from koyeb.api_async.models.catalog_usage import CatalogUsage from koyeb.api_async.models.check_coupon_reply import CheckCouponReply -from koyeb.api_async.models.clear_idenfy_verification_result_request import ( - ClearIdenfyVerificationResultRequest, -) +from koyeb.api_async.models.clear_idenfy_verification_result_request import ClearIdenfyVerificationResultRequest from koyeb.api_async.models.compose_reply import ComposeReply from koyeb.api_async.models.config_file import ConfigFile -from koyeb.api_async.models.confirm_payment_authorization_reply import ( - ConfirmPaymentAuthorizationReply, -) +from koyeb.api_async.models.confirm_payment_authorization_reply import ConfirmPaymentAuthorizationReply from koyeb.api_async.models.create_access_token_reply import CreateAccessTokenReply from koyeb.api_async.models.create_access_token_request import CreateAccessTokenRequest from koyeb.api_async.models.create_account_request import CreateAccountRequest @@ -67,29 +59,15 @@ from koyeb.api_async.models.create_credential_reply import CreateCredentialReply from koyeb.api_async.models.create_domain import CreateDomain from koyeb.api_async.models.create_domain_reply import CreateDomainReply -from koyeb.api_async.models.create_instance_snapshot_reply import ( - CreateInstanceSnapshotReply, -) -from koyeb.api_async.models.create_instance_snapshot_request import ( - CreateInstanceSnapshotRequest, -) -from koyeb.api_async.models.create_organization_invitation_reply import ( - CreateOrganizationInvitationReply, -) -from koyeb.api_async.models.create_organization_invitation_request import ( - CreateOrganizationInvitationRequest, -) +from koyeb.api_async.models.create_instance_snapshot_reply import CreateInstanceSnapshotReply +from koyeb.api_async.models.create_instance_snapshot_request import CreateInstanceSnapshotRequest +from koyeb.api_async.models.create_organization_invitation_reply import CreateOrganizationInvitationReply +from koyeb.api_async.models.create_organization_invitation_request import CreateOrganizationInvitationRequest from koyeb.api_async.models.create_organization_reply import CreateOrganizationReply from koyeb.api_async.models.create_organization_request import CreateOrganizationRequest -from koyeb.api_async.models.create_payment_authorization_reply import ( - CreatePaymentAuthorizationReply, -) -from koyeb.api_async.models.create_persistent_volume_reply import ( - CreatePersistentVolumeReply, -) -from koyeb.api_async.models.create_persistent_volume_request import ( - CreatePersistentVolumeRequest, -) +from koyeb.api_async.models.create_payment_authorization_reply import CreatePaymentAuthorizationReply +from koyeb.api_async.models.create_persistent_volume_reply import CreatePersistentVolumeReply +from koyeb.api_async.models.create_persistent_volume_request import CreatePersistentVolumeRequest from koyeb.api_async.models.create_project import CreateProject from koyeb.api_async.models.create_project_reply import CreateProjectReply from koyeb.api_async.models.create_secret import CreateSecret @@ -100,41 +78,23 @@ from koyeb.api_async.models.create_service_reply import CreateServiceReply from koyeb.api_async.models.create_snapshot_reply import CreateSnapshotReply from koyeb.api_async.models.create_snapshot_request import CreateSnapshotRequest -from koyeb.api_async.models.create_stage_attempt_request import ( - CreateStageAttemptRequest, -) +from koyeb.api_async.models.create_stage_attempt_request import CreateStageAttemptRequest from koyeb.api_async.models.credential import Credential from koyeb.api_async.models.credential_type import CredentialType -from koyeb.api_async.models.database_deployment_metadata import ( - DatabaseDeploymentMetadata, -) +from koyeb.api_async.models.database_deployment_metadata import DatabaseDeploymentMetadata from koyeb.api_async.models.database_role_password import DatabaseRolePassword from koyeb.api_async.models.database_source import DatabaseSource from koyeb.api_async.models.database_usage import DatabaseUsage from koyeb.api_async.models.database_usage_details import DatabaseUsageDetails from koyeb.api_async.models.datacenter_list_item import DatacenterListItem -from koyeb.api_async.models.deactivate_organization_reply import ( - DeactivateOrganizationReply, -) -from koyeb.api_async.models.deactivate_organization_request import ( - DeactivateOrganizationRequest, -) -from koyeb.api_async.models.declare_stage_progress_request import ( - DeclareStageProgressRequest, -) -from koyeb.api_async.models.declare_step_progress_request import ( - DeclareStepProgressRequest, -) -from koyeb.api_async.models.decline_organization_invitation_reply import ( - DeclineOrganizationInvitationReply, -) -from koyeb.api_async.models.delete_instance_snapshot_reply import ( - DeleteInstanceSnapshotReply, -) +from koyeb.api_async.models.deactivate_organization_reply import DeactivateOrganizationReply +from koyeb.api_async.models.deactivate_organization_request import DeactivateOrganizationRequest +from koyeb.api_async.models.declare_stage_progress_request import DeclareStageProgressRequest +from koyeb.api_async.models.declare_step_progress_request import DeclareStepProgressRequest +from koyeb.api_async.models.decline_organization_invitation_reply import DeclineOrganizationInvitationReply +from koyeb.api_async.models.delete_instance_snapshot_reply import DeleteInstanceSnapshotReply from koyeb.api_async.models.delete_organization_reply import DeleteOrganizationReply -from koyeb.api_async.models.delete_persistent_volume_reply import ( - DeletePersistentVolumeReply, -) +from koyeb.api_async.models.delete_persistent_volume_reply import DeletePersistentVolumeReply from koyeb.api_async.models.delete_snapshot_reply import DeleteSnapshotReply from koyeb.api_async.models.delete_user_reply import DeleteUserReply from koyeb.api_async.models.deployment import Deployment @@ -148,69 +108,37 @@ from koyeb.api_async.models.deployment_list_item import DeploymentListItem from koyeb.api_async.models.deployment_mesh import DeploymentMesh from koyeb.api_async.models.deployment_metadata import DeploymentMetadata -from koyeb.api_async.models.deployment_neon_postgres_database_info import ( - DeploymentNeonPostgresDatabaseInfo, -) -from koyeb.api_async.models.deployment_neon_postgres_database_info_role import ( - DeploymentNeonPostgresDatabaseInfoRole, -) +from koyeb.api_async.models.deployment_neon_postgres_database_info import DeploymentNeonPostgresDatabaseInfo +from koyeb.api_async.models.deployment_neon_postgres_database_info_role import DeploymentNeonPostgresDatabaseInfoRole from koyeb.api_async.models.deployment_port import DeploymentPort -from koyeb.api_async.models.deployment_provisioning_info import ( - DeploymentProvisioningInfo, -) -from koyeb.api_async.models.deployment_provisioning_info_stage import ( - DeploymentProvisioningInfoStage, -) -from koyeb.api_async.models.deployment_provisioning_info_stage_build_attempt import ( - DeploymentProvisioningInfoStageBuildAttempt, -) -from koyeb.api_async.models.deployment_provisioning_info_stage_build_attempt_build_step import ( - DeploymentProvisioningInfoStageBuildAttemptBuildStep, -) -from koyeb.api_async.models.deployment_provisioning_info_stage_status import ( - DeploymentProvisioningInfoStageStatus, -) +from koyeb.api_async.models.deployment_provisioning_info import DeploymentProvisioningInfo +from koyeb.api_async.models.deployment_provisioning_info_stage import DeploymentProvisioningInfoStage +from koyeb.api_async.models.deployment_provisioning_info_stage_build_attempt import DeploymentProvisioningInfoStageBuildAttempt +from koyeb.api_async.models.deployment_provisioning_info_stage_build_attempt_build_step import DeploymentProvisioningInfoStageBuildAttemptBuildStep +from koyeb.api_async.models.deployment_provisioning_info_stage_status import DeploymentProvisioningInfoStageStatus from koyeb.api_async.models.deployment_proxy_port import DeploymentProxyPort -from koyeb.api_async.models.deployment_proxy_port_metadata import ( - DeploymentProxyPortMetadata, -) +from koyeb.api_async.models.deployment_proxy_port_metadata import DeploymentProxyPortMetadata from koyeb.api_async.models.deployment_role import DeploymentRole from koyeb.api_async.models.deployment_route import DeploymentRoute from koyeb.api_async.models.deployment_scaling import DeploymentScaling from koyeb.api_async.models.deployment_scaling_target import DeploymentScalingTarget -from koyeb.api_async.models.deployment_scaling_target_average_cpu import ( - DeploymentScalingTargetAverageCPU, -) -from koyeb.api_async.models.deployment_scaling_target_average_mem import ( - DeploymentScalingTargetAverageMem, -) -from koyeb.api_async.models.deployment_scaling_target_concurrent_requests import ( - DeploymentScalingTargetConcurrentRequests, -) -from koyeb.api_async.models.deployment_scaling_target_requests_per_second import ( - DeploymentScalingTargetRequestsPerSecond, -) -from koyeb.api_async.models.deployment_scaling_target_requests_response_time import ( - DeploymentScalingTargetRequestsResponseTime, -) -from koyeb.api_async.models.deployment_scaling_target_sleep_idle_delay import ( - DeploymentScalingTargetSleepIdleDelay, -) +from koyeb.api_async.models.deployment_scaling_target_average_cpu import DeploymentScalingTargetAverageCPU +from koyeb.api_async.models.deployment_scaling_target_average_mem import DeploymentScalingTargetAverageMem +from koyeb.api_async.models.deployment_scaling_target_concurrent_requests import DeploymentScalingTargetConcurrentRequests +from koyeb.api_async.models.deployment_scaling_target_requests_per_second import DeploymentScalingTargetRequestsPerSecond +from koyeb.api_async.models.deployment_scaling_target_requests_response_time import DeploymentScalingTargetRequestsResponseTime +from koyeb.api_async.models.deployment_scaling_target_sleep_idle_delay import DeploymentScalingTargetSleepIdleDelay from koyeb.api_async.models.deployment_status import DeploymentStatus from koyeb.api_async.models.deployment_strategy import DeploymentStrategy from koyeb.api_async.models.deployment_strategy_type import DeploymentStrategyType from koyeb.api_async.models.deployment_volume import DeploymentVolume from koyeb.api_async.models.desired_deployment import DesiredDeployment from koyeb.api_async.models.desired_deployment_group import DesiredDeploymentGroup -from koyeb.api_async.models.digital_ocean_registry_configuration import ( - DigitalOceanRegistryConfiguration, -) +from koyeb.api_async.models.digital_ocean_registry_configuration import DigitalOceanRegistryConfiguration from koyeb.api_async.models.discourse_auth_reply import DiscourseAuthReply from koyeb.api_async.models.discourse_auth_request import DiscourseAuthRequest from koyeb.api_async.models.docker_builder import DockerBuilder -from koyeb.api_async.models.docker_hub_registry_configuration import ( - DockerHubRegistryConfiguration, -) +from koyeb.api_async.models.docker_hub_registry_configuration import DockerHubRegistryConfiguration from koyeb.api_async.models.docker_source import DockerSource from koyeb.api_async.models.domain import Domain from koyeb.api_async.models.domain_load_balancer_koyeb import DomainLoadBalancerKoyeb @@ -228,27 +156,17 @@ from koyeb.api_async.models.exec_command_reply import ExecCommandReply from koyeb.api_async.models.exec_command_request_body import ExecCommandRequestBody from koyeb.api_async.models.exec_command_request_id_type import ExecCommandRequestIdType -from koyeb.api_async.models.exec_command_request_terminal_size import ( - ExecCommandRequestTerminalSize, -) -from koyeb.api_async.models.gcp_container_registry_configuration import ( - GCPContainerRegistryConfiguration, -) +from koyeb.api_async.models.exec_command_request_terminal_size import ExecCommandRequestTerminalSize +from koyeb.api_async.models.gcp_container_registry_configuration import GCPContainerRegistryConfiguration from koyeb.api_async.models.get_app_reply import GetAppReply from koyeb.api_async.models.get_budget_reply import GetBudgetReply from koyeb.api_async.models.get_catalog_instance_reply import GetCatalogInstanceReply from koyeb.api_async.models.get_credential_reply import GetCredentialReply from koyeb.api_async.models.get_deployment_reply import GetDeploymentReply -from koyeb.api_async.models.get_deployment_scaling_reply import ( - GetDeploymentScalingReply, -) -from koyeb.api_async.models.get_deployment_scaling_reply_item import ( - GetDeploymentScalingReplyItem, -) +from koyeb.api_async.models.get_deployment_scaling_reply import GetDeploymentScalingReply +from koyeb.api_async.models.get_deployment_scaling_reply_item import GetDeploymentScalingReplyItem from koyeb.api_async.models.get_domain_reply import GetDomainReply -from koyeb.api_async.models.get_github_installation_reply import ( - GetGithubInstallationReply, -) +from koyeb.api_async.models.get_github_installation_reply import GetGithubInstallationReply from koyeb.api_async.models.get_idenfy_token_reply import GetIdenfyTokenReply from koyeb.api_async.models.get_instance_reply import GetInstanceReply from koyeb.api_async.models.get_instance_snapshot_reply import GetInstanceSnapshotReply @@ -256,49 +174,31 @@ from koyeb.api_async.models.get_metrics_reply import GetMetricsReply from koyeb.api_async.models.get_metrics_reply_metric import GetMetricsReplyMetric from koyeb.api_async.models.get_o_auth_options_reply import GetOAuthOptionsReply -from koyeb.api_async.models.get_organization_invitation_reply import ( - GetOrganizationInvitationReply, -) -from koyeb.api_async.models.get_organization_quotas_usage_reply import ( - GetOrganizationQuotasUsageReply, -) +from koyeb.api_async.models.get_organization_invitation_reply import GetOrganizationInvitationReply +from koyeb.api_async.models.get_organization_quotas_usage_reply import GetOrganizationQuotasUsageReply from koyeb.api_async.models.get_organization_reply import GetOrganizationReply -from koyeb.api_async.models.get_organization_summary_reply import ( - GetOrganizationSummaryReply, -) -from koyeb.api_async.models.get_organization_usage_details_reply import ( - GetOrganizationUsageDetailsReply, -) -from koyeb.api_async.models.get_organization_usage_reply import ( - GetOrganizationUsageReply, -) +from koyeb.api_async.models.get_organization_summary_reply import GetOrganizationSummaryReply +from koyeb.api_async.models.get_organization_usage_details_reply import GetOrganizationUsageDetailsReply +from koyeb.api_async.models.get_organization_usage_reply import GetOrganizationUsageReply from koyeb.api_async.models.get_payment_method_reply import GetPaymentMethodReply from koyeb.api_async.models.get_persistent_volume_reply import GetPersistentVolumeReply from koyeb.api_async.models.get_pool_claim_reply import GetPoolClaimReply from koyeb.api_async.models.get_project_reply import GetProjectReply from koyeb.api_async.models.get_quotas_reply import GetQuotasReply from koyeb.api_async.models.get_region_reply import GetRegionReply -from koyeb.api_async.models.get_regional_deployment_reply import ( - GetRegionalDeploymentReply, -) +from koyeb.api_async.models.get_regional_deployment_reply import GetRegionalDeploymentReply from koyeb.api_async.models.get_secret_reply import GetSecretReply from koyeb.api_async.models.get_service_pool_reply import GetServicePoolReply from koyeb.api_async.models.get_service_reply import GetServiceReply from koyeb.api_async.models.get_service_scaling_reply import GetServiceScalingReply from koyeb.api_async.models.get_snapshot_reply import GetSnapshotReply from koyeb.api_async.models.get_subscription_reply import GetSubscriptionReply -from koyeb.api_async.models.get_user_organization_invitation_reply import ( - GetUserOrganizationInvitationReply, -) +from koyeb.api_async.models.get_user_organization_invitation_reply import GetUserOrganizationInvitationReply from koyeb.api_async.models.get_user_settings_reply import GetUserSettingsReply from koyeb.api_async.models.git_deployment_metadata import GitDeploymentMetadata from koyeb.api_async.models.git_env_deployment_metadata import GitEnvDeploymentMetadata -from koyeb.api_async.models.git_hub_registry_configuration import ( - GitHubRegistryConfiguration, -) -from koyeb.api_async.models.git_lab_registry_configuration import ( - GitLabRegistryConfiguration, -) +from koyeb.api_async.models.git_hub_registry_configuration import GitHubRegistryConfiguration +from koyeb.api_async.models.git_lab_registry_configuration import GitLabRegistryConfiguration from koyeb.api_async.models.git_source import GitSource from koyeb.api_async.models.github_installation_reply import GithubInstallationReply from koyeb.api_async.models.github_installation_request import GithubInstallationRequest @@ -317,32 +217,20 @@ from koyeb.api_async.models.instance_snapshot_quotas import InstanceSnapshotQuotas from koyeb.api_async.models.instance_snapshot_status import InstanceSnapshotStatus from koyeb.api_async.models.instance_snapshot_type import InstanceSnapshotType -from koyeb.api_async.models.instance_snapshot_type_usage import ( - InstanceSnapshotTypeUsage, -) +from koyeb.api_async.models.instance_snapshot_type_usage import InstanceSnapshotTypeUsage from koyeb.api_async.models.instance_status import InstanceStatus from koyeb.api_async.models.instance_type_usage import InstanceTypeUsage from koyeb.api_async.models.instance_usage import InstanceUsage from koyeb.api_async.models.instances_summary import InstancesSummary from koyeb.api_async.models.invite_user_request import InviteUserRequest from koyeb.api_async.models.kgitproxy_branch import KgitproxyBranch -from koyeb.api_async.models.kgitproxy_git_hub_repository import ( - KgitproxyGitHubRepository, -) -from koyeb.api_async.models.kgitproxy_github_installation_status import ( - KgitproxyGithubInstallationStatus, -) +from koyeb.api_async.models.kgitproxy_git_hub_repository import KgitproxyGitHubRepository +from koyeb.api_async.models.kgitproxy_github_installation_status import KgitproxyGithubInstallationStatus from koyeb.api_async.models.kgitproxy_indexing_status import KgitproxyIndexingStatus -from koyeb.api_async.models.kgitproxy_list_branches_reply import ( - KgitproxyListBranchesReply, -) -from koyeb.api_async.models.kgitproxy_list_repositories_reply import ( - KgitproxyListRepositoriesReply, -) +from koyeb.api_async.models.kgitproxy_list_branches_reply import KgitproxyListBranchesReply +from koyeb.api_async.models.kgitproxy_list_repositories_reply import KgitproxyListRepositoriesReply from koyeb.api_async.models.kgitproxy_repository import KgitproxyRepository -from koyeb.api_async.models.kgitproxy_repository_provider import ( - KgitproxyRepositoryProvider, -) +from koyeb.api_async.models.kgitproxy_repository_provider import KgitproxyRepositoryProvider from koyeb.api_async.models.ksearch_app import KsearchApp from koyeb.api_async.models.ksearch_global_deployment import KsearchGlobalDeployment from koyeb.api_async.models.ksearch_instance import KsearchInstance @@ -356,45 +244,25 @@ from koyeb.api_async.models.lifecycle_quotas import LifecycleQuotas from koyeb.api_async.models.list_app_events_reply import ListAppEventsReply from koyeb.api_async.models.list_apps_reply import ListAppsReply -from koyeb.api_async.models.list_catalog_instances_reply import ( - ListCatalogInstancesReply, -) +from koyeb.api_async.models.list_catalog_instances_reply import ListCatalogInstancesReply from koyeb.api_async.models.list_credentials_reply import ListCredentialsReply from koyeb.api_async.models.list_datacenters_reply import ListDatacentersReply -from koyeb.api_async.models.list_deployment_events_reply import ( - ListDeploymentEventsReply, -) +from koyeb.api_async.models.list_deployment_events_reply import ListDeploymentEventsReply from koyeb.api_async.models.list_deployments_reply import ListDeploymentsReply from koyeb.api_async.models.list_domains_reply import ListDomainsReply from koyeb.api_async.models.list_instance_events_reply import ListInstanceEventsReply -from koyeb.api_async.models.list_instance_snapshot_events_reply import ( - ListInstanceSnapshotEventsReply, -) -from koyeb.api_async.models.list_instance_snapshots_reply import ( - ListInstanceSnapshotsReply, -) +from koyeb.api_async.models.list_instance_snapshot_events_reply import ListInstanceSnapshotEventsReply +from koyeb.api_async.models.list_instance_snapshots_reply import ListInstanceSnapshotsReply from koyeb.api_async.models.list_instances_reply import ListInstancesReply -from koyeb.api_async.models.list_organization_invitations_reply import ( - ListOrganizationInvitationsReply, -) -from koyeb.api_async.models.list_organization_members_reply import ( - ListOrganizationMembersReply, -) +from koyeb.api_async.models.list_organization_invitations_reply import ListOrganizationInvitationsReply +from koyeb.api_async.models.list_organization_members_reply import ListOrganizationMembersReply from koyeb.api_async.models.list_payment_methods_reply import ListPaymentMethodsReply -from koyeb.api_async.models.list_persistent_volume_events_reply import ( - ListPersistentVolumeEventsReply, -) -from koyeb.api_async.models.list_persistent_volumes_reply import ( - ListPersistentVolumesReply, -) +from koyeb.api_async.models.list_persistent_volume_events_reply import ListPersistentVolumeEventsReply +from koyeb.api_async.models.list_persistent_volumes_reply import ListPersistentVolumesReply from koyeb.api_async.models.list_pool_claim_reply import ListPoolClaimReply from koyeb.api_async.models.list_projects_reply import ListProjectsReply -from koyeb.api_async.models.list_regional_deployment_events_reply import ( - ListRegionalDeploymentEventsReply, -) -from koyeb.api_async.models.list_regional_deployments_reply import ( - ListRegionalDeploymentsReply, -) +from koyeb.api_async.models.list_regional_deployment_events_reply import ListRegionalDeploymentEventsReply +from koyeb.api_async.models.list_regional_deployments_reply import ListRegionalDeploymentsReply from koyeb.api_async.models.list_regions_reply import ListRegionsReply from koyeb.api_async.models.list_secrets_reply import ListSecretsReply from koyeb.api_async.models.list_service_events_reply import ListServiceEventsReply @@ -402,12 +270,8 @@ from koyeb.api_async.models.list_services_reply import ListServicesReply from koyeb.api_async.models.list_snapshots_reply import ListSnapshotsReply from koyeb.api_async.models.list_usage_reply import ListUsageReply -from koyeb.api_async.models.list_user_organization_invitations_reply import ( - ListUserOrganizationInvitationsReply, -) -from koyeb.api_async.models.list_user_organizations_reply import ( - ListUserOrganizationsReply, -) +from koyeb.api_async.models.list_user_organization_invitations_reply import ListUserOrganizationInvitationsReply +from koyeb.api_async.models.list_user_organizations_reply import ListUserOrganizationsReply from koyeb.api_async.models.log_entry import LogEntry from koyeb.api_async.models.login_method_reply import LoginMethodReply from koyeb.api_async.models.login_method_reply_method import LoginMethodReplyMethod @@ -420,30 +284,18 @@ from koyeb.api_async.models.mesh_scope import MeshScope from koyeb.api_async.models.metric_name import MetricName from koyeb.api_async.models.neon_postgres_database import NeonPostgresDatabase -from koyeb.api_async.models.neon_postgres_database_deployment_metadata import ( - NeonPostgresDatabaseDeploymentMetadata, -) -from koyeb.api_async.models.neon_postgres_database_neon_database import ( - NeonPostgresDatabaseNeonDatabase, -) -from koyeb.api_async.models.neon_postgres_database_neon_role import ( - NeonPostgresDatabaseNeonRole, -) +from koyeb.api_async.models.neon_postgres_database_deployment_metadata import NeonPostgresDatabaseDeploymentMetadata +from koyeb.api_async.models.neon_postgres_database_neon_database import NeonPostgresDatabaseNeonDatabase +from koyeb.api_async.models.neon_postgres_database_neon_role import NeonPostgresDatabaseNeonRole from koyeb.api_async.models.neon_postgres_summary import NeonPostgresSummary from koyeb.api_async.models.network_policy import NetworkPolicy from koyeb.api_async.models.network_policy_destination import NetworkPolicyDestination from koyeb.api_async.models.next_invoice_reply import NextInvoiceReply from koyeb.api_async.models.next_invoice_reply_discount import NextInvoiceReplyDiscount -from koyeb.api_async.models.next_invoice_reply_discount_type import ( - NextInvoiceReplyDiscountType, -) +from koyeb.api_async.models.next_invoice_reply_discount_type import NextInvoiceReplyDiscountType from koyeb.api_async.models.next_invoice_reply_line import NextInvoiceReplyLine -from koyeb.api_async.models.next_invoice_reply_line_period import ( - NextInvoiceReplyLinePeriod, -) -from koyeb.api_async.models.next_invoice_reply_line_price import ( - NextInvoiceReplyLinePrice, -) +from koyeb.api_async.models.next_invoice_reply_line_period import NextInvoiceReplyLinePeriod +from koyeb.api_async.models.next_invoice_reply_line_price import NextInvoiceReplyLinePrice from koyeb.api_async.models.notification import Notification from koyeb.api_async.models.notification_list import NotificationList from koyeb.api_async.models.o_auth_callback_reply import OAuthCallbackReply @@ -451,16 +303,10 @@ from koyeb.api_async.models.o_auth_provider import OAuthProvider from koyeb.api_async.models.object import Object from koyeb.api_async.models.organization import Organization -from koyeb.api_async.models.organization_deactivation_reason import ( - OrganizationDeactivationReason, -) -from koyeb.api_async.models.organization_detailed_status import ( - OrganizationDetailedStatus, -) +from koyeb.api_async.models.organization_deactivation_reason import OrganizationDeactivationReason +from koyeb.api_async.models.organization_detailed_status import OrganizationDetailedStatus from koyeb.api_async.models.organization_invitation import OrganizationInvitation -from koyeb.api_async.models.organization_invitation_status import ( - OrganizationInvitationStatus, -) +from koyeb.api_async.models.organization_invitation_status import OrganizationInvitationStatus from koyeb.api_async.models.organization_member import OrganizationMember from koyeb.api_async.models.organization_member_status import OrganizationMemberStatus from koyeb.api_async.models.organization_status import OrganizationStatus @@ -469,14 +315,10 @@ from koyeb.api_async.models.payment_method_status import PaymentMethodStatus from koyeb.api_async.models.period_usage import PeriodUsage from koyeb.api_async.models.persistent_volume import PersistentVolume -from koyeb.api_async.models.persistent_volume_backing_store import ( - PersistentVolumeBackingStore, -) +from koyeb.api_async.models.persistent_volume_backing_store import PersistentVolumeBackingStore from koyeb.api_async.models.persistent_volume_event import PersistentVolumeEvent from koyeb.api_async.models.persistent_volume_quotas import PersistentVolumeQuotas -from koyeb.api_async.models.persistent_volume_region_usage import ( - PersistentVolumeRegionUsage, -) +from koyeb.api_async.models.persistent_volume_region_usage import PersistentVolumeRegionUsage from koyeb.api_async.models.persistent_volume_status import PersistentVolumeStatus from koyeb.api_async.models.plan import Plan from koyeb.api_async.models.pool_claim import PoolClaim @@ -484,9 +326,7 @@ from koyeb.api_async.models.pool_claim_request import PoolClaimRequest from koyeb.api_async.models.pool_claim_status import PoolClaimStatus from koyeb.api_async.models.port import Port -from koyeb.api_async.models.private_registry_configuration import ( - PrivateRegistryConfiguration, -) +from koyeb.api_async.models.private_registry_configuration import PrivateRegistryConfiguration from koyeb.api_async.models.project import Project from koyeb.api_async.models.proxy_port_protocol import ProxyPortProtocol from koyeb.api_async.models.public_organization import PublicOrganization @@ -495,9 +335,7 @@ from koyeb.api_async.models.query_logs_reply_pagination import QueryLogsReplyPagination from koyeb.api_async.models.quota_usage import QuotaUsage from koyeb.api_async.models.quotas import Quotas -from koyeb.api_async.models.reactivate_organization_reply import ( - ReactivateOrganizationReply, -) +from koyeb.api_async.models.reactivate_organization_reply import ReactivateOrganizationReply from koyeb.api_async.models.redeem_coupon_request import RedeemCouponRequest from koyeb.api_async.models.redeploy_reply import RedeployReply from koyeb.api_async.models.redeploy_request_info import RedeployRequestInfo @@ -506,34 +344,20 @@ from koyeb.api_async.models.region_list_item import RegionListItem from koyeb.api_async.models.region_usage import RegionUsage from koyeb.api_async.models.regional_deployment import RegionalDeployment -from koyeb.api_async.models.regional_deployment_definition import ( - RegionalDeploymentDefinition, -) -from koyeb.api_async.models.regional_deployment_definition_type import ( - RegionalDeploymentDefinitionType, -) +from koyeb.api_async.models.regional_deployment_definition import RegionalDeploymentDefinition +from koyeb.api_async.models.regional_deployment_definition_type import RegionalDeploymentDefinitionType from koyeb.api_async.models.regional_deployment_event import RegionalDeploymentEvent -from koyeb.api_async.models.regional_deployment_list_item import ( - RegionalDeploymentListItem, -) +from koyeb.api_async.models.regional_deployment_list_item import RegionalDeploymentListItem from koyeb.api_async.models.regional_deployment_mesh import RegionalDeploymentMesh from koyeb.api_async.models.regional_deployment_role import RegionalDeploymentRole from koyeb.api_async.models.regional_deployment_status import RegionalDeploymentStatus from koyeb.api_async.models.regional_deployment_volume import RegionalDeploymentVolume -from koyeb.api_async.models.remove_organization_member_reply import ( - RemoveOrganizationMemberReply, -) -from koyeb.api_async.models.resend_organization_invitation_reply import ( - ResendOrganizationInvitationReply, -) +from koyeb.api_async.models.remove_organization_member_reply import RemoveOrganizationMemberReply +from koyeb.api_async.models.resend_organization_invitation_reply import ResendOrganizationInvitationReply from koyeb.api_async.models.reset_password_request import ResetPasswordRequest from koyeb.api_async.models.reveal_secret_reply import RevealSecretReply -from koyeb.api_async.models.review_organization_capacity_reply import ( - ReviewOrganizationCapacityReply, -) -from koyeb.api_async.models.review_organization_capacity_request import ( - ReviewOrganizationCapacityRequest, -) +from koyeb.api_async.models.review_organization_capacity_reply import ReviewOrganizationCapacityReply +from koyeb.api_async.models.review_organization_capacity_request import ReviewOrganizationCapacityRequest from koyeb.api_async.models.route import Route from koyeb.api_async.models.sample import Sample from koyeb.api_async.models.sandbox_metadata import SandboxMetadata @@ -557,33 +381,19 @@ from koyeb.api_async.models.snapshot import Snapshot from koyeb.api_async.models.snapshot_status import SnapshotStatus from koyeb.api_async.models.snapshot_type import SnapshotType -from koyeb.api_async.models.stream_result_of_exec_command_reply import ( - StreamResultOfExecCommandReply, -) +from koyeb.api_async.models.stream_result_of_exec_command_reply import StreamResultOfExecCommandReply from koyeb.api_async.models.stream_result_of_log_entry import StreamResultOfLogEntry from koyeb.api_async.models.subscription import Subscription -from koyeb.api_async.models.subscription_payment_failure import ( - SubscriptionPaymentFailure, -) -from koyeb.api_async.models.subscription_payment_failure_stripe_sdk import ( - SubscriptionPaymentFailureStripeSDK, -) +from koyeb.api_async.models.subscription_payment_failure import SubscriptionPaymentFailure +from koyeb.api_async.models.subscription_payment_failure_stripe_sdk import SubscriptionPaymentFailureStripeSDK from koyeb.api_async.models.subscription_status import SubscriptionStatus from koyeb.api_async.models.tcp_health_check import TCPHealthCheck from koyeb.api_async.models.token import Token from koyeb.api_async.models.trigger_deployment_metadata import TriggerDeploymentMetadata -from koyeb.api_async.models.trigger_deployment_metadata_actor_type import ( - TriggerDeploymentMetadataActorType, -) -from koyeb.api_async.models.trigger_deployment_metadata_trigger_type import ( - TriggerDeploymentMetadataTriggerType, -) -from koyeb.api_async.models.trigger_git_deployment_metadata import ( - TriggerGitDeploymentMetadata, -) -from koyeb.api_async.models.trigger_git_deployment_metadata_provider import ( - TriggerGitDeploymentMetadataProvider, -) +from koyeb.api_async.models.trigger_deployment_metadata_actor_type import TriggerDeploymentMetadataActorType +from koyeb.api_async.models.trigger_deployment_metadata_trigger_type import TriggerDeploymentMetadataTriggerType +from koyeb.api_async.models.trigger_git_deployment_metadata import TriggerGitDeploymentMetadata +from koyeb.api_async.models.trigger_git_deployment_metadata_provider import TriggerGitDeploymentMetadataProvider from koyeb.api_async.models.update_app import UpdateApp from koyeb.api_async.models.update_app_reply import UpdateAppReply from koyeb.api_async.models.update_budget_reply import UpdateBudgetReply @@ -591,56 +401,30 @@ from koyeb.api_async.models.update_credential_reply import UpdateCredentialReply from koyeb.api_async.models.update_domain import UpdateDomain from koyeb.api_async.models.update_domain_reply import UpdateDomainReply -from koyeb.api_async.models.update_organization_default_project_reply import ( - UpdateOrganizationDefaultProjectReply, -) -from koyeb.api_async.models.update_organization_default_project_request import ( - UpdateOrganizationDefaultProjectRequest, -) -from koyeb.api_async.models.update_organization_name_reply import ( - UpdateOrganizationNameReply, -) -from koyeb.api_async.models.update_organization_name_request import ( - UpdateOrganizationNameRequest, -) -from koyeb.api_async.models.update_organization_plan_reply import ( - UpdateOrganizationPlanReply, -) -from koyeb.api_async.models.update_organization_plan_request import ( - UpdateOrganizationPlanRequest, -) +from koyeb.api_async.models.update_organization_default_project_reply import UpdateOrganizationDefaultProjectReply +from koyeb.api_async.models.update_organization_default_project_request import UpdateOrganizationDefaultProjectRequest +from koyeb.api_async.models.update_organization_name_reply import UpdateOrganizationNameReply +from koyeb.api_async.models.update_organization_name_request import UpdateOrganizationNameRequest +from koyeb.api_async.models.update_organization_plan_reply import UpdateOrganizationPlanReply +from koyeb.api_async.models.update_organization_plan_request import UpdateOrganizationPlanRequest from koyeb.api_async.models.update_organization_reply import UpdateOrganizationReply from koyeb.api_async.models.update_password_request import UpdatePasswordRequest -from koyeb.api_async.models.update_persistent_volume_reply import ( - UpdatePersistentVolumeReply, -) -from koyeb.api_async.models.update_persistent_volume_request import ( - UpdatePersistentVolumeRequest, -) +from koyeb.api_async.models.update_persistent_volume_reply import UpdatePersistentVolumeReply +from koyeb.api_async.models.update_persistent_volume_request import UpdatePersistentVolumeRequest from koyeb.api_async.models.update_project_reply import UpdateProjectReply from koyeb.api_async.models.update_secret_reply import UpdateSecretReply from koyeb.api_async.models.update_service import UpdateService from koyeb.api_async.models.update_service_pool import UpdateServicePool from koyeb.api_async.models.update_service_pool_reply import UpdateServicePoolReply from koyeb.api_async.models.update_service_reply import UpdateServiceReply -from koyeb.api_async.models.update_service_scaling_request import ( - UpdateServiceScalingRequest, -) +from koyeb.api_async.models.update_service_scaling_request import UpdateServiceScalingRequest from koyeb.api_async.models.update_snapshot_reply import UpdateSnapshotReply from koyeb.api_async.models.update_snapshot_request import UpdateSnapshotRequest -from koyeb.api_async.models.update_user_request_user_update_body import ( - UpdateUserRequestUserUpdateBody, -) +from koyeb.api_async.models.update_user_request_user_update_body import UpdateUserRequestUserUpdateBody from koyeb.api_async.models.update_user_settings_reply import UpdateUserSettingsReply -from koyeb.api_async.models.update_user_settings_request import ( - UpdateUserSettingsRequest, -) -from koyeb.api_async.models.upsert_signup_qualification_reply import ( - UpsertSignupQualificationReply, -) -from koyeb.api_async.models.upsert_signup_qualification_request import ( - UpsertSignupQualificationRequest, -) +from koyeb.api_async.models.update_user_settings_request import UpdateUserSettingsRequest +from koyeb.api_async.models.upsert_signup_qualification_reply import UpsertSignupQualificationReply +from koyeb.api_async.models.upsert_signup_qualification_request import UpsertSignupQualificationRequest from koyeb.api_async.models.usage import Usage from koyeb.api_async.models.usage_details import UsageDetails from koyeb.api_async.models.user import User @@ -649,6 +433,5 @@ from koyeb.api_async.models.user_role_role import UserRoleRole from koyeb.api_async.models.user_settings import UserSettings from koyeb.api_async.models.verify_docker_image_reply import VerifyDockerImageReply -from koyeb.api_async.models.verify_docker_image_reply_err_code import ( - VerifyDockerImageReplyErrCode, -) +from koyeb.api_async.models.verify_docker_image_reply_err_code import VerifyDockerImageReplyErrCode + diff --git a/koyeb/api_async/models/accept_organization_invitation_reply.py b/koyeb/api_async/models/accept_organization_invitation_reply.py index d0927646..f5b160f4 100644 --- a/koyeb/api_async/models/accept_organization_invitation_reply.py +++ b/koyeb/api_async/models/accept_organization_invitation_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AcceptOrganizationInvitationReply(BaseModel): """ AcceptOrganizationInvitationReply - """ # noqa: E501 - + """ # noqa: E501 invitation: Optional[OrganizationInvitation] = None __properties: ClassVar[List[str]] = ["invitation"] @@ -40,6 +38,7 @@ class AcceptOrganizationInvitationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of invitation if self.invitation: - _dict["invitation"] = self.invitation.to_dict() + _dict['invitation'] = self.invitation.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "invitation": OrganizationInvitation.from_dict(obj["invitation"]) - if obj.get("invitation") is not None - else None - } - ) + _obj = cls.model_validate({ + "invitation": OrganizationInvitation.from_dict(obj["invitation"]) if obj.get("invitation") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/action.py b/koyeb/api_async/models/action.py index 56c31901..2c83db3f 100644 --- a/koyeb/api_async/models/action.py +++ b/koyeb/api_async/models/action.py @@ -26,11 +26,13 @@ class Action(str, Enum): """ allowed enum values """ - SIGNIN = "signin" - SIGNUP = "signup" - REGISTER = "register" + SIGNIN = 'signin' + SIGNUP = 'signup' + REGISTER = 'register' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of Action from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/activity.py b/koyeb/api_async/models/activity.py index 28e865cc..add77548 100644 --- a/koyeb/api_async/models/activity.py +++ b/koyeb/api_async/models/activity.py @@ -25,26 +25,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Activity(BaseModel): """ Activity - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None actor: Optional[Object] = None object: Optional[Object] = None verb: Optional[StrictStr] = None metadata: Optional[Dict[str, Any]] = None created_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = [ - "id", - "actor", - "object", - "verb", - "metadata", - "created_at", - ] + __properties: ClassVar[List[str]] = ["id", "actor", "object", "verb", "metadata", "created_at"] model_config = ConfigDict( validate_by_name=True, @@ -53,6 +44,7 @@ class Activity(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -76,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -85,10 +78,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of actor if self.actor: - _dict["actor"] = self.actor.to_dict() + _dict['actor'] = self.actor.to_dict() # override the default output from pydantic by calling `to_dict()` of object if self.object: - _dict["object"] = self.object.to_dict() + _dict['object'] = self.object.to_dict() return _dict @classmethod @@ -100,18 +93,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "actor": Object.from_dict(obj["actor"]) - if obj.get("actor") is not None - else None, - "object": Object.from_dict(obj["object"]) - if obj.get("object") is not None - else None, - "verb": obj.get("verb"), - "metadata": obj.get("metadata"), - "created_at": obj.get("created_at"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "actor": Object.from_dict(obj["actor"]) if obj.get("actor") is not None else None, + "object": Object.from_dict(obj["object"]) if obj.get("object") is not None else None, + "verb": obj.get("verb"), + "metadata": obj.get("metadata"), + "created_at": obj.get("created_at") + }) return _obj + + diff --git a/koyeb/api_async/models/activity_list.py b/koyeb/api_async/models/activity_list.py index c91ba853..916e4307 100644 --- a/koyeb/api_async/models/activity_list.py +++ b/koyeb/api_async/models/activity_list.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ActivityList(BaseModel): """ ActivityList - """ # noqa: E501 - + """ # noqa: E501 activities: Optional[List[Activity]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ActivityList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.activities: for _item_activities in self.activities: - _items.append( - _item_activities.to_dict() if _item_activities is not None else None - ) - _dict["activities"] = _items + if _item_activities: + _items.append(_item_activities.to_dict()) + _dict['activities'] = _items return _dict @classmethod @@ -92,14 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "activities": [Activity.from_dict(_item) for _item in obj["activities"]] - if obj.get("activities") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "activities": [Activity.from_dict(_item) for _item in obj["activities"]] if obj.get("activities") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api_async/models/app.py b/koyeb/api_async/models/app.py index d731859d..60b61f80 100644 --- a/koyeb/api_async/models/app.py +++ b/koyeb/api_async/models/app.py @@ -27,12 +27,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class App(BaseModel): """ App - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None @@ -48,23 +46,7 @@ class App(BaseModel): version: Optional[StrictStr] = None domains: Optional[List[Domain]] = None life_cycle: Optional[AppLifeCycle] = None - __properties: ClassVar[List[str]] = [ - "id", - "name", - "organization_id", - "created_at", - "updated_at", - "started_at", - "succeeded_at", - "paused_at", - "resumed_at", - "terminated_at", - "status", - "messages", - "version", - "domains", - "life_cycle", - ] + __properties: ClassVar[List[str]] = ["id", "name", "organization_id", "created_at", "updated_at", "started_at", "succeeded_at", "paused_at", "resumed_at", "terminated_at", "status", "messages", "version", "domains", "life_cycle"] model_config = ConfigDict( validate_by_name=True, @@ -73,6 +55,7 @@ class App(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -96,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -107,13 +91,12 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.domains: for _item_domains in self.domains: - _items.append( - _item_domains.to_dict() if _item_domains is not None else None - ) - _dict["domains"] = _items + if _item_domains: + _items.append(_item_domains.to_dict()) + _dict['domains'] = _items # override the default output from pydantic by calling `to_dict()` of life_cycle if self.life_cycle: - _dict["life_cycle"] = self.life_cycle.to_dict() + _dict['life_cycle'] = self.life_cycle.to_dict() return _dict @classmethod @@ -125,29 +108,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "organization_id": obj.get("organization_id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "started_at": obj.get("started_at"), - "succeeded_at": obj.get("succeeded_at"), - "paused_at": obj.get("paused_at"), - "resumed_at": obj.get("resumed_at"), - "terminated_at": obj.get("terminated_at"), - "status": obj.get("status") - if obj.get("status") is not None - else AppStatus.STARTING, - "messages": obj.get("messages"), - "version": obj.get("version"), - "domains": [Domain.from_dict(_item) for _item in obj["domains"]] - if obj.get("domains") is not None - else None, - "life_cycle": AppLifeCycle.from_dict(obj["life_cycle"]) - if obj.get("life_cycle") is not None - else None, - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "organization_id": obj.get("organization_id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "started_at": obj.get("started_at"), + "succeeded_at": obj.get("succeeded_at"), + "paused_at": obj.get("paused_at"), + "resumed_at": obj.get("resumed_at"), + "terminated_at": obj.get("terminated_at"), + "status": obj.get("status") if obj.get("status") is not None else AppStatus.STARTING, + "messages": obj.get("messages"), + "version": obj.get("version"), + "domains": [Domain.from_dict(_item) for _item in obj["domains"]] if obj.get("domains") is not None else None, + "life_cycle": AppLifeCycle.from_dict(obj["life_cycle"]) if obj.get("life_cycle") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/app_event.py b/koyeb/api_async/models/app_event.py index 23a6b3cc..3337861a 100644 --- a/koyeb/api_async/models/app_event.py +++ b/koyeb/api_async/models/app_event.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AppEvent(BaseModel): """ AppEvent - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None when: Optional[datetime] = None organization_id: Optional[StrictStr] = None @@ -37,15 +35,7 @@ class AppEvent(BaseModel): type: Optional[StrictStr] = None message: Optional[StrictStr] = None metadata: Optional[Dict[str, Any]] = None - __properties: ClassVar[List[str]] = [ - "id", - "when", - "organization_id", - "app_id", - "type", - "message", - "metadata", - ] + __properties: ClassVar[List[str]] = ["id", "when", "organization_id", "app_id", "type", "message", "metadata"] model_config = ConfigDict( validate_by_name=True, @@ -54,6 +44,7 @@ class AppEvent(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -95,15 +87,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "when": obj.get("when"), - "organization_id": obj.get("organization_id"), - "app_id": obj.get("app_id"), - "type": obj.get("type"), - "message": obj.get("message"), - "metadata": obj.get("metadata"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "when": obj.get("when"), + "organization_id": obj.get("organization_id"), + "app_id": obj.get("app_id"), + "type": obj.get("type"), + "message": obj.get("message"), + "metadata": obj.get("metadata") + }) return _obj + + diff --git a/koyeb/api_async/models/app_life_cycle.py b/koyeb/api_async/models/app_life_cycle.py index b6610fa4..f5a8b149 100644 --- a/koyeb/api_async/models/app_life_cycle.py +++ b/koyeb/api_async/models/app_life_cycle.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AppLifeCycle(BaseModel): """ AppLifeCycle - """ # noqa: E501 - + """ # noqa: E501 delete_when_empty: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["delete_when_empty"] @@ -39,6 +37,7 @@ class AppLifeCycle(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"delete_when_empty": obj.get("delete_when_empty")}) + _obj = cls.model_validate({ + "delete_when_empty": obj.get("delete_when_empty") + }) return _obj + + diff --git a/koyeb/api_async/models/app_list_item.py b/koyeb/api_async/models/app_list_item.py index 83ce4e2e..63ff3d1b 100644 --- a/koyeb/api_async/models/app_list_item.py +++ b/koyeb/api_async/models/app_list_item.py @@ -26,12 +26,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AppListItem(BaseModel): """ AppListItem - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None @@ -40,16 +38,7 @@ class AppListItem(BaseModel): domains: Optional[List[Domain]] = None status: Optional[AppStatus] = AppStatus.STARTING messages: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = [ - "id", - "name", - "organization_id", - "updated_at", - "created_at", - "domains", - "status", - "messages", - ] + __properties: ClassVar[List[str]] = ["id", "name", "organization_id", "updated_at", "created_at", "domains", "status", "messages"] model_config = ConfigDict( validate_by_name=True, @@ -58,6 +47,7 @@ class AppListItem(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -81,7 +71,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -92,10 +83,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.domains: for _item_domains in self.domains: - _items.append( - _item_domains.to_dict() if _item_domains is not None else None - ) - _dict["domains"] = _items + if _item_domains: + _items.append(_item_domains.to_dict()) + _dict['domains'] = _items return _dict @classmethod @@ -107,20 +97,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "organization_id": obj.get("organization_id"), - "updated_at": obj.get("updated_at"), - "created_at": obj.get("created_at"), - "domains": [Domain.from_dict(_item) for _item in obj["domains"]] - if obj.get("domains") is not None - else None, - "status": obj.get("status") - if obj.get("status") is not None - else AppStatus.STARTING, - "messages": obj.get("messages"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "organization_id": obj.get("organization_id"), + "updated_at": obj.get("updated_at"), + "created_at": obj.get("created_at"), + "domains": [Domain.from_dict(_item) for _item in obj["domains"]] if obj.get("domains") is not None else None, + "status": obj.get("status") if obj.get("status") is not None else AppStatus.STARTING, + "messages": obj.get("messages") + }) return _obj + + diff --git a/koyeb/api_async/models/app_status.py b/koyeb/api_async/models/app_status.py index 73660fd3..3135ab25 100644 --- a/koyeb/api_async/models/app_status.py +++ b/koyeb/api_async/models/app_status.py @@ -26,17 +26,19 @@ class AppStatus(str, Enum): """ allowed enum values """ - STARTING = "STARTING" - HEALTHY = "HEALTHY" - DEGRADED = "DEGRADED" - UNHEALTHY = "UNHEALTHY" - DELETING = "DELETING" - DELETED = "DELETED" - PAUSING = "PAUSING" - PAUSED = "PAUSED" - RESUMING = "RESUMING" + STARTING = 'STARTING' + HEALTHY = 'HEALTHY' + DEGRADED = 'DEGRADED' + UNHEALTHY = 'UNHEALTHY' + DELETING = 'DELETING' + DELETED = 'DELETED' + PAUSING = 'PAUSING' + PAUSED = 'PAUSED' + RESUMING = 'RESUMING' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of AppStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/app_usage.py b/koyeb/api_async/models/app_usage.py index e79881ab..6ad7b4b5 100644 --- a/koyeb/api_async/models/app_usage.py +++ b/koyeb/api_async/models/app_usage.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AppUsage(BaseModel): """ AppUsage - """ # noqa: E501 - + """ # noqa: E501 app_id: Optional[StrictStr] = None app_name: Optional[StrictStr] = None services: Optional[List[ServiceUsage]] = None @@ -44,6 +42,7 @@ class AppUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -78,18 +78,16 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.services: for _item_services in self.services: - _items.append( - _item_services.to_dict() if _item_services is not None else None - ) - _dict["services"] = _items + if _item_services: + _items.append(_item_services.to_dict()) + _dict['services'] = _items # override the default output from pydantic by calling `to_dict()` of each item in databases (list) _items = [] if self.databases: for _item_databases in self.databases: - _items.append( - _item_databases.to_dict() if _item_databases is not None else None - ) - _dict["databases"] = _items + if _item_databases: + _items.append(_item_databases.to_dict()) + _dict['databases'] = _items return _dict @classmethod @@ -101,18 +99,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "app_id": obj.get("app_id"), - "app_name": obj.get("app_name"), - "services": [ServiceUsage.from_dict(_item) for _item in obj["services"]] - if obj.get("services") is not None - else None, - "databases": [ - DatabaseUsage.from_dict(_item) for _item in obj["databases"] - ] - if obj.get("databases") is not None - else None, - } - ) + _obj = cls.model_validate({ + "app_id": obj.get("app_id"), + "app_name": obj.get("app_name"), + "services": [ServiceUsage.from_dict(_item) for _item in obj["services"]] if obj.get("services") is not None else None, + "databases": [DatabaseUsage.from_dict(_item) for _item in obj["databases"]] if obj.get("databases") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/apps_summary.py b/koyeb/api_async/models/apps_summary.py index 86f1abe0..711af28f 100644 --- a/koyeb/api_async/models/apps_summary.py +++ b/koyeb/api_async/models/apps_summary.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AppsSummary(BaseModel): """ AppsSummary - """ # noqa: E501 - + """ # noqa: E501 total: Optional[StrictStr] = None by_status: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["total", "by_status"] @@ -40,6 +38,7 @@ class AppsSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"total": obj.get("total"), "by_status": obj.get("by_status")} - ) + _obj = cls.model_validate({ + "total": obj.get("total"), + "by_status": obj.get("by_status") + }) return _obj + + diff --git a/koyeb/api_async/models/archive.py b/koyeb/api_async/models/archive.py index 098f9484..0ff4272d 100644 --- a/koyeb/api_async/models/archive.py +++ b/koyeb/api_async/models/archive.py @@ -24,41 +24,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Archive(BaseModel): """ Archive - """ # noqa: E501 - - id: Optional[StrictStr] = Field( - default=None, - description="The archive id, that can be referenced when creating or updating a service.", - ) - organization_id: Optional[StrictStr] = Field( - default=None, description="Organization owning the archive." - ) - upload_url: Optional[StrictStr] = Field( - default=None, - description="The URL where to upload the archive. This URL is signed and can only be used to upload the archive until `valid_until`.", - ) - size: Optional[StrictStr] = Field( - default=None, description="The provisioned space for the archive." - ) - created_at: Optional[datetime] = Field( - default=None, description="Date of creation of the archive." - ) - deleted_at: Optional[datetime] = Field( - default=None, - description="This field is automatically set by Koyeb when the archive is garbage collected.", - ) - __properties: ClassVar[List[str]] = [ - "id", - "organization_id", - "upload_url", - "size", - "created_at", - "deleted_at", - ] + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The archive id, that can be referenced when creating or updating a service.") + organization_id: Optional[StrictStr] = Field(default=None, description="Organization owning the archive.") + upload_url: Optional[StrictStr] = Field(default=None, description="The URL where to upload the archive. This URL is signed and can only be used to upload the archive until `valid_until`.") + size: Optional[StrictStr] = Field(default=None, description="The provisioned space for the archive.") + created_at: Optional[datetime] = Field(default=None, description="Date of creation of the archive.") + deleted_at: Optional[datetime] = Field(default=None, description="This field is automatically set by Koyeb when the archive is garbage collected.") + __properties: ClassVar[List[str]] = ["id", "organization_id", "upload_url", "size", "created_at", "deleted_at"] model_config = ConfigDict( validate_by_name=True, @@ -67,6 +43,7 @@ class Archive(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -90,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -108,14 +86,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "organization_id": obj.get("organization_id"), - "upload_url": obj.get("upload_url"), - "size": obj.get("size"), - "created_at": obj.get("created_at"), - "deleted_at": obj.get("deleted_at"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "upload_url": obj.get("upload_url"), + "size": obj.get("size"), + "created_at": obj.get("created_at"), + "deleted_at": obj.get("deleted_at") + }) return _obj + + diff --git a/koyeb/api_async/models/archive_deployment_metadata.py b/koyeb/api_async/models/archive_deployment_metadata.py index 2ea27ec8..a0e92d47 100644 --- a/koyeb/api_async/models/archive_deployment_metadata.py +++ b/koyeb/api_async/models/archive_deployment_metadata.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ArchiveDeploymentMetadata(BaseModel): """ ArchiveDeploymentMetadata - """ # noqa: E501 - + """ # noqa: E501 last_provisioned_deployment_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["last_provisioned_deployment_id"] @@ -39,6 +37,7 @@ class ArchiveDeploymentMetadata(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,11 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "last_provisioned_deployment_id": obj.get( - "last_provisioned_deployment_id" - ) - } - ) + _obj = cls.model_validate({ + "last_provisioned_deployment_id": obj.get("last_provisioned_deployment_id") + }) return _obj + + diff --git a/koyeb/api_async/models/archive_source.py b/koyeb/api_async/models/archive_source.py index 0412051f..44dd2792 100644 --- a/koyeb/api_async/models/archive_source.py +++ b/koyeb/api_async/models/archive_source.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ArchiveSource(BaseModel): """ ArchiveSource - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None buildpack: Optional[BuildpackBuilder] = None docker: Optional[DockerBuilder] = None @@ -43,6 +41,7 @@ class ArchiveSource(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -75,10 +75,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of buildpack if self.buildpack: - _dict["buildpack"] = self.buildpack.to_dict() + _dict['buildpack'] = self.buildpack.to_dict() # override the default output from pydantic by calling `to_dict()` of docker if self.docker: - _dict["docker"] = self.docker.to_dict() + _dict['docker'] = self.docker.to_dict() return _dict @classmethod @@ -90,15 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "buildpack": BuildpackBuilder.from_dict(obj["buildpack"]) - if obj.get("buildpack") is not None - else None, - "docker": DockerBuilder.from_dict(obj["docker"]) - if obj.get("docker") is not None - else None, - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "buildpack": BuildpackBuilder.from_dict(obj["buildpack"]) if obj.get("buildpack") is not None else None, + "docker": DockerBuilder.from_dict(obj["docker"]) if obj.get("docker") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/auto_release.py b/koyeb/api_async/models/auto_release.py index f39c6ff0..fd7813ca 100644 --- a/koyeb/api_async/models/auto_release.py +++ b/koyeb/api_async/models/auto_release.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AutoRelease(BaseModel): """ AutoRelease - """ # noqa: E501 - + """ # noqa: E501 groups: Optional[List[AutoReleaseGroup]] = None __properties: ClassVar[List[str]] = ["groups"] @@ -40,6 +38,7 @@ class AutoRelease(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,10 +74,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.groups: for _item_groups in self.groups: - _items.append( - _item_groups.to_dict() if _item_groups is not None else None - ) - _dict["groups"] = _items + if _item_groups: + _items.append(_item_groups.to_dict()) + _dict['groups'] = _items return _dict @classmethod @@ -89,11 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "groups": [AutoReleaseGroup.from_dict(_item) for _item in obj["groups"]] - if obj.get("groups") is not None - else None - } - ) + _obj = cls.model_validate({ + "groups": [AutoReleaseGroup.from_dict(_item) for _item in obj["groups"]] if obj.get("groups") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/auto_release_group.py b/koyeb/api_async/models/auto_release_group.py index 72aa4e3a..ec0bb0b4 100644 --- a/koyeb/api_async/models/auto_release_group.py +++ b/koyeb/api_async/models/auto_release_group.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AutoReleaseGroup(BaseModel): """ AutoReleaseGroup - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None repository: Optional[StrictStr] = None git_ref: Optional[StrictStr] = None @@ -42,6 +40,7 @@ class AutoReleaseGroup(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "repository": obj.get("repository"), - "git_ref": obj.get("git_ref"), - "latest_sha": obj.get("latest_sha"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "repository": obj.get("repository"), + "git_ref": obj.get("git_ref"), + "latest_sha": obj.get("latest_sha") + }) return _obj + + diff --git a/koyeb/api_async/models/autocomplete_reply.py b/koyeb/api_async/models/autocomplete_reply.py index d34a31c5..d43bd098 100644 --- a/koyeb/api_async/models/autocomplete_reply.py +++ b/koyeb/api_async/models/autocomplete_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AutocompleteReply(BaseModel): """ AutocompleteReply - """ # noqa: E501 - + """ # noqa: E501 secrets: Optional[List[StrictStr]] = None user_env: Optional[List[StrictStr]] = None system_env: Optional[List[StrictStr]] = None @@ -41,6 +39,7 @@ class AutocompleteReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "secrets": obj.get("secrets"), - "user_env": obj.get("user_env"), - "system_env": obj.get("system_env"), - } - ) + _obj = cls.model_validate({ + "secrets": obj.get("secrets"), + "user_env": obj.get("user_env"), + "system_env": obj.get("system_env") + }) return _obj + + diff --git a/koyeb/api_async/models/autocomplete_request.py b/koyeb/api_async/models/autocomplete_request.py index 23deac16..8a5c303b 100644 --- a/koyeb/api_async/models/autocomplete_request.py +++ b/koyeb/api_async/models/autocomplete_request.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AutocompleteRequest(BaseModel): """ AutocompleteRequest - """ # noqa: E501 - + """ # noqa: E501 definition: Optional[DeploymentDefinition] = None __properties: ClassVar[List[str]] = ["definition"] @@ -40,6 +38,7 @@ class AutocompleteRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of definition if self.definition: - _dict["definition"] = self.definition.to_dict() + _dict['definition'] = self.definition.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "definition": DeploymentDefinition.from_dict(obj["definition"]) - if obj.get("definition") is not None - else None - } - ) + _obj = cls.model_validate({ + "definition": DeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/availability_level.py b/koyeb/api_async/models/availability_level.py index dcda535b..b3af7346 100644 --- a/koyeb/api_async/models/availability_level.py +++ b/koyeb/api_async/models/availability_level.py @@ -26,12 +26,14 @@ class AvailabilityLevel(str, Enum): """ allowed enum values """ - UNKNOWN = "UNKNOWN" - LOW = "LOW" - MEDIUM = "MEDIUM" - HIGH = "HIGH" + UNKNOWN = 'UNKNOWN' + LOW = 'LOW' + MEDIUM = 'MEDIUM' + HIGH = 'HIGH' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of AvailabilityLevel from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/azure_container_registry_configuration.py b/koyeb/api_async/models/azure_container_registry_configuration.py index 4c23b323..487232a6 100644 --- a/koyeb/api_async/models/azure_container_registry_configuration.py +++ b/koyeb/api_async/models/azure_container_registry_configuration.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class AzureContainerRegistryConfiguration(BaseModel): """ AzureContainerRegistryConfiguration - """ # noqa: E501 - + """ # noqa: E501 registry_name: Optional[StrictStr] = None username: Optional[StrictStr] = None password: Optional[StrictStr] = None @@ -41,6 +39,7 @@ class AzureContainerRegistryConfiguration(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "registry_name": obj.get("registry_name"), - "username": obj.get("username"), - "password": obj.get("password"), - } - ) + _obj = cls.model_validate({ + "registry_name": obj.get("registry_name"), + "username": obj.get("username"), + "password": obj.get("password") + }) return _obj + + diff --git a/koyeb/api_async/models/basic_auth_policy.py b/koyeb/api_async/models/basic_auth_policy.py index 85eddef8..c280abe2 100644 --- a/koyeb/api_async/models/basic_auth_policy.py +++ b/koyeb/api_async/models/basic_auth_policy.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class BasicAuthPolicy(BaseModel): """ BasicAuthPolicy - """ # noqa: E501 - + """ # noqa: E501 username: Optional[StrictStr] = None password: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["username", "password"] @@ -40,6 +38,7 @@ class BasicAuthPolicy(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"username": obj.get("username"), "password": obj.get("password")} - ) + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password") + }) return _obj + + diff --git a/koyeb/api_async/models/budget.py b/koyeb/api_async/models/budget.py index d811b63a..824506f8 100644 --- a/koyeb/api_async/models/budget.py +++ b/koyeb/api_async/models/budget.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Budget(BaseModel): """ Budget - """ # noqa: E501 - + """ # noqa: E501 amount: Optional[StrictStr] = None thresholds: Optional[List[StrictStr]] = None __properties: ClassVar[List[str]] = ["amount", "thresholds"] @@ -40,6 +38,7 @@ class Budget(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"amount": obj.get("amount"), "thresholds": obj.get("thresholds")} - ) + _obj = cls.model_validate({ + "amount": obj.get("amount"), + "thresholds": obj.get("thresholds") + }) return _obj + + diff --git a/koyeb/api_async/models/buildpack_builder.py b/koyeb/api_async/models/buildpack_builder.py index 31d6f93f..4854af47 100644 --- a/koyeb/api_async/models/buildpack_builder.py +++ b/koyeb/api_async/models/buildpack_builder.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class BuildpackBuilder(BaseModel): """ BuildpackBuilder - """ # noqa: E501 - + """ # noqa: E501 build_command: Optional[StrictStr] = None run_command: Optional[StrictStr] = None privileged: Optional[StrictBool] = None @@ -41,6 +39,7 @@ class BuildpackBuilder(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "build_command": obj.get("build_command"), - "run_command": obj.get("run_command"), - "privileged": obj.get("privileged"), - } - ) + _obj = cls.model_validate({ + "build_command": obj.get("build_command"), + "run_command": obj.get("run_command"), + "privileged": obj.get("privileged") + }) return _obj + + diff --git a/koyeb/api_async/models/canny_auth_reply.py b/koyeb/api_async/models/canny_auth_reply.py index 5475250c..d3c71df3 100644 --- a/koyeb/api_async/models/canny_auth_reply.py +++ b/koyeb/api_async/models/canny_auth_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CannyAuthReply(BaseModel): """ CannyAuthReply - """ # noqa: E501 - + """ # noqa: E501 token: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["token"] @@ -39,6 +37,7 @@ class CannyAuthReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"token": obj.get("token")}) + _obj = cls.model_validate({ + "token": obj.get("token") + }) return _obj + + diff --git a/koyeb/api_async/models/catalog_gpu_details.py b/koyeb/api_async/models/catalog_gpu_details.py index 5a7321ae..4f7a7ad5 100644 --- a/koyeb/api_async/models/catalog_gpu_details.py +++ b/koyeb/api_async/models/catalog_gpu_details.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CatalogGPUDetails(BaseModel): """ CatalogGPUDetails - """ # noqa: E501 - + """ # noqa: E501 count: Optional[StrictInt] = None brand: Optional[StrictStr] = None memory: Optional[StrictStr] = None @@ -42,6 +40,7 @@ class CatalogGPUDetails(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "count": obj.get("count"), - "brand": obj.get("brand"), - "memory": obj.get("memory"), - "name": obj.get("name"), - } - ) + _obj = cls.model_validate({ + "count": obj.get("count"), + "brand": obj.get("brand"), + "memory": obj.get("memory"), + "name": obj.get("name") + }) return _obj + + diff --git a/koyeb/api_async/models/catalog_instance.py b/koyeb/api_async/models/catalog_instance.py index 97738831..3c00f0e4 100644 --- a/koyeb/api_async/models/catalog_instance.py +++ b/koyeb/api_async/models/catalog_instance.py @@ -17,33 +17,20 @@ import re # noqa: F401 import json -from pydantic import ( - BaseModel, - ConfigDict, - Field, - StrictBool, - StrictFloat, - StrictInt, - StrictStr, -) +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from koyeb.api_async.models.catalog_gpu_details import CatalogGPUDetails from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class CatalogInstance(BaseModel): """ CatalogInstance - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None description: Optional[StrictStr] = None - vcpu: Optional[StrictInt] = Field( - default=None, - description="The number of cpus. Deprecated. Use vcpu_shares instead.", - ) + vcpu: Optional[StrictInt] = Field(default=None, description="The number of cpus. Deprecated. Use vcpu_shares instead.") memory: Optional[StrictStr] = None disk: Optional[StrictStr] = None price_per_second: Optional[StrictStr] = None @@ -52,9 +39,7 @@ class CatalogInstance(BaseModel): regions: Optional[List[StrictStr]] = None status: Optional[StrictStr] = None require_plan: Optional[List[StrictStr]] = None - vcpu_shares: Optional[Union[StrictFloat, StrictInt]] = Field( - default=None, description="The number of vcpu shares reserved for the instance." - ) + vcpu_shares: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of vcpu shares reserved for the instance.") display_name: Optional[StrictStr] = None aliases: Optional[List[StrictStr]] = None type: Optional[StrictStr] = None @@ -62,27 +47,7 @@ class CatalogInstance(BaseModel): service_types: Optional[List[StrictStr]] = None volumes_enabled: Optional[StrictBool] = None light_sleep_enabled: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "id", - "description", - "vcpu", - "memory", - "disk", - "price_per_second", - "price_hourly", - "price_monthly", - "regions", - "status", - "require_plan", - "vcpu_shares", - "display_name", - "aliases", - "type", - "gpu", - "service_types", - "volumes_enabled", - "light_sleep_enabled", - ] + __properties: ClassVar[List[str]] = ["id", "description", "vcpu", "memory", "disk", "price_per_second", "price_hourly", "price_monthly", "regions", "status", "require_plan", "vcpu_shares", "display_name", "aliases", "type", "gpu", "service_types", "volumes_enabled", "light_sleep_enabled"] model_config = ConfigDict( validate_by_name=True, @@ -91,6 +56,7 @@ class CatalogInstance(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -114,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -123,7 +90,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of gpu if self.gpu: - _dict["gpu"] = self.gpu.to_dict() + _dict['gpu'] = self.gpu.to_dict() return _dict @classmethod @@ -135,29 +102,27 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "description": obj.get("description"), - "vcpu": obj.get("vcpu"), - "memory": obj.get("memory"), - "disk": obj.get("disk"), - "price_per_second": obj.get("price_per_second"), - "price_hourly": obj.get("price_hourly"), - "price_monthly": obj.get("price_monthly"), - "regions": obj.get("regions"), - "status": obj.get("status"), - "require_plan": obj.get("require_plan"), - "vcpu_shares": obj.get("vcpu_shares"), - "display_name": obj.get("display_name"), - "aliases": obj.get("aliases"), - "type": obj.get("type"), - "gpu": CatalogGPUDetails.from_dict(obj["gpu"]) - if obj.get("gpu") is not None - else None, - "service_types": obj.get("service_types"), - "volumes_enabled": obj.get("volumes_enabled"), - "light_sleep_enabled": obj.get("light_sleep_enabled"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "description": obj.get("description"), + "vcpu": obj.get("vcpu"), + "memory": obj.get("memory"), + "disk": obj.get("disk"), + "price_per_second": obj.get("price_per_second"), + "price_hourly": obj.get("price_hourly"), + "price_monthly": obj.get("price_monthly"), + "regions": obj.get("regions"), + "status": obj.get("status"), + "require_plan": obj.get("require_plan"), + "vcpu_shares": obj.get("vcpu_shares"), + "display_name": obj.get("display_name"), + "aliases": obj.get("aliases"), + "type": obj.get("type"), + "gpu": CatalogGPUDetails.from_dict(obj["gpu"]) if obj.get("gpu") is not None else None, + "service_types": obj.get("service_types"), + "volumes_enabled": obj.get("volumes_enabled"), + "light_sleep_enabled": obj.get("light_sleep_enabled") + }) return _obj + + diff --git a/koyeb/api_async/models/catalog_instance_list_item.py b/koyeb/api_async/models/catalog_instance_list_item.py index f158cf1c..dc43b681 100644 --- a/koyeb/api_async/models/catalog_instance_list_item.py +++ b/koyeb/api_async/models/catalog_instance_list_item.py @@ -17,33 +17,20 @@ import re # noqa: F401 import json -from pydantic import ( - BaseModel, - ConfigDict, - Field, - StrictBool, - StrictFloat, - StrictInt, - StrictStr, -) +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional, Union from koyeb.api_async.models.catalog_gpu_details import CatalogGPUDetails from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class CatalogInstanceListItem(BaseModel): """ CatalogInstanceListItem - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None description: Optional[StrictStr] = None - vcpu: Optional[StrictInt] = Field( - default=None, - description="The number of cpus. Deprecated. Use vcpu_shares instead.", - ) + vcpu: Optional[StrictInt] = Field(default=None, description="The number of cpus. Deprecated. Use vcpu_shares instead.") memory: Optional[StrictStr] = None disk: Optional[StrictStr] = None price_per_second: Optional[StrictStr] = None @@ -52,9 +39,7 @@ class CatalogInstanceListItem(BaseModel): regions: Optional[List[StrictStr]] = None status: Optional[StrictStr] = None require_plan: Optional[List[StrictStr]] = None - vcpu_shares: Optional[Union[StrictFloat, StrictInt]] = Field( - default=None, description="The number of vcpu shares reserved for the instance." - ) + vcpu_shares: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The number of vcpu shares reserved for the instance.") display_name: Optional[StrictStr] = None aliases: Optional[List[StrictStr]] = None type: Optional[StrictStr] = None @@ -62,27 +47,7 @@ class CatalogInstanceListItem(BaseModel): service_types: Optional[List[StrictStr]] = None volumes_enabled: Optional[StrictBool] = None light_sleep_enabled: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "id", - "description", - "vcpu", - "memory", - "disk", - "price_per_second", - "price_hourly", - "price_monthly", - "regions", - "status", - "require_plan", - "vcpu_shares", - "display_name", - "aliases", - "type", - "gpu", - "service_types", - "volumes_enabled", - "light_sleep_enabled", - ] + __properties: ClassVar[List[str]] = ["id", "description", "vcpu", "memory", "disk", "price_per_second", "price_hourly", "price_monthly", "regions", "status", "require_plan", "vcpu_shares", "display_name", "aliases", "type", "gpu", "service_types", "volumes_enabled", "light_sleep_enabled"] model_config = ConfigDict( validate_by_name=True, @@ -91,6 +56,7 @@ class CatalogInstanceListItem(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -114,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -123,7 +90,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of gpu if self.gpu: - _dict["gpu"] = self.gpu.to_dict() + _dict['gpu'] = self.gpu.to_dict() return _dict @classmethod @@ -135,29 +102,27 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "description": obj.get("description"), - "vcpu": obj.get("vcpu"), - "memory": obj.get("memory"), - "disk": obj.get("disk"), - "price_per_second": obj.get("price_per_second"), - "price_hourly": obj.get("price_hourly"), - "price_monthly": obj.get("price_monthly"), - "regions": obj.get("regions"), - "status": obj.get("status"), - "require_plan": obj.get("require_plan"), - "vcpu_shares": obj.get("vcpu_shares"), - "display_name": obj.get("display_name"), - "aliases": obj.get("aliases"), - "type": obj.get("type"), - "gpu": CatalogGPUDetails.from_dict(obj["gpu"]) - if obj.get("gpu") is not None - else None, - "service_types": obj.get("service_types"), - "volumes_enabled": obj.get("volumes_enabled"), - "light_sleep_enabled": obj.get("light_sleep_enabled"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "description": obj.get("description"), + "vcpu": obj.get("vcpu"), + "memory": obj.get("memory"), + "disk": obj.get("disk"), + "price_per_second": obj.get("price_per_second"), + "price_hourly": obj.get("price_hourly"), + "price_monthly": obj.get("price_monthly"), + "regions": obj.get("regions"), + "status": obj.get("status"), + "require_plan": obj.get("require_plan"), + "vcpu_shares": obj.get("vcpu_shares"), + "display_name": obj.get("display_name"), + "aliases": obj.get("aliases"), + "type": obj.get("type"), + "gpu": CatalogGPUDetails.from_dict(obj["gpu"]) if obj.get("gpu") is not None else None, + "service_types": obj.get("service_types"), + "volumes_enabled": obj.get("volumes_enabled"), + "light_sleep_enabled": obj.get("light_sleep_enabled") + }) return _obj + + diff --git a/koyeb/api_async/models/catalog_usage.py b/koyeb/api_async/models/catalog_usage.py index 3ed8f12a..49f94c01 100644 --- a/koyeb/api_async/models/catalog_usage.py +++ b/koyeb/api_async/models/catalog_usage.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CatalogUsage(BaseModel): """ CatalogUsage - """ # noqa: E501 - + """ # noqa: E501 instances: Optional[Dict[str, InstanceAvailability]] = None __properties: ClassVar[List[str]] = ["instances"] @@ -40,6 +38,7 @@ class CatalogUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,12 +74,9 @@ def to_dict(self) -> Dict[str, Any]: _field_dict = {} if self.instances: for _key_instances in self.instances: - _field_dict[_key_instances] = ( - self.instances[_key_instances].to_dict() - if self.instances[_key_instances] is not None - else None - ) - _dict["instances"] = _field_dict + if self.instances[_key_instances]: + _field_dict[_key_instances] = self.instances[_key_instances].to_dict() + _dict['instances'] = _field_dict return _dict @classmethod @@ -91,14 +88,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instances": dict( - (_k, InstanceAvailability.from_dict(_v)) - for _k, _v in obj["instances"].items() - ) - if obj.get("instances") is not None - else None - } - ) + _obj = cls.model_validate({ + "instances": dict( + (_k, InstanceAvailability.from_dict(_v)) + for _k, _v in obj["instances"].items() + ) + if obj.get("instances") is not None + else None + }) return _obj + + diff --git a/koyeb/api_async/models/check_coupon_reply.py b/koyeb/api_async/models/check_coupon_reply.py index 57e0905c..2a13bd32 100644 --- a/koyeb/api_async/models/check_coupon_reply.py +++ b/koyeb/api_async/models/check_coupon_reply.py @@ -23,22 +23,15 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CheckCouponReply(BaseModel): """ CheckCouponReply - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None percent_off: Optional[Union[StrictFloat, StrictInt]] = None amount_off: Optional[StrictStr] = None currency: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "name", - "percent_off", - "amount_off", - "currency", - ] + __properties: ClassVar[List[str]] = ["name", "percent_off", "amount_off", "currency"] model_config = ConfigDict( validate_by_name=True, @@ -47,6 +40,7 @@ class CheckCouponReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -88,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "percent_off": obj.get("percent_off"), - "amount_off": obj.get("amount_off"), - "currency": obj.get("currency"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "percent_off": obj.get("percent_off"), + "amount_off": obj.get("amount_off"), + "currency": obj.get("currency") + }) return _obj + + diff --git a/koyeb/api_async/models/clear_idenfy_verification_result_request.py b/koyeb/api_async/models/clear_idenfy_verification_result_request.py index ad64d103..ebf9fd32 100644 --- a/koyeb/api_async/models/clear_idenfy_verification_result_request.py +++ b/koyeb/api_async/models/clear_idenfy_verification_result_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ClearIdenfyVerificationResultRequest(BaseModel): """ ClearIdenfyVerificationResultRequest - """ # noqa: E501 - + """ # noqa: E501 user_id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["user_id", "organization_id"] @@ -40,6 +38,7 @@ class ClearIdenfyVerificationResultRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,10 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "user_id": obj.get("user_id"), - "organization_id": obj.get("organization_id"), - } - ) + _obj = cls.model_validate({ + "user_id": obj.get("user_id"), + "organization_id": obj.get("organization_id") + }) return _obj + + diff --git a/koyeb/api_async/models/compose_reply.py b/koyeb/api_async/models/compose_reply.py index cffb45e9..c70d6f1d 100644 --- a/koyeb/api_async/models/compose_reply.py +++ b/koyeb/api_async/models/compose_reply.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ComposeReply(BaseModel): """ ComposeReply - """ # noqa: E501 - + """ # noqa: E501 app: Optional[App] = None services: Optional[List[Service]] = None __properties: ClassVar[List[str]] = ["app", "services"] @@ -42,6 +40,7 @@ class ComposeReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,15 +74,14 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of app if self.app: - _dict["app"] = self.app.to_dict() + _dict['app'] = self.app.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in services (list) _items = [] if self.services: for _item_services in self.services: - _items.append( - _item_services.to_dict() if _item_services is not None else None - ) - _dict["services"] = _items + if _item_services: + _items.append(_item_services.to_dict()) + _dict['services'] = _items return _dict @classmethod @@ -94,14 +93,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "app": App.from_dict(obj["app"]) - if obj.get("app") is not None - else None, - "services": [Service.from_dict(_item) for _item in obj["services"]] - if obj.get("services") is not None - else None, - } - ) + _obj = cls.model_validate({ + "app": App.from_dict(obj["app"]) if obj.get("app") is not None else None, + "services": [Service.from_dict(_item) for _item in obj["services"]] if obj.get("services") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/config_file.py b/koyeb/api_async/models/config_file.py index 01300f05..b8e444e5 100644 --- a/koyeb/api_async/models/config_file.py +++ b/koyeb/api_async/models/config_file.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ConfigFile(BaseModel): """ ConfigFile - """ # noqa: E501 - + """ # noqa: E501 path: Optional[StrictStr] = None permissions: Optional[StrictStr] = None content: Optional[StrictStr] = None @@ -41,6 +39,7 @@ class ConfigFile(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "path": obj.get("path"), - "permissions": obj.get("permissions"), - "content": obj.get("content"), - } - ) + _obj = cls.model_validate({ + "path": obj.get("path"), + "permissions": obj.get("permissions"), + "content": obj.get("content") + }) return _obj + + diff --git a/koyeb/api_async/models/confirm_payment_authorization_reply.py b/koyeb/api_async/models/confirm_payment_authorization_reply.py index 353145a4..3dd0b186 100644 --- a/koyeb/api_async/models/confirm_payment_authorization_reply.py +++ b/koyeb/api_async/models/confirm_payment_authorization_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ConfirmPaymentAuthorizationReply(BaseModel): """ ConfirmPaymentAuthorizationReply - """ # noqa: E501 - + """ # noqa: E501 payment_method: Optional[PaymentMethod] = None __properties: ClassVar[List[str]] = ["payment_method"] @@ -40,6 +38,7 @@ class ConfirmPaymentAuthorizationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of payment_method if self.payment_method: - _dict["payment_method"] = self.payment_method.to_dict() + _dict['payment_method'] = self.payment_method.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "payment_method": PaymentMethod.from_dict(obj["payment_method"]) - if obj.get("payment_method") is not None - else None - } - ) + _obj = cls.model_validate({ + "payment_method": PaymentMethod.from_dict(obj["payment_method"]) if obj.get("payment_method") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_access_token_reply.py b/koyeb/api_async/models/create_access_token_reply.py index 4e8d896b..23a91db2 100644 --- a/koyeb/api_async/models/create_access_token_reply.py +++ b/koyeb/api_async/models/create_access_token_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateAccessTokenReply(BaseModel): """ CreateAccessTokenReply - """ # noqa: E501 - + """ # noqa: E501 token: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["token"] @@ -39,6 +37,7 @@ class CreateAccessTokenReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"token": obj.get("token")}) + _obj = cls.model_validate({ + "token": obj.get("token") + }) return _obj + + diff --git a/koyeb/api_async/models/create_access_token_request.py b/koyeb/api_async/models/create_access_token_request.py index fc62077c..fa9b6d85 100644 --- a/koyeb/api_async/models/create_access_token_request.py +++ b/koyeb/api_async/models/create_access_token_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateAccessTokenRequest(BaseModel): """ CreateAccessTokenRequest - """ # noqa: E501 - + """ # noqa: E501 validity: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["validity"] @@ -39,6 +37,7 @@ class CreateAccessTokenRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"validity": obj.get("validity")}) + _obj = cls.model_validate({ + "validity": obj.get("validity") + }) return _obj + + diff --git a/koyeb/api_async/models/create_account_request.py b/koyeb/api_async/models/create_account_request.py index a3ebcf36..a076eec5 100644 --- a/koyeb/api_async/models/create_account_request.py +++ b/koyeb/api_async/models/create_account_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateAccountRequest(BaseModel): """ Create new account - """ # noqa: E501 - + """ # noqa: E501 email: StrictStr password: StrictStr name: Optional[StrictStr] = None @@ -42,6 +40,7 @@ class CreateAccountRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "email": obj.get("email"), - "password": obj.get("password"), - "name": obj.get("name"), - "captcha": obj.get("captcha"), - } - ) + _obj = cls.model_validate({ + "email": obj.get("email"), + "password": obj.get("password"), + "name": obj.get("name"), + "captcha": obj.get("captcha") + }) return _obj + + diff --git a/koyeb/api_async/models/create_app.py b/koyeb/api_async/models/create_app.py index 9fd0fd7e..bfb4d51c 100644 --- a/koyeb/api_async/models/create_app.py +++ b/koyeb/api_async/models/create_app.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateApp(BaseModel): """ CreateApp - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None life_cycle: Optional[AppLifeCycle] = None __properties: ClassVar[List[str]] = ["name", "life_cycle"] @@ -41,6 +39,7 @@ class CreateApp(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of life_cycle if self.life_cycle: - _dict["life_cycle"] = self.life_cycle.to_dict() + _dict['life_cycle'] = self.life_cycle.to_dict() return _dict @classmethod @@ -85,12 +85,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "life_cycle": AppLifeCycle.from_dict(obj["life_cycle"]) - if obj.get("life_cycle") is not None - else None, - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "life_cycle": AppLifeCycle.from_dict(obj["life_cycle"]) if obj.get("life_cycle") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_app_reply.py b/koyeb/api_async/models/create_app_reply.py index c4d68da7..f29d82d5 100644 --- a/koyeb/api_async/models/create_app_reply.py +++ b/koyeb/api_async/models/create_app_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateAppReply(BaseModel): """ CreateAppReply - """ # noqa: E501 - + """ # noqa: E501 app: Optional[App] = None __properties: ClassVar[List[str]] = ["app"] @@ -40,6 +38,7 @@ class CreateAppReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of app if self.app: - _dict["app"] = self.app.to_dict() + _dict['app'] = self.app.to_dict() return _dict @classmethod @@ -84,7 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"app": App.from_dict(obj["app"]) if obj.get("app") is not None else None} - ) + _obj = cls.model_validate({ + "app": App.from_dict(obj["app"]) if obj.get("app") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_archive.py b/koyeb/api_async/models/create_archive.py index 22f983d5..c8b6202e 100644 --- a/koyeb/api_async/models/create_archive.py +++ b/koyeb/api_async/models/create_archive.py @@ -23,16 +23,11 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateArchive(BaseModel): """ CreateArchive - """ # noqa: E501 - - size: Optional[StrictStr] = Field( - default=None, - description="How much space to provision for the archive, in bytes.", - ) + """ # noqa: E501 + size: Optional[StrictStr] = Field(default=None, description="How much space to provision for the archive, in bytes.") __properties: ClassVar[List[str]] = ["size"] model_config = ConfigDict( @@ -42,6 +37,7 @@ class CreateArchive(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"size": obj.get("size")}) + _obj = cls.model_validate({ + "size": obj.get("size") + }) return _obj + + diff --git a/koyeb/api_async/models/create_archive_reply.py b/koyeb/api_async/models/create_archive_reply.py index 61f2c4fc..19cad8ca 100644 --- a/koyeb/api_async/models/create_archive_reply.py +++ b/koyeb/api_async/models/create_archive_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateArchiveReply(BaseModel): """ CreateArchiveReply - """ # noqa: E501 - + """ # noqa: E501 archive: Optional[Archive] = None __properties: ClassVar[List[str]] = ["archive"] @@ -40,6 +38,7 @@ class CreateArchiveReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of archive if self.archive: - _dict["archive"] = self.archive.to_dict() + _dict['archive'] = self.archive.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "archive": Archive.from_dict(obj["archive"]) - if obj.get("archive") is not None - else None - } - ) + _obj = cls.model_validate({ + "archive": Archive.from_dict(obj["archive"]) if obj.get("archive") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_budget_reply.py b/koyeb/api_async/models/create_budget_reply.py index 0e9122d9..2c91b2f3 100644 --- a/koyeb/api_async/models/create_budget_reply.py +++ b/koyeb/api_async/models/create_budget_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateBudgetReply(BaseModel): """ CreateBudgetReply - """ # noqa: E501 - + """ # noqa: E501 budget: Optional[Budget] = None __properties: ClassVar[List[str]] = ["budget"] @@ -40,6 +38,7 @@ class CreateBudgetReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of budget if self.budget: - _dict["budget"] = self.budget.to_dict() + _dict['budget'] = self.budget.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "budget": Budget.from_dict(obj["budget"]) - if obj.get("budget") is not None - else None - } - ) + _obj = cls.model_validate({ + "budget": Budget.from_dict(obj["budget"]) if obj.get("budget") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_compose.py b/koyeb/api_async/models/create_compose.py index 30479d67..9fc73e6b 100644 --- a/koyeb/api_async/models/create_compose.py +++ b/koyeb/api_async/models/create_compose.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateCompose(BaseModel): """ CreateCompose - """ # noqa: E501 - + """ # noqa: E501 app: Optional[CreateApp] = None services: Optional[List[CreateService]] = None __properties: ClassVar[List[str]] = ["app", "services"] @@ -42,6 +40,7 @@ class CreateCompose(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,15 +74,14 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of app if self.app: - _dict["app"] = self.app.to_dict() + _dict['app'] = self.app.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in services (list) _items = [] if self.services: for _item_services in self.services: - _items.append( - _item_services.to_dict() if _item_services is not None else None - ) - _dict["services"] = _items + if _item_services: + _items.append(_item_services.to_dict()) + _dict['services'] = _items return _dict @classmethod @@ -94,16 +93,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "app": CreateApp.from_dict(obj["app"]) - if obj.get("app") is not None - else None, - "services": [ - CreateService.from_dict(_item) for _item in obj["services"] - ] - if obj.get("services") is not None - else None, - } - ) + _obj = cls.model_validate({ + "app": CreateApp.from_dict(obj["app"]) if obj.get("app") is not None else None, + "services": [CreateService.from_dict(_item) for _item in obj["services"]] if obj.get("services") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_credential.py b/koyeb/api_async/models/create_credential.py index 1d04fe0b..fb219900 100644 --- a/koyeb/api_async/models/create_credential.py +++ b/koyeb/api_async/models/create_credential.py @@ -24,22 +24,15 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateCredential(BaseModel): """ CreateCredential - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None description: Optional[StrictStr] = None type: Optional[CredentialType] = CredentialType.INVALID organization_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "name", - "description", - "type", - "organization_id", - ] + __properties: ClassVar[List[str]] = ["name", "description", "type", "organization_id"] model_config = ConfigDict( validate_by_name=True, @@ -48,6 +41,7 @@ class CreateCredential(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -71,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -89,14 +84,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "description": obj.get("description"), - "type": obj.get("type") - if obj.get("type") is not None - else CredentialType.INVALID, - "organization_id": obj.get("organization_id"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description"), + "type": obj.get("type") if obj.get("type") is not None else CredentialType.INVALID, + "organization_id": obj.get("organization_id") + }) return _obj + + diff --git a/koyeb/api_async/models/create_credential_reply.py b/koyeb/api_async/models/create_credential_reply.py index d7adb4a0..a3f8b15e 100644 --- a/koyeb/api_async/models/create_credential_reply.py +++ b/koyeb/api_async/models/create_credential_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateCredentialReply(BaseModel): """ CreateCredentialReply - """ # noqa: E501 - + """ # noqa: E501 credential: Optional[Credential] = None __properties: ClassVar[List[str]] = ["credential"] @@ -40,6 +38,7 @@ class CreateCredentialReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of credential if self.credential: - _dict["credential"] = self.credential.to_dict() + _dict['credential'] = self.credential.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "credential": Credential.from_dict(obj["credential"]) - if obj.get("credential") is not None - else None - } - ) + _obj = cls.model_validate({ + "credential": Credential.from_dict(obj["credential"]) if obj.get("credential") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_domain.py b/koyeb/api_async/models/create_domain.py index 6a3a50bc..539bd023 100644 --- a/koyeb/api_async/models/create_domain.py +++ b/koyeb/api_async/models/create_domain.py @@ -25,24 +25,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateDomain(BaseModel): """ CreateDomain - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None type: Optional[DomainType] = DomainType.AUTOASSIGNED app_id: Optional[StrictStr] = None cloudflare: Optional[Dict[str, Any]] = None koyeb: Optional[DomainLoadBalancerKoyeb] = None - __properties: ClassVar[List[str]] = [ - "name", - "type", - "app_id", - "cloudflare", - "koyeb", - ] + __properties: ClassVar[List[str]] = ["name", "type", "app_id", "cloudflare", "koyeb"] model_config = ConfigDict( validate_by_name=True, @@ -51,6 +43,7 @@ class CreateDomain(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of koyeb if self.koyeb: - _dict["koyeb"] = self.koyeb.to_dict() + _dict['koyeb'] = self.koyeb.to_dict() return _dict @classmethod @@ -95,17 +89,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "type": obj.get("type") - if obj.get("type") is not None - else DomainType.AUTOASSIGNED, - "app_id": obj.get("app_id"), - "cloudflare": obj.get("cloudflare"), - "koyeb": DomainLoadBalancerKoyeb.from_dict(obj["koyeb"]) - if obj.get("koyeb") is not None - else None, - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "type": obj.get("type") if obj.get("type") is not None else DomainType.AUTOASSIGNED, + "app_id": obj.get("app_id"), + "cloudflare": obj.get("cloudflare"), + "koyeb": DomainLoadBalancerKoyeb.from_dict(obj["koyeb"]) if obj.get("koyeb") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_domain_reply.py b/koyeb/api_async/models/create_domain_reply.py index 5fb21b3a..ec608d44 100644 --- a/koyeb/api_async/models/create_domain_reply.py +++ b/koyeb/api_async/models/create_domain_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateDomainReply(BaseModel): """ CreateDomainReply - """ # noqa: E501 - + """ # noqa: E501 domain: Optional[Domain] = None __properties: ClassVar[List[str]] = ["domain"] @@ -40,6 +38,7 @@ class CreateDomainReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of domain if self.domain: - _dict["domain"] = self.domain.to_dict() + _dict['domain'] = self.domain.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "domain": Domain.from_dict(obj["domain"]) - if obj.get("domain") is not None - else None - } - ) + _obj = cls.model_validate({ + "domain": Domain.from_dict(obj["domain"]) if obj.get("domain") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_instance_snapshot_reply.py b/koyeb/api_async/models/create_instance_snapshot_reply.py index 154bc949..80e055f5 100644 --- a/koyeb/api_async/models/create_instance_snapshot_reply.py +++ b/koyeb/api_async/models/create_instance_snapshot_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateInstanceSnapshotReply(BaseModel): """ CreateInstanceSnapshotReply - """ # noqa: E501 - + """ # noqa: E501 instance_snapshot: Optional[InstanceSnapshot] = None __properties: ClassVar[List[str]] = ["instance_snapshot"] @@ -40,6 +38,7 @@ class CreateInstanceSnapshotReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of instance_snapshot if self.instance_snapshot: - _dict["instance_snapshot"] = self.instance_snapshot.to_dict() + _dict['instance_snapshot'] = self.instance_snapshot.to_dict() return _dict @classmethod @@ -84,13 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instance_snapshot": InstanceSnapshot.from_dict( - obj["instance_snapshot"] - ) - if obj.get("instance_snapshot") is not None - else None - } - ) + _obj = cls.model_validate({ + "instance_snapshot": InstanceSnapshot.from_dict(obj["instance_snapshot"]) if obj.get("instance_snapshot") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_instance_snapshot_request.py b/koyeb/api_async/models/create_instance_snapshot_request.py index 1dff9775..a6eb8343 100644 --- a/koyeb/api_async/models/create_instance_snapshot_request.py +++ b/koyeb/api_async/models/create_instance_snapshot_request.py @@ -24,17 +24,13 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateInstanceSnapshotRequest(BaseModel): """ CreateInstanceSnapshotRequest - """ # noqa: E501 - + """ # noqa: E501 instance_id: Optional[StrictStr] = None name: Optional[StrictStr] = None - type: Optional[ - InstanceSnapshotType - ] = InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID + type: Optional[InstanceSnapshotType] = InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID __properties: ClassVar[List[str]] = ["instance_id", "name", "type"] model_config = ConfigDict( @@ -44,6 +40,7 @@ class CreateInstanceSnapshotRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -85,13 +83,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instance_id": obj.get("instance_id"), - "name": obj.get("name"), - "type": obj.get("type") - if obj.get("type") is not None - else InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID, - } - ) + _obj = cls.model_validate({ + "instance_id": obj.get("instance_id"), + "name": obj.get("name"), + "type": obj.get("type") if obj.get("type") is not None else InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID + }) return _obj + + diff --git a/koyeb/api_async/models/create_organization_invitation_reply.py b/koyeb/api_async/models/create_organization_invitation_reply.py index a7b7bc3e..ea45a077 100644 --- a/koyeb/api_async/models/create_organization_invitation_reply.py +++ b/koyeb/api_async/models/create_organization_invitation_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateOrganizationInvitationReply(BaseModel): """ CreateOrganizationInvitationReply - """ # noqa: E501 - + """ # noqa: E501 invitation: Optional[OrganizationInvitation] = None __properties: ClassVar[List[str]] = ["invitation"] @@ -40,6 +38,7 @@ class CreateOrganizationInvitationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of invitation if self.invitation: - _dict["invitation"] = self.invitation.to_dict() + _dict['invitation'] = self.invitation.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "invitation": OrganizationInvitation.from_dict(obj["invitation"]) - if obj.get("invitation") is not None - else None - } - ) + _obj = cls.model_validate({ + "invitation": OrganizationInvitation.from_dict(obj["invitation"]) if obj.get("invitation") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_organization_invitation_request.py b/koyeb/api_async/models/create_organization_invitation_request.py index 0bf58fc4..39fb4c12 100644 --- a/koyeb/api_async/models/create_organization_invitation_request.py +++ b/koyeb/api_async/models/create_organization_invitation_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateOrganizationInvitationRequest(BaseModel): """ CreateOrganizationInvitationRequest - """ # noqa: E501 - + """ # noqa: E501 email: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["email"] @@ -39,6 +37,7 @@ class CreateOrganizationInvitationRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"email": obj.get("email")}) + _obj = cls.model_validate({ + "email": obj.get("email") + }) return _obj + + diff --git a/koyeb/api_async/models/create_organization_reply.py b/koyeb/api_async/models/create_organization_reply.py index 33703d38..1356c127 100644 --- a/koyeb/api_async/models/create_organization_reply.py +++ b/koyeb/api_async/models/create_organization_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateOrganizationReply(BaseModel): """ CreateOrganizationReply - """ # noqa: E501 - + """ # noqa: E501 organization: Optional[Organization] = None __properties: ClassVar[List[str]] = ["organization"] @@ -40,6 +38,7 @@ class CreateOrganizationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization": Organization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None - } - ) + _obj = cls.model_validate({ + "organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_organization_request.py b/koyeb/api_async/models/create_organization_request.py index e56892d4..0714ddbb 100644 --- a/koyeb/api_async/models/create_organization_request.py +++ b/koyeb/api_async/models/create_organization_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateOrganizationRequest(BaseModel): """ CreateOrganizationRequest - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name"] @@ -39,6 +37,7 @@ class CreateOrganizationRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"name": obj.get("name")}) + _obj = cls.model_validate({ + "name": obj.get("name") + }) return _obj + + diff --git a/koyeb/api_async/models/create_payment_authorization_reply.py b/koyeb/api_async/models/create_payment_authorization_reply.py index 1f35153c..b4cdc727 100644 --- a/koyeb/api_async/models/create_payment_authorization_reply.py +++ b/koyeb/api_async/models/create_payment_authorization_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreatePaymentAuthorizationReply(BaseModel): """ CreatePaymentAuthorizationReply - """ # noqa: E501 - + """ # noqa: E501 payment_method: Optional[PaymentMethod] = None __properties: ClassVar[List[str]] = ["payment_method"] @@ -40,6 +38,7 @@ class CreatePaymentAuthorizationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of payment_method if self.payment_method: - _dict["payment_method"] = self.payment_method.to_dict() + _dict['payment_method'] = self.payment_method.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "payment_method": PaymentMethod.from_dict(obj["payment_method"]) - if obj.get("payment_method") is not None - else None - } - ) + _obj = cls.model_validate({ + "payment_method": PaymentMethod.from_dict(obj["payment_method"]) if obj.get("payment_method") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_persistent_volume_reply.py b/koyeb/api_async/models/create_persistent_volume_reply.py index fceb50f8..e6a36b9f 100644 --- a/koyeb/api_async/models/create_persistent_volume_reply.py +++ b/koyeb/api_async/models/create_persistent_volume_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreatePersistentVolumeReply(BaseModel): """ CreatePersistentVolumeReply - """ # noqa: E501 - + """ # noqa: E501 volume: Optional[PersistentVolume] = None __properties: ClassVar[List[str]] = ["volume"] @@ -40,6 +38,7 @@ class CreatePersistentVolumeReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of volume if self.volume: - _dict["volume"] = self.volume.to_dict() + _dict['volume'] = self.volume.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "volume": PersistentVolume.from_dict(obj["volume"]) - if obj.get("volume") is not None - else None - } - ) + _obj = cls.model_validate({ + "volume": PersistentVolume.from_dict(obj["volume"]) if obj.get("volume") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_persistent_volume_request.py b/koyeb/api_async/models/create_persistent_volume_request.py index b3f06b29..d7fdd983 100644 --- a/koyeb/api_async/models/create_persistent_volume_request.py +++ b/koyeb/api_async/models/create_persistent_volume_request.py @@ -19,35 +19,22 @@ from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.persistent_volume_backing_store import ( - PersistentVolumeBackingStore, -) +from koyeb.api_async.models.persistent_volume_backing_store import PersistentVolumeBackingStore from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreatePersistentVolumeRequest(BaseModel): """ CreatePersistentVolumeRequest - """ # noqa: E501 - - volume_type: Optional[ - PersistentVolumeBackingStore - ] = PersistentVolumeBackingStore.PERSISTENT_VOLUME_BACKING_STORE_INVALID + """ # noqa: E501 + volume_type: Optional[PersistentVolumeBackingStore] = PersistentVolumeBackingStore.PERSISTENT_VOLUME_BACKING_STORE_INVALID name: Optional[StrictStr] = None region: Optional[StrictStr] = None read_only: Optional[StrictBool] = None max_size: Optional[StrictInt] = None snapshot_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "volume_type", - "name", - "region", - "read_only", - "max_size", - "snapshot_id", - ] + __properties: ClassVar[List[str]] = ["volume_type", "name", "region", "read_only", "max_size", "snapshot_id"] model_config = ConfigDict( validate_by_name=True, @@ -56,6 +43,7 @@ class CreatePersistentVolumeRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -79,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -97,16 +86,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "volume_type": obj.get("volume_type") - if obj.get("volume_type") is not None - else PersistentVolumeBackingStore.PERSISTENT_VOLUME_BACKING_STORE_INVALID, - "name": obj.get("name"), - "region": obj.get("region"), - "read_only": obj.get("read_only"), - "max_size": obj.get("max_size"), - "snapshot_id": obj.get("snapshot_id"), - } - ) + _obj = cls.model_validate({ + "volume_type": obj.get("volume_type") if obj.get("volume_type") is not None else PersistentVolumeBackingStore.PERSISTENT_VOLUME_BACKING_STORE_INVALID, + "name": obj.get("name"), + "region": obj.get("region"), + "read_only": obj.get("read_only"), + "max_size": obj.get("max_size"), + "snapshot_id": obj.get("snapshot_id") + }) return _obj + + diff --git a/koyeb/api_async/models/create_project.py b/koyeb/api_async/models/create_project.py index 0bde34b8..28484cb9 100644 --- a/koyeb/api_async/models/create_project.py +++ b/koyeb/api_async/models/create_project.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateProject(BaseModel): """ CreateProject - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None description: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name", "description"] @@ -40,6 +38,7 @@ class CreateProject(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"name": obj.get("name"), "description": obj.get("description")} - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "description": obj.get("description") + }) return _obj + + diff --git a/koyeb/api_async/models/create_project_reply.py b/koyeb/api_async/models/create_project_reply.py index 95eca82b..46943a52 100644 --- a/koyeb/api_async/models/create_project_reply.py +++ b/koyeb/api_async/models/create_project_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateProjectReply(BaseModel): """ CreateProjectReply - """ # noqa: E501 - + """ # noqa: E501 project: Optional[Project] = None __properties: ClassVar[List[str]] = ["project"] @@ -40,6 +38,7 @@ class CreateProjectReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of project if self.project: - _dict["project"] = self.project.to_dict() + _dict['project'] = self.project.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "project": Project.from_dict(obj["project"]) - if obj.get("project") is not None - else None - } - ) + _obj = cls.model_validate({ + "project": Project.from_dict(obj["project"]) if obj.get("project") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_secret.py b/koyeb/api_async/models/create_secret.py index f461222f..6b09b8d1 100644 --- a/koyeb/api_async/models/create_secret.py +++ b/koyeb/api_async/models/create_secret.py @@ -19,38 +19,22 @@ from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.azure_container_registry_configuration import ( - AzureContainerRegistryConfiguration, -) -from koyeb.api_async.models.digital_ocean_registry_configuration import ( - DigitalOceanRegistryConfiguration, -) -from koyeb.api_async.models.docker_hub_registry_configuration import ( - DockerHubRegistryConfiguration, -) -from koyeb.api_async.models.gcp_container_registry_configuration import ( - GCPContainerRegistryConfiguration, -) -from koyeb.api_async.models.git_hub_registry_configuration import ( - GitHubRegistryConfiguration, -) -from koyeb.api_async.models.git_lab_registry_configuration import ( - GitLabRegistryConfiguration, -) -from koyeb.api_async.models.private_registry_configuration import ( - PrivateRegistryConfiguration, -) +from koyeb.api_async.models.azure_container_registry_configuration import AzureContainerRegistryConfiguration +from koyeb.api_async.models.digital_ocean_registry_configuration import DigitalOceanRegistryConfiguration +from koyeb.api_async.models.docker_hub_registry_configuration import DockerHubRegistryConfiguration +from koyeb.api_async.models.gcp_container_registry_configuration import GCPContainerRegistryConfiguration +from koyeb.api_async.models.git_hub_registry_configuration import GitHubRegistryConfiguration +from koyeb.api_async.models.git_lab_registry_configuration import GitLabRegistryConfiguration +from koyeb.api_async.models.private_registry_configuration import PrivateRegistryConfiguration from koyeb.api_async.models.secret_type import SecretType from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateSecret(BaseModel): """ CreateSecret - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None type: Optional[SecretType] = SecretType.SIMPLE value: Optional[StrictStr] = None @@ -61,18 +45,7 @@ class CreateSecret(BaseModel): gitlab_registry: Optional[GitLabRegistryConfiguration] = None gcp_container_registry: Optional[GCPContainerRegistryConfiguration] = None azure_container_registry: Optional[AzureContainerRegistryConfiguration] = None - __properties: ClassVar[List[str]] = [ - "name", - "type", - "value", - "docker_hub_registry", - "private_registry", - "digital_ocean_registry", - "github_registry", - "gitlab_registry", - "gcp_container_registry", - "azure_container_registry", - ] + __properties: ClassVar[List[str]] = ["name", "type", "value", "docker_hub_registry", "private_registry", "digital_ocean_registry", "github_registry", "gitlab_registry", "gcp_container_registry", "azure_container_registry"] model_config = ConfigDict( validate_by_name=True, @@ -81,6 +54,7 @@ class CreateSecret(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -104,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -113,25 +88,25 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of docker_hub_registry if self.docker_hub_registry: - _dict["docker_hub_registry"] = self.docker_hub_registry.to_dict() + _dict['docker_hub_registry'] = self.docker_hub_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of private_registry if self.private_registry: - _dict["private_registry"] = self.private_registry.to_dict() + _dict['private_registry'] = self.private_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of digital_ocean_registry if self.digital_ocean_registry: - _dict["digital_ocean_registry"] = self.digital_ocean_registry.to_dict() + _dict['digital_ocean_registry'] = self.digital_ocean_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of github_registry if self.github_registry: - _dict["github_registry"] = self.github_registry.to_dict() + _dict['github_registry'] = self.github_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of gitlab_registry if self.gitlab_registry: - _dict["gitlab_registry"] = self.gitlab_registry.to_dict() + _dict['gitlab_registry'] = self.gitlab_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of gcp_container_registry if self.gcp_container_registry: - _dict["gcp_container_registry"] = self.gcp_container_registry.to_dict() + _dict['gcp_container_registry'] = self.gcp_container_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of azure_container_registry if self.azure_container_registry: - _dict["azure_container_registry"] = self.azure_container_registry.to_dict() + _dict['azure_container_registry'] = self.azure_container_registry.to_dict() return _dict @classmethod @@ -143,48 +118,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "type": obj.get("type") - if obj.get("type") is not None - else SecretType.SIMPLE, - "value": obj.get("value"), - "docker_hub_registry": DockerHubRegistryConfiguration.from_dict( - obj["docker_hub_registry"] - ) - if obj.get("docker_hub_registry") is not None - else None, - "private_registry": PrivateRegistryConfiguration.from_dict( - obj["private_registry"] - ) - if obj.get("private_registry") is not None - else None, - "digital_ocean_registry": DigitalOceanRegistryConfiguration.from_dict( - obj["digital_ocean_registry"] - ) - if obj.get("digital_ocean_registry") is not None - else None, - "github_registry": GitHubRegistryConfiguration.from_dict( - obj["github_registry"] - ) - if obj.get("github_registry") is not None - else None, - "gitlab_registry": GitLabRegistryConfiguration.from_dict( - obj["gitlab_registry"] - ) - if obj.get("gitlab_registry") is not None - else None, - "gcp_container_registry": GCPContainerRegistryConfiguration.from_dict( - obj["gcp_container_registry"] - ) - if obj.get("gcp_container_registry") is not None - else None, - "azure_container_registry": AzureContainerRegistryConfiguration.from_dict( - obj["azure_container_registry"] - ) - if obj.get("azure_container_registry") is not None - else None, - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "type": obj.get("type") if obj.get("type") is not None else SecretType.SIMPLE, + "value": obj.get("value"), + "docker_hub_registry": DockerHubRegistryConfiguration.from_dict(obj["docker_hub_registry"]) if obj.get("docker_hub_registry") is not None else None, + "private_registry": PrivateRegistryConfiguration.from_dict(obj["private_registry"]) if obj.get("private_registry") is not None else None, + "digital_ocean_registry": DigitalOceanRegistryConfiguration.from_dict(obj["digital_ocean_registry"]) if obj.get("digital_ocean_registry") is not None else None, + "github_registry": GitHubRegistryConfiguration.from_dict(obj["github_registry"]) if obj.get("github_registry") is not None else None, + "gitlab_registry": GitLabRegistryConfiguration.from_dict(obj["gitlab_registry"]) if obj.get("gitlab_registry") is not None else None, + "gcp_container_registry": GCPContainerRegistryConfiguration.from_dict(obj["gcp_container_registry"]) if obj.get("gcp_container_registry") is not None else None, + "azure_container_registry": AzureContainerRegistryConfiguration.from_dict(obj["azure_container_registry"]) if obj.get("azure_container_registry") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_secret_reply.py b/koyeb/api_async/models/create_secret_reply.py index e4c998d2..55a19d4f 100644 --- a/koyeb/api_async/models/create_secret_reply.py +++ b/koyeb/api_async/models/create_secret_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateSecretReply(BaseModel): """ CreateSecretReply - """ # noqa: E501 - + """ # noqa: E501 secret: Optional[Secret] = None __properties: ClassVar[List[str]] = ["secret"] @@ -40,6 +38,7 @@ class CreateSecretReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of secret if self.secret: - _dict["secret"] = self.secret.to_dict() + _dict['secret'] = self.secret.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "secret": Secret.from_dict(obj["secret"]) - if obj.get("secret") is not None - else None - } - ) + _obj = cls.model_validate({ + "secret": Secret.from_dict(obj["secret"]) if obj.get("secret") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_service.py b/koyeb/api_async/models/create_service.py index aeb3543f..aa358457 100644 --- a/koyeb/api_async/models/create_service.py +++ b/koyeb/api_async/models/create_service.py @@ -25,29 +25,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateService(BaseModel): """ CreateService - """ # noqa: E501 - + """ # noqa: E501 app_id: Optional[StrictStr] = None definition: Optional[DeploymentDefinition] = None life_cycle: Optional[ServiceLifeCycle] = None instance_snapshot_id: Optional[StrictStr] = None name: Optional[StrictStr] = None - service_account_id: Optional[StrictStr] = Field( - default=None, - description="(Optional) The Albe service account ID to associate with the service. Immutable after creation.", - ) - __properties: ClassVar[List[str]] = [ - "app_id", - "definition", - "life_cycle", - "instance_snapshot_id", - "name", - "service_account_id", - ] + service_account_id: Optional[StrictStr] = Field(default=None, description="(Optional) The Albe service account ID to associate with the service. Immutable after creation.") + __properties: ClassVar[List[str]] = ["app_id", "definition", "life_cycle", "instance_snapshot_id", "name", "service_account_id"] model_config = ConfigDict( validate_by_name=True, @@ -56,6 +44,7 @@ class CreateService(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -79,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -88,10 +78,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of definition if self.definition: - _dict["definition"] = self.definition.to_dict() + _dict['definition'] = self.definition.to_dict() # override the default output from pydantic by calling `to_dict()` of life_cycle if self.life_cycle: - _dict["life_cycle"] = self.life_cycle.to_dict() + _dict['life_cycle'] = self.life_cycle.to_dict() return _dict @classmethod @@ -103,18 +93,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "app_id": obj.get("app_id"), - "definition": DeploymentDefinition.from_dict(obj["definition"]) - if obj.get("definition") is not None - else None, - "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) - if obj.get("life_cycle") is not None - else None, - "instance_snapshot_id": obj.get("instance_snapshot_id"), - "name": obj.get("name"), - "service_account_id": obj.get("service_account_id"), - } - ) + _obj = cls.model_validate({ + "app_id": obj.get("app_id"), + "definition": DeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None, + "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) if obj.get("life_cycle") is not None else None, + "instance_snapshot_id": obj.get("instance_snapshot_id"), + "name": obj.get("name"), + "service_account_id": obj.get("service_account_id") + }) return _obj + + diff --git a/koyeb/api_async/models/create_service_pool.py b/koyeb/api_async/models/create_service_pool.py index 7ca696c1..4d2ec538 100644 --- a/koyeb/api_async/models/create_service_pool.py +++ b/koyeb/api_async/models/create_service_pool.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateServicePool(BaseModel): """ CreateServicePool - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None size: Optional[StrictInt] = None definition: Optional[DeploymentDefinition] = None @@ -42,6 +40,7 @@ class CreateServicePool(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of definition if self.definition: - _dict["definition"] = self.definition.to_dict() + _dict['definition'] = self.definition.to_dict() return _dict @classmethod @@ -86,13 +86,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "size": obj.get("size"), - "definition": DeploymentDefinition.from_dict(obj["definition"]) - if obj.get("definition") is not None - else None, - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "size": obj.get("size"), + "definition": DeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_service_pool_reply.py b/koyeb/api_async/models/create_service_pool_reply.py index f3954aad..c64c75e0 100644 --- a/koyeb/api_async/models/create_service_pool_reply.py +++ b/koyeb/api_async/models/create_service_pool_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateServicePoolReply(BaseModel): """ CreateServicePoolReply - """ # noqa: E501 - + """ # noqa: E501 service_pool: Optional[ServicePool] = None __properties: ClassVar[List[str]] = ["service_pool"] @@ -40,6 +38,7 @@ class CreateServicePoolReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of service_pool if self.service_pool: - _dict["service_pool"] = self.service_pool.to_dict() + _dict['service_pool'] = self.service_pool.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service_pool": ServicePool.from_dict(obj["service_pool"]) - if obj.get("service_pool") is not None - else None - } - ) + _obj = cls.model_validate({ + "service_pool": ServicePool.from_dict(obj["service_pool"]) if obj.get("service_pool") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_service_reply.py b/koyeb/api_async/models/create_service_reply.py index c46d793a..36b299f6 100644 --- a/koyeb/api_async/models/create_service_reply.py +++ b/koyeb/api_async/models/create_service_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateServiceReply(BaseModel): """ CreateServiceReply - """ # noqa: E501 - + """ # noqa: E501 service: Optional[Service] = None __properties: ClassVar[List[str]] = ["service"] @@ -40,6 +38,7 @@ class CreateServiceReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of service if self.service: - _dict["service"] = self.service.to_dict() + _dict['service'] = self.service.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service": Service.from_dict(obj["service"]) - if obj.get("service") is not None - else None - } - ) + _obj = cls.model_validate({ + "service": Service.from_dict(obj["service"]) if obj.get("service") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_snapshot_reply.py b/koyeb/api_async/models/create_snapshot_reply.py index 7fff1391..1862f214 100644 --- a/koyeb/api_async/models/create_snapshot_reply.py +++ b/koyeb/api_async/models/create_snapshot_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateSnapshotReply(BaseModel): """ CreateSnapshotReply - """ # noqa: E501 - + """ # noqa: E501 snapshot: Optional[Snapshot] = None __properties: ClassVar[List[str]] = ["snapshot"] @@ -40,6 +38,7 @@ class CreateSnapshotReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of snapshot if self.snapshot: - _dict["snapshot"] = self.snapshot.to_dict() + _dict['snapshot'] = self.snapshot.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "snapshot": Snapshot.from_dict(obj["snapshot"]) - if obj.get("snapshot") is not None - else None - } - ) + _obj = cls.model_validate({ + "snapshot": Snapshot.from_dict(obj["snapshot"]) if obj.get("snapshot") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/create_snapshot_request.py b/koyeb/api_async/models/create_snapshot_request.py index 7a73ac71..289f6da9 100644 --- a/koyeb/api_async/models/create_snapshot_request.py +++ b/koyeb/api_async/models/create_snapshot_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateSnapshotRequest(BaseModel): """ CreateSnapshotRequest - """ # noqa: E501 - + """ # noqa: E501 parent_volume_id: Optional[StrictStr] = None name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["parent_volume_id", "name"] @@ -40,6 +38,7 @@ class CreateSnapshotRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"parent_volume_id": obj.get("parent_volume_id"), "name": obj.get("name")} - ) + _obj = cls.model_validate({ + "parent_volume_id": obj.get("parent_volume_id"), + "name": obj.get("name") + }) return _obj + + diff --git a/koyeb/api_async/models/create_stage_attempt_request.py b/koyeb/api_async/models/create_stage_attempt_request.py index 9b1ef8f1..d39ab662 100644 --- a/koyeb/api_async/models/create_stage_attempt_request.py +++ b/koyeb/api_async/models/create_stage_attempt_request.py @@ -20,33 +20,21 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.deployment_provisioning_info_stage_status import ( - DeploymentProvisioningInfoStageStatus, -) +from koyeb.api_async.models.deployment_provisioning_info_stage_status import DeploymentProvisioningInfoStageStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class CreateStageAttemptRequest(BaseModel): """ CreateStageAttemptRequest - """ # noqa: E501 - + """ # noqa: E501 secret: Optional[StrictStr] = None - status: Optional[ - DeploymentProvisioningInfoStageStatus - ] = DeploymentProvisioningInfoStageStatus.UNKNOWN + status: Optional[DeploymentProvisioningInfoStageStatus] = DeploymentProvisioningInfoStageStatus.UNKNOWN started_at: Optional[datetime] = None messages: Optional[List[StrictStr]] = None steps: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = [ - "secret", - "status", - "started_at", - "messages", - "steps", - ] + __properties: ClassVar[List[str]] = ["secret", "status", "started_at", "messages", "steps"] model_config = ConfigDict( validate_by_name=True, @@ -55,6 +43,7 @@ class CreateStageAttemptRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -78,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -96,15 +86,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "secret": obj.get("secret"), - "status": obj.get("status") - if obj.get("status") is not None - else DeploymentProvisioningInfoStageStatus.UNKNOWN, - "started_at": obj.get("started_at"), - "messages": obj.get("messages"), - "steps": obj.get("steps"), - } - ) + _obj = cls.model_validate({ + "secret": obj.get("secret"), + "status": obj.get("status") if obj.get("status") is not None else DeploymentProvisioningInfoStageStatus.UNKNOWN, + "started_at": obj.get("started_at"), + "messages": obj.get("messages"), + "steps": obj.get("steps") + }) return _obj + + diff --git a/koyeb/api_async/models/credential.py b/koyeb/api_async/models/credential.py index d062909c..38e85eb0 100644 --- a/koyeb/api_async/models/credential.py +++ b/koyeb/api_async/models/credential.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Credential(BaseModel): """ Credential - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None type: Optional[CredentialType] = CredentialType.INVALID name: Optional[StrictStr] = None @@ -41,18 +39,7 @@ class Credential(BaseModel): updated_at: Optional[datetime] = None created_at: Optional[datetime] = None expires_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = [ - "id", - "type", - "name", - "token", - "description", - "user_id", - "organization_id", - "updated_at", - "created_at", - "expires_at", - ] + __properties: ClassVar[List[str]] = ["id", "type", "name", "token", "description", "user_id", "organization_id", "updated_at", "created_at", "expires_at"] model_config = ConfigDict( validate_by_name=True, @@ -61,6 +48,7 @@ class Credential(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -84,7 +72,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -102,20 +91,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "type": obj.get("type") - if obj.get("type") is not None - else CredentialType.INVALID, - "name": obj.get("name"), - "token": obj.get("token"), - "description": obj.get("description"), - "user_id": obj.get("user_id"), - "organization_id": obj.get("organization_id"), - "updated_at": obj.get("updated_at"), - "created_at": obj.get("created_at"), - "expires_at": obj.get("expires_at"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type") if obj.get("type") is not None else CredentialType.INVALID, + "name": obj.get("name"), + "token": obj.get("token"), + "description": obj.get("description"), + "user_id": obj.get("user_id"), + "organization_id": obj.get("organization_id"), + "updated_at": obj.get("updated_at"), + "created_at": obj.get("created_at"), + "expires_at": obj.get("expires_at") + }) return _obj + + diff --git a/koyeb/api_async/models/credential_type.py b/koyeb/api_async/models/credential_type.py index 3d835bd3..bf4708ee 100644 --- a/koyeb/api_async/models/credential_type.py +++ b/koyeb/api_async/models/credential_type.py @@ -26,11 +26,13 @@ class CredentialType(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - USER = "USER" - ORGANIZATION = "ORGANIZATION" + INVALID = 'INVALID' + USER = 'USER' + ORGANIZATION = 'ORGANIZATION' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of CredentialType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/database_deployment_metadata.py b/koyeb/api_async/models/database_deployment_metadata.py index f77b1991..e0a44654 100644 --- a/koyeb/api_async/models/database_deployment_metadata.py +++ b/koyeb/api_async/models/database_deployment_metadata.py @@ -19,19 +19,15 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.neon_postgres_database_deployment_metadata import ( - NeonPostgresDatabaseDeploymentMetadata, -) +from koyeb.api_async.models.neon_postgres_database_deployment_metadata import NeonPostgresDatabaseDeploymentMetadata from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DatabaseDeploymentMetadata(BaseModel): """ DatabaseDeploymentMetadata - """ # noqa: E501 - + """ # noqa: E501 neon_postgres: Optional[NeonPostgresDatabaseDeploymentMetadata] = None __properties: ClassVar[List[str]] = ["neon_postgres"] @@ -42,6 +38,7 @@ class DatabaseDeploymentMetadata(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of neon_postgres if self.neon_postgres: - _dict["neon_postgres"] = self.neon_postgres.to_dict() + _dict['neon_postgres'] = self.neon_postgres.to_dict() return _dict @classmethod @@ -86,13 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "neon_postgres": NeonPostgresDatabaseDeploymentMetadata.from_dict( - obj["neon_postgres"] - ) - if obj.get("neon_postgres") is not None - else None - } - ) + _obj = cls.model_validate({ + "neon_postgres": NeonPostgresDatabaseDeploymentMetadata.from_dict(obj["neon_postgres"]) if obj.get("neon_postgres") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/database_role_password.py b/koyeb/api_async/models/database_role_password.py index c5205862..c405a183 100644 --- a/koyeb/api_async/models/database_role_password.py +++ b/koyeb/api_async/models/database_role_password.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DatabaseRolePassword(BaseModel): """ DatabaseRolePassword - """ # noqa: E501 - + """ # noqa: E501 username: Optional[StrictStr] = None password: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["username", "password"] @@ -40,6 +38,7 @@ class DatabaseRolePassword(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"username": obj.get("username"), "password": obj.get("password")} - ) + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password") + }) return _obj + + diff --git a/koyeb/api_async/models/database_source.py b/koyeb/api_async/models/database_source.py index 14308a66..0a93b775 100644 --- a/koyeb/api_async/models/database_source.py +++ b/koyeb/api_async/models/database_source.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DatabaseSource(BaseModel): """ DatabaseSource - """ # noqa: E501 - + """ # noqa: E501 neon_postgres: Optional[NeonPostgresDatabase] = None __properties: ClassVar[List[str]] = ["neon_postgres"] @@ -40,6 +38,7 @@ class DatabaseSource(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of neon_postgres if self.neon_postgres: - _dict["neon_postgres"] = self.neon_postgres.to_dict() + _dict['neon_postgres'] = self.neon_postgres.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "neon_postgres": NeonPostgresDatabase.from_dict(obj["neon_postgres"]) - if obj.get("neon_postgres") is not None - else None - } - ) + _obj = cls.model_validate({ + "neon_postgres": NeonPostgresDatabase.from_dict(obj["neon_postgres"]) if obj.get("neon_postgres") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/database_usage.py b/koyeb/api_async/models/database_usage.py index 67210716..7343bf59 100644 --- a/koyeb/api_async/models/database_usage.py +++ b/koyeb/api_async/models/database_usage.py @@ -23,22 +23,15 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DatabaseUsage(BaseModel): """ DatabaseUsage - """ # noqa: E501 - + """ # noqa: E501 service_id: Optional[StrictStr] = None service_name: Optional[StrictStr] = None compute_time_seconds: Optional[StrictInt] = None data_storage_megabytes_hours: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = [ - "service_id", - "service_name", - "compute_time_seconds", - "data_storage_megabytes_hours", - ] + __properties: ClassVar[List[str]] = ["service_id", "service_name", "compute_time_seconds", "data_storage_megabytes_hours"] model_config = ConfigDict( validate_by_name=True, @@ -47,6 +40,7 @@ class DatabaseUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -88,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service_id": obj.get("service_id"), - "service_name": obj.get("service_name"), - "compute_time_seconds": obj.get("compute_time_seconds"), - "data_storage_megabytes_hours": obj.get("data_storage_megabytes_hours"), - } - ) + _obj = cls.model_validate({ + "service_id": obj.get("service_id"), + "service_name": obj.get("service_name"), + "compute_time_seconds": obj.get("compute_time_seconds"), + "data_storage_megabytes_hours": obj.get("data_storage_megabytes_hours") + }) return _obj + + diff --git a/koyeb/api_async/models/database_usage_details.py b/koyeb/api_async/models/database_usage_details.py index 12ba6e3c..96eb3fcd 100644 --- a/koyeb/api_async/models/database_usage_details.py +++ b/koyeb/api_async/models/database_usage_details.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DatabaseUsageDetails(BaseModel): """ DatabaseUsageDetails - """ # noqa: E501 - + """ # noqa: E501 organization_id: Optional[StrictStr] = None app_id: Optional[StrictStr] = None app_name: Optional[StrictStr] = None @@ -39,17 +37,7 @@ class DatabaseUsageDetails(BaseModel): data_storage_megabytes_hour: Optional[StrictInt] = None started_at: Optional[datetime] = None terminated_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = [ - "organization_id", - "app_id", - "app_name", - "service_id", - "service_name", - "compute_time_seconds", - "data_storage_megabytes_hour", - "started_at", - "terminated_at", - ] + __properties: ClassVar[List[str]] = ["organization_id", "app_id", "app_name", "service_id", "service_name", "compute_time_seconds", "data_storage_megabytes_hour", "started_at", "terminated_at"] model_config = ConfigDict( validate_by_name=True, @@ -58,6 +46,7 @@ class DatabaseUsageDetails(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -81,7 +70,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -99,17 +89,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization_id": obj.get("organization_id"), - "app_id": obj.get("app_id"), - "app_name": obj.get("app_name"), - "service_id": obj.get("service_id"), - "service_name": obj.get("service_name"), - "compute_time_seconds": obj.get("compute_time_seconds"), - "data_storage_megabytes_hour": obj.get("data_storage_megabytes_hour"), - "started_at": obj.get("started_at"), - "terminated_at": obj.get("terminated_at"), - } - ) + _obj = cls.model_validate({ + "organization_id": obj.get("organization_id"), + "app_id": obj.get("app_id"), + "app_name": obj.get("app_name"), + "service_id": obj.get("service_id"), + "service_name": obj.get("service_name"), + "compute_time_seconds": obj.get("compute_time_seconds"), + "data_storage_megabytes_hour": obj.get("data_storage_megabytes_hour"), + "started_at": obj.get("started_at"), + "terminated_at": obj.get("terminated_at") + }) return _obj + + diff --git a/koyeb/api_async/models/datacenter_list_item.py b/koyeb/api_async/models/datacenter_list_item.py index 3b395b3b..f9806cc1 100644 --- a/koyeb/api_async/models/datacenter_list_item.py +++ b/koyeb/api_async/models/datacenter_list_item.py @@ -23,26 +23,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DatacenterListItem(BaseModel): """ DatacenterListItem - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None region_id: Optional[StrictStr] = None domain: Optional[StrictStr] = None coordinates: Optional[List[StrictStr]] = None use_gpu: Optional[StrictBool] = None regions: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = [ - "id", - "region_id", - "domain", - "coordinates", - "use_gpu", - "regions", - ] + __properties: ClassVar[List[str]] = ["id", "region_id", "domain", "coordinates", "use_gpu", "regions"] model_config = ConfigDict( validate_by_name=True, @@ -51,6 +42,7 @@ class DatacenterListItem(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -92,14 +85,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "region_id": obj.get("region_id"), - "domain": obj.get("domain"), - "coordinates": obj.get("coordinates"), - "use_gpu": obj.get("use_gpu"), - "regions": obj.get("regions"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "region_id": obj.get("region_id"), + "domain": obj.get("domain"), + "coordinates": obj.get("coordinates"), + "use_gpu": obj.get("use_gpu"), + "regions": obj.get("regions") + }) return _obj + + diff --git a/koyeb/api_async/models/deactivate_organization_reply.py b/koyeb/api_async/models/deactivate_organization_reply.py index 74a8bf88..527d1f88 100644 --- a/koyeb/api_async/models/deactivate_organization_reply.py +++ b/koyeb/api_async/models/deactivate_organization_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeactivateOrganizationReply(BaseModel): """ DeactivateOrganizationReply - """ # noqa: E501 - + """ # noqa: E501 organization: Optional[Organization] = None __properties: ClassVar[List[str]] = ["organization"] @@ -40,6 +38,7 @@ class DeactivateOrganizationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization": Organization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None - } - ) + _obj = cls.model_validate({ + "organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/deactivate_organization_request.py b/koyeb/api_async/models/deactivate_organization_request.py index 14d6bbd5..74cd5765 100644 --- a/koyeb/api_async/models/deactivate_organization_request.py +++ b/koyeb/api_async/models/deactivate_organization_request.py @@ -23,16 +23,11 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeactivateOrganizationRequest(BaseModel): """ DeactivateOrganizationRequest - """ # noqa: E501 - - skip_confirmation: Optional[StrictBool] = Field( - default=None, - description="if set to true, skip_confirmation will directly start the deactivation process, without sending a confirmation email beforehand.", - ) + """ # noqa: E501 + skip_confirmation: Optional[StrictBool] = Field(default=None, description="if set to true, skip_confirmation will directly start the deactivation process, without sending a confirmation email beforehand.") __properties: ClassVar[List[str]] = ["skip_confirmation"] model_config = ConfigDict( @@ -42,6 +37,7 @@ class DeactivateOrganizationRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"skip_confirmation": obj.get("skip_confirmation")}) + _obj = cls.model_validate({ + "skip_confirmation": obj.get("skip_confirmation") + }) return _obj + + diff --git a/koyeb/api_async/models/declare_stage_progress_request.py b/koyeb/api_async/models/declare_stage_progress_request.py index e9bf6497..1726a7e5 100644 --- a/koyeb/api_async/models/declare_stage_progress_request.py +++ b/koyeb/api_async/models/declare_stage_progress_request.py @@ -20,37 +20,23 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.deployment_provisioning_info_stage_status import ( - DeploymentProvisioningInfoStageStatus, -) +from koyeb.api_async.models.deployment_provisioning_info_stage_status import DeploymentProvisioningInfoStageStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeclareStageProgressRequest(BaseModel): """ DeclareStageProgressRequest - """ # noqa: E501 - + """ # noqa: E501 secret: Optional[StrictStr] = None - status: Optional[ - DeploymentProvisioningInfoStageStatus - ] = DeploymentProvisioningInfoStageStatus.UNKNOWN + status: Optional[DeploymentProvisioningInfoStageStatus] = DeploymentProvisioningInfoStageStatus.UNKNOWN finished_at: Optional[datetime] = None messages: Optional[List[StrictStr]] = None image_pushed: Optional[StrictBool] = None internal_failure: Optional[StrictBool] = None retryable_failure: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "secret", - "status", - "finished_at", - "messages", - "image_pushed", - "internal_failure", - "retryable_failure", - ] + __properties: ClassVar[List[str]] = ["secret", "status", "finished_at", "messages", "image_pushed", "internal_failure", "retryable_failure"] model_config = ConfigDict( validate_by_name=True, @@ -59,6 +45,7 @@ class DeclareStageProgressRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -82,7 +69,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -100,17 +88,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "secret": obj.get("secret"), - "status": obj.get("status") - if obj.get("status") is not None - else DeploymentProvisioningInfoStageStatus.UNKNOWN, - "finished_at": obj.get("finished_at"), - "messages": obj.get("messages"), - "image_pushed": obj.get("image_pushed"), - "internal_failure": obj.get("internal_failure"), - "retryable_failure": obj.get("retryable_failure"), - } - ) + _obj = cls.model_validate({ + "secret": obj.get("secret"), + "status": obj.get("status") if obj.get("status") is not None else DeploymentProvisioningInfoStageStatus.UNKNOWN, + "finished_at": obj.get("finished_at"), + "messages": obj.get("messages"), + "image_pushed": obj.get("image_pushed"), + "internal_failure": obj.get("internal_failure"), + "retryable_failure": obj.get("retryable_failure") + }) return _obj + + diff --git a/koyeb/api_async/models/declare_step_progress_request.py b/koyeb/api_async/models/declare_step_progress_request.py index c9da67b9..b05fd36e 100644 --- a/koyeb/api_async/models/declare_step_progress_request.py +++ b/koyeb/api_async/models/declare_step_progress_request.py @@ -20,33 +20,21 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.deployment_provisioning_info_stage_status import ( - DeploymentProvisioningInfoStageStatus, -) +from koyeb.api_async.models.deployment_provisioning_info_stage_status import DeploymentProvisioningInfoStageStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeclareStepProgressRequest(BaseModel): """ DeclareStepProgressRequest - """ # noqa: E501 - + """ # noqa: E501 secret: Optional[StrictStr] = None - status: Optional[ - DeploymentProvisioningInfoStageStatus - ] = DeploymentProvisioningInfoStageStatus.UNKNOWN + status: Optional[DeploymentProvisioningInfoStageStatus] = DeploymentProvisioningInfoStageStatus.UNKNOWN started_at: Optional[datetime] = None finished_at: Optional[datetime] = None messages: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = [ - "secret", - "status", - "started_at", - "finished_at", - "messages", - ] + __properties: ClassVar[List[str]] = ["secret", "status", "started_at", "finished_at", "messages"] model_config = ConfigDict( validate_by_name=True, @@ -55,6 +43,7 @@ class DeclareStepProgressRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -78,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -96,15 +86,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "secret": obj.get("secret"), - "status": obj.get("status") - if obj.get("status") is not None - else DeploymentProvisioningInfoStageStatus.UNKNOWN, - "started_at": obj.get("started_at"), - "finished_at": obj.get("finished_at"), - "messages": obj.get("messages"), - } - ) + _obj = cls.model_validate({ + "secret": obj.get("secret"), + "status": obj.get("status") if obj.get("status") is not None else DeploymentProvisioningInfoStageStatus.UNKNOWN, + "started_at": obj.get("started_at"), + "finished_at": obj.get("finished_at"), + "messages": obj.get("messages") + }) return _obj + + diff --git a/koyeb/api_async/models/decline_organization_invitation_reply.py b/koyeb/api_async/models/decline_organization_invitation_reply.py index 86ed79cf..8768f350 100644 --- a/koyeb/api_async/models/decline_organization_invitation_reply.py +++ b/koyeb/api_async/models/decline_organization_invitation_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeclineOrganizationInvitationReply(BaseModel): """ DeclineOrganizationInvitationReply - """ # noqa: E501 - + """ # noqa: E501 invitation: Optional[OrganizationInvitation] = None __properties: ClassVar[List[str]] = ["invitation"] @@ -40,6 +38,7 @@ class DeclineOrganizationInvitationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of invitation if self.invitation: - _dict["invitation"] = self.invitation.to_dict() + _dict['invitation'] = self.invitation.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "invitation": OrganizationInvitation.from_dict(obj["invitation"]) - if obj.get("invitation") is not None - else None - } - ) + _obj = cls.model_validate({ + "invitation": OrganizationInvitation.from_dict(obj["invitation"]) if obj.get("invitation") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/delete_instance_snapshot_reply.py b/koyeb/api_async/models/delete_instance_snapshot_reply.py index 1588aba1..16141524 100644 --- a/koyeb/api_async/models/delete_instance_snapshot_reply.py +++ b/koyeb/api_async/models/delete_instance_snapshot_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeleteInstanceSnapshotReply(BaseModel): """ DeleteInstanceSnapshotReply - """ # noqa: E501 - + """ # noqa: E501 instance_snapshot: Optional[InstanceSnapshot] = None __properties: ClassVar[List[str]] = ["instance_snapshot"] @@ -40,6 +38,7 @@ class DeleteInstanceSnapshotReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of instance_snapshot if self.instance_snapshot: - _dict["instance_snapshot"] = self.instance_snapshot.to_dict() + _dict['instance_snapshot'] = self.instance_snapshot.to_dict() return _dict @classmethod @@ -84,13 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instance_snapshot": InstanceSnapshot.from_dict( - obj["instance_snapshot"] - ) - if obj.get("instance_snapshot") is not None - else None - } - ) + _obj = cls.model_validate({ + "instance_snapshot": InstanceSnapshot.from_dict(obj["instance_snapshot"]) if obj.get("instance_snapshot") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/delete_organization_reply.py b/koyeb/api_async/models/delete_organization_reply.py index 6202193c..f467d652 100644 --- a/koyeb/api_async/models/delete_organization_reply.py +++ b/koyeb/api_async/models/delete_organization_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeleteOrganizationReply(BaseModel): """ DeleteOrganizationReply - """ # noqa: E501 - + """ # noqa: E501 organization: Optional[Organization] = None __properties: ClassVar[List[str]] = ["organization"] @@ -40,6 +38,7 @@ class DeleteOrganizationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization": Organization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None - } - ) + _obj = cls.model_validate({ + "organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/delete_persistent_volume_reply.py b/koyeb/api_async/models/delete_persistent_volume_reply.py index 11416b47..9ebd45ed 100644 --- a/koyeb/api_async/models/delete_persistent_volume_reply.py +++ b/koyeb/api_async/models/delete_persistent_volume_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeletePersistentVolumeReply(BaseModel): """ DeletePersistentVolumeReply - """ # noqa: E501 - + """ # noqa: E501 volume: Optional[PersistentVolume] = None __properties: ClassVar[List[str]] = ["volume"] @@ -40,6 +38,7 @@ class DeletePersistentVolumeReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of volume if self.volume: - _dict["volume"] = self.volume.to_dict() + _dict['volume'] = self.volume.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "volume": PersistentVolume.from_dict(obj["volume"]) - if obj.get("volume") is not None - else None - } - ) + _obj = cls.model_validate({ + "volume": PersistentVolume.from_dict(obj["volume"]) if obj.get("volume") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/delete_snapshot_reply.py b/koyeb/api_async/models/delete_snapshot_reply.py index 11c92329..6ffcc172 100644 --- a/koyeb/api_async/models/delete_snapshot_reply.py +++ b/koyeb/api_async/models/delete_snapshot_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeleteSnapshotReply(BaseModel): """ DeleteSnapshotReply - """ # noqa: E501 - + """ # noqa: E501 snapshot: Optional[Snapshot] = None __properties: ClassVar[List[str]] = ["snapshot"] @@ -40,6 +38,7 @@ class DeleteSnapshotReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of snapshot if self.snapshot: - _dict["snapshot"] = self.snapshot.to_dict() + _dict['snapshot'] = self.snapshot.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "snapshot": Snapshot.from_dict(obj["snapshot"]) - if obj.get("snapshot") is not None - else None - } - ) + _obj = cls.model_validate({ + "snapshot": Snapshot.from_dict(obj["snapshot"]) if obj.get("snapshot") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/delete_user_reply.py b/koyeb/api_async/models/delete_user_reply.py index 7d86ce58..44de41be 100644 --- a/koyeb/api_async/models/delete_user_reply.py +++ b/koyeb/api_async/models/delete_user_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeleteUserReply(BaseModel): """ DeleteUserReply - """ # noqa: E501 - + """ # noqa: E501 user: Optional[User] = None __properties: ClassVar[List[str]] = ["user"] @@ -40,6 +38,7 @@ class DeleteUserReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of user if self.user: - _dict["user"] = self.user.to_dict() + _dict['user'] = self.user.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "user": User.from_dict(obj["user"]) - if obj.get("user") is not None - else None - } - ) + _obj = cls.model_validate({ + "user": User.from_dict(obj["user"]) if obj.get("user") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/deployment.py b/koyeb/api_async/models/deployment.py index 1e636ef4..a562fb95 100644 --- a/koyeb/api_async/models/deployment.py +++ b/koyeb/api_async/models/deployment.py @@ -23,21 +23,17 @@ from koyeb.api_async.models.deployment_database_info import DeploymentDatabaseInfo from koyeb.api_async.models.deployment_definition import DeploymentDefinition from koyeb.api_async.models.deployment_metadata import DeploymentMetadata -from koyeb.api_async.models.deployment_provisioning_info import ( - DeploymentProvisioningInfo, -) +from koyeb.api_async.models.deployment_provisioning_info import DeploymentProvisioningInfo from koyeb.api_async.models.deployment_role import DeploymentRole from koyeb.api_async.models.deployment_status import DeploymentStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class Deployment(BaseModel): """ Deployment - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -62,37 +58,8 @@ class Deployment(BaseModel): version: Optional[StrictStr] = None deployment_group: Optional[StrictStr] = None instance_snapshot_id: Optional[StrictStr] = None - created_by: Optional[StrictStr] = Field( - default=None, - description="CreatedBy is the user_id of the user that called CreateService or UpdateService. It's optional because CreateService or UpdateService can be called by a machine, using a token that's organization scoped, not user scoped.", - ) - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "updated_at", - "allocated_at", - "started_at", - "succeeded_at", - "terminated_at", - "organization_id", - "project_id", - "app_id", - "service_id", - "parent_id", - "child_id", - "status", - "metadata", - "definition", - "messages", - "provisioning_info", - "database_info", - "skip_build", - "role", - "version", - "deployment_group", - "instance_snapshot_id", - "created_by", - ] + created_by: Optional[StrictStr] = Field(default=None, description="CreatedBy is the user_id of the user that called CreateService or UpdateService. It's optional because CreateService or UpdateService can be called by a machine, using a token that's organization scoped, not user scoped.") + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "allocated_at", "started_at", "succeeded_at", "terminated_at", "organization_id", "project_id", "app_id", "service_id", "parent_id", "child_id", "status", "metadata", "definition", "messages", "provisioning_info", "database_info", "skip_build", "role", "version", "deployment_group", "instance_snapshot_id", "created_by"] model_config = ConfigDict( validate_by_name=True, @@ -101,6 +68,7 @@ class Deployment(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -124,7 +92,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -133,16 +102,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of metadata if self.metadata: - _dict["metadata"] = self.metadata.to_dict() + _dict['metadata'] = self.metadata.to_dict() # override the default output from pydantic by calling `to_dict()` of definition if self.definition: - _dict["definition"] = self.definition.to_dict() + _dict['definition'] = self.definition.to_dict() # override the default output from pydantic by calling `to_dict()` of provisioning_info if self.provisioning_info: - _dict["provisioning_info"] = self.provisioning_info.to_dict() + _dict['provisioning_info'] = self.provisioning_info.to_dict() # override the default output from pydantic by calling `to_dict()` of database_info if self.database_info: - _dict["database_info"] = self.database_info.to_dict() + _dict['database_info'] = self.database_info.to_dict() return _dict @classmethod @@ -154,47 +123,33 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "allocated_at": obj.get("allocated_at"), - "started_at": obj.get("started_at"), - "succeeded_at": obj.get("succeeded_at"), - "terminated_at": obj.get("terminated_at"), - "organization_id": obj.get("organization_id"), - "project_id": obj.get("project_id"), - "app_id": obj.get("app_id"), - "service_id": obj.get("service_id"), - "parent_id": obj.get("parent_id"), - "child_id": obj.get("child_id"), - "status": obj.get("status") - if obj.get("status") is not None - else DeploymentStatus.PENDING, - "metadata": DeploymentMetadata.from_dict(obj["metadata"]) - if obj.get("metadata") is not None - else None, - "definition": DeploymentDefinition.from_dict(obj["definition"]) - if obj.get("definition") is not None - else None, - "messages": obj.get("messages"), - "provisioning_info": DeploymentProvisioningInfo.from_dict( - obj["provisioning_info"] - ) - if obj.get("provisioning_info") is not None - else None, - "database_info": DeploymentDatabaseInfo.from_dict(obj["database_info"]) - if obj.get("database_info") is not None - else None, - "skip_build": obj.get("skip_build"), - "role": obj.get("role") - if obj.get("role") is not None - else DeploymentRole.INVALID, - "version": obj.get("version"), - "deployment_group": obj.get("deployment_group"), - "instance_snapshot_id": obj.get("instance_snapshot_id"), - "created_by": obj.get("created_by"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "allocated_at": obj.get("allocated_at"), + "started_at": obj.get("started_at"), + "succeeded_at": obj.get("succeeded_at"), + "terminated_at": obj.get("terminated_at"), + "organization_id": obj.get("organization_id"), + "project_id": obj.get("project_id"), + "app_id": obj.get("app_id"), + "service_id": obj.get("service_id"), + "parent_id": obj.get("parent_id"), + "child_id": obj.get("child_id"), + "status": obj.get("status") if obj.get("status") is not None else DeploymentStatus.PENDING, + "metadata": DeploymentMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "definition": DeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None, + "messages": obj.get("messages"), + "provisioning_info": DeploymentProvisioningInfo.from_dict(obj["provisioning_info"]) if obj.get("provisioning_info") is not None else None, + "database_info": DeploymentDatabaseInfo.from_dict(obj["database_info"]) if obj.get("database_info") is not None else None, + "skip_build": obj.get("skip_build"), + "role": obj.get("role") if obj.get("role") is not None else DeploymentRole.INVALID, + "version": obj.get("version"), + "deployment_group": obj.get("deployment_group"), + "instance_snapshot_id": obj.get("instance_snapshot_id"), + "created_by": obj.get("created_by") + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_database_info.py b/koyeb/api_async/models/deployment_database_info.py index 4f1d78b8..cd945106 100644 --- a/koyeb/api_async/models/deployment_database_info.py +++ b/koyeb/api_async/models/deployment_database_info.py @@ -19,19 +19,15 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.deployment_neon_postgres_database_info import ( - DeploymentNeonPostgresDatabaseInfo, -) +from koyeb.api_async.models.deployment_neon_postgres_database_info import DeploymentNeonPostgresDatabaseInfo from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentDatabaseInfo(BaseModel): """ DeploymentDatabaseInfo - """ # noqa: E501 - + """ # noqa: E501 neon_postgres: Optional[DeploymentNeonPostgresDatabaseInfo] = None __properties: ClassVar[List[str]] = ["neon_postgres"] @@ -42,6 +38,7 @@ class DeploymentDatabaseInfo(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of neon_postgres if self.neon_postgres: - _dict["neon_postgres"] = self.neon_postgres.to_dict() + _dict['neon_postgres'] = self.neon_postgres.to_dict() return _dict @classmethod @@ -86,13 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "neon_postgres": DeploymentNeonPostgresDatabaseInfo.from_dict( - obj["neon_postgres"] - ) - if obj.get("neon_postgres") is not None - else None - } - ) + _obj = cls.model_validate({ + "neon_postgres": DeploymentNeonPostgresDatabaseInfo.from_dict(obj["neon_postgres"]) if obj.get("neon_postgres") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_definition.py b/koyeb/api_async/models/deployment_definition.py index 873d640d..ae58e0c8 100644 --- a/koyeb/api_async/models/deployment_definition.py +++ b/koyeb/api_async/models/deployment_definition.py @@ -40,16 +40,11 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentDefinition(BaseModel): """ DeploymentDefinition - """ # noqa: E501 - - name: Optional[StrictStr] = Field( - default=None, - description="Service name. Deprecated, set it directly in the Service when creating it.", - ) + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="Service name. Deprecated, set it directly in the Service when creating it.") type: Optional[DeploymentDefinitionType] = DeploymentDefinitionType.INVALID strategy: Optional[DeploymentStrategy] = None routes: Optional[List[DeploymentRoute]] = None @@ -69,28 +64,7 @@ class DeploymentDefinition(BaseModel): git: Optional[GitSource] = None database: Optional[DatabaseSource] = None archive: Optional[ArchiveSource] = None - __properties: ClassVar[List[str]] = [ - "name", - "type", - "strategy", - "routes", - "ports", - "proxy_ports", - "env", - "regions", - "scalings", - "instance_types", - "health_checks", - "volumes", - "config_files", - "skip_cache", - "mesh", - "network_policy", - "docker", - "git", - "database", - "archive", - ] + __properties: ClassVar[List[str]] = ["name", "type", "strategy", "routes", "ports", "proxy_ports", "env", "regions", "scalings", "instance_types", "health_checks", "volumes", "config_files", "skip_cache", "mesh", "network_policy", "docker", "git", "database", "archive"] model_config = ConfigDict( validate_by_name=True, @@ -99,6 +73,7 @@ class DeploymentDefinition(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -122,7 +97,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -131,100 +107,85 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of strategy if self.strategy: - _dict["strategy"] = self.strategy.to_dict() + _dict['strategy'] = self.strategy.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in routes (list) _items = [] if self.routes: for _item_routes in self.routes: - _items.append( - _item_routes.to_dict() if _item_routes is not None else None - ) - _dict["routes"] = _items + if _item_routes: + _items.append(_item_routes.to_dict()) + _dict['routes'] = _items # override the default output from pydantic by calling `to_dict()` of each item in ports (list) _items = [] if self.ports: for _item_ports in self.ports: - _items.append( - _item_ports.to_dict() if _item_ports is not None else None - ) - _dict["ports"] = _items + if _item_ports: + _items.append(_item_ports.to_dict()) + _dict['ports'] = _items # override the default output from pydantic by calling `to_dict()` of each item in proxy_ports (list) _items = [] if self.proxy_ports: for _item_proxy_ports in self.proxy_ports: - _items.append( - _item_proxy_ports.to_dict() - if _item_proxy_ports is not None - else None - ) - _dict["proxy_ports"] = _items + if _item_proxy_ports: + _items.append(_item_proxy_ports.to_dict()) + _dict['proxy_ports'] = _items # override the default output from pydantic by calling `to_dict()` of each item in env (list) _items = [] if self.env: for _item_env in self.env: - _items.append(_item_env.to_dict() if _item_env is not None else None) - _dict["env"] = _items + if _item_env: + _items.append(_item_env.to_dict()) + _dict['env'] = _items # override the default output from pydantic by calling `to_dict()` of each item in scalings (list) _items = [] if self.scalings: for _item_scalings in self.scalings: - _items.append( - _item_scalings.to_dict() if _item_scalings is not None else None - ) - _dict["scalings"] = _items + if _item_scalings: + _items.append(_item_scalings.to_dict()) + _dict['scalings'] = _items # override the default output from pydantic by calling `to_dict()` of each item in instance_types (list) _items = [] if self.instance_types: for _item_instance_types in self.instance_types: - _items.append( - _item_instance_types.to_dict() - if _item_instance_types is not None - else None - ) - _dict["instance_types"] = _items + if _item_instance_types: + _items.append(_item_instance_types.to_dict()) + _dict['instance_types'] = _items # override the default output from pydantic by calling `to_dict()` of each item in health_checks (list) _items = [] if self.health_checks: for _item_health_checks in self.health_checks: - _items.append( - _item_health_checks.to_dict() - if _item_health_checks is not None - else None - ) - _dict["health_checks"] = _items + if _item_health_checks: + _items.append(_item_health_checks.to_dict()) + _dict['health_checks'] = _items # override the default output from pydantic by calling `to_dict()` of each item in volumes (list) _items = [] if self.volumes: for _item_volumes in self.volumes: - _items.append( - _item_volumes.to_dict() if _item_volumes is not None else None - ) - _dict["volumes"] = _items + if _item_volumes: + _items.append(_item_volumes.to_dict()) + _dict['volumes'] = _items # override the default output from pydantic by calling `to_dict()` of each item in config_files (list) _items = [] if self.config_files: for _item_config_files in self.config_files: - _items.append( - _item_config_files.to_dict() - if _item_config_files is not None - else None - ) - _dict["config_files"] = _items + if _item_config_files: + _items.append(_item_config_files.to_dict()) + _dict['config_files'] = _items # override the default output from pydantic by calling `to_dict()` of network_policy if self.network_policy: - _dict["network_policy"] = self.network_policy.to_dict() + _dict['network_policy'] = self.network_policy.to_dict() # override the default output from pydantic by calling `to_dict()` of docker if self.docker: - _dict["docker"] = self.docker.to_dict() + _dict['docker'] = self.docker.to_dict() # override the default output from pydantic by calling `to_dict()` of git if self.git: - _dict["git"] = self.git.to_dict() + _dict['git'] = self.git.to_dict() # override the default output from pydantic by calling `to_dict()` of database if self.database: - _dict["database"] = self.database.to_dict() + _dict['database'] = self.database.to_dict() # override the default output from pydantic by calling `to_dict()` of archive if self.archive: - _dict["archive"] = self.archive.to_dict() + _dict['archive'] = self.archive.to_dict() return _dict @classmethod @@ -236,76 +197,28 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "type": obj.get("type") - if obj.get("type") is not None - else DeploymentDefinitionType.INVALID, - "strategy": DeploymentStrategy.from_dict(obj["strategy"]) - if obj.get("strategy") is not None - else None, - "routes": [DeploymentRoute.from_dict(_item) for _item in obj["routes"]] - if obj.get("routes") is not None - else None, - "ports": [DeploymentPort.from_dict(_item) for _item in obj["ports"]] - if obj.get("ports") is not None - else None, - "proxy_ports": [ - DeploymentProxyPort.from_dict(_item) for _item in obj["proxy_ports"] - ] - if obj.get("proxy_ports") is not None - else None, - "env": [DeploymentEnv.from_dict(_item) for _item in obj["env"]] - if obj.get("env") is not None - else None, - "regions": obj.get("regions"), - "scalings": [ - DeploymentScaling.from_dict(_item) for _item in obj["scalings"] - ] - if obj.get("scalings") is not None - else None, - "instance_types": [ - DeploymentInstanceType.from_dict(_item) - for _item in obj["instance_types"] - ] - if obj.get("instance_types") is not None - else None, - "health_checks": [ - DeploymentHealthCheck.from_dict(_item) - for _item in obj["health_checks"] - ] - if obj.get("health_checks") is not None - else None, - "volumes": [ - DeploymentVolume.from_dict(_item) for _item in obj["volumes"] - ] - if obj.get("volumes") is not None - else None, - "config_files": [ - ConfigFile.from_dict(_item) for _item in obj["config_files"] - ] - if obj.get("config_files") is not None - else None, - "skip_cache": obj.get("skip_cache"), - "mesh": obj.get("mesh") - if obj.get("mesh") is not None - else DeploymentMesh.DEPLOYMENT_MESH_AUTO, - "network_policy": NetworkPolicy.from_dict(obj["network_policy"]) - if obj.get("network_policy") is not None - else None, - "docker": DockerSource.from_dict(obj["docker"]) - if obj.get("docker") is not None - else None, - "git": GitSource.from_dict(obj["git"]) - if obj.get("git") is not None - else None, - "database": DatabaseSource.from_dict(obj["database"]) - if obj.get("database") is not None - else None, - "archive": ArchiveSource.from_dict(obj["archive"]) - if obj.get("archive") is not None - else None, - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "type": obj.get("type") if obj.get("type") is not None else DeploymentDefinitionType.INVALID, + "strategy": DeploymentStrategy.from_dict(obj["strategy"]) if obj.get("strategy") is not None else None, + "routes": [DeploymentRoute.from_dict(_item) for _item in obj["routes"]] if obj.get("routes") is not None else None, + "ports": [DeploymentPort.from_dict(_item) for _item in obj["ports"]] if obj.get("ports") is not None else None, + "proxy_ports": [DeploymentProxyPort.from_dict(_item) for _item in obj["proxy_ports"]] if obj.get("proxy_ports") is not None else None, + "env": [DeploymentEnv.from_dict(_item) for _item in obj["env"]] if obj.get("env") is not None else None, + "regions": obj.get("regions"), + "scalings": [DeploymentScaling.from_dict(_item) for _item in obj["scalings"]] if obj.get("scalings") is not None else None, + "instance_types": [DeploymentInstanceType.from_dict(_item) for _item in obj["instance_types"]] if obj.get("instance_types") is not None else None, + "health_checks": [DeploymentHealthCheck.from_dict(_item) for _item in obj["health_checks"]] if obj.get("health_checks") is not None else None, + "volumes": [DeploymentVolume.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None, + "config_files": [ConfigFile.from_dict(_item) for _item in obj["config_files"]] if obj.get("config_files") is not None else None, + "skip_cache": obj.get("skip_cache"), + "mesh": obj.get("mesh") if obj.get("mesh") is not None else DeploymentMesh.DEPLOYMENT_MESH_AUTO, + "network_policy": NetworkPolicy.from_dict(obj["network_policy"]) if obj.get("network_policy") is not None else None, + "docker": DockerSource.from_dict(obj["docker"]) if obj.get("docker") is not None else None, + "git": GitSource.from_dict(obj["git"]) if obj.get("git") is not None else None, + "database": DatabaseSource.from_dict(obj["database"]) if obj.get("database") is not None else None, + "archive": ArchiveSource.from_dict(obj["archive"]) if obj.get("archive") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_definition_type.py b/koyeb/api_async/models/deployment_definition_type.py index c3014a7e..4897cba4 100644 --- a/koyeb/api_async/models/deployment_definition_type.py +++ b/koyeb/api_async/models/deployment_definition_type.py @@ -26,13 +26,15 @@ class DeploymentDefinitionType(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - WEB = "WEB" - WORKER = "WORKER" - DATABASE = "DATABASE" - SANDBOX = "SANDBOX" + INVALID = 'INVALID' + WEB = 'WEB' + WORKER = 'WORKER' + DATABASE = 'DATABASE' + SANDBOX = 'SANDBOX' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DeploymentDefinitionType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/deployment_env.py b/koyeb/api_async/models/deployment_env.py index 1ecef1e5..98d50c71 100644 --- a/koyeb/api_async/models/deployment_env.py +++ b/koyeb/api_async/models/deployment_env.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentEnv(BaseModel): """ DeploymentEnv - """ # noqa: E501 - + """ # noqa: E501 scopes: Optional[List[StrictStr]] = None key: Optional[StrictStr] = None value: Optional[StrictStr] = None @@ -42,6 +40,7 @@ class DeploymentEnv(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "scopes": obj.get("scopes"), - "key": obj.get("key"), - "value": obj.get("value"), - "secret": obj.get("secret"), - } - ) + _obj = cls.model_validate({ + "scopes": obj.get("scopes"), + "key": obj.get("key"), + "value": obj.get("value"), + "secret": obj.get("secret") + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_event.py b/koyeb/api_async/models/deployment_event.py index 00cd2493..c95f6fea 100644 --- a/koyeb/api_async/models/deployment_event.py +++ b/koyeb/api_async/models/deployment_event.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentEvent(BaseModel): """ DeploymentEvent - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None when: Optional[datetime] = None organization_id: Optional[StrictStr] = None @@ -37,15 +35,7 @@ class DeploymentEvent(BaseModel): type: Optional[StrictStr] = None message: Optional[StrictStr] = None metadata: Optional[Dict[str, Any]] = None - __properties: ClassVar[List[str]] = [ - "id", - "when", - "organization_id", - "deployment_id", - "type", - "message", - "metadata", - ] + __properties: ClassVar[List[str]] = ["id", "when", "organization_id", "deployment_id", "type", "message", "metadata"] model_config = ConfigDict( validate_by_name=True, @@ -54,6 +44,7 @@ class DeploymentEvent(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -95,15 +87,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "when": obj.get("when"), - "organization_id": obj.get("organization_id"), - "deployment_id": obj.get("deployment_id"), - "type": obj.get("type"), - "message": obj.get("message"), - "metadata": obj.get("metadata"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "when": obj.get("when"), + "organization_id": obj.get("organization_id"), + "deployment_id": obj.get("deployment_id"), + "type": obj.get("type"), + "message": obj.get("message"), + "metadata": obj.get("metadata") + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_health_check.py b/koyeb/api_async/models/deployment_health_check.py index 4f19d51c..e2f7129d 100644 --- a/koyeb/api_async/models/deployment_health_check.py +++ b/koyeb/api_async/models/deployment_health_check.py @@ -25,26 +25,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentHealthCheck(BaseModel): """ DeploymentHealthCheck - """ # noqa: E501 - + """ # noqa: E501 grace_period: Optional[StrictInt] = None interval: Optional[StrictInt] = None restart_limit: Optional[StrictInt] = None timeout: Optional[StrictInt] = None tcp: Optional[TCPHealthCheck] = None http: Optional[HTTPHealthCheck] = None - __properties: ClassVar[List[str]] = [ - "grace_period", - "interval", - "restart_limit", - "timeout", - "tcp", - "http", - ] + __properties: ClassVar[List[str]] = ["grace_period", "interval", "restart_limit", "timeout", "tcp", "http"] model_config = ConfigDict( validate_by_name=True, @@ -53,6 +44,7 @@ class DeploymentHealthCheck(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -76,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -85,10 +78,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of tcp if self.tcp: - _dict["tcp"] = self.tcp.to_dict() + _dict['tcp'] = self.tcp.to_dict() # override the default output from pydantic by calling `to_dict()` of http if self.http: - _dict["http"] = self.http.to_dict() + _dict['http'] = self.http.to_dict() return _dict @classmethod @@ -100,18 +93,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "grace_period": obj.get("grace_period"), - "interval": obj.get("interval"), - "restart_limit": obj.get("restart_limit"), - "timeout": obj.get("timeout"), - "tcp": TCPHealthCheck.from_dict(obj["tcp"]) - if obj.get("tcp") is not None - else None, - "http": HTTPHealthCheck.from_dict(obj["http"]) - if obj.get("http") is not None - else None, - } - ) + _obj = cls.model_validate({ + "grace_period": obj.get("grace_period"), + "interval": obj.get("interval"), + "restart_limit": obj.get("restart_limit"), + "timeout": obj.get("timeout"), + "tcp": TCPHealthCheck.from_dict(obj["tcp"]) if obj.get("tcp") is not None else None, + "http": HTTPHealthCheck.from_dict(obj["http"]) if obj.get("http") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_instance_type.py b/koyeb/api_async/models/deployment_instance_type.py index 9c9c866e..9ea41e65 100644 --- a/koyeb/api_async/models/deployment_instance_type.py +++ b/koyeb/api_async/models/deployment_instance_type.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentInstanceType(BaseModel): """ DeploymentInstanceType - """ # noqa: E501 - + """ # noqa: E501 scopes: Optional[List[StrictStr]] = None type: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["scopes", "type"] @@ -40,6 +38,7 @@ class DeploymentInstanceType(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"scopes": obj.get("scopes"), "type": obj.get("type")} - ) + _obj = cls.model_validate({ + "scopes": obj.get("scopes"), + "type": obj.get("type") + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_list_item.py b/koyeb/api_async/models/deployment_list_item.py index 20706644..2f17aaca 100644 --- a/koyeb/api_async/models/deployment_list_item.py +++ b/koyeb/api_async/models/deployment_list_item.py @@ -23,20 +23,16 @@ from koyeb.api_async.models.deployment_database_info import DeploymentDatabaseInfo from koyeb.api_async.models.deployment_definition import DeploymentDefinition from koyeb.api_async.models.deployment_metadata import DeploymentMetadata -from koyeb.api_async.models.deployment_provisioning_info import ( - DeploymentProvisioningInfo, -) +from koyeb.api_async.models.deployment_provisioning_info import DeploymentProvisioningInfo from koyeb.api_async.models.deployment_status import DeploymentStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentListItem(BaseModel): """ DeploymentListItem - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -57,37 +53,10 @@ class DeploymentListItem(BaseModel): provisioning_info: Optional[DeploymentProvisioningInfo] = None database_info: Optional[DeploymentDatabaseInfo] = None instance_snapshot_id: Optional[StrictStr] = None - created_by: Optional[StrictStr] = Field( - default=None, - description="CreatedBy is the user_id of the user that called CreateService or UpdateService. It's optional because CreateService or UpdateService can be called by a machine, using a token that's organization scoped, not user scoped.", - ) + created_by: Optional[StrictStr] = Field(default=None, description="CreatedBy is the user_id of the user that called CreateService or UpdateService. It's optional because CreateService or UpdateService can be called by a machine, using a token that's organization scoped, not user scoped.") version: Optional[StrictStr] = None deployment_group: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "updated_at", - "allocated_at", - "started_at", - "succeeded_at", - "terminated_at", - "organization_id", - "project_id", - "app_id", - "service_id", - "parent_id", - "child_id", - "status", - "metadata", - "definition", - "messages", - "provisioning_info", - "database_info", - "instance_snapshot_id", - "created_by", - "version", - "deployment_group", - ] + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "allocated_at", "started_at", "succeeded_at", "terminated_at", "organization_id", "project_id", "app_id", "service_id", "parent_id", "child_id", "status", "metadata", "definition", "messages", "provisioning_info", "database_info", "instance_snapshot_id", "created_by", "version", "deployment_group"] model_config = ConfigDict( validate_by_name=True, @@ -96,6 +65,7 @@ class DeploymentListItem(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -119,7 +89,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -128,16 +99,16 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of metadata if self.metadata: - _dict["metadata"] = self.metadata.to_dict() + _dict['metadata'] = self.metadata.to_dict() # override the default output from pydantic by calling `to_dict()` of definition if self.definition: - _dict["definition"] = self.definition.to_dict() + _dict['definition'] = self.definition.to_dict() # override the default output from pydantic by calling `to_dict()` of provisioning_info if self.provisioning_info: - _dict["provisioning_info"] = self.provisioning_info.to_dict() + _dict['provisioning_info'] = self.provisioning_info.to_dict() # override the default output from pydantic by calling `to_dict()` of database_info if self.database_info: - _dict["database_info"] = self.database_info.to_dict() + _dict['database_info'] = self.database_info.to_dict() return _dict @classmethod @@ -149,43 +120,31 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "allocated_at": obj.get("allocated_at"), - "started_at": obj.get("started_at"), - "succeeded_at": obj.get("succeeded_at"), - "terminated_at": obj.get("terminated_at"), - "organization_id": obj.get("organization_id"), - "project_id": obj.get("project_id"), - "app_id": obj.get("app_id"), - "service_id": obj.get("service_id"), - "parent_id": obj.get("parent_id"), - "child_id": obj.get("child_id"), - "status": obj.get("status") - if obj.get("status") is not None - else DeploymentStatus.PENDING, - "metadata": DeploymentMetadata.from_dict(obj["metadata"]) - if obj.get("metadata") is not None - else None, - "definition": DeploymentDefinition.from_dict(obj["definition"]) - if obj.get("definition") is not None - else None, - "messages": obj.get("messages"), - "provisioning_info": DeploymentProvisioningInfo.from_dict( - obj["provisioning_info"] - ) - if obj.get("provisioning_info") is not None - else None, - "database_info": DeploymentDatabaseInfo.from_dict(obj["database_info"]) - if obj.get("database_info") is not None - else None, - "instance_snapshot_id": obj.get("instance_snapshot_id"), - "created_by": obj.get("created_by"), - "version": obj.get("version"), - "deployment_group": obj.get("deployment_group"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "allocated_at": obj.get("allocated_at"), + "started_at": obj.get("started_at"), + "succeeded_at": obj.get("succeeded_at"), + "terminated_at": obj.get("terminated_at"), + "organization_id": obj.get("organization_id"), + "project_id": obj.get("project_id"), + "app_id": obj.get("app_id"), + "service_id": obj.get("service_id"), + "parent_id": obj.get("parent_id"), + "child_id": obj.get("child_id"), + "status": obj.get("status") if obj.get("status") is not None else DeploymentStatus.PENDING, + "metadata": DeploymentMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "definition": DeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None, + "messages": obj.get("messages"), + "provisioning_info": DeploymentProvisioningInfo.from_dict(obj["provisioning_info"]) if obj.get("provisioning_info") is not None else None, + "database_info": DeploymentDatabaseInfo.from_dict(obj["database_info"]) if obj.get("database_info") is not None else None, + "instance_snapshot_id": obj.get("instance_snapshot_id"), + "created_by": obj.get("created_by"), + "version": obj.get("version"), + "deployment_group": obj.get("deployment_group") + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_mesh.py b/koyeb/api_async/models/deployment_mesh.py index 6b9ce078..5f04e72c 100644 --- a/koyeb/api_async/models/deployment_mesh.py +++ b/koyeb/api_async/models/deployment_mesh.py @@ -26,11 +26,13 @@ class DeploymentMesh(str, Enum): """ allowed enum values """ - DEPLOYMENT_MESH_AUTO = "DEPLOYMENT_MESH_AUTO" - DEPLOYMENT_MESH_ENABLED = "DEPLOYMENT_MESH_ENABLED" - DEPLOYMENT_MESH_DISABLED = "DEPLOYMENT_MESH_DISABLED" + DEPLOYMENT_MESH_AUTO = 'DEPLOYMENT_MESH_AUTO' + DEPLOYMENT_MESH_ENABLED = 'DEPLOYMENT_MESH_ENABLED' + DEPLOYMENT_MESH_DISABLED = 'DEPLOYMENT_MESH_DISABLED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DeploymentMesh from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/deployment_metadata.py b/koyeb/api_async/models/deployment_metadata.py index 89784a53..9bda1683 100644 --- a/koyeb/api_async/models/deployment_metadata.py +++ b/koyeb/api_async/models/deployment_metadata.py @@ -20,12 +20,8 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional from koyeb.api_async.models.archive_deployment_metadata import ArchiveDeploymentMetadata -from koyeb.api_async.models.database_deployment_metadata import ( - DatabaseDeploymentMetadata, -) -from koyeb.api_async.models.deployment_proxy_port_metadata import ( - DeploymentProxyPortMetadata, -) +from koyeb.api_async.models.database_deployment_metadata import DatabaseDeploymentMetadata +from koyeb.api_async.models.deployment_proxy_port_metadata import DeploymentProxyPortMetadata from koyeb.api_async.models.git_deployment_metadata import GitDeploymentMetadata from koyeb.api_async.models.sandbox_metadata import SandboxMetadata from koyeb.api_async.models.trigger_deployment_metadata import TriggerDeploymentMetadata @@ -33,26 +29,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentMetadata(BaseModel): """ DeploymentMetadata - """ # noqa: E501 - + """ # noqa: E501 trigger: Optional[TriggerDeploymentMetadata] = None database: Optional[DatabaseDeploymentMetadata] = None git: Optional[GitDeploymentMetadata] = None archive: Optional[ArchiveDeploymentMetadata] = None proxy_ports: Optional[List[DeploymentProxyPortMetadata]] = None sandbox: Optional[SandboxMetadata] = None - __properties: ClassVar[List[str]] = [ - "trigger", - "database", - "git", - "archive", - "proxy_ports", - "sandbox", - ] + __properties: ClassVar[List[str]] = ["trigger", "database", "git", "archive", "proxy_ports", "sandbox"] model_config = ConfigDict( validate_by_name=True, @@ -61,6 +48,7 @@ class DeploymentMetadata(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -84,7 +72,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -93,29 +82,26 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of trigger if self.trigger: - _dict["trigger"] = self.trigger.to_dict() + _dict['trigger'] = self.trigger.to_dict() # override the default output from pydantic by calling `to_dict()` of database if self.database: - _dict["database"] = self.database.to_dict() + _dict['database'] = self.database.to_dict() # override the default output from pydantic by calling `to_dict()` of git if self.git: - _dict["git"] = self.git.to_dict() + _dict['git'] = self.git.to_dict() # override the default output from pydantic by calling `to_dict()` of archive if self.archive: - _dict["archive"] = self.archive.to_dict() + _dict['archive'] = self.archive.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in proxy_ports (list) _items = [] if self.proxy_ports: for _item_proxy_ports in self.proxy_ports: - _items.append( - _item_proxy_ports.to_dict() - if _item_proxy_ports is not None - else None - ) - _dict["proxy_ports"] = _items + if _item_proxy_ports: + _items.append(_item_proxy_ports.to_dict()) + _dict['proxy_ports'] = _items # override the default output from pydantic by calling `to_dict()` of sandbox if self.sandbox: - _dict["sandbox"] = self.sandbox.to_dict() + _dict['sandbox'] = self.sandbox.to_dict() return _dict @classmethod @@ -127,29 +113,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "trigger": TriggerDeploymentMetadata.from_dict(obj["trigger"]) - if obj.get("trigger") is not None - else None, - "database": DatabaseDeploymentMetadata.from_dict(obj["database"]) - if obj.get("database") is not None - else None, - "git": GitDeploymentMetadata.from_dict(obj["git"]) - if obj.get("git") is not None - else None, - "archive": ArchiveDeploymentMetadata.from_dict(obj["archive"]) - if obj.get("archive") is not None - else None, - "proxy_ports": [ - DeploymentProxyPortMetadata.from_dict(_item) - for _item in obj["proxy_ports"] - ] - if obj.get("proxy_ports") is not None - else None, - "sandbox": SandboxMetadata.from_dict(obj["sandbox"]) - if obj.get("sandbox") is not None - else None, - } - ) + _obj = cls.model_validate({ + "trigger": TriggerDeploymentMetadata.from_dict(obj["trigger"]) if obj.get("trigger") is not None else None, + "database": DatabaseDeploymentMetadata.from_dict(obj["database"]) if obj.get("database") is not None else None, + "git": GitDeploymentMetadata.from_dict(obj["git"]) if obj.get("git") is not None else None, + "archive": ArchiveDeploymentMetadata.from_dict(obj["archive"]) if obj.get("archive") is not None else None, + "proxy_ports": [DeploymentProxyPortMetadata.from_dict(_item) for _item in obj["proxy_ports"]] if obj.get("proxy_ports") is not None else None, + "sandbox": SandboxMetadata.from_dict(obj["sandbox"]) if obj.get("sandbox") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_neon_postgres_database_info.py b/koyeb/api_async/models/deployment_neon_postgres_database_info.py index 2b05c6ee..78852676 100644 --- a/koyeb/api_async/models/deployment_neon_postgres_database_info.py +++ b/koyeb/api_async/models/deployment_neon_postgres_database_info.py @@ -20,19 +20,15 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.deployment_neon_postgres_database_info_role import ( - DeploymentNeonPostgresDatabaseInfoRole, -) +from koyeb.api_async.models.deployment_neon_postgres_database_info_role import DeploymentNeonPostgresDatabaseInfoRole from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentNeonPostgresDatabaseInfo(BaseModel): """ DeploymentNeonPostgresDatabaseInfo - """ # noqa: E501 - + """ # noqa: E501 active_time_seconds: Optional[StrictStr] = None compute_time_seconds: Optional[StrictStr] = None written_data_bytes: Optional[StrictStr] = None @@ -47,22 +43,7 @@ class DeploymentNeonPostgresDatabaseInfo(BaseModel): default_branch_state: Optional[StrictStr] = None default_branch_logical_size: Optional[StrictStr] = None roles: Optional[List[DeploymentNeonPostgresDatabaseInfoRole]] = None - __properties: ClassVar[List[str]] = [ - "active_time_seconds", - "compute_time_seconds", - "written_data_bytes", - "data_transfer_bytes", - "data_storage_bytes_hour", - "server_host", - "server_port", - "endpoint_state", - "endpoint_last_active", - "default_branch_id", - "default_branch_name", - "default_branch_state", - "default_branch_logical_size", - "roles", - ] + __properties: ClassVar[List[str]] = ["active_time_seconds", "compute_time_seconds", "written_data_bytes", "data_transfer_bytes", "data_storage_bytes_hour", "server_host", "server_port", "endpoint_state", "endpoint_last_active", "default_branch_id", "default_branch_name", "default_branch_state", "default_branch_logical_size", "roles"] model_config = ConfigDict( validate_by_name=True, @@ -71,6 +52,7 @@ class DeploymentNeonPostgresDatabaseInfo(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -94,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -105,10 +88,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.roles: for _item_roles in self.roles: - _items.append( - _item_roles.to_dict() if _item_roles is not None else None - ) - _dict["roles"] = _items + if _item_roles: + _items.append(_item_roles.to_dict()) + _dict['roles'] = _items return _dict @classmethod @@ -120,27 +102,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "active_time_seconds": obj.get("active_time_seconds"), - "compute_time_seconds": obj.get("compute_time_seconds"), - "written_data_bytes": obj.get("written_data_bytes"), - "data_transfer_bytes": obj.get("data_transfer_bytes"), - "data_storage_bytes_hour": obj.get("data_storage_bytes_hour"), - "server_host": obj.get("server_host"), - "server_port": obj.get("server_port"), - "endpoint_state": obj.get("endpoint_state"), - "endpoint_last_active": obj.get("endpoint_last_active"), - "default_branch_id": obj.get("default_branch_id"), - "default_branch_name": obj.get("default_branch_name"), - "default_branch_state": obj.get("default_branch_state"), - "default_branch_logical_size": obj.get("default_branch_logical_size"), - "roles": [ - DeploymentNeonPostgresDatabaseInfoRole.from_dict(_item) - for _item in obj["roles"] - ] - if obj.get("roles") is not None - else None, - } - ) + _obj = cls.model_validate({ + "active_time_seconds": obj.get("active_time_seconds"), + "compute_time_seconds": obj.get("compute_time_seconds"), + "written_data_bytes": obj.get("written_data_bytes"), + "data_transfer_bytes": obj.get("data_transfer_bytes"), + "data_storage_bytes_hour": obj.get("data_storage_bytes_hour"), + "server_host": obj.get("server_host"), + "server_port": obj.get("server_port"), + "endpoint_state": obj.get("endpoint_state"), + "endpoint_last_active": obj.get("endpoint_last_active"), + "default_branch_id": obj.get("default_branch_id"), + "default_branch_name": obj.get("default_branch_name"), + "default_branch_state": obj.get("default_branch_state"), + "default_branch_logical_size": obj.get("default_branch_logical_size"), + "roles": [DeploymentNeonPostgresDatabaseInfoRole.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_neon_postgres_database_info_role.py b/koyeb/api_async/models/deployment_neon_postgres_database_info_role.py index 3fb284df..e488eb0e 100644 --- a/koyeb/api_async/models/deployment_neon_postgres_database_info_role.py +++ b/koyeb/api_async/models/deployment_neon_postgres_database_info_role.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentNeonPostgresDatabaseInfoRole(BaseModel): """ DeploymentNeonPostgresDatabaseInfoRole - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None secret_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name", "secret_id"] @@ -40,6 +38,7 @@ class DeploymentNeonPostgresDatabaseInfoRole(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"name": obj.get("name"), "secret_id": obj.get("secret_id")} - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "secret_id": obj.get("secret_id") + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_port.py b/koyeb/api_async/models/deployment_port.py index c3f06c05..9f2535d8 100644 --- a/koyeb/api_async/models/deployment_port.py +++ b/koyeb/api_async/models/deployment_port.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentPort(BaseModel): """ DeploymentPort - """ # noqa: E501 - + """ # noqa: E501 port: Optional[StrictInt] = None protocol: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["port", "protocol"] @@ -40,6 +38,7 @@ class DeploymentPort(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"port": obj.get("port"), "protocol": obj.get("protocol")} - ) + _obj = cls.model_validate({ + "port": obj.get("port"), + "protocol": obj.get("protocol") + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_provisioning_info.py b/koyeb/api_async/models/deployment_provisioning_info.py index 0ad636b5..443a78ac 100644 --- a/koyeb/api_async/models/deployment_provisioning_info.py +++ b/koyeb/api_async/models/deployment_provisioning_info.py @@ -19,29 +19,18 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.deployment_provisioning_info_stage import ( - DeploymentProvisioningInfoStage, -) +from koyeb.api_async.models.deployment_provisioning_info_stage import DeploymentProvisioningInfoStage from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentProvisioningInfo(BaseModel): """ DeploymentProvisioningInfo - """ # noqa: E501 - - sha: Optional[StrictStr] = Field( - default=None, - description="The git sha for this build (we resolve the reference at the start of the build).", - ) - image: Optional[StrictStr] = Field( - default=None, description="The docker image built as a result of this build." - ) - stages: Optional[List[DeploymentProvisioningInfoStage]] = Field( - default=None, description="Some info about the build." - ) + """ # noqa: E501 + sha: Optional[StrictStr] = Field(default=None, description="The git sha for this build (we resolve the reference at the start of the build).") + image: Optional[StrictStr] = Field(default=None, description="The docker image built as a result of this build.") + stages: Optional[List[DeploymentProvisioningInfoStage]] = Field(default=None, description="Some info about the build.") __properties: ClassVar[List[str]] = ["sha", "image", "stages"] model_config = ConfigDict( @@ -51,6 +40,7 @@ class DeploymentProvisioningInfo(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -85,10 +76,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.stages: for _item_stages in self.stages: - _items.append( - _item_stages.to_dict() if _item_stages is not None else None - ) - _dict["stages"] = _items + if _item_stages: + _items.append(_item_stages.to_dict()) + _dict['stages'] = _items return _dict @classmethod @@ -100,16 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "sha": obj.get("sha"), - "image": obj.get("image"), - "stages": [ - DeploymentProvisioningInfoStage.from_dict(_item) - for _item in obj["stages"] - ] - if obj.get("stages") is not None - else None, - } - ) + _obj = cls.model_validate({ + "sha": obj.get("sha"), + "image": obj.get("image"), + "stages": [DeploymentProvisioningInfoStage.from_dict(_item) for _item in obj["stages"]] if obj.get("stages") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_provisioning_info_stage.py b/koyeb/api_async/models/deployment_provisioning_info_stage.py index 3e9ed301..94288e04 100644 --- a/koyeb/api_async/models/deployment_provisioning_info_stage.py +++ b/koyeb/api_async/models/deployment_provisioning_info_stage.py @@ -20,38 +20,23 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.deployment_provisioning_info_stage_build_attempt import ( - DeploymentProvisioningInfoStageBuildAttempt, -) -from koyeb.api_async.models.deployment_provisioning_info_stage_status import ( - DeploymentProvisioningInfoStageStatus, -) +from koyeb.api_async.models.deployment_provisioning_info_stage_build_attempt import DeploymentProvisioningInfoStageBuildAttempt +from koyeb.api_async.models.deployment_provisioning_info_stage_status import DeploymentProvisioningInfoStageStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentProvisioningInfoStage(BaseModel): """ DeploymentProvisioningInfoStage - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None - status: Optional[ - DeploymentProvisioningInfoStageStatus - ] = DeploymentProvisioningInfoStageStatus.UNKNOWN + status: Optional[DeploymentProvisioningInfoStageStatus] = DeploymentProvisioningInfoStageStatus.UNKNOWN messages: Optional[List[StrictStr]] = None started_at: Optional[datetime] = None finished_at: Optional[datetime] = None build_attempts: Optional[List[DeploymentProvisioningInfoStageBuildAttempt]] = None - __properties: ClassVar[List[str]] = [ - "name", - "status", - "messages", - "started_at", - "finished_at", - "build_attempts", - ] + __properties: ClassVar[List[str]] = ["name", "status", "messages", "started_at", "finished_at", "build_attempts"] model_config = ConfigDict( validate_by_name=True, @@ -60,6 +45,7 @@ class DeploymentProvisioningInfoStage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -83,7 +69,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -94,12 +81,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.build_attempts: for _item_build_attempts in self.build_attempts: - _items.append( - _item_build_attempts.to_dict() - if _item_build_attempts is not None - else None - ) - _dict["build_attempts"] = _items + if _item_build_attempts: + _items.append(_item_build_attempts.to_dict()) + _dict['build_attempts'] = _items return _dict @classmethod @@ -111,21 +95,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "status": obj.get("status") - if obj.get("status") is not None - else DeploymentProvisioningInfoStageStatus.UNKNOWN, - "messages": obj.get("messages"), - "started_at": obj.get("started_at"), - "finished_at": obj.get("finished_at"), - "build_attempts": [ - DeploymentProvisioningInfoStageBuildAttempt.from_dict(_item) - for _item in obj["build_attempts"] - ] - if obj.get("build_attempts") is not None - else None, - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "status": obj.get("status") if obj.get("status") is not None else DeploymentProvisioningInfoStageStatus.UNKNOWN, + "messages": obj.get("messages"), + "started_at": obj.get("started_at"), + "finished_at": obj.get("finished_at"), + "build_attempts": [DeploymentProvisioningInfoStageBuildAttempt.from_dict(_item) for _item in obj["build_attempts"]] if obj.get("build_attempts") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_provisioning_info_stage_build_attempt.py b/koyeb/api_async/models/deployment_provisioning_info_stage_build_attempt.py index cc3618db..8d0832ee 100644 --- a/koyeb/api_async/models/deployment_provisioning_info_stage_build_attempt.py +++ b/koyeb/api_async/models/deployment_provisioning_info_stage_build_attempt.py @@ -20,26 +20,18 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.deployment_provisioning_info_stage_build_attempt_build_step import ( - DeploymentProvisioningInfoStageBuildAttemptBuildStep, -) -from koyeb.api_async.models.deployment_provisioning_info_stage_status import ( - DeploymentProvisioningInfoStageStatus, -) +from koyeb.api_async.models.deployment_provisioning_info_stage_build_attempt_build_step import DeploymentProvisioningInfoStageBuildAttemptBuildStep +from koyeb.api_async.models.deployment_provisioning_info_stage_status import DeploymentProvisioningInfoStageStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentProvisioningInfoStageBuildAttempt(BaseModel): """ DeploymentProvisioningInfoStageBuildAttempt - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictInt] = None - status: Optional[ - DeploymentProvisioningInfoStageStatus - ] = DeploymentProvisioningInfoStageStatus.UNKNOWN + status: Optional[DeploymentProvisioningInfoStageStatus] = DeploymentProvisioningInfoStageStatus.UNKNOWN messages: Optional[List[StrictStr]] = None started_at: Optional[datetime] = None finished_at: Optional[datetime] = None @@ -47,22 +39,8 @@ class DeploymentProvisioningInfoStageBuildAttempt(BaseModel): image_pushed: Optional[StrictBool] = None internal_failure: Optional[StrictBool] = None retryable_failure: Optional[StrictBool] = None - wait_completion: Optional[StrictBool] = Field( - default=None, - description="This flag is used to finalize the build, and continue the deployment in case of success, or cancel and potentially retry the build in case of failure.", - ) - __properties: ClassVar[List[str]] = [ - "id", - "status", - "messages", - "started_at", - "finished_at", - "steps", - "image_pushed", - "internal_failure", - "retryable_failure", - "wait_completion", - ] + wait_completion: Optional[StrictBool] = Field(default=None, description="This flag is used to finalize the build, and continue the deployment in case of success, or cancel and potentially retry the build in case of failure.") + __properties: ClassVar[List[str]] = ["id", "status", "messages", "started_at", "finished_at", "steps", "image_pushed", "internal_failure", "retryable_failure", "wait_completion"] model_config = ConfigDict( validate_by_name=True, @@ -71,6 +49,7 @@ class DeploymentProvisioningInfoStageBuildAttempt(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -94,7 +73,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -105,10 +85,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.steps: for _item_steps in self.steps: - _items.append( - _item_steps.to_dict() if _item_steps is not None else None - ) - _dict["steps"] = _items + if _item_steps: + _items.append(_item_steps.to_dict()) + _dict['steps'] = _items return _dict @classmethod @@ -120,27 +99,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "status": obj.get("status") - if obj.get("status") is not None - else DeploymentProvisioningInfoStageStatus.UNKNOWN, - "messages": obj.get("messages"), - "started_at": obj.get("started_at"), - "finished_at": obj.get("finished_at"), - "steps": [ - DeploymentProvisioningInfoStageBuildAttemptBuildStep.from_dict( - _item - ) - for _item in obj["steps"] - ] - if obj.get("steps") is not None - else None, - "image_pushed": obj.get("image_pushed"), - "internal_failure": obj.get("internal_failure"), - "retryable_failure": obj.get("retryable_failure"), - "wait_completion": obj.get("wait_completion"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "status": obj.get("status") if obj.get("status") is not None else DeploymentProvisioningInfoStageStatus.UNKNOWN, + "messages": obj.get("messages"), + "started_at": obj.get("started_at"), + "finished_at": obj.get("finished_at"), + "steps": [DeploymentProvisioningInfoStageBuildAttemptBuildStep.from_dict(_item) for _item in obj["steps"]] if obj.get("steps") is not None else None, + "image_pushed": obj.get("image_pushed"), + "internal_failure": obj.get("internal_failure"), + "retryable_failure": obj.get("retryable_failure"), + "wait_completion": obj.get("wait_completion") + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_provisioning_info_stage_build_attempt_build_step.py b/koyeb/api_async/models/deployment_provisioning_info_stage_build_attempt_build_step.py index 8b78d2e3..13890407 100644 --- a/koyeb/api_async/models/deployment_provisioning_info_stage_build_attempt_build_step.py +++ b/koyeb/api_async/models/deployment_provisioning_info_stage_build_attempt_build_step.py @@ -20,33 +20,21 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.deployment_provisioning_info_stage_status import ( - DeploymentProvisioningInfoStageStatus, -) +from koyeb.api_async.models.deployment_provisioning_info_stage_status import DeploymentProvisioningInfoStageStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentProvisioningInfoStageBuildAttemptBuildStep(BaseModel): """ DeploymentProvisioningInfoStageBuildAttemptBuildStep - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None - status: Optional[ - DeploymentProvisioningInfoStageStatus - ] = DeploymentProvisioningInfoStageStatus.UNKNOWN + status: Optional[DeploymentProvisioningInfoStageStatus] = DeploymentProvisioningInfoStageStatus.UNKNOWN messages: Optional[List[StrictStr]] = None started_at: Optional[datetime] = None finished_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = [ - "name", - "status", - "messages", - "started_at", - "finished_at", - ] + __properties: ClassVar[List[str]] = ["name", "status", "messages", "started_at", "finished_at"] model_config = ConfigDict( validate_by_name=True, @@ -55,6 +43,7 @@ class DeploymentProvisioningInfoStageBuildAttemptBuildStep(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -78,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -96,15 +86,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "status": obj.get("status") - if obj.get("status") is not None - else DeploymentProvisioningInfoStageStatus.UNKNOWN, - "messages": obj.get("messages"), - "started_at": obj.get("started_at"), - "finished_at": obj.get("finished_at"), - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "status": obj.get("status") if obj.get("status") is not None else DeploymentProvisioningInfoStageStatus.UNKNOWN, + "messages": obj.get("messages"), + "started_at": obj.get("started_at"), + "finished_at": obj.get("finished_at") + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_provisioning_info_stage_status.py b/koyeb/api_async/models/deployment_provisioning_info_stage_status.py index 837e5851..38fe449d 100644 --- a/koyeb/api_async/models/deployment_provisioning_info_stage_status.py +++ b/koyeb/api_async/models/deployment_provisioning_info_stage_status.py @@ -26,14 +26,16 @@ class DeploymentProvisioningInfoStageStatus(str, Enum): """ allowed enum values """ - UNKNOWN = "UNKNOWN" - PENDING = "PENDING" - RUNNING = "RUNNING" - FAILED = "FAILED" - COMPLETED = "COMPLETED" - ABORTED = "ABORTED" + UNKNOWN = 'UNKNOWN' + PENDING = 'PENDING' + RUNNING = 'RUNNING' + FAILED = 'FAILED' + COMPLETED = 'COMPLETED' + ABORTED = 'ABORTED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DeploymentProvisioningInfoStageStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/deployment_proxy_port.py b/koyeb/api_async/models/deployment_proxy_port.py index bba9d061..92f0863c 100644 --- a/koyeb/api_async/models/deployment_proxy_port.py +++ b/koyeb/api_async/models/deployment_proxy_port.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentProxyPort(BaseModel): """ DeploymentProxyPort - """ # noqa: E501 - + """ # noqa: E501 port: Optional[StrictInt] = None protocol: Optional[ProxyPortProtocol] = ProxyPortProtocol.TCP __properties: ClassVar[List[str]] = ["port", "protocol"] @@ -41,6 +39,7 @@ class DeploymentProxyPort(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,12 +82,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "port": obj.get("port"), - "protocol": obj.get("protocol") - if obj.get("protocol") is not None - else ProxyPortProtocol.TCP, - } - ) + _obj = cls.model_validate({ + "port": obj.get("port"), + "protocol": obj.get("protocol") if obj.get("protocol") is not None else ProxyPortProtocol.TCP + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_proxy_port_metadata.py b/koyeb/api_async/models/deployment_proxy_port_metadata.py index e94a6f4d..9f77b5f3 100644 --- a/koyeb/api_async/models/deployment_proxy_port_metadata.py +++ b/koyeb/api_async/models/deployment_proxy_port_metadata.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentProxyPortMetadata(BaseModel): """ DeploymentProxyPortMetadata - """ # noqa: E501 - + """ # noqa: E501 host: Optional[StrictStr] = None public_port: Optional[StrictInt] = None port: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class DeploymentProxyPortMetadata(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,14 +84,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "host": obj.get("host"), - "public_port": obj.get("public_port"), - "port": obj.get("port"), - "protocol": obj.get("protocol") - if obj.get("protocol") is not None - else ProxyPortProtocol.TCP, - } - ) + _obj = cls.model_validate({ + "host": obj.get("host"), + "public_port": obj.get("public_port"), + "port": obj.get("port"), + "protocol": obj.get("protocol") if obj.get("protocol") is not None else ProxyPortProtocol.TCP + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_role.py b/koyeb/api_async/models/deployment_role.py index 649f75f0..da8fe3d3 100644 --- a/koyeb/api_async/models/deployment_role.py +++ b/koyeb/api_async/models/deployment_role.py @@ -26,12 +26,14 @@ class DeploymentRole(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - ACTIVE = "ACTIVE" - UPCOMING = "UPCOMING" - CURRENT = "CURRENT" + INVALID = 'INVALID' + ACTIVE = 'ACTIVE' + UPCOMING = 'UPCOMING' + CURRENT = 'CURRENT' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DeploymentRole from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/deployment_route.py b/koyeb/api_async/models/deployment_route.py index 1bca1989..51eefe84 100644 --- a/koyeb/api_async/models/deployment_route.py +++ b/koyeb/api_async/models/deployment_route.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentRoute(BaseModel): """ DeploymentRoute - """ # noqa: E501 - + """ # noqa: E501 port: Optional[StrictInt] = None path: Optional[StrictStr] = None security_policies: Optional[SecurityPolicies] = None @@ -42,6 +40,7 @@ class DeploymentRoute(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of security_policies if self.security_policies: - _dict["security_policies"] = self.security_policies.to_dict() + _dict['security_policies'] = self.security_policies.to_dict() return _dict @classmethod @@ -86,15 +86,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "port": obj.get("port"), - "path": obj.get("path"), - "security_policies": SecurityPolicies.from_dict( - obj["security_policies"] - ) - if obj.get("security_policies") is not None - else None, - } - ) + _obj = cls.model_validate({ + "port": obj.get("port"), + "path": obj.get("path"), + "security_policies": SecurityPolicies.from_dict(obj["security_policies"]) if obj.get("security_policies") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_scaling.py b/koyeb/api_async/models/deployment_scaling.py index 08f5b509..76934d91 100644 --- a/koyeb/api_async/models/deployment_scaling.py +++ b/koyeb/api_async/models/deployment_scaling.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentScaling(BaseModel): """ DeploymentScaling - """ # noqa: E501 - + """ # noqa: E501 scopes: Optional[List[StrictStr]] = None min: Optional[StrictInt] = None max: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class DeploymentScaling(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.targets: for _item_targets in self.targets: - _items.append( - _item_targets.to_dict() if _item_targets is not None else None - ) - _dict["targets"] = _items + if _item_targets: + _items.append(_item_targets.to_dict()) + _dict['targets'] = _items return _dict @classmethod @@ -92,16 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "scopes": obj.get("scopes"), - "min": obj.get("min"), - "max": obj.get("max"), - "targets": [ - DeploymentScalingTarget.from_dict(_item) for _item in obj["targets"] - ] - if obj.get("targets") is not None - else None, - } - ) + _obj = cls.model_validate({ + "scopes": obj.get("scopes"), + "min": obj.get("min"), + "max": obj.get("max"), + "targets": [DeploymentScalingTarget.from_dict(_item) for _item in obj["targets"]] if obj.get("targets") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_scaling_target.py b/koyeb/api_async/models/deployment_scaling_target.py index d5da51c7..89a35152 100644 --- a/koyeb/api_async/models/deployment_scaling_target.py +++ b/koyeb/api_async/models/deployment_scaling_target.py @@ -19,48 +19,27 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.deployment_scaling_target_average_cpu import ( - DeploymentScalingTargetAverageCPU, -) -from koyeb.api_async.models.deployment_scaling_target_average_mem import ( - DeploymentScalingTargetAverageMem, -) -from koyeb.api_async.models.deployment_scaling_target_concurrent_requests import ( - DeploymentScalingTargetConcurrentRequests, -) -from koyeb.api_async.models.deployment_scaling_target_requests_per_second import ( - DeploymentScalingTargetRequestsPerSecond, -) -from koyeb.api_async.models.deployment_scaling_target_requests_response_time import ( - DeploymentScalingTargetRequestsResponseTime, -) -from koyeb.api_async.models.deployment_scaling_target_sleep_idle_delay import ( - DeploymentScalingTargetSleepIdleDelay, -) +from koyeb.api_async.models.deployment_scaling_target_average_cpu import DeploymentScalingTargetAverageCPU +from koyeb.api_async.models.deployment_scaling_target_average_mem import DeploymentScalingTargetAverageMem +from koyeb.api_async.models.deployment_scaling_target_concurrent_requests import DeploymentScalingTargetConcurrentRequests +from koyeb.api_async.models.deployment_scaling_target_requests_per_second import DeploymentScalingTargetRequestsPerSecond +from koyeb.api_async.models.deployment_scaling_target_requests_response_time import DeploymentScalingTargetRequestsResponseTime +from koyeb.api_async.models.deployment_scaling_target_sleep_idle_delay import DeploymentScalingTargetSleepIdleDelay from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentScalingTarget(BaseModel): """ DeploymentScalingTarget - """ # noqa: E501 - + """ # noqa: E501 average_cpu: Optional[DeploymentScalingTargetAverageCPU] = None average_mem: Optional[DeploymentScalingTargetAverageMem] = None requests_per_second: Optional[DeploymentScalingTargetRequestsPerSecond] = None concurrent_requests: Optional[DeploymentScalingTargetConcurrentRequests] = None requests_response_time: Optional[DeploymentScalingTargetRequestsResponseTime] = None sleep_idle_delay: Optional[DeploymentScalingTargetSleepIdleDelay] = None - __properties: ClassVar[List[str]] = [ - "average_cpu", - "average_mem", - "requests_per_second", - "concurrent_requests", - "requests_response_time", - "sleep_idle_delay", - ] + __properties: ClassVar[List[str]] = ["average_cpu", "average_mem", "requests_per_second", "concurrent_requests", "requests_response_time", "sleep_idle_delay"] model_config = ConfigDict( validate_by_name=True, @@ -69,6 +48,7 @@ class DeploymentScalingTarget(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -92,7 +72,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -101,22 +82,22 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of average_cpu if self.average_cpu: - _dict["average_cpu"] = self.average_cpu.to_dict() + _dict['average_cpu'] = self.average_cpu.to_dict() # override the default output from pydantic by calling `to_dict()` of average_mem if self.average_mem: - _dict["average_mem"] = self.average_mem.to_dict() + _dict['average_mem'] = self.average_mem.to_dict() # override the default output from pydantic by calling `to_dict()` of requests_per_second if self.requests_per_second: - _dict["requests_per_second"] = self.requests_per_second.to_dict() + _dict['requests_per_second'] = self.requests_per_second.to_dict() # override the default output from pydantic by calling `to_dict()` of concurrent_requests if self.concurrent_requests: - _dict["concurrent_requests"] = self.concurrent_requests.to_dict() + _dict['concurrent_requests'] = self.concurrent_requests.to_dict() # override the default output from pydantic by calling `to_dict()` of requests_response_time if self.requests_response_time: - _dict["requests_response_time"] = self.requests_response_time.to_dict() + _dict['requests_response_time'] = self.requests_response_time.to_dict() # override the default output from pydantic by calling `to_dict()` of sleep_idle_delay if self.sleep_idle_delay: - _dict["sleep_idle_delay"] = self.sleep_idle_delay.to_dict() + _dict['sleep_idle_delay'] = self.sleep_idle_delay.to_dict() return _dict @classmethod @@ -128,38 +109,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "average_cpu": DeploymentScalingTargetAverageCPU.from_dict( - obj["average_cpu"] - ) - if obj.get("average_cpu") is not None - else None, - "average_mem": DeploymentScalingTargetAverageMem.from_dict( - obj["average_mem"] - ) - if obj.get("average_mem") is not None - else None, - "requests_per_second": DeploymentScalingTargetRequestsPerSecond.from_dict( - obj["requests_per_second"] - ) - if obj.get("requests_per_second") is not None - else None, - "concurrent_requests": DeploymentScalingTargetConcurrentRequests.from_dict( - obj["concurrent_requests"] - ) - if obj.get("concurrent_requests") is not None - else None, - "requests_response_time": DeploymentScalingTargetRequestsResponseTime.from_dict( - obj["requests_response_time"] - ) - if obj.get("requests_response_time") is not None - else None, - "sleep_idle_delay": DeploymentScalingTargetSleepIdleDelay.from_dict( - obj["sleep_idle_delay"] - ) - if obj.get("sleep_idle_delay") is not None - else None, - } - ) + _obj = cls.model_validate({ + "average_cpu": DeploymentScalingTargetAverageCPU.from_dict(obj["average_cpu"]) if obj.get("average_cpu") is not None else None, + "average_mem": DeploymentScalingTargetAverageMem.from_dict(obj["average_mem"]) if obj.get("average_mem") is not None else None, + "requests_per_second": DeploymentScalingTargetRequestsPerSecond.from_dict(obj["requests_per_second"]) if obj.get("requests_per_second") is not None else None, + "concurrent_requests": DeploymentScalingTargetConcurrentRequests.from_dict(obj["concurrent_requests"]) if obj.get("concurrent_requests") is not None else None, + "requests_response_time": DeploymentScalingTargetRequestsResponseTime.from_dict(obj["requests_response_time"]) if obj.get("requests_response_time") is not None else None, + "sleep_idle_delay": DeploymentScalingTargetSleepIdleDelay.from_dict(obj["sleep_idle_delay"]) if obj.get("sleep_idle_delay") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_scaling_target_average_cpu.py b/koyeb/api_async/models/deployment_scaling_target_average_cpu.py index 21ce94ae..5dd9efdb 100644 --- a/koyeb/api_async/models/deployment_scaling_target_average_cpu.py +++ b/koyeb/api_async/models/deployment_scaling_target_average_cpu.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentScalingTargetAverageCPU(BaseModel): """ DeploymentScalingTargetAverageCPU - """ # noqa: E501 - + """ # noqa: E501 value: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["value"] @@ -39,6 +37,7 @@ class DeploymentScalingTargetAverageCPU(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"value": obj.get("value")}) + _obj = cls.model_validate({ + "value": obj.get("value") + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_scaling_target_average_mem.py b/koyeb/api_async/models/deployment_scaling_target_average_mem.py index 0193838e..f5e1e36a 100644 --- a/koyeb/api_async/models/deployment_scaling_target_average_mem.py +++ b/koyeb/api_async/models/deployment_scaling_target_average_mem.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentScalingTargetAverageMem(BaseModel): """ DeploymentScalingTargetAverageMem - """ # noqa: E501 - + """ # noqa: E501 value: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["value"] @@ -39,6 +37,7 @@ class DeploymentScalingTargetAverageMem(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"value": obj.get("value")}) + _obj = cls.model_validate({ + "value": obj.get("value") + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_scaling_target_concurrent_requests.py b/koyeb/api_async/models/deployment_scaling_target_concurrent_requests.py index a43c46e0..eb1e59a0 100644 --- a/koyeb/api_async/models/deployment_scaling_target_concurrent_requests.py +++ b/koyeb/api_async/models/deployment_scaling_target_concurrent_requests.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentScalingTargetConcurrentRequests(BaseModel): """ DeploymentScalingTargetConcurrentRequests - """ # noqa: E501 - + """ # noqa: E501 value: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["value"] @@ -39,6 +37,7 @@ class DeploymentScalingTargetConcurrentRequests(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"value": obj.get("value")}) + _obj = cls.model_validate({ + "value": obj.get("value") + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_scaling_target_requests_per_second.py b/koyeb/api_async/models/deployment_scaling_target_requests_per_second.py index 5d74a068..d2e602ef 100644 --- a/koyeb/api_async/models/deployment_scaling_target_requests_per_second.py +++ b/koyeb/api_async/models/deployment_scaling_target_requests_per_second.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentScalingTargetRequestsPerSecond(BaseModel): """ DeploymentScalingTargetRequestsPerSecond - """ # noqa: E501 - + """ # noqa: E501 value: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["value"] @@ -39,6 +37,7 @@ class DeploymentScalingTargetRequestsPerSecond(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"value": obj.get("value")}) + _obj = cls.model_validate({ + "value": obj.get("value") + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_scaling_target_requests_response_time.py b/koyeb/api_async/models/deployment_scaling_target_requests_response_time.py index 2865cfd1..f1c78121 100644 --- a/koyeb/api_async/models/deployment_scaling_target_requests_response_time.py +++ b/koyeb/api_async/models/deployment_scaling_target_requests_response_time.py @@ -23,17 +23,12 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentScalingTargetRequestsResponseTime(BaseModel): """ DeploymentScalingTargetRequestsResponseTime - """ # noqa: E501 - + """ # noqa: E501 value: Optional[StrictInt] = None - quantile: Optional[StrictInt] = Field( - default=None, - description="The quantile to use for autoscaling. For example, set to 95 to use the 95th percentile (p95) for autoscaling. Valid values are between 0 and 100.", - ) + quantile: Optional[StrictInt] = Field(default=None, description="The quantile to use for autoscaling. For example, set to 95 to use the 95th percentile (p95) for autoscaling. Valid values are between 0 and 100.") __properties: ClassVar[List[str]] = ["value", "quantile"] model_config = ConfigDict( @@ -43,6 +38,7 @@ class DeploymentScalingTargetRequestsResponseTime(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"value": obj.get("value"), "quantile": obj.get("quantile")} - ) + _obj = cls.model_validate({ + "value": obj.get("value"), + "quantile": obj.get("quantile") + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_scaling_target_sleep_idle_delay.py b/koyeb/api_async/models/deployment_scaling_target_sleep_idle_delay.py index c5738f84..2d131c68 100644 --- a/koyeb/api_async/models/deployment_scaling_target_sleep_idle_delay.py +++ b/koyeb/api_async/models/deployment_scaling_target_sleep_idle_delay.py @@ -23,29 +23,14 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentScalingTargetSleepIdleDelay(BaseModel): """ DeploymentScalingTargetSleepIdleDelay - """ # noqa: E501 - - value: Optional[StrictInt] = Field( - default=None, - description="DEPRECATED: use deep_sleep_value instead. Delay in seconds after which a service which received 0 request is put to deep sleep.", - ) - deep_sleep_value: Optional[StrictInt] = Field( - default=None, - description="Delay in seconds after which a service which received 0 request is put to deep sleep.", - ) - light_sleep_value: Optional[StrictInt] = Field( - default=None, - description="Delay in seconds after which a service which received 0 request is put to light sleep.", - ) - __properties: ClassVar[List[str]] = [ - "value", - "deep_sleep_value", - "light_sleep_value", - ] + """ # noqa: E501 + value: Optional[StrictInt] = Field(default=None, description="DEPRECATED: use deep_sleep_value instead. Delay in seconds after which a service which received 0 request is put to deep sleep.") + deep_sleep_value: Optional[StrictInt] = Field(default=None, description="Delay in seconds after which a service which received 0 request is put to deep sleep.") + light_sleep_value: Optional[StrictInt] = Field(default=None, description="Delay in seconds after which a service which received 0 request is put to light sleep.") + __properties: ClassVar[List[str]] = ["value", "deep_sleep_value", "light_sleep_value"] model_config = ConfigDict( validate_by_name=True, @@ -54,6 +39,7 @@ class DeploymentScalingTargetSleepIdleDelay(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -95,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "value": obj.get("value"), - "deep_sleep_value": obj.get("deep_sleep_value"), - "light_sleep_value": obj.get("light_sleep_value"), - } - ) + _obj = cls.model_validate({ + "value": obj.get("value"), + "deep_sleep_value": obj.get("deep_sleep_value"), + "light_sleep_value": obj.get("light_sleep_value") + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_status.py b/koyeb/api_async/models/deployment_status.py index c4b733c9..ce4765e8 100644 --- a/koyeb/api_async/models/deployment_status.py +++ b/koyeb/api_async/models/deployment_status.py @@ -26,24 +26,26 @@ class DeploymentStatus(str, Enum): """ allowed enum values """ - PENDING = "PENDING" - PROVISIONING = "PROVISIONING" - SCHEDULED = "SCHEDULED" - CANCELING = "CANCELING" - CANCELED = "CANCELED" - ALLOCATING = "ALLOCATING" - STARTING = "STARTING" - HEALTHY = "HEALTHY" - DEGRADED = "DEGRADED" - UNHEALTHY = "UNHEALTHY" - STOPPING = "STOPPING" - STOPPED = "STOPPED" - ERRORING = "ERRORING" - ERROR = "ERROR" - STASHED = "STASHED" - SLEEPING = "SLEEPING" + PENDING = 'PENDING' + PROVISIONING = 'PROVISIONING' + SCHEDULED = 'SCHEDULED' + CANCELING = 'CANCELING' + CANCELED = 'CANCELED' + ALLOCATING = 'ALLOCATING' + STARTING = 'STARTING' + HEALTHY = 'HEALTHY' + DEGRADED = 'DEGRADED' + UNHEALTHY = 'UNHEALTHY' + STOPPING = 'STOPPING' + STOPPED = 'STOPPED' + ERRORING = 'ERRORING' + ERROR = 'ERROR' + STASHED = 'STASHED' + SLEEPING = 'SLEEPING' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DeploymentStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/deployment_strategy.py b/koyeb/api_async/models/deployment_strategy.py index 004b75ef..3bbe1370 100644 --- a/koyeb/api_async/models/deployment_strategy.py +++ b/koyeb/api_async/models/deployment_strategy.py @@ -24,15 +24,11 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentStrategy(BaseModel): """ DeploymentStrategy - """ # noqa: E501 - - type: Optional[ - DeploymentStrategyType - ] = DeploymentStrategyType.DEPLOYMENT_STRATEGY_TYPE_INVALID + """ # noqa: E501 + type: Optional[DeploymentStrategyType] = DeploymentStrategyType.DEPLOYMENT_STRATEGY_TYPE_INVALID __properties: ClassVar[List[str]] = ["type"] model_config = ConfigDict( @@ -42,6 +38,7 @@ class DeploymentStrategy(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,11 +81,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "type": obj.get("type") - if obj.get("type") is not None - else DeploymentStrategyType.DEPLOYMENT_STRATEGY_TYPE_INVALID - } - ) + _obj = cls.model_validate({ + "type": obj.get("type") if obj.get("type") is not None else DeploymentStrategyType.DEPLOYMENT_STRATEGY_TYPE_INVALID + }) return _obj + + diff --git a/koyeb/api_async/models/deployment_strategy_type.py b/koyeb/api_async/models/deployment_strategy_type.py index 3c82cbd1..34e4d106 100644 --- a/koyeb/api_async/models/deployment_strategy_type.py +++ b/koyeb/api_async/models/deployment_strategy_type.py @@ -20,20 +20,22 @@ class DeploymentStrategyType(str, Enum): """ - - DEPLOYMENT_STRATEGY_TYPE_INVALID: DEPRECATED: Use DEPLOYMENT_STRATEGY_TYPE_DEFAULT instead. - DEPLOYMENT_STRATEGY_TYPE_DEFAULT: Default/unspecified strategy (resolves to platform default, currently ROLLING). - DEPLOYMENT_STRATEGY_TYPE_CANARY: Use canary strategy. - DEPLOYMENT_STRATEGY_TYPE_ROLLING: Use rolling strategy. - DEPLOYMENT_STRATEGY_TYPE_BLUE_GREEN: Use blue green strategy. - DEPLOYMENT_STRATEGY_TYPE_IMMEDIATE: Use immediate strategy. + - DEPLOYMENT_STRATEGY_TYPE_INVALID: DEPRECATED: Use DEPLOYMENT_STRATEGY_TYPE_DEFAULT instead. - DEPLOYMENT_STRATEGY_TYPE_DEFAULT: Default/unspecified strategy (resolves to platform default, currently ROLLING). - DEPLOYMENT_STRATEGY_TYPE_CANARY: Use canary strategy. - DEPLOYMENT_STRATEGY_TYPE_ROLLING: Use rolling strategy. - DEPLOYMENT_STRATEGY_TYPE_BLUE_GREEN: Use blue green strategy. - DEPLOYMENT_STRATEGY_TYPE_IMMEDIATE: Use immediate strategy. """ """ allowed enum values """ - DEPLOYMENT_STRATEGY_TYPE_INVALID = "DEPLOYMENT_STRATEGY_TYPE_INVALID" - DEPLOYMENT_STRATEGY_TYPE_DEFAULT = "DEPLOYMENT_STRATEGY_TYPE_DEFAULT" - DEPLOYMENT_STRATEGY_TYPE_CANARY = "DEPLOYMENT_STRATEGY_TYPE_CANARY" - DEPLOYMENT_STRATEGY_TYPE_ROLLING = "DEPLOYMENT_STRATEGY_TYPE_ROLLING" - DEPLOYMENT_STRATEGY_TYPE_BLUE_GREEN = "DEPLOYMENT_STRATEGY_TYPE_BLUE_GREEN" - DEPLOYMENT_STRATEGY_TYPE_IMMEDIATE = "DEPLOYMENT_STRATEGY_TYPE_IMMEDIATE" + DEPLOYMENT_STRATEGY_TYPE_INVALID = 'DEPLOYMENT_STRATEGY_TYPE_INVALID' + DEPLOYMENT_STRATEGY_TYPE_DEFAULT = 'DEPLOYMENT_STRATEGY_TYPE_DEFAULT' + DEPLOYMENT_STRATEGY_TYPE_CANARY = 'DEPLOYMENT_STRATEGY_TYPE_CANARY' + DEPLOYMENT_STRATEGY_TYPE_ROLLING = 'DEPLOYMENT_STRATEGY_TYPE_ROLLING' + DEPLOYMENT_STRATEGY_TYPE_BLUE_GREEN = 'DEPLOYMENT_STRATEGY_TYPE_BLUE_GREEN' + DEPLOYMENT_STRATEGY_TYPE_IMMEDIATE = 'DEPLOYMENT_STRATEGY_TYPE_IMMEDIATE' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DeploymentStrategyType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/deployment_volume.py b/koyeb/api_async/models/deployment_volume.py index b0c27f45..0a671f05 100644 --- a/koyeb/api_async/models/deployment_volume.py +++ b/koyeb/api_async/models/deployment_volume.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DeploymentVolume(BaseModel): """ DeploymentVolume - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None path: Optional[StrictStr] = None replica_index: Optional[StrictInt] = None @@ -42,6 +40,7 @@ class DeploymentVolume(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "path": obj.get("path"), - "replica_index": obj.get("replica_index"), - "scopes": obj.get("scopes"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "path": obj.get("path"), + "replica_index": obj.get("replica_index"), + "scopes": obj.get("scopes") + }) return _obj + + diff --git a/koyeb/api_async/models/desired_deployment.py b/koyeb/api_async/models/desired_deployment.py index 6fc6c357..251ac3e1 100644 --- a/koyeb/api_async/models/desired_deployment.py +++ b/koyeb/api_async/models/desired_deployment.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DesiredDeployment(BaseModel): """ DesiredDeployment - """ # noqa: E501 - + """ # noqa: E501 groups: Optional[List[DesiredDeploymentGroup]] = None __properties: ClassVar[List[str]] = ["groups"] @@ -40,6 +38,7 @@ class DesiredDeployment(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,10 +74,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.groups: for _item_groups in self.groups: - _items.append( - _item_groups.to_dict() if _item_groups is not None else None - ) - _dict["groups"] = _items + if _item_groups: + _items.append(_item_groups.to_dict()) + _dict['groups'] = _items return _dict @classmethod @@ -89,13 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "groups": [ - DesiredDeploymentGroup.from_dict(_item) for _item in obj["groups"] - ] - if obj.get("groups") is not None - else None - } - ) + _obj = cls.model_validate({ + "groups": [DesiredDeploymentGroup.from_dict(_item) for _item in obj["groups"]] if obj.get("groups") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/desired_deployment_group.py b/koyeb/api_async/models/desired_deployment_group.py index 49e7d8ed..ff32228b 100644 --- a/koyeb/api_async/models/desired_deployment_group.py +++ b/koyeb/api_async/models/desired_deployment_group.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DesiredDeploymentGroup(BaseModel): """ DesiredDeploymentGroup - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None deployment_ids: Optional[List[StrictStr]] = None __properties: ClassVar[List[str]] = ["name", "deployment_ids"] @@ -40,6 +38,7 @@ class DesiredDeploymentGroup(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"name": obj.get("name"), "deployment_ids": obj.get("deployment_ids")} - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "deployment_ids": obj.get("deployment_ids") + }) return _obj + + diff --git a/koyeb/api_async/models/digital_ocean_registry_configuration.py b/koyeb/api_async/models/digital_ocean_registry_configuration.py index 814943ff..655cb1bb 100644 --- a/koyeb/api_async/models/digital_ocean_registry_configuration.py +++ b/koyeb/api_async/models/digital_ocean_registry_configuration.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DigitalOceanRegistryConfiguration(BaseModel): """ DigitalOceanRegistryConfiguration - """ # noqa: E501 - + """ # noqa: E501 username: Optional[StrictStr] = None password: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["username", "password"] @@ -40,6 +38,7 @@ class DigitalOceanRegistryConfiguration(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"username": obj.get("username"), "password": obj.get("password")} - ) + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password") + }) return _obj + + diff --git a/koyeb/api_async/models/discourse_auth_reply.py b/koyeb/api_async/models/discourse_auth_reply.py index ac8199be..222a7321 100644 --- a/koyeb/api_async/models/discourse_auth_reply.py +++ b/koyeb/api_async/models/discourse_auth_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DiscourseAuthReply(BaseModel): """ DiscourseAuthReply - """ # noqa: E501 - + """ # noqa: E501 sso: Optional[StrictStr] = None sig: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["sso", "sig"] @@ -40,6 +38,7 @@ class DiscourseAuthReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,5 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"sso": obj.get("sso"), "sig": obj.get("sig")}) + _obj = cls.model_validate({ + "sso": obj.get("sso"), + "sig": obj.get("sig") + }) return _obj + + diff --git a/koyeb/api_async/models/discourse_auth_request.py b/koyeb/api_async/models/discourse_auth_request.py index 857708e1..ee511966 100644 --- a/koyeb/api_async/models/discourse_auth_request.py +++ b/koyeb/api_async/models/discourse_auth_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DiscourseAuthRequest(BaseModel): """ DiscourseAuthRequest - """ # noqa: E501 - + """ # noqa: E501 payload: Optional[StrictStr] = None sig: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["payload", "sig"] @@ -40,6 +38,7 @@ class DiscourseAuthRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"payload": obj.get("payload"), "sig": obj.get("sig")} - ) + _obj = cls.model_validate({ + "payload": obj.get("payload"), + "sig": obj.get("sig") + }) return _obj + + diff --git a/koyeb/api_async/models/docker_builder.py b/koyeb/api_async/models/docker_builder.py index 4dd66bfd..008cec1a 100644 --- a/koyeb/api_async/models/docker_builder.py +++ b/koyeb/api_async/models/docker_builder.py @@ -23,26 +23,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DockerBuilder(BaseModel): """ DockerBuilder - """ # noqa: E501 - + """ # noqa: E501 dockerfile: Optional[StrictStr] = None entrypoint: Optional[List[StrictStr]] = None command: Optional[StrictStr] = None args: Optional[List[StrictStr]] = None target: Optional[StrictStr] = None privileged: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "dockerfile", - "entrypoint", - "command", - "args", - "target", - "privileged", - ] + __properties: ClassVar[List[str]] = ["dockerfile", "entrypoint", "command", "args", "target", "privileged"] model_config = ConfigDict( validate_by_name=True, @@ -51,6 +42,7 @@ class DockerBuilder(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -92,14 +85,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "dockerfile": obj.get("dockerfile"), - "entrypoint": obj.get("entrypoint"), - "command": obj.get("command"), - "args": obj.get("args"), - "target": obj.get("target"), - "privileged": obj.get("privileged"), - } - ) + _obj = cls.model_validate({ + "dockerfile": obj.get("dockerfile"), + "entrypoint": obj.get("entrypoint"), + "command": obj.get("command"), + "args": obj.get("args"), + "target": obj.get("target"), + "privileged": obj.get("privileged") + }) return _obj + + diff --git a/koyeb/api_async/models/docker_hub_registry_configuration.py b/koyeb/api_async/models/docker_hub_registry_configuration.py index 18b48c74..1e3d6c45 100644 --- a/koyeb/api_async/models/docker_hub_registry_configuration.py +++ b/koyeb/api_async/models/docker_hub_registry_configuration.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DockerHubRegistryConfiguration(BaseModel): """ DockerHubRegistryConfiguration - """ # noqa: E501 - + """ # noqa: E501 username: Optional[StrictStr] = None password: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["username", "password"] @@ -40,6 +38,7 @@ class DockerHubRegistryConfiguration(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"username": obj.get("username"), "password": obj.get("password")} - ) + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password") + }) return _obj + + diff --git a/koyeb/api_async/models/docker_source.py b/koyeb/api_async/models/docker_source.py index b6793b6a..1ed042d9 100644 --- a/koyeb/api_async/models/docker_source.py +++ b/koyeb/api_async/models/docker_source.py @@ -23,26 +23,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DockerSource(BaseModel): """ DockerSource - """ # noqa: E501 - + """ # noqa: E501 image: Optional[StrictStr] = None command: Optional[StrictStr] = None args: Optional[List[StrictStr]] = None image_registry_secret: Optional[StrictStr] = None entrypoint: Optional[List[StrictStr]] = None privileged: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "image", - "command", - "args", - "image_registry_secret", - "entrypoint", - "privileged", - ] + __properties: ClassVar[List[str]] = ["image", "command", "args", "image_registry_secret", "entrypoint", "privileged"] model_config = ConfigDict( validate_by_name=True, @@ -51,6 +42,7 @@ class DockerSource(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -92,14 +85,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "image": obj.get("image"), - "command": obj.get("command"), - "args": obj.get("args"), - "image_registry_secret": obj.get("image_registry_secret"), - "entrypoint": obj.get("entrypoint"), - "privileged": obj.get("privileged"), - } - ) + _obj = cls.model_validate({ + "image": obj.get("image"), + "command": obj.get("command"), + "args": obj.get("args"), + "image_registry_secret": obj.get("image_registry_secret"), + "entrypoint": obj.get("entrypoint"), + "privileged": obj.get("privileged") + }) return _obj + + diff --git a/koyeb/api_async/models/domain.py b/koyeb/api_async/models/domain.py index b59f8ab4..666978ed 100644 --- a/koyeb/api_async/models/domain.py +++ b/koyeb/api_async/models/domain.py @@ -27,12 +27,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Domain(BaseModel): """ Domain - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None name: Optional[StrictStr] = None @@ -48,28 +46,8 @@ class Domain(BaseModel): version: Optional[StrictStr] = None cloudflare: Optional[Dict[str, Any]] = None koyeb: Optional[DomainLoadBalancerKoyeb] = None - project_id: Optional[StrictStr] = Field( - default=None, - description="The project ID this domain belongs to. Empty if the domain is organization-level.", - ) - __properties: ClassVar[List[str]] = [ - "id", - "organization_id", - "name", - "created_at", - "updated_at", - "status", - "type", - "app_id", - "deployment_group", - "verified_at", - "intended_cname", - "messages", - "version", - "cloudflare", - "koyeb", - "project_id", - ] + project_id: Optional[StrictStr] = Field(default=None, description="The project ID this domain belongs to. Empty if the domain is organization-level.") + __properties: ClassVar[List[str]] = ["id", "organization_id", "name", "created_at", "updated_at", "status", "type", "app_id", "deployment_group", "verified_at", "intended_cname", "messages", "version", "cloudflare", "koyeb", "project_id"] model_config = ConfigDict( validate_by_name=True, @@ -78,6 +56,7 @@ class Domain(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -101,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -110,7 +90,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of koyeb if self.koyeb: - _dict["koyeb"] = self.koyeb.to_dict() + _dict['koyeb'] = self.koyeb.to_dict() return _dict @classmethod @@ -122,30 +102,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "organization_id": obj.get("organization_id"), - "name": obj.get("name"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "status": obj.get("status") - if obj.get("status") is not None - else DomainStatus.PENDING, - "type": obj.get("type") - if obj.get("type") is not None - else DomainType.AUTOASSIGNED, - "app_id": obj.get("app_id"), - "deployment_group": obj.get("deployment_group"), - "verified_at": obj.get("verified_at"), - "intended_cname": obj.get("intended_cname"), - "messages": obj.get("messages"), - "version": obj.get("version"), - "cloudflare": obj.get("cloudflare"), - "koyeb": DomainLoadBalancerKoyeb.from_dict(obj["koyeb"]) - if obj.get("koyeb") is not None - else None, - "project_id": obj.get("project_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "name": obj.get("name"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "status": obj.get("status") if obj.get("status") is not None else DomainStatus.PENDING, + "type": obj.get("type") if obj.get("type") is not None else DomainType.AUTOASSIGNED, + "app_id": obj.get("app_id"), + "deployment_group": obj.get("deployment_group"), + "verified_at": obj.get("verified_at"), + "intended_cname": obj.get("intended_cname"), + "messages": obj.get("messages"), + "version": obj.get("version"), + "cloudflare": obj.get("cloudflare"), + "koyeb": DomainLoadBalancerKoyeb.from_dict(obj["koyeb"]) if obj.get("koyeb") is not None else None, + "project_id": obj.get("project_id") + }) return _obj + + diff --git a/koyeb/api_async/models/domain_load_balancer_koyeb.py b/koyeb/api_async/models/domain_load_balancer_koyeb.py index a23d93d1..a3b2a3f1 100644 --- a/koyeb/api_async/models/domain_load_balancer_koyeb.py +++ b/koyeb/api_async/models/domain_load_balancer_koyeb.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DomainLoadBalancerKoyeb(BaseModel): """ DomainLoadBalancerKoyeb - """ # noqa: E501 - + """ # noqa: E501 request_timeout_seconds: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["request_timeout_seconds"] @@ -39,6 +37,7 @@ class DomainLoadBalancerKoyeb(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,7 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"request_timeout_seconds": obj.get("request_timeout_seconds")} - ) + _obj = cls.model_validate({ + "request_timeout_seconds": obj.get("request_timeout_seconds") + }) return _obj + + diff --git a/koyeb/api_async/models/domain_load_balancer_quotas.py b/koyeb/api_async/models/domain_load_balancer_quotas.py index f103cb75..4a16fea9 100644 --- a/koyeb/api_async/models/domain_load_balancer_quotas.py +++ b/koyeb/api_async/models/domain_load_balancer_quotas.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DomainLoadBalancerQuotas(BaseModel): """ DomainLoadBalancerQuotas - """ # noqa: E501 - + """ # noqa: E501 max_koyeb: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["max_koyeb"] @@ -39,6 +37,7 @@ class DomainLoadBalancerQuotas(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"max_koyeb": obj.get("max_koyeb")}) + _obj = cls.model_validate({ + "max_koyeb": obj.get("max_koyeb") + }) return _obj + + diff --git a/koyeb/api_async/models/domain_status.py b/koyeb/api_async/models/domain_status.py index 8abb49ab..1f441933 100644 --- a/koyeb/api_async/models/domain_status.py +++ b/koyeb/api_async/models/domain_status.py @@ -26,13 +26,15 @@ class DomainStatus(str, Enum): """ allowed enum values """ - PENDING = "PENDING" - ACTIVE = "ACTIVE" - ERROR = "ERROR" - DELETING = "DELETING" - DELETED = "DELETED" + PENDING = 'PENDING' + ACTIVE = 'ACTIVE' + ERROR = 'ERROR' + DELETING = 'DELETING' + DELETED = 'DELETED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DomainStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/domain_type.py b/koyeb/api_async/models/domain_type.py index 2a709294..6ea6ca50 100644 --- a/koyeb/api_async/models/domain_type.py +++ b/koyeb/api_async/models/domain_type.py @@ -26,10 +26,12 @@ class DomainType(str, Enum): """ allowed enum values """ - AUTOASSIGNED = "AUTOASSIGNED" - CUSTOM = "CUSTOM" + AUTOASSIGNED = 'AUTOASSIGNED' + CUSTOM = 'CUSTOM' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DomainType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/domains_summary.py b/koyeb/api_async/models/domains_summary.py index 98b06194..6c569af5 100644 --- a/koyeb/api_async/models/domains_summary.py +++ b/koyeb/api_async/models/domains_summary.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class DomainsSummary(BaseModel): """ DomainsSummary - """ # noqa: E501 - + """ # noqa: E501 total: Optional[StrictStr] = None by_status: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["total", "by_status"] @@ -40,6 +38,7 @@ class DomainsSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"total": obj.get("total"), "by_status": obj.get("by_status")} - ) + _obj = cls.model_validate({ + "total": obj.get("total"), + "by_status": obj.get("by_status") + }) return _obj + + diff --git a/koyeb/api_async/models/egress_policy.py b/koyeb/api_async/models/egress_policy.py index 72cdc770..fcc9ae50 100644 --- a/koyeb/api_async/models/egress_policy.py +++ b/koyeb/api_async/models/egress_policy.py @@ -25,17 +25,12 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class EgressPolicy(BaseModel): """ EgressPolicy - """ # noqa: E501 - + """ # noqa: E501 mode: Optional[EgressPolicyMode] = EgressPolicyMode.EGRESS_POLICY_MODE_DEFAULT - allow_list: Optional[List[NetworkPolicyDestination]] = Field( - default=None, - description="Allowed destinations (deny-by-default semantics under DENY_ALL). Ignored when mode is DEFAULT.", - ) + allow_list: Optional[List[NetworkPolicyDestination]] = Field(default=None, description="Allowed destinations (deny-by-default semantics under DENY_ALL). Ignored when mode is DEFAULT.") __properties: ClassVar[List[str]] = ["mode", "allow_list"] model_config = ConfigDict( @@ -45,6 +40,7 @@ class EgressPolicy(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -79,10 +76,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.allow_list: for _item_allow_list in self.allow_list: - _items.append( - _item_allow_list.to_dict() if _item_allow_list is not None else None - ) - _dict["allow_list"] = _items + if _item_allow_list: + _items.append(_item_allow_list.to_dict()) + _dict['allow_list'] = _items return _dict @classmethod @@ -94,17 +90,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "mode": obj.get("mode") - if obj.get("mode") is not None - else EgressPolicyMode.EGRESS_POLICY_MODE_DEFAULT, - "allow_list": [ - NetworkPolicyDestination.from_dict(_item) - for _item in obj["allow_list"] - ] - if obj.get("allow_list") is not None - else None, - } - ) + _obj = cls.model_validate({ + "mode": obj.get("mode") if obj.get("mode") is not None else EgressPolicyMode.EGRESS_POLICY_MODE_DEFAULT, + "allow_list": [NetworkPolicyDestination.from_dict(_item) for _item in obj["allow_list"]] if obj.get("allow_list") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/egress_policy_mode.py b/koyeb/api_async/models/egress_policy_mode.py index 968dc260..3786f8dd 100644 --- a/koyeb/api_async/models/egress_policy_mode.py +++ b/koyeb/api_async/models/egress_policy_mode.py @@ -26,10 +26,12 @@ class EgressPolicyMode(str, Enum): """ allowed enum values """ - EGRESS_POLICY_MODE_DEFAULT = "EGRESS_POLICY_MODE_DEFAULT" - EGRESS_POLICY_MODE_DENY_ALL = "EGRESS_POLICY_MODE_DENY_ALL" + EGRESS_POLICY_MODE_DEFAULT = 'EGRESS_POLICY_MODE_DEFAULT' + EGRESS_POLICY_MODE_DENY_ALL = 'EGRESS_POLICY_MODE_DENY_ALL' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of EgressPolicyMode from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/env.py b/koyeb/api_async/models/env.py index cee7b64a..4f05c55d 100644 --- a/koyeb/api_async/models/env.py +++ b/koyeb/api_async/models/env.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Env(BaseModel): """ Env - """ # noqa: E501 - + """ # noqa: E501 key: Optional[StrictStr] = None value: Optional[StrictStr] = None secret: Optional[StrictStr] = None @@ -41,6 +39,7 @@ class Env(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "key": obj.get("key"), - "value": obj.get("value"), - "secret": obj.get("secret"), - } - ) + _obj = cls.model_validate({ + "key": obj.get("key"), + "value": obj.get("value"), + "secret": obj.get("secret") + }) return _obj + + diff --git a/koyeb/api_async/models/error.py b/koyeb/api_async/models/error.py index ec2fe905..a7c14eae 100644 --- a/koyeb/api_async/models/error.py +++ b/koyeb/api_async/models/error.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Error(BaseModel): """ Error - """ # noqa: E501 - + """ # noqa: E501 status: Optional[StrictInt] = None code: Optional[StrictStr] = None message: Optional[StrictStr] = None @@ -41,6 +39,7 @@ class Error(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "status": obj.get("status"), - "code": obj.get("code"), - "message": obj.get("message"), - } - ) + _obj = cls.model_validate({ + "status": obj.get("status"), + "code": obj.get("code"), + "message": obj.get("message") + }) return _obj + + diff --git a/koyeb/api_async/models/error_field.py b/koyeb/api_async/models/error_field.py index 848aca13..0672a721 100644 --- a/koyeb/api_async/models/error_field.py +++ b/koyeb/api_async/models/error_field.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ErrorField(BaseModel): """ ErrorField - """ # noqa: E501 - + """ # noqa: E501 var_field: Optional[StrictStr] = Field(default=None, alias="field") description: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["field", "description"] @@ -40,6 +38,7 @@ class ErrorField(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"field": obj.get("field"), "description": obj.get("description")} - ) + _obj = cls.model_validate({ + "field": obj.get("field"), + "description": obj.get("description") + }) return _obj + + diff --git a/koyeb/api_async/models/error_with_fields.py b/koyeb/api_async/models/error_with_fields.py index a4cb8029..6c18c8f6 100644 --- a/koyeb/api_async/models/error_with_fields.py +++ b/koyeb/api_async/models/error_with_fields.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ErrorWithFields(BaseModel): """ ErrorWithFields - """ # noqa: E501 - + """ # noqa: E501 status: Optional[StrictInt] = None code: Optional[StrictStr] = None message: Optional[StrictStr] = None @@ -43,6 +41,7 @@ class ErrorWithFields(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.fields: for _item_fields in self.fields: - _items.append( - _item_fields.to_dict() if _item_fields is not None else None - ) - _dict["fields"] = _items + if _item_fields: + _items.append(_item_fields.to_dict()) + _dict['fields'] = _items return _dict @classmethod @@ -92,14 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "status": obj.get("status"), - "code": obj.get("code"), - "message": obj.get("message"), - "fields": [ErrorField.from_dict(_item) for _item in obj["fields"]] - if obj.get("fields") is not None - else None, - } - ) + _obj = cls.model_validate({ + "status": obj.get("status"), + "code": obj.get("code"), + "message": obj.get("message"), + "fields": [ErrorField.from_dict(_item) for _item in obj["fields"]] if obj.get("fields") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/exec_command_io.py b/koyeb/api_async/models/exec_command_io.py index 1db0c6f7..7adf4f6b 100644 --- a/koyeb/api_async/models/exec_command_io.py +++ b/koyeb/api_async/models/exec_command_io.py @@ -24,33 +24,22 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ExecCommandIO(BaseModel): """ ExecCommandIO - """ # noqa: E501 - - data: Optional[ - Union[Annotated[bytes, Field(strict=True)], Annotated[str, Field(strict=True)]] - ] = Field(default=None, description="Data is base64 encoded") - close: Optional[StrictBool] = Field( - default=None, description="Indicate last data frame" - ) + """ # noqa: E501 + data: Optional[Union[Annotated[bytes, Field(strict=True)], Annotated[str, Field(strict=True)]]] = Field(default=None, description="Data is base64 encoded") + close: Optional[StrictBool] = Field(default=None, description="Indicate last data frame") __properties: ClassVar[List[str]] = ["data", "close"] - @field_validator("data", mode="before") + @field_validator('data', mode="before") def data_validate_regular_expression(cls, value): """Validates the regular expression""" if value is None: return value - if isinstance(value, str) and not re.match( - r"^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$", - value, - ): - raise ValueError( - r"must validate the regular expression /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/" - ) + if isinstance(value, str) and not re.match(r"^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$", value): + raise ValueError(r"must validate the regular expression /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/") return value model_config = ConfigDict( @@ -60,6 +49,7 @@ def data_validate_regular_expression(cls, value): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -83,7 +73,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -101,5 +92,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"data": obj.get("data"), "close": obj.get("close")}) + _obj = cls.model_validate({ + "data": obj.get("data"), + "close": obj.get("close") + }) return _obj + + diff --git a/koyeb/api_async/models/exec_command_reply.py b/koyeb/api_async/models/exec_command_reply.py index e069b84f..31703d82 100644 --- a/koyeb/api_async/models/exec_command_reply.py +++ b/koyeb/api_async/models/exec_command_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ExecCommandReply(BaseModel): """ ExecCommandReply - """ # noqa: E501 - + """ # noqa: E501 stdout: Optional[ExecCommandIO] = None stderr: Optional[ExecCommandIO] = None exited: Optional[StrictBool] = None @@ -43,6 +41,7 @@ class ExecCommandReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -75,10 +75,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of stdout if self.stdout: - _dict["stdout"] = self.stdout.to_dict() + _dict['stdout'] = self.stdout.to_dict() # override the default output from pydantic by calling `to_dict()` of stderr if self.stderr: - _dict["stderr"] = self.stderr.to_dict() + _dict['stderr'] = self.stderr.to_dict() return _dict @classmethod @@ -90,16 +90,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "stdout": ExecCommandIO.from_dict(obj["stdout"]) - if obj.get("stdout") is not None - else None, - "stderr": ExecCommandIO.from_dict(obj["stderr"]) - if obj.get("stderr") is not None - else None, - "exited": obj.get("exited"), - "exit_code": obj.get("exit_code"), - } - ) + _obj = cls.model_validate({ + "stdout": ExecCommandIO.from_dict(obj["stdout"]) if obj.get("stdout") is not None else None, + "stderr": ExecCommandIO.from_dict(obj["stderr"]) if obj.get("stderr") is not None else None, + "exited": obj.get("exited"), + "exit_code": obj.get("exit_code") + }) return _obj + + diff --git a/koyeb/api_async/models/exec_command_request_body.py b/koyeb/api_async/models/exec_command_request_body.py index 876310e0..3404b283 100644 --- a/koyeb/api_async/models/exec_command_request_body.py +++ b/koyeb/api_async/models/exec_command_request_body.py @@ -20,29 +20,19 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from koyeb.api_async.models.exec_command_io import ExecCommandIO -from koyeb.api_async.models.exec_command_request_terminal_size import ( - ExecCommandRequestTerminalSize, -) +from koyeb.api_async.models.exec_command_request_terminal_size import ExecCommandRequestTerminalSize from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class ExecCommandRequestBody(BaseModel): """ ExecCommandRequestBody - """ # noqa: E501 - - command: Optional[List[StrictStr]] = Field( - default=None, description="Command to exec. Mandatory in the first frame sent" - ) + """ # noqa: E501 + command: Optional[List[StrictStr]] = Field(default=None, description="Command to exec. Mandatory in the first frame sent") tty_size: Optional[ExecCommandRequestTerminalSize] = None stdin: Optional[ExecCommandIO] = None - disable_tty: Optional[StrictBool] = Field( - default=None, - description="Disable TTY. It's enough to specify it in the first frame", - alias="disableTty", - ) + disable_tty: Optional[StrictBool] = Field(default=None, description="Disable TTY. It's enough to specify it in the first frame", alias="disableTty") __properties: ClassVar[List[str]] = ["command", "tty_size", "stdin", "disableTty"] model_config = ConfigDict( @@ -52,6 +42,7 @@ class ExecCommandRequestBody(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -75,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +76,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of tty_size if self.tty_size: - _dict["tty_size"] = self.tty_size.to_dict() + _dict['tty_size'] = self.tty_size.to_dict() # override the default output from pydantic by calling `to_dict()` of stdin if self.stdin: - _dict["stdin"] = self.stdin.to_dict() + _dict['stdin'] = self.stdin.to_dict() return _dict @classmethod @@ -99,16 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "command": obj.get("command"), - "tty_size": ExecCommandRequestTerminalSize.from_dict(obj["tty_size"]) - if obj.get("tty_size") is not None - else None, - "stdin": ExecCommandIO.from_dict(obj["stdin"]) - if obj.get("stdin") is not None - else None, - "disableTty": obj.get("disableTty"), - } - ) + _obj = cls.model_validate({ + "command": obj.get("command"), + "tty_size": ExecCommandRequestTerminalSize.from_dict(obj["tty_size"]) if obj.get("tty_size") is not None else None, + "stdin": ExecCommandIO.from_dict(obj["stdin"]) if obj.get("stdin") is not None else None, + "disableTty": obj.get("disableTty") + }) return _obj + + diff --git a/koyeb/api_async/models/exec_command_request_id_type.py b/koyeb/api_async/models/exec_command_request_id_type.py index f6deb51f..9893c9dc 100644 --- a/koyeb/api_async/models/exec_command_request_id_type.py +++ b/koyeb/api_async/models/exec_command_request_id_type.py @@ -26,11 +26,13 @@ class ExecCommandRequestIdType(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - INSTANCE_ID = "INSTANCE_ID" - SERVICE_ID = "SERVICE_ID" + INVALID = 'INVALID' + INSTANCE_ID = 'INSTANCE_ID' + SERVICE_ID = 'SERVICE_ID' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ExecCommandRequestIdType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/exec_command_request_terminal_size.py b/koyeb/api_async/models/exec_command_request_terminal_size.py index 5f6f41ff..c0834f4d 100644 --- a/koyeb/api_async/models/exec_command_request_terminal_size.py +++ b/koyeb/api_async/models/exec_command_request_terminal_size.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ExecCommandRequestTerminalSize(BaseModel): """ ExecCommandRequestTerminalSize - """ # noqa: E501 - + """ # noqa: E501 height: Optional[StrictInt] = None width: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["height", "width"] @@ -40,6 +38,7 @@ class ExecCommandRequestTerminalSize(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"height": obj.get("height"), "width": obj.get("width")} - ) + _obj = cls.model_validate({ + "height": obj.get("height"), + "width": obj.get("width") + }) return _obj + + diff --git a/koyeb/api_async/models/gcp_container_registry_configuration.py b/koyeb/api_async/models/gcp_container_registry_configuration.py index 527bf173..2afa4c13 100644 --- a/koyeb/api_async/models/gcp_container_registry_configuration.py +++ b/koyeb/api_async/models/gcp_container_registry_configuration.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GCPContainerRegistryConfiguration(BaseModel): """ GCPContainerRegistryConfiguration - """ # noqa: E501 - + """ # noqa: E501 keyfile_content: Optional[StrictStr] = None url: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["keyfile_content", "url"] @@ -40,6 +38,7 @@ class GCPContainerRegistryConfiguration(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"keyfile_content": obj.get("keyfile_content"), "url": obj.get("url")} - ) + _obj = cls.model_validate({ + "keyfile_content": obj.get("keyfile_content"), + "url": obj.get("url") + }) return _obj + + diff --git a/koyeb/api_async/models/get_app_reply.py b/koyeb/api_async/models/get_app_reply.py index 2525140f..11630d8d 100644 --- a/koyeb/api_async/models/get_app_reply.py +++ b/koyeb/api_async/models/get_app_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetAppReply(BaseModel): """ GetAppReply - """ # noqa: E501 - + """ # noqa: E501 app: Optional[App] = None __properties: ClassVar[List[str]] = ["app"] @@ -40,6 +38,7 @@ class GetAppReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of app if self.app: - _dict["app"] = self.app.to_dict() + _dict['app'] = self.app.to_dict() return _dict @classmethod @@ -84,7 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"app": App.from_dict(obj["app"]) if obj.get("app") is not None else None} - ) + _obj = cls.model_validate({ + "app": App.from_dict(obj["app"]) if obj.get("app") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_budget_reply.py b/koyeb/api_async/models/get_budget_reply.py index 1967a425..3e769f48 100644 --- a/koyeb/api_async/models/get_budget_reply.py +++ b/koyeb/api_async/models/get_budget_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetBudgetReply(BaseModel): """ GetBudgetReply - """ # noqa: E501 - + """ # noqa: E501 budget: Optional[Budget] = None __properties: ClassVar[List[str]] = ["budget"] @@ -40,6 +38,7 @@ class GetBudgetReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of budget if self.budget: - _dict["budget"] = self.budget.to_dict() + _dict['budget'] = self.budget.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "budget": Budget.from_dict(obj["budget"]) - if obj.get("budget") is not None - else None - } - ) + _obj = cls.model_validate({ + "budget": Budget.from_dict(obj["budget"]) if obj.get("budget") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_catalog_instance_reply.py b/koyeb/api_async/models/get_catalog_instance_reply.py index 0b389eb6..42c0b834 100644 --- a/koyeb/api_async/models/get_catalog_instance_reply.py +++ b/koyeb/api_async/models/get_catalog_instance_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetCatalogInstanceReply(BaseModel): """ GetCatalogInstanceReply - """ # noqa: E501 - + """ # noqa: E501 instance: Optional[CatalogInstance] = None __properties: ClassVar[List[str]] = ["instance"] @@ -40,6 +38,7 @@ class GetCatalogInstanceReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of instance if self.instance: - _dict["instance"] = self.instance.to_dict() + _dict['instance'] = self.instance.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instance": CatalogInstance.from_dict(obj["instance"]) - if obj.get("instance") is not None - else None - } - ) + _obj = cls.model_validate({ + "instance": CatalogInstance.from_dict(obj["instance"]) if obj.get("instance") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_credential_reply.py b/koyeb/api_async/models/get_credential_reply.py index 0bbbae35..74e436d2 100644 --- a/koyeb/api_async/models/get_credential_reply.py +++ b/koyeb/api_async/models/get_credential_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetCredentialReply(BaseModel): """ GetCredentialReply - """ # noqa: E501 - + """ # noqa: E501 credential: Optional[Credential] = None __properties: ClassVar[List[str]] = ["credential"] @@ -40,6 +38,7 @@ class GetCredentialReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of credential if self.credential: - _dict["credential"] = self.credential.to_dict() + _dict['credential'] = self.credential.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "credential": Credential.from_dict(obj["credential"]) - if obj.get("credential") is not None - else None - } - ) + _obj = cls.model_validate({ + "credential": Credential.from_dict(obj["credential"]) if obj.get("credential") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_deployment_reply.py b/koyeb/api_async/models/get_deployment_reply.py index 74eeefb3..2062c00c 100644 --- a/koyeb/api_async/models/get_deployment_reply.py +++ b/koyeb/api_async/models/get_deployment_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetDeploymentReply(BaseModel): """ GetDeploymentReply - """ # noqa: E501 - + """ # noqa: E501 deployment: Optional[Deployment] = None __properties: ClassVar[List[str]] = ["deployment"] @@ -40,6 +38,7 @@ class GetDeploymentReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of deployment if self.deployment: - _dict["deployment"] = self.deployment.to_dict() + _dict['deployment'] = self.deployment.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "deployment": Deployment.from_dict(obj["deployment"]) - if obj.get("deployment") is not None - else None - } - ) + _obj = cls.model_validate({ + "deployment": Deployment.from_dict(obj["deployment"]) if obj.get("deployment") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_deployment_scaling_reply.py b/koyeb/api_async/models/get_deployment_scaling_reply.py index 959cd562..4217354d 100644 --- a/koyeb/api_async/models/get_deployment_scaling_reply.py +++ b/koyeb/api_async/models/get_deployment_scaling_reply.py @@ -19,19 +19,15 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.get_deployment_scaling_reply_item import ( - GetDeploymentScalingReplyItem, -) +from koyeb.api_async.models.get_deployment_scaling_reply_item import GetDeploymentScalingReplyItem from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetDeploymentScalingReply(BaseModel): """ GetDeploymentScalingReply - """ # noqa: E501 - + """ # noqa: E501 replicas: Optional[List[GetDeploymentScalingReplyItem]] = None __properties: ClassVar[List[str]] = ["replicas"] @@ -42,6 +38,7 @@ class GetDeploymentScalingReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -76,10 +74,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.replicas: for _item_replicas in self.replicas: - _items.append( - _item_replicas.to_dict() if _item_replicas is not None else None - ) - _dict["replicas"] = _items + if _item_replicas: + _items.append(_item_replicas.to_dict()) + _dict['replicas'] = _items return _dict @classmethod @@ -91,14 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "replicas": [ - GetDeploymentScalingReplyItem.from_dict(_item) - for _item in obj["replicas"] - ] - if obj.get("replicas") is not None - else None - } - ) + _obj = cls.model_validate({ + "replicas": [GetDeploymentScalingReplyItem.from_dict(_item) for _item in obj["replicas"]] if obj.get("replicas") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_deployment_scaling_reply_item.py b/koyeb/api_async/models/get_deployment_scaling_reply_item.py index 62b90f50..0a66e65e 100644 --- a/koyeb/api_async/models/get_deployment_scaling_reply_item.py +++ b/koyeb/api_async/models/get_deployment_scaling_reply_item.py @@ -24,18 +24,13 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetDeploymentScalingReplyItem(BaseModel): """ GetDeploymentScalingReplyItem - """ # noqa: E501 - + """ # noqa: E501 region: Optional[StrictStr] = None replica_index: Optional[StrictInt] = None - instances: Optional[List[Instance]] = Field( - default=None, - description="An array of `active` and `starting` instances. Status of the active instance (and if none the most recent instance) string status = 4; Status message of the active instance (and if none the most recent instance) string message = 5;", - ) + instances: Optional[List[Instance]] = Field(default=None, description="An array of `active` and `starting` instances. Status of the active instance (and if none the most recent instance) string status = 4; Status message of the active instance (and if none the most recent instance) string message = 5;") __properties: ClassVar[List[str]] = ["region", "replica_index", "instances"] model_config = ConfigDict( @@ -45,6 +40,7 @@ class GetDeploymentScalingReplyItem(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -79,10 +76,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.instances: for _item_instances in self.instances: - _items.append( - _item_instances.to_dict() if _item_instances is not None else None - ) - _dict["instances"] = _items + if _item_instances: + _items.append(_item_instances.to_dict()) + _dict['instances'] = _items return _dict @classmethod @@ -94,13 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "region": obj.get("region"), - "replica_index": obj.get("replica_index"), - "instances": [Instance.from_dict(_item) for _item in obj["instances"]] - if obj.get("instances") is not None - else None, - } - ) + _obj = cls.model_validate({ + "region": obj.get("region"), + "replica_index": obj.get("replica_index"), + "instances": [Instance.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_domain_reply.py b/koyeb/api_async/models/get_domain_reply.py index d12d5a87..2086f049 100644 --- a/koyeb/api_async/models/get_domain_reply.py +++ b/koyeb/api_async/models/get_domain_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetDomainReply(BaseModel): """ GetDomainReply - """ # noqa: E501 - + """ # noqa: E501 domain: Optional[Domain] = None __properties: ClassVar[List[str]] = ["domain"] @@ -40,6 +38,7 @@ class GetDomainReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of domain if self.domain: - _dict["domain"] = self.domain.to_dict() + _dict['domain'] = self.domain.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "domain": Domain.from_dict(obj["domain"]) - if obj.get("domain") is not None - else None - } - ) + _obj = cls.model_validate({ + "domain": Domain.from_dict(obj["domain"]) if obj.get("domain") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_github_installation_reply.py b/koyeb/api_async/models/get_github_installation_reply.py index 5777a33a..2d3d7dc5 100644 --- a/koyeb/api_async/models/get_github_installation_reply.py +++ b/koyeb/api_async/models/get_github_installation_reply.py @@ -20,46 +20,27 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.kgitproxy_github_installation_status import ( - KgitproxyGithubInstallationStatus, -) +from koyeb.api_async.models.kgitproxy_github_installation_status import KgitproxyGithubInstallationStatus from koyeb.api_async.models.kgitproxy_indexing_status import KgitproxyIndexingStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetGithubInstallationReply(BaseModel): """ GetGithubInstallationReply - """ # noqa: E501 - + """ # noqa: E501 installation_id: Optional[StrictStr] = None installation_url: Optional[StrictStr] = None name: Optional[StrictStr] = None avatar_url: Optional[StrictStr] = None - status: Optional[ - KgitproxyGithubInstallationStatus - ] = KgitproxyGithubInstallationStatus.INVALID + status: Optional[KgitproxyGithubInstallationStatus] = KgitproxyGithubInstallationStatus.INVALID installed_at: Optional[datetime] = None suspended_at: Optional[datetime] = None - indexing_status: Optional[ - KgitproxyIndexingStatus - ] = KgitproxyIndexingStatus.INVALID_INDEXING_STATUS + indexing_status: Optional[KgitproxyIndexingStatus] = KgitproxyIndexingStatus.INVALID_INDEXING_STATUS indexed_repositories: Optional[StrictInt] = None total_repositories: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = [ - "installation_id", - "installation_url", - "name", - "avatar_url", - "status", - "installed_at", - "suspended_at", - "indexing_status", - "indexed_repositories", - "total_repositories", - ] + __properties: ClassVar[List[str]] = ["installation_id", "installation_url", "name", "avatar_url", "status", "installed_at", "suspended_at", "indexing_status", "indexed_repositories", "total_repositories"] model_config = ConfigDict( validate_by_name=True, @@ -68,6 +49,7 @@ class GetGithubInstallationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -91,7 +73,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -109,22 +92,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "installation_id": obj.get("installation_id"), - "installation_url": obj.get("installation_url"), - "name": obj.get("name"), - "avatar_url": obj.get("avatar_url"), - "status": obj.get("status") - if obj.get("status") is not None - else KgitproxyGithubInstallationStatus.INVALID, - "installed_at": obj.get("installed_at"), - "suspended_at": obj.get("suspended_at"), - "indexing_status": obj.get("indexing_status") - if obj.get("indexing_status") is not None - else KgitproxyIndexingStatus.INVALID_INDEXING_STATUS, - "indexed_repositories": obj.get("indexed_repositories"), - "total_repositories": obj.get("total_repositories"), - } - ) + _obj = cls.model_validate({ + "installation_id": obj.get("installation_id"), + "installation_url": obj.get("installation_url"), + "name": obj.get("name"), + "avatar_url": obj.get("avatar_url"), + "status": obj.get("status") if obj.get("status") is not None else KgitproxyGithubInstallationStatus.INVALID, + "installed_at": obj.get("installed_at"), + "suspended_at": obj.get("suspended_at"), + "indexing_status": obj.get("indexing_status") if obj.get("indexing_status") is not None else KgitproxyIndexingStatus.INVALID_INDEXING_STATUS, + "indexed_repositories": obj.get("indexed_repositories"), + "total_repositories": obj.get("total_repositories") + }) return _obj + + diff --git a/koyeb/api_async/models/get_idenfy_token_reply.py b/koyeb/api_async/models/get_idenfy_token_reply.py index fe8ac94e..68f867f4 100644 --- a/koyeb/api_async/models/get_idenfy_token_reply.py +++ b/koyeb/api_async/models/get_idenfy_token_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetIdenfyTokenReply(BaseModel): """ GetIdenfyTokenReply - """ # noqa: E501 - + """ # noqa: E501 auth_token: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["auth_token"] @@ -39,6 +37,7 @@ class GetIdenfyTokenReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"auth_token": obj.get("auth_token")}) + _obj = cls.model_validate({ + "auth_token": obj.get("auth_token") + }) return _obj + + diff --git a/koyeb/api_async/models/get_instance_reply.py b/koyeb/api_async/models/get_instance_reply.py index 565f7eab..e523be0c 100644 --- a/koyeb/api_async/models/get_instance_reply.py +++ b/koyeb/api_async/models/get_instance_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetInstanceReply(BaseModel): """ GetInstanceReply - """ # noqa: E501 - + """ # noqa: E501 instance: Optional[Instance] = None __properties: ClassVar[List[str]] = ["instance"] @@ -40,6 +38,7 @@ class GetInstanceReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of instance if self.instance: - _dict["instance"] = self.instance.to_dict() + _dict['instance'] = self.instance.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instance": Instance.from_dict(obj["instance"]) - if obj.get("instance") is not None - else None - } - ) + _obj = cls.model_validate({ + "instance": Instance.from_dict(obj["instance"]) if obj.get("instance") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_instance_snapshot_reply.py b/koyeb/api_async/models/get_instance_snapshot_reply.py index 96f45713..2d0980c6 100644 --- a/koyeb/api_async/models/get_instance_snapshot_reply.py +++ b/koyeb/api_async/models/get_instance_snapshot_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetInstanceSnapshotReply(BaseModel): """ GetInstanceSnapshotReply - """ # noqa: E501 - + """ # noqa: E501 instance_snapshot: Optional[InstanceSnapshot] = None __properties: ClassVar[List[str]] = ["instance_snapshot"] @@ -40,6 +38,7 @@ class GetInstanceSnapshotReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of instance_snapshot if self.instance_snapshot: - _dict["instance_snapshot"] = self.instance_snapshot.to_dict() + _dict['instance_snapshot'] = self.instance_snapshot.to_dict() return _dict @classmethod @@ -84,13 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instance_snapshot": InstanceSnapshot.from_dict( - obj["instance_snapshot"] - ) - if obj.get("instance_snapshot") is not None - else None - } - ) + _obj = cls.model_validate({ + "instance_snapshot": InstanceSnapshot.from_dict(obj["instance_snapshot"]) if obj.get("instance_snapshot") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_intercom_profile_reply.py b/koyeb/api_async/models/get_intercom_profile_reply.py index 1fad5419..0c201cb7 100644 --- a/koyeb/api_async/models/get_intercom_profile_reply.py +++ b/koyeb/api_async/models/get_intercom_profile_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetIntercomProfileReply(BaseModel): """ GetIntercomProfileReply - """ # noqa: E501 - + """ # noqa: E501 hash: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["hash"] @@ -39,6 +37,7 @@ class GetIntercomProfileReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"hash": obj.get("hash")}) + _obj = cls.model_validate({ + "hash": obj.get("hash") + }) return _obj + + diff --git a/koyeb/api_async/models/get_metrics_reply.py b/koyeb/api_async/models/get_metrics_reply.py index 82fb030a..17ad55bc 100644 --- a/koyeb/api_async/models/get_metrics_reply.py +++ b/koyeb/api_async/models/get_metrics_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetMetricsReply(BaseModel): """ GetMetricsReply - """ # noqa: E501 - + """ # noqa: E501 metrics: Optional[List[GetMetricsReplyMetric]] = None __properties: ClassVar[List[str]] = ["metrics"] @@ -40,6 +38,7 @@ class GetMetricsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,10 +74,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.metrics: for _item_metrics in self.metrics: - _items.append( - _item_metrics.to_dict() if _item_metrics is not None else None - ) - _dict["metrics"] = _items + if _item_metrics: + _items.append(_item_metrics.to_dict()) + _dict['metrics'] = _items return _dict @classmethod @@ -89,13 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "metrics": [ - GetMetricsReplyMetric.from_dict(_item) for _item in obj["metrics"] - ] - if obj.get("metrics") is not None - else None - } - ) + _obj = cls.model_validate({ + "metrics": [GetMetricsReplyMetric.from_dict(_item) for _item in obj["metrics"]] if obj.get("metrics") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_metrics_reply_metric.py b/koyeb/api_async/models/get_metrics_reply_metric.py index 91296d33..9e104f63 100644 --- a/koyeb/api_async/models/get_metrics_reply_metric.py +++ b/koyeb/api_async/models/get_metrics_reply_metric.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetMetricsReplyMetric(BaseModel): """ GetMetricsReplyMetric - """ # noqa: E501 - + """ # noqa: E501 labels: Optional[Dict[str, StrictStr]] = None samples: Optional[List[Sample]] = None __properties: ClassVar[List[str]] = ["labels", "samples"] @@ -41,6 +39,7 @@ class GetMetricsReplyMetric(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -75,10 +75,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.samples: for _item_samples in self.samples: - _items.append( - _item_samples.to_dict() if _item_samples is not None else None - ) - _dict["samples"] = _items + if _item_samples: + _items.append(_item_samples.to_dict()) + _dict['samples'] = _items return _dict @classmethod @@ -90,12 +89,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "labels": obj.get("labels"), - "samples": [Sample.from_dict(_item) for _item in obj["samples"]] - if obj.get("samples") is not None - else None, - } - ) + _obj = cls.model_validate({ + "labels": obj.get("labels"), + "samples": [Sample.from_dict(_item) for _item in obj["samples"]] if obj.get("samples") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_o_auth_options_reply.py b/koyeb/api_async/models/get_o_auth_options_reply.py index eaa6a7fb..648a1650 100644 --- a/koyeb/api_async/models/get_o_auth_options_reply.py +++ b/koyeb/api_async/models/get_o_auth_options_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetOAuthOptionsReply(BaseModel): """ A list of providers which you can use for single sign-on. - """ # noqa: E501 - + """ # noqa: E501 oauth_providers: Optional[List[OAuthProvider]] = None __properties: ClassVar[List[str]] = ["oauth_providers"] @@ -40,6 +38,7 @@ class GetOAuthOptionsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,12 +74,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.oauth_providers: for _item_oauth_providers in self.oauth_providers: - _items.append( - _item_oauth_providers.to_dict() - if _item_oauth_providers is not None - else None - ) - _dict["oauth_providers"] = _items + if _item_oauth_providers: + _items.append(_item_oauth_providers.to_dict()) + _dict['oauth_providers'] = _items return _dict @classmethod @@ -91,13 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "oauth_providers": [ - OAuthProvider.from_dict(_item) for _item in obj["oauth_providers"] - ] - if obj.get("oauth_providers") is not None - else None - } - ) + _obj = cls.model_validate({ + "oauth_providers": [OAuthProvider.from_dict(_item) for _item in obj["oauth_providers"]] if obj.get("oauth_providers") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_organization_invitation_reply.py b/koyeb/api_async/models/get_organization_invitation_reply.py index effe9295..fee01ede 100644 --- a/koyeb/api_async/models/get_organization_invitation_reply.py +++ b/koyeb/api_async/models/get_organization_invitation_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetOrganizationInvitationReply(BaseModel): """ GetOrganizationInvitationReply - """ # noqa: E501 - + """ # noqa: E501 invitation: Optional[OrganizationInvitation] = None __properties: ClassVar[List[str]] = ["invitation"] @@ -40,6 +38,7 @@ class GetOrganizationInvitationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of invitation if self.invitation: - _dict["invitation"] = self.invitation.to_dict() + _dict['invitation'] = self.invitation.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "invitation": OrganizationInvitation.from_dict(obj["invitation"]) - if obj.get("invitation") is not None - else None - } - ) + _obj = cls.model_validate({ + "invitation": OrganizationInvitation.from_dict(obj["invitation"]) if obj.get("invitation") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_organization_quotas_usage_reply.py b/koyeb/api_async/models/get_organization_quotas_usage_reply.py index 34b137ec..5008f3a8 100644 --- a/koyeb/api_async/models/get_organization_quotas_usage_reply.py +++ b/koyeb/api_async/models/get_organization_quotas_usage_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetOrganizationQuotasUsageReply(BaseModel): """ GetOrganizationQuotasUsageReply - """ # noqa: E501 - + """ # noqa: E501 usage: Optional[QuotaUsage] = None __properties: ClassVar[List[str]] = ["usage"] @@ -40,6 +38,7 @@ class GetOrganizationQuotasUsageReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of usage if self.usage: - _dict["usage"] = self.usage.to_dict() + _dict['usage'] = self.usage.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "usage": QuotaUsage.from_dict(obj["usage"]) - if obj.get("usage") is not None - else None - } - ) + _obj = cls.model_validate({ + "usage": QuotaUsage.from_dict(obj["usage"]) if obj.get("usage") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_organization_reply.py b/koyeb/api_async/models/get_organization_reply.py index a0f820e7..8e8444ca 100644 --- a/koyeb/api_async/models/get_organization_reply.py +++ b/koyeb/api_async/models/get_organization_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetOrganizationReply(BaseModel): """ GetOrganizationReply - """ # noqa: E501 - + """ # noqa: E501 organization: Optional[Organization] = None __properties: ClassVar[List[str]] = ["organization"] @@ -40,6 +38,7 @@ class GetOrganizationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization": Organization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None - } - ) + _obj = cls.model_validate({ + "organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_organization_summary_reply.py b/koyeb/api_async/models/get_organization_summary_reply.py index 0f874337..7d517141 100644 --- a/koyeb/api_async/models/get_organization_summary_reply.py +++ b/koyeb/api_async/models/get_organization_summary_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetOrganizationSummaryReply(BaseModel): """ GetOrganizationSummaryReply - """ # noqa: E501 - + """ # noqa: E501 summary: Optional[OrganizationSummary] = None __properties: ClassVar[List[str]] = ["summary"] @@ -40,6 +38,7 @@ class GetOrganizationSummaryReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of summary if self.summary: - _dict["summary"] = self.summary.to_dict() + _dict['summary'] = self.summary.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "summary": OrganizationSummary.from_dict(obj["summary"]) - if obj.get("summary") is not None - else None - } - ) + _obj = cls.model_validate({ + "summary": OrganizationSummary.from_dict(obj["summary"]) if obj.get("summary") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_organization_usage_details_reply.py b/koyeb/api_async/models/get_organization_usage_details_reply.py index 7026df73..79cc91a3 100644 --- a/koyeb/api_async/models/get_organization_usage_details_reply.py +++ b/koyeb/api_async/models/get_organization_usage_details_reply.py @@ -25,26 +25,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetOrganizationUsageDetailsReply(BaseModel): """ GetOrganizationUsageDetailsReply - """ # noqa: E501 - + """ # noqa: E501 usage_details: Optional[List[UsageDetails]] = None database_details: Optional[List[DatabaseUsageDetails]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None count: Optional[StrictInt] = None order: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "usage_details", - "database_details", - "limit", - "offset", - "count", - "order", - ] + __properties: ClassVar[List[str]] = ["usage_details", "database_details", "limit", "offset", "count", "order"] model_config = ConfigDict( validate_by_name=True, @@ -53,6 +44,7 @@ class GetOrganizationUsageDetailsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -76,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -87,22 +80,16 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.usage_details: for _item_usage_details in self.usage_details: - _items.append( - _item_usage_details.to_dict() - if _item_usage_details is not None - else None - ) - _dict["usage_details"] = _items + if _item_usage_details: + _items.append(_item_usage_details.to_dict()) + _dict['usage_details'] = _items # override the default output from pydantic by calling `to_dict()` of each item in database_details (list) _items = [] if self.database_details: for _item_database_details in self.database_details: - _items.append( - _item_database_details.to_dict() - if _item_database_details is not None - else None - ) - _dict["database_details"] = _items + if _item_database_details: + _items.append(_item_database_details.to_dict()) + _dict['database_details'] = _items return _dict @classmethod @@ -114,23 +101,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "usage_details": [ - UsageDetails.from_dict(_item) for _item in obj["usage_details"] - ] - if obj.get("usage_details") is not None - else None, - "database_details": [ - DatabaseUsageDetails.from_dict(_item) - for _item in obj["database_details"] - ] - if obj.get("database_details") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - "order": obj.get("order"), - } - ) + _obj = cls.model_validate({ + "usage_details": [UsageDetails.from_dict(_item) for _item in obj["usage_details"]] if obj.get("usage_details") is not None else None, + "database_details": [DatabaseUsageDetails.from_dict(_item) for _item in obj["database_details"]] if obj.get("database_details") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "order": obj.get("order") + }) return _obj + + diff --git a/koyeb/api_async/models/get_organization_usage_reply.py b/koyeb/api_async/models/get_organization_usage_reply.py index d613d068..dd481cbd 100644 --- a/koyeb/api_async/models/get_organization_usage_reply.py +++ b/koyeb/api_async/models/get_organization_usage_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetOrganizationUsageReply(BaseModel): """ GetOrganizationUsageReply - """ # noqa: E501 - + """ # noqa: E501 usage: Optional[Usage] = None __properties: ClassVar[List[str]] = ["usage"] @@ -40,6 +38,7 @@ class GetOrganizationUsageReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of usage if self.usage: - _dict["usage"] = self.usage.to_dict() + _dict['usage'] = self.usage.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "usage": Usage.from_dict(obj["usage"]) - if obj.get("usage") is not None - else None - } - ) + _obj = cls.model_validate({ + "usage": Usage.from_dict(obj["usage"]) if obj.get("usage") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_payment_method_reply.py b/koyeb/api_async/models/get_payment_method_reply.py index f890b7b2..227e3bcd 100644 --- a/koyeb/api_async/models/get_payment_method_reply.py +++ b/koyeb/api_async/models/get_payment_method_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetPaymentMethodReply(BaseModel): """ GetPaymentMethodReply - """ # noqa: E501 - + """ # noqa: E501 payment_method: Optional[PaymentMethod] = None __properties: ClassVar[List[str]] = ["payment_method"] @@ -40,6 +38,7 @@ class GetPaymentMethodReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of payment_method if self.payment_method: - _dict["payment_method"] = self.payment_method.to_dict() + _dict['payment_method'] = self.payment_method.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "payment_method": PaymentMethod.from_dict(obj["payment_method"]) - if obj.get("payment_method") is not None - else None - } - ) + _obj = cls.model_validate({ + "payment_method": PaymentMethod.from_dict(obj["payment_method"]) if obj.get("payment_method") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_persistent_volume_reply.py b/koyeb/api_async/models/get_persistent_volume_reply.py index cf00c000..b411593c 100644 --- a/koyeb/api_async/models/get_persistent_volume_reply.py +++ b/koyeb/api_async/models/get_persistent_volume_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetPersistentVolumeReply(BaseModel): """ GetPersistentVolumeReply - """ # noqa: E501 - + """ # noqa: E501 volume: Optional[PersistentVolume] = None __properties: ClassVar[List[str]] = ["volume"] @@ -40,6 +38,7 @@ class GetPersistentVolumeReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of volume if self.volume: - _dict["volume"] = self.volume.to_dict() + _dict['volume'] = self.volume.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "volume": PersistentVolume.from_dict(obj["volume"]) - if obj.get("volume") is not None - else None - } - ) + _obj = cls.model_validate({ + "volume": PersistentVolume.from_dict(obj["volume"]) if obj.get("volume") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_pool_claim_reply.py b/koyeb/api_async/models/get_pool_claim_reply.py index 8298e451..e7fc1be1 100644 --- a/koyeb/api_async/models/get_pool_claim_reply.py +++ b/koyeb/api_async/models/get_pool_claim_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetPoolClaimReply(BaseModel): """ GetPoolClaimReply - """ # noqa: E501 - + """ # noqa: E501 claim: Optional[PoolClaim] = None __properties: ClassVar[List[str]] = ["claim"] @@ -40,6 +38,7 @@ class GetPoolClaimReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of claim if self.claim: - _dict["claim"] = self.claim.to_dict() + _dict['claim'] = self.claim.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "claim": PoolClaim.from_dict(obj["claim"]) - if obj.get("claim") is not None - else None - } - ) + _obj = cls.model_validate({ + "claim": PoolClaim.from_dict(obj["claim"]) if obj.get("claim") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_project_reply.py b/koyeb/api_async/models/get_project_reply.py index abbbb7a3..5b0a058b 100644 --- a/koyeb/api_async/models/get_project_reply.py +++ b/koyeb/api_async/models/get_project_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetProjectReply(BaseModel): """ GetProjectReply - """ # noqa: E501 - + """ # noqa: E501 project: Optional[Project] = None __properties: ClassVar[List[str]] = ["project"] @@ -40,6 +38,7 @@ class GetProjectReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of project if self.project: - _dict["project"] = self.project.to_dict() + _dict['project'] = self.project.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "project": Project.from_dict(obj["project"]) - if obj.get("project") is not None - else None - } - ) + _obj = cls.model_validate({ + "project": Project.from_dict(obj["project"]) if obj.get("project") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_quotas_reply.py b/koyeb/api_async/models/get_quotas_reply.py index 449ac119..ec016b24 100644 --- a/koyeb/api_async/models/get_quotas_reply.py +++ b/koyeb/api_async/models/get_quotas_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetQuotasReply(BaseModel): """ GetQuotasReply - """ # noqa: E501 - + """ # noqa: E501 quotas: Optional[Quotas] = None __properties: ClassVar[List[str]] = ["quotas"] @@ -40,6 +38,7 @@ class GetQuotasReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of quotas if self.quotas: - _dict["quotas"] = self.quotas.to_dict() + _dict['quotas'] = self.quotas.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "quotas": Quotas.from_dict(obj["quotas"]) - if obj.get("quotas") is not None - else None - } - ) + _obj = cls.model_validate({ + "quotas": Quotas.from_dict(obj["quotas"]) if obj.get("quotas") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_region_reply.py b/koyeb/api_async/models/get_region_reply.py index da25649d..c728ef31 100644 --- a/koyeb/api_async/models/get_region_reply.py +++ b/koyeb/api_async/models/get_region_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetRegionReply(BaseModel): """ GetRegionReply - """ # noqa: E501 - + """ # noqa: E501 region: Optional[Region] = None __properties: ClassVar[List[str]] = ["region"] @@ -40,6 +38,7 @@ class GetRegionReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of region if self.region: - _dict["region"] = self.region.to_dict() + _dict['region'] = self.region.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "region": Region.from_dict(obj["region"]) - if obj.get("region") is not None - else None - } - ) + _obj = cls.model_validate({ + "region": Region.from_dict(obj["region"]) if obj.get("region") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_regional_deployment_reply.py b/koyeb/api_async/models/get_regional_deployment_reply.py index 250cf655..c34588b8 100644 --- a/koyeb/api_async/models/get_regional_deployment_reply.py +++ b/koyeb/api_async/models/get_regional_deployment_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetRegionalDeploymentReply(BaseModel): """ GetRegionalDeploymentReply - """ # noqa: E501 - + """ # noqa: E501 regional_deployment: Optional[RegionalDeployment] = None __properties: ClassVar[List[str]] = ["regional_deployment"] @@ -40,6 +38,7 @@ class GetRegionalDeploymentReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of regional_deployment if self.regional_deployment: - _dict["regional_deployment"] = self.regional_deployment.to_dict() + _dict['regional_deployment'] = self.regional_deployment.to_dict() return _dict @classmethod @@ -84,13 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "regional_deployment": RegionalDeployment.from_dict( - obj["regional_deployment"] - ) - if obj.get("regional_deployment") is not None - else None - } - ) + _obj = cls.model_validate({ + "regional_deployment": RegionalDeployment.from_dict(obj["regional_deployment"]) if obj.get("regional_deployment") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_secret_reply.py b/koyeb/api_async/models/get_secret_reply.py index f79355ed..aef295c8 100644 --- a/koyeb/api_async/models/get_secret_reply.py +++ b/koyeb/api_async/models/get_secret_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetSecretReply(BaseModel): """ GetSecretReply - """ # noqa: E501 - + """ # noqa: E501 secret: Optional[Secret] = None __properties: ClassVar[List[str]] = ["secret"] @@ -40,6 +38,7 @@ class GetSecretReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of secret if self.secret: - _dict["secret"] = self.secret.to_dict() + _dict['secret'] = self.secret.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "secret": Secret.from_dict(obj["secret"]) - if obj.get("secret") is not None - else None - } - ) + _obj = cls.model_validate({ + "secret": Secret.from_dict(obj["secret"]) if obj.get("secret") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_service_pool_reply.py b/koyeb/api_async/models/get_service_pool_reply.py index 685cb1e5..8fba6733 100644 --- a/koyeb/api_async/models/get_service_pool_reply.py +++ b/koyeb/api_async/models/get_service_pool_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetServicePoolReply(BaseModel): """ GetServicePoolReply - """ # noqa: E501 - + """ # noqa: E501 service_pool: Optional[ServicePool] = None __properties: ClassVar[List[str]] = ["service_pool"] @@ -40,6 +38,7 @@ class GetServicePoolReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of service_pool if self.service_pool: - _dict["service_pool"] = self.service_pool.to_dict() + _dict['service_pool'] = self.service_pool.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service_pool": ServicePool.from_dict(obj["service_pool"]) - if obj.get("service_pool") is not None - else None - } - ) + _obj = cls.model_validate({ + "service_pool": ServicePool.from_dict(obj["service_pool"]) if obj.get("service_pool") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_service_reply.py b/koyeb/api_async/models/get_service_reply.py index 412d5691..3e1bd49d 100644 --- a/koyeb/api_async/models/get_service_reply.py +++ b/koyeb/api_async/models/get_service_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetServiceReply(BaseModel): """ GetServiceReply - """ # noqa: E501 - + """ # noqa: E501 service: Optional[Service] = None __properties: ClassVar[List[str]] = ["service"] @@ -40,6 +38,7 @@ class GetServiceReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of service if self.service: - _dict["service"] = self.service.to_dict() + _dict['service'] = self.service.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service": Service.from_dict(obj["service"]) - if obj.get("service") is not None - else None - } - ) + _obj = cls.model_validate({ + "service": Service.from_dict(obj["service"]) if obj.get("service") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_service_scaling_reply.py b/koyeb/api_async/models/get_service_scaling_reply.py index d916d9ca..e0500b23 100644 --- a/koyeb/api_async/models/get_service_scaling_reply.py +++ b/koyeb/api_async/models/get_service_scaling_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetServiceScalingReply(BaseModel): """ GetServiceScalingReply - """ # noqa: E501 - + """ # noqa: E501 scalings: Optional[List[ManualServiceScaling]] = None __properties: ClassVar[List[str]] = ["scalings"] @@ -40,6 +38,7 @@ class GetServiceScalingReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,10 +74,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.scalings: for _item_scalings in self.scalings: - _items.append( - _item_scalings.to_dict() if _item_scalings is not None else None - ) - _dict["scalings"] = _items + if _item_scalings: + _items.append(_item_scalings.to_dict()) + _dict['scalings'] = _items return _dict @classmethod @@ -89,13 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "scalings": [ - ManualServiceScaling.from_dict(_item) for _item in obj["scalings"] - ] - if obj.get("scalings") is not None - else None - } - ) + _obj = cls.model_validate({ + "scalings": [ManualServiceScaling.from_dict(_item) for _item in obj["scalings"]] if obj.get("scalings") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_snapshot_reply.py b/koyeb/api_async/models/get_snapshot_reply.py index ee195518..46809d7d 100644 --- a/koyeb/api_async/models/get_snapshot_reply.py +++ b/koyeb/api_async/models/get_snapshot_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetSnapshotReply(BaseModel): """ GetSnapshotReply - """ # noqa: E501 - + """ # noqa: E501 snapshot: Optional[Snapshot] = None __properties: ClassVar[List[str]] = ["snapshot"] @@ -40,6 +38,7 @@ class GetSnapshotReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of snapshot if self.snapshot: - _dict["snapshot"] = self.snapshot.to_dict() + _dict['snapshot'] = self.snapshot.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "snapshot": Snapshot.from_dict(obj["snapshot"]) - if obj.get("snapshot") is not None - else None - } - ) + _obj = cls.model_validate({ + "snapshot": Snapshot.from_dict(obj["snapshot"]) if obj.get("snapshot") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_subscription_reply.py b/koyeb/api_async/models/get_subscription_reply.py index d0f23615..673dc939 100644 --- a/koyeb/api_async/models/get_subscription_reply.py +++ b/koyeb/api_async/models/get_subscription_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetSubscriptionReply(BaseModel): """ GetSubscriptionReply - """ # noqa: E501 - + """ # noqa: E501 subscription: Optional[Subscription] = None __properties: ClassVar[List[str]] = ["subscription"] @@ -40,6 +38,7 @@ class GetSubscriptionReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of subscription if self.subscription: - _dict["subscription"] = self.subscription.to_dict() + _dict['subscription'] = self.subscription.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "subscription": Subscription.from_dict(obj["subscription"]) - if obj.get("subscription") is not None - else None - } - ) + _obj = cls.model_validate({ + "subscription": Subscription.from_dict(obj["subscription"]) if obj.get("subscription") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_user_organization_invitation_reply.py b/koyeb/api_async/models/get_user_organization_invitation_reply.py index cc3d4337..ef3f659e 100644 --- a/koyeb/api_async/models/get_user_organization_invitation_reply.py +++ b/koyeb/api_async/models/get_user_organization_invitation_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetUserOrganizationInvitationReply(BaseModel): """ GetUserOrganizationInvitationReply - """ # noqa: E501 - + """ # noqa: E501 invitation: Optional[OrganizationInvitation] = None __properties: ClassVar[List[str]] = ["invitation"] @@ -40,6 +38,7 @@ class GetUserOrganizationInvitationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of invitation if self.invitation: - _dict["invitation"] = self.invitation.to_dict() + _dict['invitation'] = self.invitation.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "invitation": OrganizationInvitation.from_dict(obj["invitation"]) - if obj.get("invitation") is not None - else None - } - ) + _obj = cls.model_validate({ + "invitation": OrganizationInvitation.from_dict(obj["invitation"]) if obj.get("invitation") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/get_user_settings_reply.py b/koyeb/api_async/models/get_user_settings_reply.py index 590b5733..2a7c0b6f 100644 --- a/koyeb/api_async/models/get_user_settings_reply.py +++ b/koyeb/api_async/models/get_user_settings_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GetUserSettingsReply(BaseModel): """ GetUserSettingsReply - """ # noqa: E501 - + """ # noqa: E501 settings: Optional[UserSettings] = None __properties: ClassVar[List[str]] = ["settings"] @@ -40,6 +38,7 @@ class GetUserSettingsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of settings if self.settings: - _dict["settings"] = self.settings.to_dict() + _dict['settings'] = self.settings.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "settings": UserSettings.from_dict(obj["settings"]) - if obj.get("settings") is not None - else None - } - ) + _obj = cls.model_validate({ + "settings": UserSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/git_deployment_metadata.py b/koyeb/api_async/models/git_deployment_metadata.py index 251e3423..6dc8c00e 100644 --- a/koyeb/api_async/models/git_deployment_metadata.py +++ b/koyeb/api_async/models/git_deployment_metadata.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GitDeploymentMetadata(BaseModel): """ GitDeploymentMetadata - """ # noqa: E501 - + """ # noqa: E501 last_provisioned_deployment_id: Optional[StrictStr] = None git_env: Optional[GitEnvDeploymentMetadata] = None __properties: ClassVar[List[str]] = ["last_provisioned_deployment_id", "git_env"] @@ -41,6 +39,7 @@ class GitDeploymentMetadata(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of git_env if self.git_env: - _dict["git_env"] = self.git_env.to_dict() + _dict['git_env'] = self.git_env.to_dict() return _dict @classmethod @@ -85,14 +85,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "last_provisioned_deployment_id": obj.get( - "last_provisioned_deployment_id" - ), - "git_env": GitEnvDeploymentMetadata.from_dict(obj["git_env"]) - if obj.get("git_env") is not None - else None, - } - ) + _obj = cls.model_validate({ + "last_provisioned_deployment_id": obj.get("last_provisioned_deployment_id"), + "git_env": GitEnvDeploymentMetadata.from_dict(obj["git_env"]) if obj.get("git_env") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/git_env_deployment_metadata.py b/koyeb/api_async/models/git_env_deployment_metadata.py index 095fb60f..8a7a5710 100644 --- a/koyeb/api_async/models/git_env_deployment_metadata.py +++ b/koyeb/api_async/models/git_env_deployment_metadata.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GitEnvDeploymentMetadata(BaseModel): """ GitEnvDeploymentMetadata - """ # noqa: E501 - + """ # noqa: E501 sha: Optional[StrictStr] = None commit_author: Optional[StrictStr] = None commit_message: Optional[StrictStr] = None @@ -41,6 +39,7 @@ class GitEnvDeploymentMetadata(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "sha": obj.get("sha"), - "commit_author": obj.get("commit_author"), - "commit_message": obj.get("commit_message"), - } - ) + _obj = cls.model_validate({ + "sha": obj.get("sha"), + "commit_author": obj.get("commit_author"), + "commit_message": obj.get("commit_message") + }) return _obj + + diff --git a/koyeb/api_async/models/git_hub_registry_configuration.py b/koyeb/api_async/models/git_hub_registry_configuration.py index 61e5d778..ca3244ad 100644 --- a/koyeb/api_async/models/git_hub_registry_configuration.py +++ b/koyeb/api_async/models/git_hub_registry_configuration.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GitHubRegistryConfiguration(BaseModel): """ GitHubRegistryConfiguration - """ # noqa: E501 - + """ # noqa: E501 username: Optional[StrictStr] = None password: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["username", "password"] @@ -40,6 +38,7 @@ class GitHubRegistryConfiguration(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"username": obj.get("username"), "password": obj.get("password")} - ) + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password") + }) return _obj + + diff --git a/koyeb/api_async/models/git_lab_registry_configuration.py b/koyeb/api_async/models/git_lab_registry_configuration.py index 656f77bd..0b792b9a 100644 --- a/koyeb/api_async/models/git_lab_registry_configuration.py +++ b/koyeb/api_async/models/git_lab_registry_configuration.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GitLabRegistryConfiguration(BaseModel): """ GitLabRegistryConfiguration - """ # noqa: E501 - + """ # noqa: E501 username: Optional[StrictStr] = None password: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["username", "password"] @@ -40,6 +38,7 @@ class GitLabRegistryConfiguration(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"username": obj.get("username"), "password": obj.get("password")} - ) + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password") + }) return _obj + + diff --git a/koyeb/api_async/models/git_source.py b/koyeb/api_async/models/git_source.py index bdcc9b99..f9401658 100644 --- a/koyeb/api_async/models/git_source.py +++ b/koyeb/api_async/models/git_source.py @@ -25,16 +25,11 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GitSource(BaseModel): """ GitSource - """ # noqa: E501 - - repository: Optional[StrictStr] = Field( - default=None, - description="A url to a git repository (contains the provider as well) .e.g: github.com/koyeb/test.", - ) + """ # noqa: E501 + repository: Optional[StrictStr] = Field(default=None, description="A url to a git repository (contains the provider as well) .e.g: github.com/koyeb/test.") branch: Optional[StrictStr] = None tag: Optional[StrictStr] = None sha: Optional[StrictStr] = None @@ -44,18 +39,7 @@ class GitSource(BaseModel): workdir: Optional[StrictStr] = None buildpack: Optional[BuildpackBuilder] = None docker: Optional[DockerBuilder] = None - __properties: ClassVar[List[str]] = [ - "repository", - "branch", - "tag", - "sha", - "build_command", - "run_command", - "no_deploy_on_push", - "workdir", - "buildpack", - "docker", - ] + __properties: ClassVar[List[str]] = ["repository", "branch", "tag", "sha", "build_command", "run_command", "no_deploy_on_push", "workdir", "buildpack", "docker"] model_config = ConfigDict( validate_by_name=True, @@ -64,6 +48,7 @@ class GitSource(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -87,7 +72,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -96,10 +82,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of buildpack if self.buildpack: - _dict["buildpack"] = self.buildpack.to_dict() + _dict['buildpack'] = self.buildpack.to_dict() # override the default output from pydantic by calling `to_dict()` of docker if self.docker: - _dict["docker"] = self.docker.to_dict() + _dict['docker'] = self.docker.to_dict() return _dict @classmethod @@ -111,22 +97,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "repository": obj.get("repository"), - "branch": obj.get("branch"), - "tag": obj.get("tag"), - "sha": obj.get("sha"), - "build_command": obj.get("build_command"), - "run_command": obj.get("run_command"), - "no_deploy_on_push": obj.get("no_deploy_on_push"), - "workdir": obj.get("workdir"), - "buildpack": BuildpackBuilder.from_dict(obj["buildpack"]) - if obj.get("buildpack") is not None - else None, - "docker": DockerBuilder.from_dict(obj["docker"]) - if obj.get("docker") is not None - else None, - } - ) + _obj = cls.model_validate({ + "repository": obj.get("repository"), + "branch": obj.get("branch"), + "tag": obj.get("tag"), + "sha": obj.get("sha"), + "build_command": obj.get("build_command"), + "run_command": obj.get("run_command"), + "no_deploy_on_push": obj.get("no_deploy_on_push"), + "workdir": obj.get("workdir"), + "buildpack": BuildpackBuilder.from_dict(obj["buildpack"]) if obj.get("buildpack") is not None else None, + "docker": DockerBuilder.from_dict(obj["docker"]) if obj.get("docker") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/github_installation_reply.py b/koyeb/api_async/models/github_installation_reply.py index 7ff07785..210ea082 100644 --- a/koyeb/api_async/models/github_installation_reply.py +++ b/koyeb/api_async/models/github_installation_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GithubInstallationReply(BaseModel): """ GithubInstallationReply - """ # noqa: E501 - + """ # noqa: E501 app_name: Optional[StrictStr] = None app_id: Optional[StrictStr] = None url: Optional[StrictStr] = None @@ -42,6 +40,7 @@ class GithubInstallationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "app_name": obj.get("app_name"), - "app_id": obj.get("app_id"), - "url": obj.get("url"), - "state": obj.get("state"), - } - ) + _obj = cls.model_validate({ + "app_name": obj.get("app_name"), + "app_id": obj.get("app_id"), + "url": obj.get("url"), + "state": obj.get("state") + }) return _obj + + diff --git a/koyeb/api_async/models/github_installation_request.py b/koyeb/api_async/models/github_installation_request.py index 3fe192b8..046aee5a 100644 --- a/koyeb/api_async/models/github_installation_request.py +++ b/koyeb/api_async/models/github_installation_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GithubInstallationRequest(BaseModel): """ GithubInstallationRequest - """ # noqa: E501 - + """ # noqa: E501 metadata: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["metadata"] @@ -39,6 +37,7 @@ class GithubInstallationRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"metadata": obj.get("metadata")}) + _obj = cls.model_validate({ + "metadata": obj.get("metadata") + }) return _obj + + diff --git a/koyeb/api_async/models/google_protobuf_any.py b/koyeb/api_async/models/google_protobuf_any.py index 43c57cab..0ba13728 100644 --- a/koyeb/api_async/models/google_protobuf_any.py +++ b/koyeb/api_async/models/google_protobuf_any.py @@ -23,17 +23,11 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GoogleProtobufAny(BaseModel): """ `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := anypb.New(foo) if err != nil { ... } ... foo := &pb.Foo{} if err := any.UnmarshalTo(foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". JSON ==== The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": , \"lastName\": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message [google.protobuf.Duration][]): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" } - """ # noqa: E501 - - type: Optional[StrictStr] = Field( - default=None, - description='A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL\'s path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading "." is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.', - alias="@type", - ) + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, description="A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a [google.protobuf.Type][] value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.", alias="@type") additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = ["@type"] @@ -44,6 +38,7 @@ class GoogleProtobufAny(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,11 +63,9 @@ def to_dict(self) -> Dict[str, Any]: are ignored. * Fields in `self.additional_properties` are added to the output dict. """ - excluded_fields: Set[str] = set( - [ - "additional_properties", - ] - ) + excluded_fields: Set[str] = set([ + "additional_properties", + ]) _dict = self.model_dump( by_alias=True, @@ -95,10 +88,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"@type": obj.get("@type")}) + _obj = cls.model_validate({ + "@type": obj.get("@type") + }) # store additional fields in additional_properties for _key in obj.keys(): if _key not in cls.__properties: _obj.additional_properties[_key] = obj.get(_key) return _obj + + diff --git a/koyeb/api_async/models/google_protobuf_null_value.py b/koyeb/api_async/models/google_protobuf_null_value.py index 0245ec31..3b72b255 100644 --- a/koyeb/api_async/models/google_protobuf_null_value.py +++ b/koyeb/api_async/models/google_protobuf_null_value.py @@ -26,9 +26,11 @@ class GoogleProtobufNullValue(str, Enum): """ allowed enum values """ - NULL_VALUE = "NULL_VALUE" + NULL_VALUE = 'NULL_VALUE' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of GoogleProtobufNullValue from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/google_rpc_status.py b/koyeb/api_async/models/google_rpc_status.py index dba242c8..c04a4ded 100644 --- a/koyeb/api_async/models/google_rpc_status.py +++ b/koyeb/api_async/models/google_rpc_status.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class GoogleRpcStatus(BaseModel): """ GoogleRpcStatus - """ # noqa: E501 - + """ # noqa: E501 code: Optional[StrictInt] = None message: Optional[StrictStr] = None details: Optional[List[GoogleProtobufAny]] = None @@ -42,6 +40,7 @@ class GoogleRpcStatus(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -76,10 +76,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.details: for _item_details in self.details: - _items.append( - _item_details.to_dict() if _item_details is not None else None - ) - _dict["details"] = _items + if _item_details: + _items.append(_item_details.to_dict()) + _dict['details'] = _items return _dict @classmethod @@ -91,15 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "code": obj.get("code"), - "message": obj.get("message"), - "details": [ - GoogleProtobufAny.from_dict(_item) for _item in obj["details"] - ] - if obj.get("details") is not None - else None, - } - ) + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "details": [GoogleProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/has_unpaid_invoices_reply.py b/koyeb/api_async/models/has_unpaid_invoices_reply.py index d474ea9e..55faf7bb 100644 --- a/koyeb/api_async/models/has_unpaid_invoices_reply.py +++ b/koyeb/api_async/models/has_unpaid_invoices_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class HasUnpaidInvoicesReply(BaseModel): """ HasUnpaidInvoicesReply - """ # noqa: E501 - + """ # noqa: E501 has_unpaid_invoices: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["has_unpaid_invoices"] @@ -39,6 +37,7 @@ class HasUnpaidInvoicesReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,7 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"has_unpaid_invoices": obj.get("has_unpaid_invoices")} - ) + _obj = cls.model_validate({ + "has_unpaid_invoices": obj.get("has_unpaid_invoices") + }) return _obj + + diff --git a/koyeb/api_async/models/http_header.py b/koyeb/api_async/models/http_header.py index b6525c46..063a5a75 100644 --- a/koyeb/api_async/models/http_header.py +++ b/koyeb/api_async/models/http_header.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class HTTPHeader(BaseModel): """ HTTPHeader - """ # noqa: E501 - + """ # noqa: E501 key: Optional[StrictStr] = None value: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["key", "value"] @@ -40,6 +38,7 @@ class HTTPHeader(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,5 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"key": obj.get("key"), "value": obj.get("value")}) + _obj = cls.model_validate({ + "key": obj.get("key"), + "value": obj.get("value") + }) return _obj + + diff --git a/koyeb/api_async/models/http_health_check.py b/koyeb/api_async/models/http_health_check.py index 4630275e..4d4cc66d 100644 --- a/koyeb/api_async/models/http_health_check.py +++ b/koyeb/api_async/models/http_health_check.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class HTTPHealthCheck(BaseModel): """ HTTPHealthCheck - """ # noqa: E501 - + """ # noqa: E501 port: Optional[StrictInt] = None path: Optional[StrictStr] = None method: Optional[StrictStr] = None @@ -43,6 +41,7 @@ class HTTPHealthCheck(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.headers: for _item_headers in self.headers: - _items.append( - _item_headers.to_dict() if _item_headers is not None else None - ) - _dict["headers"] = _items + if _item_headers: + _items.append(_item_headers.to_dict()) + _dict['headers'] = _items return _dict @classmethod @@ -92,14 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "port": obj.get("port"), - "path": obj.get("path"), - "method": obj.get("method"), - "headers": [HTTPHeader.from_dict(_item) for _item in obj["headers"]] - if obj.get("headers") is not None - else None, - } - ) + _obj = cls.model_validate({ + "port": obj.get("port"), + "path": obj.get("path"), + "method": obj.get("method"), + "headers": [HTTPHeader.from_dict(_item) for _item in obj["headers"]] if obj.get("headers") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/instance.py b/koyeb/api_async/models/instance.py index 7dfa47db..0fb98d94 100644 --- a/koyeb/api_async/models/instance.py +++ b/koyeb/api_async/models/instance.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Instance(BaseModel): """ Instance - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -49,31 +47,8 @@ class Instance(BaseModel): started_at: Optional[datetime] = None succeeded_at: Optional[datetime] = None terminated_at: Optional[datetime] = None - xyz_deployment_id: Optional[StrictStr] = Field( - default=None, - description="WARNING: Please don't use the following attribute. Koyeb doesn't guarantee backwards compatible breaking change and reserve the right to completely drop it without notice. USE AT YOUR OWN RISK.", - ) - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "updated_at", - "organization_id", - "app_id", - "service_id", - "regional_deployment_id", - "allocation_id", - "type", - "replica_index", - "region", - "datacenter", - "hypervisor", - "status", - "messages", - "started_at", - "succeeded_at", - "terminated_at", - "xyz_deployment_id", - ] + xyz_deployment_id: Optional[StrictStr] = Field(default=None, description="WARNING: Please don't use the following attribute. Koyeb doesn't guarantee backwards compatible breaking change and reserve the right to completely drop it without notice. USE AT YOUR OWN RISK.") + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "organization_id", "app_id", "service_id", "regional_deployment_id", "allocation_id", "type", "replica_index", "region", "datacenter", "hypervisor", "status", "messages", "started_at", "succeeded_at", "terminated_at", "xyz_deployment_id"] model_config = ConfigDict( validate_by_name=True, @@ -82,6 +57,7 @@ class Instance(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -105,7 +81,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -123,29 +100,27 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "organization_id": obj.get("organization_id"), - "app_id": obj.get("app_id"), - "service_id": obj.get("service_id"), - "regional_deployment_id": obj.get("regional_deployment_id"), - "allocation_id": obj.get("allocation_id"), - "type": obj.get("type"), - "replica_index": obj.get("replica_index"), - "region": obj.get("region"), - "datacenter": obj.get("datacenter"), - "hypervisor": obj.get("hypervisor"), - "status": obj.get("status") - if obj.get("status") is not None - else InstanceStatus.ALLOCATING, - "messages": obj.get("messages"), - "started_at": obj.get("started_at"), - "succeeded_at": obj.get("succeeded_at"), - "terminated_at": obj.get("terminated_at"), - "xyz_deployment_id": obj.get("xyz_deployment_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "organization_id": obj.get("organization_id"), + "app_id": obj.get("app_id"), + "service_id": obj.get("service_id"), + "regional_deployment_id": obj.get("regional_deployment_id"), + "allocation_id": obj.get("allocation_id"), + "type": obj.get("type"), + "replica_index": obj.get("replica_index"), + "region": obj.get("region"), + "datacenter": obj.get("datacenter"), + "hypervisor": obj.get("hypervisor"), + "status": obj.get("status") if obj.get("status") is not None else InstanceStatus.ALLOCATING, + "messages": obj.get("messages"), + "started_at": obj.get("started_at"), + "succeeded_at": obj.get("succeeded_at"), + "terminated_at": obj.get("terminated_at"), + "xyz_deployment_id": obj.get("xyz_deployment_id") + }) return _obj + + diff --git a/koyeb/api_async/models/instance_availability.py b/koyeb/api_async/models/instance_availability.py index e1b86137..4231e898 100644 --- a/koyeb/api_async/models/instance_availability.py +++ b/koyeb/api_async/models/instance_availability.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InstanceAvailability(BaseModel): """ InstanceAvailability - """ # noqa: E501 - + """ # noqa: E501 regions: Optional[Dict[str, RegionAvailability]] = None availability: Optional[AvailabilityLevel] = AvailabilityLevel.UNKNOWN __properties: ClassVar[List[str]] = ["regions", "availability"] @@ -42,6 +40,7 @@ class InstanceAvailability(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -76,12 +76,9 @@ def to_dict(self) -> Dict[str, Any]: _field_dict = {} if self.regions: for _key_regions in self.regions: - _field_dict[_key_regions] = ( - self.regions[_key_regions].to_dict() - if self.regions[_key_regions] is not None - else None - ) - _dict["regions"] = _field_dict + if self.regions[_key_regions]: + _field_dict[_key_regions] = self.regions[_key_regions].to_dict() + _dict['regions'] = _field_dict return _dict @classmethod @@ -93,17 +90,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "regions": dict( - (_k, RegionAvailability.from_dict(_v)) - for _k, _v in obj["regions"].items() - ) - if obj.get("regions") is not None - else None, - "availability": obj.get("availability") - if obj.get("availability") is not None - else AvailabilityLevel.UNKNOWN, - } - ) + _obj = cls.model_validate({ + "regions": dict( + (_k, RegionAvailability.from_dict(_v)) + for _k, _v in obj["regions"].items() + ) + if obj.get("regions") is not None + else None, + "availability": obj.get("availability") if obj.get("availability") is not None else AvailabilityLevel.UNKNOWN + }) return _obj + + diff --git a/koyeb/api_async/models/instance_event.py b/koyeb/api_async/models/instance_event.py index 0723d3e4..da3ac224 100644 --- a/koyeb/api_async/models/instance_event.py +++ b/koyeb/api_async/models/instance_event.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InstanceEvent(BaseModel): """ InstanceEvent - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None when: Optional[datetime] = None organization_id: Optional[StrictStr] = None @@ -37,15 +35,7 @@ class InstanceEvent(BaseModel): type: Optional[StrictStr] = None message: Optional[StrictStr] = None metadata: Optional[Dict[str, Any]] = None - __properties: ClassVar[List[str]] = [ - "id", - "when", - "organization_id", - "instance_id", - "type", - "message", - "metadata", - ] + __properties: ClassVar[List[str]] = ["id", "when", "organization_id", "instance_id", "type", "message", "metadata"] model_config = ConfigDict( validate_by_name=True, @@ -54,6 +44,7 @@ class InstanceEvent(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -95,15 +87,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "when": obj.get("when"), - "organization_id": obj.get("organization_id"), - "instance_id": obj.get("instance_id"), - "type": obj.get("type"), - "message": obj.get("message"), - "metadata": obj.get("metadata"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "when": obj.get("when"), + "organization_id": obj.get("organization_id"), + "instance_id": obj.get("instance_id"), + "type": obj.get("type"), + "message": obj.get("message"), + "metadata": obj.get("metadata") + }) return _obj + + diff --git a/koyeb/api_async/models/instance_list_item.py b/koyeb/api_async/models/instance_list_item.py index bca2ef6c..18d88d61 100644 --- a/koyeb/api_async/models/instance_list_item.py +++ b/koyeb/api_async/models/instance_list_item.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InstanceListItem(BaseModel): """ InstanceListItem - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -45,27 +43,8 @@ class InstanceListItem(BaseModel): datacenter: Optional[StrictStr] = None status: Optional[InstanceStatus] = InstanceStatus.ALLOCATING messages: Optional[List[StrictStr]] = None - xyz_deployment_id: Optional[StrictStr] = Field( - default=None, - description="WARNING: Please don't use the following attribute. Koyeb doesn't guarantee backwards compatible breaking change and reserve the right to completely drop it without notice. USE AT YOUR OWN RISK.", - ) - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "updated_at", - "organization_id", - "app_id", - "service_id", - "regional_deployment_id", - "allocation_id", - "type", - "replica_index", - "region", - "datacenter", - "status", - "messages", - "xyz_deployment_id", - ] + xyz_deployment_id: Optional[StrictStr] = Field(default=None, description="WARNING: Please don't use the following attribute. Koyeb doesn't guarantee backwards compatible breaking change and reserve the right to completely drop it without notice. USE AT YOUR OWN RISK.") + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "organization_id", "app_id", "service_id", "regional_deployment_id", "allocation_id", "type", "replica_index", "region", "datacenter", "status", "messages", "xyz_deployment_id"] model_config = ConfigDict( validate_by_name=True, @@ -74,6 +53,7 @@ class InstanceListItem(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -97,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -115,25 +96,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "organization_id": obj.get("organization_id"), - "app_id": obj.get("app_id"), - "service_id": obj.get("service_id"), - "regional_deployment_id": obj.get("regional_deployment_id"), - "allocation_id": obj.get("allocation_id"), - "type": obj.get("type"), - "replica_index": obj.get("replica_index"), - "region": obj.get("region"), - "datacenter": obj.get("datacenter"), - "status": obj.get("status") - if obj.get("status") is not None - else InstanceStatus.ALLOCATING, - "messages": obj.get("messages"), - "xyz_deployment_id": obj.get("xyz_deployment_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "organization_id": obj.get("organization_id"), + "app_id": obj.get("app_id"), + "service_id": obj.get("service_id"), + "regional_deployment_id": obj.get("regional_deployment_id"), + "allocation_id": obj.get("allocation_id"), + "type": obj.get("type"), + "replica_index": obj.get("replica_index"), + "region": obj.get("region"), + "datacenter": obj.get("datacenter"), + "status": obj.get("status") if obj.get("status") is not None else InstanceStatus.ALLOCATING, + "messages": obj.get("messages"), + "xyz_deployment_id": obj.get("xyz_deployment_id") + }) return _obj + + diff --git a/koyeb/api_async/models/instance_snapshot.py b/koyeb/api_async/models/instance_snapshot.py index e1804def..4338a877 100644 --- a/koyeb/api_async/models/instance_snapshot.py +++ b/koyeb/api_async/models/instance_snapshot.py @@ -26,12 +26,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InstanceSnapshot(BaseModel): """ InstanceSnapshot - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None created_at: Optional[datetime] = None @@ -44,32 +42,11 @@ class InstanceSnapshot(BaseModel): deployment_id: Optional[StrictStr] = None regional_deployment_id: Optional[StrictStr] = None instance_id: Optional[StrictStr] = None - status: Optional[ - InstanceSnapshotStatus - ] = InstanceSnapshotStatus.INSTANCE_SNAPSHOT_STATUS_INVALID - type: Optional[ - InstanceSnapshotType - ] = InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID + status: Optional[InstanceSnapshotStatus] = InstanceSnapshotStatus.INSTANCE_SNAPSHOT_STATUS_INVALID + type: Optional[InstanceSnapshotType] = InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID version: Optional[StrictStr] = None messages: Optional[List[StrictStr]] = None - __properties: ClassVar[List[str]] = [ - "id", - "name", - "created_at", - "updated_at", - "available_at", - "deleted_at", - "organization_id", - "project_id", - "service_id", - "deployment_id", - "regional_deployment_id", - "instance_id", - "status", - "type", - "version", - "messages", - ] + __properties: ClassVar[List[str]] = ["id", "name", "created_at", "updated_at", "available_at", "deleted_at", "organization_id", "project_id", "service_id", "deployment_id", "regional_deployment_id", "instance_id", "status", "type", "version", "messages"] model_config = ConfigDict( validate_by_name=True, @@ -78,6 +55,7 @@ class InstanceSnapshot(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -101,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -119,28 +98,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "available_at": obj.get("available_at"), - "deleted_at": obj.get("deleted_at"), - "organization_id": obj.get("organization_id"), - "project_id": obj.get("project_id"), - "service_id": obj.get("service_id"), - "deployment_id": obj.get("deployment_id"), - "regional_deployment_id": obj.get("regional_deployment_id"), - "instance_id": obj.get("instance_id"), - "status": obj.get("status") - if obj.get("status") is not None - else InstanceSnapshotStatus.INSTANCE_SNAPSHOT_STATUS_INVALID, - "type": obj.get("type") - if obj.get("type") is not None - else InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID, - "version": obj.get("version"), - "messages": obj.get("messages"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "available_at": obj.get("available_at"), + "deleted_at": obj.get("deleted_at"), + "organization_id": obj.get("organization_id"), + "project_id": obj.get("project_id"), + "service_id": obj.get("service_id"), + "deployment_id": obj.get("deployment_id"), + "regional_deployment_id": obj.get("regional_deployment_id"), + "instance_id": obj.get("instance_id"), + "status": obj.get("status") if obj.get("status") is not None else InstanceSnapshotStatus.INSTANCE_SNAPSHOT_STATUS_INVALID, + "type": obj.get("type") if obj.get("type") is not None else InstanceSnapshotType.INSTANCE_SNAPSHOT_TYPE_INVALID, + "version": obj.get("version"), + "messages": obj.get("messages") + }) return _obj + + diff --git a/koyeb/api_async/models/instance_snapshot_event.py b/koyeb/api_async/models/instance_snapshot_event.py index 3973c87b..98076760 100644 --- a/koyeb/api_async/models/instance_snapshot_event.py +++ b/koyeb/api_async/models/instance_snapshot_event.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InstanceSnapshotEvent(BaseModel): """ InstanceSnapshotEvent - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None when: Optional[datetime] = None organization_id: Optional[StrictStr] = None @@ -37,15 +35,7 @@ class InstanceSnapshotEvent(BaseModel): type: Optional[StrictStr] = None message: Optional[StrictStr] = None metadata: Optional[Dict[str, Any]] = None - __properties: ClassVar[List[str]] = [ - "id", - "when", - "organization_id", - "instance_snapshot_id", - "type", - "message", - "metadata", - ] + __properties: ClassVar[List[str]] = ["id", "when", "organization_id", "instance_snapshot_id", "type", "message", "metadata"] model_config = ConfigDict( validate_by_name=True, @@ -54,6 +44,7 @@ class InstanceSnapshotEvent(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -95,15 +87,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "when": obj.get("when"), - "organization_id": obj.get("organization_id"), - "instance_snapshot_id": obj.get("instance_snapshot_id"), - "type": obj.get("type"), - "message": obj.get("message"), - "metadata": obj.get("metadata"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "when": obj.get("when"), + "organization_id": obj.get("organization_id"), + "instance_snapshot_id": obj.get("instance_snapshot_id"), + "type": obj.get("type"), + "message": obj.get("message"), + "metadata": obj.get("metadata") + }) return _obj + + diff --git a/koyeb/api_async/models/instance_snapshot_quotas.py b/koyeb/api_async/models/instance_snapshot_quotas.py index 9345e32e..4fb674b8 100644 --- a/koyeb/api_async/models/instance_snapshot_quotas.py +++ b/koyeb/api_async/models/instance_snapshot_quotas.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InstanceSnapshotQuotas(BaseModel): """ InstanceSnapshotQuotas - """ # noqa: E501 - + """ # noqa: E501 filesystem: Optional[StrictInt] = None full: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["filesystem", "full"] @@ -40,6 +38,7 @@ class InstanceSnapshotQuotas(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"filesystem": obj.get("filesystem"), "full": obj.get("full")} - ) + _obj = cls.model_validate({ + "filesystem": obj.get("filesystem"), + "full": obj.get("full") + }) return _obj + + diff --git a/koyeb/api_async/models/instance_snapshot_status.py b/koyeb/api_async/models/instance_snapshot_status.py index 7bf4c276..a824eb6b 100644 --- a/koyeb/api_async/models/instance_snapshot_status.py +++ b/koyeb/api_async/models/instance_snapshot_status.py @@ -26,14 +26,16 @@ class InstanceSnapshotStatus(str, Enum): """ allowed enum values """ - INSTANCE_SNAPSHOT_STATUS_INVALID = "INSTANCE_SNAPSHOT_STATUS_INVALID" - INSTANCE_SNAPSHOT_STATUS_CREATING = "INSTANCE_SNAPSHOT_STATUS_CREATING" - INSTANCE_SNAPSHOT_STATUS_AVAILABLE = "INSTANCE_SNAPSHOT_STATUS_AVAILABLE" - INSTANCE_SNAPSHOT_STATUS_ERROR = "INSTANCE_SNAPSHOT_STATUS_ERROR" - INSTANCE_SNAPSHOT_STATUS_DELETING = "INSTANCE_SNAPSHOT_STATUS_DELETING" - INSTANCE_SNAPSHOT_STATUS_DELETED = "INSTANCE_SNAPSHOT_STATUS_DELETED" + INSTANCE_SNAPSHOT_STATUS_INVALID = 'INSTANCE_SNAPSHOT_STATUS_INVALID' + INSTANCE_SNAPSHOT_STATUS_CREATING = 'INSTANCE_SNAPSHOT_STATUS_CREATING' + INSTANCE_SNAPSHOT_STATUS_AVAILABLE = 'INSTANCE_SNAPSHOT_STATUS_AVAILABLE' + INSTANCE_SNAPSHOT_STATUS_ERROR = 'INSTANCE_SNAPSHOT_STATUS_ERROR' + INSTANCE_SNAPSHOT_STATUS_DELETING = 'INSTANCE_SNAPSHOT_STATUS_DELETING' + INSTANCE_SNAPSHOT_STATUS_DELETED = 'INSTANCE_SNAPSHOT_STATUS_DELETED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of InstanceSnapshotStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/instance_snapshot_type.py b/koyeb/api_async/models/instance_snapshot_type.py index ed2af447..a83a50fb 100644 --- a/koyeb/api_async/models/instance_snapshot_type.py +++ b/koyeb/api_async/models/instance_snapshot_type.py @@ -26,11 +26,13 @@ class InstanceSnapshotType(str, Enum): """ allowed enum values """ - INSTANCE_SNAPSHOT_TYPE_INVALID = "INSTANCE_SNAPSHOT_TYPE_INVALID" - INSTANCE_SNAPSHOT_TYPE_FILESYSTEM = "INSTANCE_SNAPSHOT_TYPE_FILESYSTEM" - INSTANCE_SNAPSHOT_TYPE_FULL = "INSTANCE_SNAPSHOT_TYPE_FULL" + INSTANCE_SNAPSHOT_TYPE_INVALID = 'INSTANCE_SNAPSHOT_TYPE_INVALID' + INSTANCE_SNAPSHOT_TYPE_FILESYSTEM = 'INSTANCE_SNAPSHOT_TYPE_FILESYSTEM' + INSTANCE_SNAPSHOT_TYPE_FULL = 'INSTANCE_SNAPSHOT_TYPE_FULL' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of InstanceSnapshotType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/instance_snapshot_type_usage.py b/koyeb/api_async/models/instance_snapshot_type_usage.py index 7196bed6..0e8b72b9 100644 --- a/koyeb/api_async/models/instance_snapshot_type_usage.py +++ b/koyeb/api_async/models/instance_snapshot_type_usage.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InstanceSnapshotTypeUsage(BaseModel): """ InstanceSnapshotTypeUsage - """ # noqa: E501 - + """ # noqa: E501 type: Optional[StrictStr] = None used: Optional[StrictInt] = None limit: Optional[StrictInt] = None @@ -41,6 +39,7 @@ class InstanceSnapshotTypeUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "type": obj.get("type"), - "used": obj.get("used"), - "limit": obj.get("limit"), - } - ) + _obj = cls.model_validate({ + "type": obj.get("type"), + "used": obj.get("used"), + "limit": obj.get("limit") + }) return _obj + + diff --git a/koyeb/api_async/models/instance_status.py b/koyeb/api_async/models/instance_status.py index b55bc490..10443720 100644 --- a/koyeb/api_async/models/instance_status.py +++ b/koyeb/api_async/models/instance_status.py @@ -26,16 +26,18 @@ class InstanceStatus(str, Enum): """ allowed enum values """ - ALLOCATING = "ALLOCATING" - STARTING = "STARTING" - HEALTHY = "HEALTHY" - UNHEALTHY = "UNHEALTHY" - STOPPING = "STOPPING" - STOPPED = "STOPPED" - ERROR = "ERROR" - SLEEPING = "SLEEPING" + ALLOCATING = 'ALLOCATING' + STARTING = 'STARTING' + HEALTHY = 'HEALTHY' + UNHEALTHY = 'UNHEALTHY' + STOPPING = 'STOPPING' + STOPPED = 'STOPPED' + ERROR = 'ERROR' + SLEEPING = 'SLEEPING' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of InstanceStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/instance_type_usage.py b/koyeb/api_async/models/instance_type_usage.py index 7b6f923c..d44a0ac5 100644 --- a/koyeb/api_async/models/instance_type_usage.py +++ b/koyeb/api_async/models/instance_type_usage.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InstanceTypeUsage(BaseModel): """ InstanceTypeUsage - """ # noqa: E501 - + """ # noqa: E501 instance_type: Optional[StrictStr] = None used: Optional[StrictInt] = None limit: Optional[StrictInt] = None @@ -41,6 +39,7 @@ class InstanceTypeUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instance_type": obj.get("instance_type"), - "used": obj.get("used"), - "limit": obj.get("limit"), - } - ) + _obj = cls.model_validate({ + "instance_type": obj.get("instance_type"), + "used": obj.get("used"), + "limit": obj.get("limit") + }) return _obj + + diff --git a/koyeb/api_async/models/instance_usage.py b/koyeb/api_async/models/instance_usage.py index b2e50393..e63b0799 100644 --- a/koyeb/api_async/models/instance_usage.py +++ b/koyeb/api_async/models/instance_usage.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InstanceUsage(BaseModel): """ InstanceUsage - """ # noqa: E501 - + """ # noqa: E501 duration_seconds: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["duration_seconds"] @@ -39,6 +37,7 @@ class InstanceUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"duration_seconds": obj.get("duration_seconds")}) + _obj = cls.model_validate({ + "duration_seconds": obj.get("duration_seconds") + }) return _obj + + diff --git a/koyeb/api_async/models/instances_summary.py b/koyeb/api_async/models/instances_summary.py index 2fd3a99e..982376b8 100644 --- a/koyeb/api_async/models/instances_summary.py +++ b/koyeb/api_async/models/instances_summary.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InstancesSummary(BaseModel): """ InstancesSummary - """ # noqa: E501 - + """ # noqa: E501 total: Optional[StrictStr] = None by_type: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["total", "by_type"] @@ -40,6 +38,7 @@ class InstancesSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"total": obj.get("total"), "by_type": obj.get("by_type")} - ) + _obj = cls.model_validate({ + "total": obj.get("total"), + "by_type": obj.get("by_type") + }) return _obj + + diff --git a/koyeb/api_async/models/invite_user_request.py b/koyeb/api_async/models/invite_user_request.py index b216f397..6c05f27e 100644 --- a/koyeb/api_async/models/invite_user_request.py +++ b/koyeb/api_async/models/invite_user_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class InviteUserRequest(BaseModel): """ InviteUserRequest - """ # noqa: E501 - + """ # noqa: E501 email: Optional[StrictStr] = None name: Optional[StrictStr] = None message: Optional[StrictStr] = None @@ -41,6 +39,7 @@ class InviteUserRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "email": obj.get("email"), - "name": obj.get("name"), - "message": obj.get("message"), - } - ) + _obj = cls.model_validate({ + "email": obj.get("email"), + "name": obj.get("name"), + "message": obj.get("message") + }) return _obj + + diff --git a/koyeb/api_async/models/kgitproxy_branch.py b/koyeb/api_async/models/kgitproxy_branch.py index 379a03c1..99b27109 100644 --- a/koyeb/api_async/models/kgitproxy_branch.py +++ b/koyeb/api_async/models/kgitproxy_branch.py @@ -19,37 +19,23 @@ from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.kgitproxy_repository_provider import ( - KgitproxyRepositoryProvider, -) +from koyeb.api_async.models.kgitproxy_repository_provider import KgitproxyRepositoryProvider from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class KgitproxyBranch(BaseModel): """ KgitproxyBranch - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None repository_id: Optional[StrictStr] = None name: Optional[StrictStr] = None is_default: Optional[StrictBool] = None is_protected: Optional[StrictBool] = None - provider: Optional[ - KgitproxyRepositoryProvider - ] = KgitproxyRepositoryProvider.INVALID_PROVIDER - __properties: ClassVar[List[str]] = [ - "id", - "organization_id", - "repository_id", - "name", - "is_default", - "is_protected", - "provider", - ] + provider: Optional[KgitproxyRepositoryProvider] = KgitproxyRepositoryProvider.INVALID_PROVIDER + __properties: ClassVar[List[str]] = ["id", "organization_id", "repository_id", "name", "is_default", "is_protected", "provider"] model_config = ConfigDict( validate_by_name=True, @@ -58,6 +44,7 @@ class KgitproxyBranch(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -81,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -99,17 +87,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "organization_id": obj.get("organization_id"), - "repository_id": obj.get("repository_id"), - "name": obj.get("name"), - "is_default": obj.get("is_default"), - "is_protected": obj.get("is_protected"), - "provider": obj.get("provider") - if obj.get("provider") is not None - else KgitproxyRepositoryProvider.INVALID_PROVIDER, - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "repository_id": obj.get("repository_id"), + "name": obj.get("name"), + "is_default": obj.get("is_default"), + "is_protected": obj.get("is_protected"), + "provider": obj.get("provider") if obj.get("provider") is not None else KgitproxyRepositoryProvider.INVALID_PROVIDER + }) return _obj + + diff --git a/koyeb/api_async/models/kgitproxy_git_hub_repository.py b/koyeb/api_async/models/kgitproxy_git_hub_repository.py index 3b6a4603..caa94569 100644 --- a/koyeb/api_async/models/kgitproxy_git_hub_repository.py +++ b/koyeb/api_async/models/kgitproxy_git_hub_repository.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KgitproxyGitHubRepository(BaseModel): """ KgitproxyGitHubRepository - """ # noqa: E501 - + """ # noqa: E501 github_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["github_id"] @@ -39,6 +37,7 @@ class KgitproxyGitHubRepository(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"github_id": obj.get("github_id")}) + _obj = cls.model_validate({ + "github_id": obj.get("github_id") + }) return _obj + + diff --git a/koyeb/api_async/models/kgitproxy_github_installation_status.py b/koyeb/api_async/models/kgitproxy_github_installation_status.py index b2644fec..9d281028 100644 --- a/koyeb/api_async/models/kgitproxy_github_installation_status.py +++ b/koyeb/api_async/models/kgitproxy_github_installation_status.py @@ -26,12 +26,14 @@ class KgitproxyGithubInstallationStatus(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - INSTALLED = "INSTALLED" - SUSPENDED = "SUSPENDED" - DELETED = "DELETED" + INVALID = 'INVALID' + INSTALLED = 'INSTALLED' + SUSPENDED = 'SUSPENDED' + DELETED = 'DELETED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of KgitproxyGithubInstallationStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/kgitproxy_indexing_status.py b/koyeb/api_async/models/kgitproxy_indexing_status.py index e10b3041..50cf2426 100644 --- a/koyeb/api_async/models/kgitproxy_indexing_status.py +++ b/koyeb/api_async/models/kgitproxy_indexing_status.py @@ -26,12 +26,14 @@ class KgitproxyIndexingStatus(str, Enum): """ allowed enum values """ - INVALID_INDEXING_STATUS = "INVALID_INDEXING_STATUS" - NOT_STARTED = "NOT_STARTED" - IN_PROGRESS = "IN_PROGRESS" - COMPLETED = "COMPLETED" + INVALID_INDEXING_STATUS = 'INVALID_INDEXING_STATUS' + NOT_STARTED = 'NOT_STARTED' + IN_PROGRESS = 'IN_PROGRESS' + COMPLETED = 'COMPLETED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of KgitproxyIndexingStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/kgitproxy_list_branches_reply.py b/koyeb/api_async/models/kgitproxy_list_branches_reply.py index 5def6fa0..47a8a0b8 100644 --- a/koyeb/api_async/models/kgitproxy_list_branches_reply.py +++ b/koyeb/api_async/models/kgitproxy_list_branches_reply.py @@ -24,24 +24,14 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KgitproxyListBranchesReply(BaseModel): """ KgitproxyListBranchesReply - """ # noqa: E501 - - branches: Optional[List[KgitproxyBranch]] = Field( - default=None, description="The collection of branches." - ) - limit: Optional[StrictInt] = Field( - default=None, description="The limit in the request." - ) - offset: Optional[StrictInt] = Field( - default=None, description="The offset in the request." - ) - count: Optional[StrictInt] = Field( - default=None, description="The total number of items." - ) + """ # noqa: E501 + branches: Optional[List[KgitproxyBranch]] = Field(default=None, description="The collection of branches.") + limit: Optional[StrictInt] = Field(default=None, description="The limit in the request.") + offset: Optional[StrictInt] = Field(default=None, description="The offset in the request.") + count: Optional[StrictInt] = Field(default=None, description="The total number of items.") __properties: ClassVar[List[str]] = ["branches", "limit", "offset", "count"] model_config = ConfigDict( @@ -51,6 +41,7 @@ class KgitproxyListBranchesReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -85,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.branches: for _item_branches in self.branches: - _items.append( - _item_branches.to_dict() if _item_branches is not None else None - ) - _dict["branches"] = _items + if _item_branches: + _items.append(_item_branches.to_dict()) + _dict['branches'] = _items return _dict @classmethod @@ -100,16 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "branches": [ - KgitproxyBranch.from_dict(_item) for _item in obj["branches"] - ] - if obj.get("branches") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "branches": [KgitproxyBranch.from_dict(_item) for _item in obj["branches"]] if obj.get("branches") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api_async/models/kgitproxy_list_repositories_reply.py b/koyeb/api_async/models/kgitproxy_list_repositories_reply.py index 1fa35557..64a64087 100644 --- a/koyeb/api_async/models/kgitproxy_list_repositories_reply.py +++ b/koyeb/api_async/models/kgitproxy_list_repositories_reply.py @@ -24,24 +24,14 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KgitproxyListRepositoriesReply(BaseModel): """ KgitproxyListRepositoriesReply - """ # noqa: E501 - - repositories: Optional[List[KgitproxyRepository]] = Field( - default=None, description="The collection of repositories." - ) - limit: Optional[StrictInt] = Field( - default=None, description="The limit in the request." - ) - offset: Optional[StrictInt] = Field( - default=None, description="The offset in the request." - ) - count: Optional[StrictInt] = Field( - default=None, description="The total number of items." - ) + """ # noqa: E501 + repositories: Optional[List[KgitproxyRepository]] = Field(default=None, description="The collection of repositories.") + limit: Optional[StrictInt] = Field(default=None, description="The limit in the request.") + offset: Optional[StrictInt] = Field(default=None, description="The offset in the request.") + count: Optional[StrictInt] = Field(default=None, description="The total number of items.") __properties: ClassVar[List[str]] = ["repositories", "limit", "offset", "count"] model_config = ConfigDict( @@ -51,6 +41,7 @@ class KgitproxyListRepositoriesReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -85,12 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.repositories: for _item_repositories in self.repositories: - _items.append( - _item_repositories.to_dict() - if _item_repositories is not None - else None - ) - _dict["repositories"] = _items + if _item_repositories: + _items.append(_item_repositories.to_dict()) + _dict['repositories'] = _items return _dict @classmethod @@ -102,17 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "repositories": [ - KgitproxyRepository.from_dict(_item) - for _item in obj["repositories"] - ] - if obj.get("repositories") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "repositories": [KgitproxyRepository.from_dict(_item) for _item in obj["repositories"]] if obj.get("repositories") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api_async/models/kgitproxy_repository.py b/koyeb/api_async/models/kgitproxy_repository.py index c8ba063a..6aa5cb8f 100644 --- a/koyeb/api_async/models/kgitproxy_repository.py +++ b/koyeb/api_async/models/kgitproxy_repository.py @@ -20,22 +20,16 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.kgitproxy_git_hub_repository import ( - KgitproxyGitHubRepository, -) -from koyeb.api_async.models.kgitproxy_repository_provider import ( - KgitproxyRepositoryProvider, -) +from koyeb.api_async.models.kgitproxy_git_hub_repository import KgitproxyGitHubRepository +from koyeb.api_async.models.kgitproxy_repository_provider import KgitproxyRepositoryProvider from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class KgitproxyRepository(BaseModel): """ KgitproxyRepository - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None name: Optional[StrictStr] = None @@ -44,24 +38,10 @@ class KgitproxyRepository(BaseModel): is_private: Optional[StrictBool] = None is_disabled: Optional[StrictBool] = None default_branch: Optional[StrictStr] = None - provider: Optional[ - KgitproxyRepositoryProvider - ] = KgitproxyRepositoryProvider.INVALID_PROVIDER + provider: Optional[KgitproxyRepositoryProvider] = KgitproxyRepositoryProvider.INVALID_PROVIDER last_push_date: Optional[datetime] = None github: Optional[KgitproxyGitHubRepository] = None - __properties: ClassVar[List[str]] = [ - "id", - "organization_id", - "name", - "url", - "description", - "is_private", - "is_disabled", - "default_branch", - "provider", - "last_push_date", - "github", - ] + __properties: ClassVar[List[str]] = ["id", "organization_id", "name", "url", "description", "is_private", "is_disabled", "default_branch", "provider", "last_push_date", "github"] model_config = ConfigDict( validate_by_name=True, @@ -70,6 +50,7 @@ class KgitproxyRepository(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -93,7 +74,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -102,7 +84,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of github if self.github: - _dict["github"] = self.github.to_dict() + _dict['github'] = self.github.to_dict() return _dict @classmethod @@ -114,23 +96,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "organization_id": obj.get("organization_id"), - "name": obj.get("name"), - "url": obj.get("url"), - "description": obj.get("description"), - "is_private": obj.get("is_private"), - "is_disabled": obj.get("is_disabled"), - "default_branch": obj.get("default_branch"), - "provider": obj.get("provider") - if obj.get("provider") is not None - else KgitproxyRepositoryProvider.INVALID_PROVIDER, - "last_push_date": obj.get("last_push_date"), - "github": KgitproxyGitHubRepository.from_dict(obj["github"]) - if obj.get("github") is not None - else None, - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "name": obj.get("name"), + "url": obj.get("url"), + "description": obj.get("description"), + "is_private": obj.get("is_private"), + "is_disabled": obj.get("is_disabled"), + "default_branch": obj.get("default_branch"), + "provider": obj.get("provider") if obj.get("provider") is not None else KgitproxyRepositoryProvider.INVALID_PROVIDER, + "last_push_date": obj.get("last_push_date"), + "github": KgitproxyGitHubRepository.from_dict(obj["github"]) if obj.get("github") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/kgitproxy_repository_provider.py b/koyeb/api_async/models/kgitproxy_repository_provider.py index 0f639dec..123d8ee8 100644 --- a/koyeb/api_async/models/kgitproxy_repository_provider.py +++ b/koyeb/api_async/models/kgitproxy_repository_provider.py @@ -26,10 +26,12 @@ class KgitproxyRepositoryProvider(str, Enum): """ allowed enum values """ - INVALID_PROVIDER = "INVALID_PROVIDER" - GITHUB = "GITHUB" + INVALID_PROVIDER = 'INVALID_PROVIDER' + GITHUB = 'GITHUB' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of KgitproxyRepositoryProvider from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/ksearch_app.py b/koyeb/api_async/models/ksearch_app.py index 35177b2b..a7dca43b 100644 --- a/koyeb/api_async/models/ksearch_app.py +++ b/koyeb/api_async/models/ksearch_app.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KsearchApp(BaseModel): """ KsearchApp - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None name: Optional[StrictStr] = None @@ -41,6 +39,7 @@ class KsearchApp(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "organization_id": obj.get("organization_id"), - "name": obj.get("name"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "name": obj.get("name") + }) return _obj + + diff --git a/koyeb/api_async/models/ksearch_global_deployment.py b/koyeb/api_async/models/ksearch_global_deployment.py index a073ba07..61edf644 100644 --- a/koyeb/api_async/models/ksearch_global_deployment.py +++ b/koyeb/api_async/models/ksearch_global_deployment.py @@ -23,22 +23,15 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KsearchGlobalDeployment(BaseModel): """ KsearchGlobalDeployment - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None app_id: Optional[StrictStr] = None service_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "organization_id", - "app_id", - "service_id", - ] + __properties: ClassVar[List[str]] = ["id", "organization_id", "app_id", "service_id"] model_config = ConfigDict( validate_by_name=True, @@ -47,6 +40,7 @@ class KsearchGlobalDeployment(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -88,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "organization_id": obj.get("organization_id"), - "app_id": obj.get("app_id"), - "service_id": obj.get("service_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "app_id": obj.get("app_id"), + "service_id": obj.get("service_id") + }) return _obj + + diff --git a/koyeb/api_async/models/ksearch_instance.py b/koyeb/api_async/models/ksearch_instance.py index d7b0de96..e451f836 100644 --- a/koyeb/api_async/models/ksearch_instance.py +++ b/koyeb/api_async/models/ksearch_instance.py @@ -23,24 +23,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KsearchInstance(BaseModel): """ KsearchInstance - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None app_id: Optional[StrictStr] = None service_id: Optional[StrictStr] = None allocation_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "organization_id", - "app_id", - "service_id", - "allocation_id", - ] + __properties: ClassVar[List[str]] = ["id", "organization_id", "app_id", "service_id", "allocation_id"] model_config = ConfigDict( validate_by_name=True, @@ -49,6 +41,7 @@ class KsearchInstance(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -72,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -90,13 +84,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "organization_id": obj.get("organization_id"), - "app_id": obj.get("app_id"), - "service_id": obj.get("service_id"), - "allocation_id": obj.get("allocation_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "app_id": obj.get("app_id"), + "service_id": obj.get("service_id"), + "allocation_id": obj.get("allocation_id") + }) return _obj + + diff --git a/koyeb/api_async/models/ksearch_organization.py b/koyeb/api_async/models/ksearch_organization.py index c9e27c77..5a0da6fd 100644 --- a/koyeb/api_async/models/ksearch_organization.py +++ b/koyeb/api_async/models/ksearch_organization.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KsearchOrganization(BaseModel): """ KsearchOrganization - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id", "name"] @@ -40,6 +38,7 @@ class KsearchOrganization(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,5 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"id": obj.get("id"), "name": obj.get("name")}) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name") + }) return _obj + + diff --git a/koyeb/api_async/models/ksearch_regional_deployment.py b/koyeb/api_async/models/ksearch_regional_deployment.py index b18825e5..1761256b 100644 --- a/koyeb/api_async/models/ksearch_regional_deployment.py +++ b/koyeb/api_async/models/ksearch_regional_deployment.py @@ -23,24 +23,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KsearchRegionalDeployment(BaseModel): """ KsearchRegionalDeployment - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None app_id: Optional[StrictStr] = None service_id: Optional[StrictStr] = None region: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "organization_id", - "app_id", - "service_id", - "region", - ] + __properties: ClassVar[List[str]] = ["id", "organization_id", "app_id", "service_id", "region"] model_config = ConfigDict( validate_by_name=True, @@ -49,6 +41,7 @@ class KsearchRegionalDeployment(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -72,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -90,13 +84,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "organization_id": obj.get("organization_id"), - "app_id": obj.get("app_id"), - "service_id": obj.get("service_id"), - "region": obj.get("region"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "app_id": obj.get("app_id"), + "service_id": obj.get("service_id"), + "region": obj.get("region") + }) return _obj + + diff --git a/koyeb/api_async/models/ksearch_search_reply.py b/koyeb/api_async/models/ksearch_search_reply.py index 48d97769..febddb76 100644 --- a/koyeb/api_async/models/ksearch_search_reply.py +++ b/koyeb/api_async/models/ksearch_search_reply.py @@ -30,12 +30,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KsearchSearchReply(BaseModel): """ KsearchSearchReply - """ # noqa: E501 - + """ # noqa: E501 organizations: Optional[List[KsearchOrganization]] = None users: Optional[List[KsearchUser]] = None apps: Optional[List[KsearchApp]] = None @@ -43,15 +41,7 @@ class KsearchSearchReply(BaseModel): global_deployments: Optional[List[KsearchGlobalDeployment]] = None regional_deployments: Optional[List[KsearchRegionalDeployment]] = None instances: Optional[List[KsearchInstance]] = None - __properties: ClassVar[List[str]] = [ - "organizations", - "users", - "apps", - "services", - "global_deployments", - "regional_deployments", - "instances", - ] + __properties: ClassVar[List[str]] = ["organizations", "users", "apps", "services", "global_deployments", "regional_deployments", "instances"] model_config = ConfigDict( validate_by_name=True, @@ -60,6 +50,7 @@ class KsearchSearchReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -83,7 +74,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -94,62 +86,51 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.organizations: for _item_organizations in self.organizations: - _items.append( - _item_organizations.to_dict() - if _item_organizations is not None - else None - ) - _dict["organizations"] = _items + if _item_organizations: + _items.append(_item_organizations.to_dict()) + _dict['organizations'] = _items # override the default output from pydantic by calling `to_dict()` of each item in users (list) _items = [] if self.users: for _item_users in self.users: - _items.append( - _item_users.to_dict() if _item_users is not None else None - ) - _dict["users"] = _items + if _item_users: + _items.append(_item_users.to_dict()) + _dict['users'] = _items # override the default output from pydantic by calling `to_dict()` of each item in apps (list) _items = [] if self.apps: for _item_apps in self.apps: - _items.append(_item_apps.to_dict() if _item_apps is not None else None) - _dict["apps"] = _items + if _item_apps: + _items.append(_item_apps.to_dict()) + _dict['apps'] = _items # override the default output from pydantic by calling `to_dict()` of each item in services (list) _items = [] if self.services: for _item_services in self.services: - _items.append( - _item_services.to_dict() if _item_services is not None else None - ) - _dict["services"] = _items + if _item_services: + _items.append(_item_services.to_dict()) + _dict['services'] = _items # override the default output from pydantic by calling `to_dict()` of each item in global_deployments (list) _items = [] if self.global_deployments: for _item_global_deployments in self.global_deployments: - _items.append( - _item_global_deployments.to_dict() - if _item_global_deployments is not None - else None - ) - _dict["global_deployments"] = _items + if _item_global_deployments: + _items.append(_item_global_deployments.to_dict()) + _dict['global_deployments'] = _items # override the default output from pydantic by calling `to_dict()` of each item in regional_deployments (list) _items = [] if self.regional_deployments: for _item_regional_deployments in self.regional_deployments: - _items.append( - _item_regional_deployments.to_dict() - if _item_regional_deployments is not None - else None - ) - _dict["regional_deployments"] = _items + if _item_regional_deployments: + _items.append(_item_regional_deployments.to_dict()) + _dict['regional_deployments'] = _items # override the default output from pydantic by calling `to_dict()` of each item in instances (list) _items = [] if self.instances: for _item_instances in self.instances: - _items.append( - _item_instances.to_dict() if _item_instances is not None else None - ) - _dict["instances"] = _items + if _item_instances: + _items.append(_item_instances.to_dict()) + _dict['instances'] = _items return _dict @classmethod @@ -161,42 +142,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organizations": [ - KsearchOrganization.from_dict(_item) - for _item in obj["organizations"] - ] - if obj.get("organizations") is not None - else None, - "users": [KsearchUser.from_dict(_item) for _item in obj["users"]] - if obj.get("users") is not None - else None, - "apps": [KsearchApp.from_dict(_item) for _item in obj["apps"]] - if obj.get("apps") is not None - else None, - "services": [ - KsearchService.from_dict(_item) for _item in obj["services"] - ] - if obj.get("services") is not None - else None, - "global_deployments": [ - KsearchGlobalDeployment.from_dict(_item) - for _item in obj["global_deployments"] - ] - if obj.get("global_deployments") is not None - else None, - "regional_deployments": [ - KsearchRegionalDeployment.from_dict(_item) - for _item in obj["regional_deployments"] - ] - if obj.get("regional_deployments") is not None - else None, - "instances": [ - KsearchInstance.from_dict(_item) for _item in obj["instances"] - ] - if obj.get("instances") is not None - else None, - } - ) + _obj = cls.model_validate({ + "organizations": [KsearchOrganization.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None, + "users": [KsearchUser.from_dict(_item) for _item in obj["users"]] if obj.get("users") is not None else None, + "apps": [KsearchApp.from_dict(_item) for _item in obj["apps"]] if obj.get("apps") is not None else None, + "services": [KsearchService.from_dict(_item) for _item in obj["services"]] if obj.get("services") is not None else None, + "global_deployments": [KsearchGlobalDeployment.from_dict(_item) for _item in obj["global_deployments"]] if obj.get("global_deployments") is not None else None, + "regional_deployments": [KsearchRegionalDeployment.from_dict(_item) for _item in obj["regional_deployments"]] if obj.get("regional_deployments") is not None else None, + "instances": [KsearchInstance.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/ksearch_service.py b/koyeb/api_async/models/ksearch_service.py index b7dfc5b8..b2c9c7d2 100644 --- a/koyeb/api_async/models/ksearch_service.py +++ b/koyeb/api_async/models/ksearch_service.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KsearchService(BaseModel): """ KsearchService - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None app_id: Optional[StrictStr] = None @@ -42,6 +40,7 @@ class KsearchService(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "organization_id": obj.get("organization_id"), - "app_id": obj.get("app_id"), - "name": obj.get("name"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "app_id": obj.get("app_id"), + "name": obj.get("name") + }) return _obj + + diff --git a/koyeb/api_async/models/ksearch_user.py b/koyeb/api_async/models/ksearch_user.py index cdff67c0..93668832 100644 --- a/koyeb/api_async/models/ksearch_user.py +++ b/koyeb/api_async/models/ksearch_user.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KsearchUser(BaseModel): """ KsearchUser - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None email: Optional[StrictStr] = None name: Optional[StrictStr] = None @@ -42,6 +40,7 @@ class KsearchUser(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "email": obj.get("email"), - "name": obj.get("name"), - "github_user": obj.get("github_user"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "email": obj.get("email"), + "name": obj.get("name"), + "github_user": obj.get("github_user") + }) return _obj + + diff --git a/koyeb/api_async/models/ktest_test_auth_reply.py b/koyeb/api_async/models/ktest_test_auth_reply.py index 7f6559d5..67feb3b0 100644 --- a/koyeb/api_async/models/ktest_test_auth_reply.py +++ b/koyeb/api_async/models/ktest_test_auth_reply.py @@ -23,22 +23,15 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KtestTestAuthReply(BaseModel): """ KtestTestAuthReply - """ # noqa: E501 - + """ # noqa: E501 payload: Optional[StrictStr] = None user_id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None workspace_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "payload", - "user_id", - "organization_id", - "workspace_id", - ] + __properties: ClassVar[List[str]] = ["payload", "user_id", "organization_id", "workspace_id"] model_config = ConfigDict( validate_by_name=True, @@ -47,6 +40,7 @@ class KtestTestAuthReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -88,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "payload": obj.get("payload"), - "user_id": obj.get("user_id"), - "organization_id": obj.get("organization_id"), - "workspace_id": obj.get("workspace_id"), - } - ) + _obj = cls.model_validate({ + "payload": obj.get("payload"), + "user_id": obj.get("user_id"), + "organization_id": obj.get("organization_id"), + "workspace_id": obj.get("workspace_id") + }) return _obj + + diff --git a/koyeb/api_async/models/ktest_test_auth_request.py b/koyeb/api_async/models/ktest_test_auth_request.py index 2900650b..58ced89e 100644 --- a/koyeb/api_async/models/ktest_test_auth_request.py +++ b/koyeb/api_async/models/ktest_test_auth_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class KtestTestAuthRequest(BaseModel): """ KtestTestAuthRequest - """ # noqa: E501 - + """ # noqa: E501 payload: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["payload"] @@ -39,6 +37,7 @@ class KtestTestAuthRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"payload": obj.get("payload")}) + _obj = cls.model_validate({ + "payload": obj.get("payload") + }) return _obj + + diff --git a/koyeb/api_async/models/lifecycle_quotas.py b/koyeb/api_async/models/lifecycle_quotas.py index bc027411..543beefb 100644 --- a/koyeb/api_async/models/lifecycle_quotas.py +++ b/koyeb/api_async/models/lifecycle_quotas.py @@ -23,22 +23,15 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class LifecycleQuotas(BaseModel): """ LifecycleQuotas - """ # noqa: E501 - + """ # noqa: E501 delete_after_sleep_min: Optional[StrictInt] = None delete_after_sleep_max: Optional[StrictInt] = None delete_after_create_min: Optional[StrictInt] = None delete_after_create_max: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = [ - "delete_after_sleep_min", - "delete_after_sleep_max", - "delete_after_create_min", - "delete_after_create_max", - ] + __properties: ClassVar[List[str]] = ["delete_after_sleep_min", "delete_after_sleep_max", "delete_after_create_min", "delete_after_create_max"] model_config = ConfigDict( validate_by_name=True, @@ -47,6 +40,7 @@ class LifecycleQuotas(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -70,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -88,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "delete_after_sleep_min": obj.get("delete_after_sleep_min"), - "delete_after_sleep_max": obj.get("delete_after_sleep_max"), - "delete_after_create_min": obj.get("delete_after_create_min"), - "delete_after_create_max": obj.get("delete_after_create_max"), - } - ) + _obj = cls.model_validate({ + "delete_after_sleep_min": obj.get("delete_after_sleep_min"), + "delete_after_sleep_max": obj.get("delete_after_sleep_max"), + "delete_after_create_min": obj.get("delete_after_create_min"), + "delete_after_create_max": obj.get("delete_after_create_max") + }) return _obj + + diff --git a/koyeb/api_async/models/list_app_events_reply.py b/koyeb/api_async/models/list_app_events_reply.py index 0523f7c4..29b7eb09 100644 --- a/koyeb/api_async/models/list_app_events_reply.py +++ b/koyeb/api_async/models/list_app_events_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListAppEventsReply(BaseModel): """ ListAppEventsReply - """ # noqa: E501 - + """ # noqa: E501 events: Optional[List[AppEvent]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None order: Optional[StrictStr] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "events", - "limit", - "offset", - "order", - "has_next", - ] + __properties: ClassVar[List[str]] = ["events", "limit", "offset", "order", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListAppEventsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.events: for _item_events in self.events: - _items.append( - _item_events.to_dict() if _item_events is not None else None - ) - _dict["events"] = _items + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _items return _dict @classmethod @@ -99,15 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "events": [AppEvent.from_dict(_item) for _item in obj["events"]] - if obj.get("events") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "order": obj.get("order"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "events": [AppEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "order": obj.get("order"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api_async/models/list_apps_reply.py b/koyeb/api_async/models/list_apps_reply.py index ed558355..2772cb2f 100644 --- a/koyeb/api_async/models/list_apps_reply.py +++ b/koyeb/api_async/models/list_apps_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListAppsReply(BaseModel): """ ListAppsReply - """ # noqa: E501 - + """ # noqa: E501 apps: Optional[List[AppListItem]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -44,6 +42,7 @@ class ListAppsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -78,8 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.apps: for _item_apps in self.apps: - _items.append(_item_apps.to_dict() if _item_apps is not None else None) - _dict["apps"] = _items + if _item_apps: + _items.append(_item_apps.to_dict()) + _dict['apps'] = _items return _dict @classmethod @@ -91,15 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "apps": [AppListItem.from_dict(_item) for _item in obj["apps"]] - if obj.get("apps") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "apps": [AppListItem.from_dict(_item) for _item in obj["apps"]] if obj.get("apps") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api_async/models/list_catalog_instances_reply.py b/koyeb/api_async/models/list_catalog_instances_reply.py index 3c077fee..fb831588 100644 --- a/koyeb/api_async/models/list_catalog_instances_reply.py +++ b/koyeb/api_async/models/list_catalog_instances_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListCatalogInstancesReply(BaseModel): """ ListCatalogInstancesReply - """ # noqa: E501 - + """ # noqa: E501 instances: Optional[List[CatalogInstanceListItem]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListCatalogInstancesReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.instances: for _item_instances in self.instances: - _items.append( - _item_instances.to_dict() if _item_instances is not None else None - ) - _dict["instances"] = _items + if _item_instances: + _items.append(_item_instances.to_dict()) + _dict['instances'] = _items return _dict @classmethod @@ -92,17 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instances": [ - CatalogInstanceListItem.from_dict(_item) - for _item in obj["instances"] - ] - if obj.get("instances") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "instances": [CatalogInstanceListItem.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api_async/models/list_credentials_reply.py b/koyeb/api_async/models/list_credentials_reply.py index 1a49d44b..75b5b438 100644 --- a/koyeb/api_async/models/list_credentials_reply.py +++ b/koyeb/api_async/models/list_credentials_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListCredentialsReply(BaseModel): """ ListCredentialsReply - """ # noqa: E501 - + """ # noqa: E501 credentials: Optional[List[Credential]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListCredentialsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,12 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.credentials: for _item_credentials in self.credentials: - _items.append( - _item_credentials.to_dict() - if _item_credentials is not None - else None - ) - _dict["credentials"] = _items + if _item_credentials: + _items.append(_item_credentials.to_dict()) + _dict['credentials'] = _items return _dict @classmethod @@ -94,16 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "credentials": [ - Credential.from_dict(_item) for _item in obj["credentials"] - ] - if obj.get("credentials") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "credentials": [Credential.from_dict(_item) for _item in obj["credentials"]] if obj.get("credentials") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api_async/models/list_datacenters_reply.py b/koyeb/api_async/models/list_datacenters_reply.py index e5c24974..3d51c7ad 100644 --- a/koyeb/api_async/models/list_datacenters_reply.py +++ b/koyeb/api_async/models/list_datacenters_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListDatacentersReply(BaseModel): """ ListDatacentersReply - """ # noqa: E501 - + """ # noqa: E501 datacenters: Optional[List[DatacenterListItem]] = None __properties: ClassVar[List[str]] = ["datacenters"] @@ -40,6 +38,7 @@ class ListDatacentersReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,12 +74,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.datacenters: for _item_datacenters in self.datacenters: - _items.append( - _item_datacenters.to_dict() - if _item_datacenters is not None - else None - ) - _dict["datacenters"] = _items + if _item_datacenters: + _items.append(_item_datacenters.to_dict()) + _dict['datacenters'] = _items return _dict @classmethod @@ -91,13 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "datacenters": [ - DatacenterListItem.from_dict(_item) for _item in obj["datacenters"] - ] - if obj.get("datacenters") is not None - else None - } - ) + _obj = cls.model_validate({ + "datacenters": [DatacenterListItem.from_dict(_item) for _item in obj["datacenters"]] if obj.get("datacenters") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/list_deployment_events_reply.py b/koyeb/api_async/models/list_deployment_events_reply.py index c02a3839..065982e4 100644 --- a/koyeb/api_async/models/list_deployment_events_reply.py +++ b/koyeb/api_async/models/list_deployment_events_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListDeploymentEventsReply(BaseModel): """ ListDeploymentEventsReply - """ # noqa: E501 - + """ # noqa: E501 events: Optional[List[DeploymentEvent]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None order: Optional[StrictStr] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "events", - "limit", - "offset", - "order", - "has_next", - ] + __properties: ClassVar[List[str]] = ["events", "limit", "offset", "order", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListDeploymentEventsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.events: for _item_events in self.events: - _items.append( - _item_events.to_dict() if _item_events is not None else None - ) - _dict["events"] = _items + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _items return _dict @classmethod @@ -99,15 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "events": [DeploymentEvent.from_dict(_item) for _item in obj["events"]] - if obj.get("events") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "order": obj.get("order"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "events": [DeploymentEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "order": obj.get("order"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api_async/models/list_deployments_reply.py b/koyeb/api_async/models/list_deployments_reply.py index 8d3bfcfd..1a3a2e5c 100644 --- a/koyeb/api_async/models/list_deployments_reply.py +++ b/koyeb/api_async/models/list_deployments_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListDeploymentsReply(BaseModel): """ ListDeploymentsReply - """ # noqa: E501 - + """ # noqa: E501 deployments: Optional[List[DeploymentListItem]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None count: Optional[StrictInt] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "deployments", - "limit", - "offset", - "count", - "has_next", - ] + __properties: ClassVar[List[str]] = ["deployments", "limit", "offset", "count", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListDeploymentsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,12 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.deployments: for _item_deployments in self.deployments: - _items.append( - _item_deployments.to_dict() - if _item_deployments is not None - else None - ) - _dict["deployments"] = _items + if _item_deployments: + _items.append(_item_deployments.to_dict()) + _dict['deployments'] = _items return _dict @classmethod @@ -101,17 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "deployments": [ - DeploymentListItem.from_dict(_item) for _item in obj["deployments"] - ] - if obj.get("deployments") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "deployments": [DeploymentListItem.from_dict(_item) for _item in obj["deployments"]] if obj.get("deployments") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api_async/models/list_domains_reply.py b/koyeb/api_async/models/list_domains_reply.py index 2e3022fa..9158ee33 100644 --- a/koyeb/api_async/models/list_domains_reply.py +++ b/koyeb/api_async/models/list_domains_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListDomainsReply(BaseModel): """ ListDomainsReply - """ # noqa: E501 - + """ # noqa: E501 domains: Optional[List[Domain]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListDomainsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.domains: for _item_domains in self.domains: - _items.append( - _item_domains.to_dict() if _item_domains is not None else None - ) - _dict["domains"] = _items + if _item_domains: + _items.append(_item_domains.to_dict()) + _dict['domains'] = _items return _dict @classmethod @@ -92,14 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "domains": [Domain.from_dict(_item) for _item in obj["domains"]] - if obj.get("domains") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "domains": [Domain.from_dict(_item) for _item in obj["domains"]] if obj.get("domains") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api_async/models/list_instance_events_reply.py b/koyeb/api_async/models/list_instance_events_reply.py index 61f23c6e..39db3246 100644 --- a/koyeb/api_async/models/list_instance_events_reply.py +++ b/koyeb/api_async/models/list_instance_events_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListInstanceEventsReply(BaseModel): """ ListInstanceEventsReply - """ # noqa: E501 - + """ # noqa: E501 events: Optional[List[InstanceEvent]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None order: Optional[StrictStr] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "events", - "limit", - "offset", - "order", - "has_next", - ] + __properties: ClassVar[List[str]] = ["events", "limit", "offset", "order", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListInstanceEventsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.events: for _item_events in self.events: - _items.append( - _item_events.to_dict() if _item_events is not None else None - ) - _dict["events"] = _items + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _items return _dict @classmethod @@ -99,15 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "events": [InstanceEvent.from_dict(_item) for _item in obj["events"]] - if obj.get("events") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "order": obj.get("order"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "events": [InstanceEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "order": obj.get("order"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api_async/models/list_instance_snapshot_events_reply.py b/koyeb/api_async/models/list_instance_snapshot_events_reply.py index fe39332d..404178db 100644 --- a/koyeb/api_async/models/list_instance_snapshot_events_reply.py +++ b/koyeb/api_async/models/list_instance_snapshot_events_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListInstanceSnapshotEventsReply(BaseModel): """ ListInstanceSnapshotEventsReply - """ # noqa: E501 - + """ # noqa: E501 events: Optional[List[InstanceSnapshotEvent]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None order: Optional[StrictStr] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "events", - "limit", - "offset", - "order", - "has_next", - ] + __properties: ClassVar[List[str]] = ["events", "limit", "offset", "order", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListInstanceSnapshotEventsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.events: for _item_events in self.events: - _items.append( - _item_events.to_dict() if _item_events is not None else None - ) - _dict["events"] = _items + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _items return _dict @classmethod @@ -99,17 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "events": [ - InstanceSnapshotEvent.from_dict(_item) for _item in obj["events"] - ] - if obj.get("events") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "order": obj.get("order"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "events": [InstanceSnapshotEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "order": obj.get("order"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api_async/models/list_instance_snapshots_reply.py b/koyeb/api_async/models/list_instance_snapshots_reply.py index a887f46c..fe7eca60 100644 --- a/koyeb/api_async/models/list_instance_snapshots_reply.py +++ b/koyeb/api_async/models/list_instance_snapshots_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListInstanceSnapshotsReply(BaseModel): """ ListInstanceSnapshotsReply - """ # noqa: E501 - + """ # noqa: E501 instance_snapshots: Optional[List[InstanceSnapshot]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None count: Optional[StrictInt] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "instance_snapshots", - "limit", - "offset", - "count", - "has_next", - ] + __properties: ClassVar[List[str]] = ["instance_snapshots", "limit", "offset", "count", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListInstanceSnapshotsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,12 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.instance_snapshots: for _item_instance_snapshots in self.instance_snapshots: - _items.append( - _item_instance_snapshots.to_dict() - if _item_instance_snapshots is not None - else None - ) - _dict["instance_snapshots"] = _items + if _item_instance_snapshots: + _items.append(_item_instance_snapshots.to_dict()) + _dict['instance_snapshots'] = _items return _dict @classmethod @@ -101,18 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instance_snapshots": [ - InstanceSnapshot.from_dict(_item) - for _item in obj["instance_snapshots"] - ] - if obj.get("instance_snapshots") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "instance_snapshots": [InstanceSnapshot.from_dict(_item) for _item in obj["instance_snapshots"]] if obj.get("instance_snapshots") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api_async/models/list_instances_reply.py b/koyeb/api_async/models/list_instances_reply.py index 340e74cd..a790eb59 100644 --- a/koyeb/api_async/models/list_instances_reply.py +++ b/koyeb/api_async/models/list_instances_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListInstancesReply(BaseModel): """ ListInstancesReply - """ # noqa: E501 - + """ # noqa: E501 instances: Optional[List[InstanceListItem]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None count: Optional[StrictInt] = None order: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "instances", - "limit", - "offset", - "count", - "order", - ] + __properties: ClassVar[List[str]] = ["instances", "limit", "offset", "count", "order"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListInstancesReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.instances: for _item_instances in self.instances: - _items.append( - _item_instances.to_dict() if _item_instances is not None else None - ) - _dict["instances"] = _items + if _item_instances: + _items.append(_item_instances.to_dict()) + _dict['instances'] = _items return _dict @classmethod @@ -99,17 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instances": [ - InstanceListItem.from_dict(_item) for _item in obj["instances"] - ] - if obj.get("instances") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - "order": obj.get("order"), - } - ) + _obj = cls.model_validate({ + "instances": [InstanceListItem.from_dict(_item) for _item in obj["instances"]] if obj.get("instances") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "order": obj.get("order") + }) return _obj + + diff --git a/koyeb/api_async/models/list_organization_invitations_reply.py b/koyeb/api_async/models/list_organization_invitations_reply.py index 57edbff7..5e39689a 100644 --- a/koyeb/api_async/models/list_organization_invitations_reply.py +++ b/koyeb/api_async/models/list_organization_invitations_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListOrganizationInvitationsReply(BaseModel): """ ListOrganizationInvitationsReply - """ # noqa: E501 - + """ # noqa: E501 invitations: Optional[List[OrganizationInvitation]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListOrganizationInvitationsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,12 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.invitations: for _item_invitations in self.invitations: - _items.append( - _item_invitations.to_dict() - if _item_invitations is not None - else None - ) - _dict["invitations"] = _items + if _item_invitations: + _items.append(_item_invitations.to_dict()) + _dict['invitations'] = _items return _dict @classmethod @@ -94,17 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "invitations": [ - OrganizationInvitation.from_dict(_item) - for _item in obj["invitations"] - ] - if obj.get("invitations") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "invitations": [OrganizationInvitation.from_dict(_item) for _item in obj["invitations"]] if obj.get("invitations") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api_async/models/list_organization_members_reply.py b/koyeb/api_async/models/list_organization_members_reply.py index d19304a7..2447e724 100644 --- a/koyeb/api_async/models/list_organization_members_reply.py +++ b/koyeb/api_async/models/list_organization_members_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListOrganizationMembersReply(BaseModel): """ ListOrganizationMembersReply - """ # noqa: E501 - + """ # noqa: E501 members: Optional[List[OrganizationMember]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListOrganizationMembersReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.members: for _item_members in self.members: - _items.append( - _item_members.to_dict() if _item_members is not None else None - ) - _dict["members"] = _items + if _item_members: + _items.append(_item_members.to_dict()) + _dict['members'] = _items return _dict @classmethod @@ -92,16 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "members": [ - OrganizationMember.from_dict(_item) for _item in obj["members"] - ] - if obj.get("members") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "members": [OrganizationMember.from_dict(_item) for _item in obj["members"]] if obj.get("members") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api_async/models/list_payment_methods_reply.py b/koyeb/api_async/models/list_payment_methods_reply.py index 13473f6e..9f42aa8a 100644 --- a/koyeb/api_async/models/list_payment_methods_reply.py +++ b/koyeb/api_async/models/list_payment_methods_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListPaymentMethodsReply(BaseModel): """ ListPaymentMethodsReply - """ # noqa: E501 - + """ # noqa: E501 payment_methods: Optional[List[PaymentMethod]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListPaymentMethodsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,12 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.payment_methods: for _item_payment_methods in self.payment_methods: - _items.append( - _item_payment_methods.to_dict() - if _item_payment_methods is not None - else None - ) - _dict["payment_methods"] = _items + if _item_payment_methods: + _items.append(_item_payment_methods.to_dict()) + _dict['payment_methods'] = _items return _dict @classmethod @@ -94,16 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "payment_methods": [ - PaymentMethod.from_dict(_item) for _item in obj["payment_methods"] - ] - if obj.get("payment_methods") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "payment_methods": [PaymentMethod.from_dict(_item) for _item in obj["payment_methods"]] if obj.get("payment_methods") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api_async/models/list_persistent_volume_events_reply.py b/koyeb/api_async/models/list_persistent_volume_events_reply.py index febbe7b9..1d1a979e 100644 --- a/koyeb/api_async/models/list_persistent_volume_events_reply.py +++ b/koyeb/api_async/models/list_persistent_volume_events_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListPersistentVolumeEventsReply(BaseModel): """ ListPersistentVolumeEventsReply - """ # noqa: E501 - + """ # noqa: E501 events: Optional[List[PersistentVolumeEvent]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None order: Optional[StrictStr] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "events", - "limit", - "offset", - "order", - "has_next", - ] + __properties: ClassVar[List[str]] = ["events", "limit", "offset", "order", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListPersistentVolumeEventsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.events: for _item_events in self.events: - _items.append( - _item_events.to_dict() if _item_events is not None else None - ) - _dict["events"] = _items + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _items return _dict @classmethod @@ -99,17 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "events": [ - PersistentVolumeEvent.from_dict(_item) for _item in obj["events"] - ] - if obj.get("events") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "order": obj.get("order"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "events": [PersistentVolumeEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "order": obj.get("order"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api_async/models/list_persistent_volumes_reply.py b/koyeb/api_async/models/list_persistent_volumes_reply.py index 8367c279..b475b8cf 100644 --- a/koyeb/api_async/models/list_persistent_volumes_reply.py +++ b/koyeb/api_async/models/list_persistent_volumes_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListPersistentVolumesReply(BaseModel): """ ListPersistentVolumesReply - """ # noqa: E501 - + """ # noqa: E501 volumes: Optional[List[PersistentVolume]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListPersistentVolumesReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.volumes: for _item_volumes in self.volumes: - _items.append( - _item_volumes.to_dict() if _item_volumes is not None else None - ) - _dict["volumes"] = _items + if _item_volumes: + _items.append(_item_volumes.to_dict()) + _dict['volumes'] = _items return _dict @classmethod @@ -92,16 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "volumes": [ - PersistentVolume.from_dict(_item) for _item in obj["volumes"] - ] - if obj.get("volumes") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "volumes": [PersistentVolume.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api_async/models/list_pool_claim_reply.py b/koyeb/api_async/models/list_pool_claim_reply.py index f329b193..4280785b 100644 --- a/koyeb/api_async/models/list_pool_claim_reply.py +++ b/koyeb/api_async/models/list_pool_claim_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListPoolClaimReply(BaseModel): """ ListPoolClaimReply - """ # noqa: E501 - + """ # noqa: E501 claims: Optional[List[PoolClaim]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None count: Optional[StrictInt] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "claims", - "limit", - "offset", - "count", - "has_next", - ] + __properties: ClassVar[List[str]] = ["claims", "limit", "offset", "count", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListPoolClaimReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.claims: for _item_claims in self.claims: - _items.append( - _item_claims.to_dict() if _item_claims is not None else None - ) - _dict["claims"] = _items + if _item_claims: + _items.append(_item_claims.to_dict()) + _dict['claims'] = _items return _dict @classmethod @@ -99,15 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "claims": [PoolClaim.from_dict(_item) for _item in obj["claims"]] - if obj.get("claims") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "claims": [PoolClaim.from_dict(_item) for _item in obj["claims"]] if obj.get("claims") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api_async/models/list_projects_reply.py b/koyeb/api_async/models/list_projects_reply.py index 4257a6d3..bab21b94 100644 --- a/koyeb/api_async/models/list_projects_reply.py +++ b/koyeb/api_async/models/list_projects_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListProjectsReply(BaseModel): """ ListProjectsReply - """ # noqa: E501 - + """ # noqa: E501 projects: Optional[List[Project]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -42,6 +40,7 @@ class ListProjectsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -76,10 +76,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.projects: for _item_projects in self.projects: - _items.append( - _item_projects.to_dict() if _item_projects is not None else None - ) - _dict["projects"] = _items + if _item_projects: + _items.append(_item_projects.to_dict()) + _dict['projects'] = _items return _dict @classmethod @@ -91,13 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "projects": [Project.from_dict(_item) for _item in obj["projects"]] - if obj.get("projects") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - } - ) + _obj = cls.model_validate({ + "projects": [Project.from_dict(_item) for _item in obj["projects"]] if obj.get("projects") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset") + }) return _obj + + diff --git a/koyeb/api_async/models/list_regional_deployment_events_reply.py b/koyeb/api_async/models/list_regional_deployment_events_reply.py index b231ed37..5c057c44 100644 --- a/koyeb/api_async/models/list_regional_deployment_events_reply.py +++ b/koyeb/api_async/models/list_regional_deployment_events_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListRegionalDeploymentEventsReply(BaseModel): """ ListRegionalDeploymentEventsReply - """ # noqa: E501 - + """ # noqa: E501 events: Optional[List[RegionalDeploymentEvent]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None order: Optional[StrictStr] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "events", - "limit", - "offset", - "order", - "has_next", - ] + __properties: ClassVar[List[str]] = ["events", "limit", "offset", "order", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListRegionalDeploymentEventsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.events: for _item_events in self.events: - _items.append( - _item_events.to_dict() if _item_events is not None else None - ) - _dict["events"] = _items + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _items return _dict @classmethod @@ -99,17 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "events": [ - RegionalDeploymentEvent.from_dict(_item) for _item in obj["events"] - ] - if obj.get("events") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "order": obj.get("order"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "events": [RegionalDeploymentEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "order": obj.get("order"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api_async/models/list_regional_deployments_reply.py b/koyeb/api_async/models/list_regional_deployments_reply.py index 9dc49ee8..0a585c15 100644 --- a/koyeb/api_async/models/list_regional_deployments_reply.py +++ b/koyeb/api_async/models/list_regional_deployments_reply.py @@ -19,31 +19,21 @@ from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.regional_deployment_list_item import ( - RegionalDeploymentListItem, -) +from koyeb.api_async.models.regional_deployment_list_item import RegionalDeploymentListItem from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListRegionalDeploymentsReply(BaseModel): """ ListRegionalDeploymentsReply - """ # noqa: E501 - + """ # noqa: E501 regional_deployments: Optional[List[RegionalDeploymentListItem]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None count: Optional[StrictInt] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "regional_deployments", - "limit", - "offset", - "count", - "has_next", - ] + __properties: ClassVar[List[str]] = ["regional_deployments", "limit", "offset", "count", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -52,6 +42,7 @@ class ListRegionalDeploymentsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -75,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -86,12 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.regional_deployments: for _item_regional_deployments in self.regional_deployments: - _items.append( - _item_regional_deployments.to_dict() - if _item_regional_deployments is not None - else None - ) - _dict["regional_deployments"] = _items + if _item_regional_deployments: + _items.append(_item_regional_deployments.to_dict()) + _dict['regional_deployments'] = _items return _dict @classmethod @@ -103,18 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "regional_deployments": [ - RegionalDeploymentListItem.from_dict(_item) - for _item in obj["regional_deployments"] - ] - if obj.get("regional_deployments") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "regional_deployments": [RegionalDeploymentListItem.from_dict(_item) for _item in obj["regional_deployments"]] if obj.get("regional_deployments") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api_async/models/list_regions_reply.py b/koyeb/api_async/models/list_regions_reply.py index 15ed2f2d..3fe99552 100644 --- a/koyeb/api_async/models/list_regions_reply.py +++ b/koyeb/api_async/models/list_regions_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListRegionsReply(BaseModel): """ ListRegionsReply - """ # noqa: E501 - + """ # noqa: E501 regions: Optional[List[RegionListItem]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListRegionsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.regions: for _item_regions in self.regions: - _items.append( - _item_regions.to_dict() if _item_regions is not None else None - ) - _dict["regions"] = _items + if _item_regions: + _items.append(_item_regions.to_dict()) + _dict['regions'] = _items return _dict @classmethod @@ -92,14 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "regions": [RegionListItem.from_dict(_item) for _item in obj["regions"]] - if obj.get("regions") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "regions": [RegionListItem.from_dict(_item) for _item in obj["regions"]] if obj.get("regions") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api_async/models/list_secrets_reply.py b/koyeb/api_async/models/list_secrets_reply.py index 4c6bbd9a..35c42d84 100644 --- a/koyeb/api_async/models/list_secrets_reply.py +++ b/koyeb/api_async/models/list_secrets_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListSecretsReply(BaseModel): """ ListSecretsReply - """ # noqa: E501 - + """ # noqa: E501 secrets: Optional[List[Secret]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListSecretsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.secrets: for _item_secrets in self.secrets: - _items.append( - _item_secrets.to_dict() if _item_secrets is not None else None - ) - _dict["secrets"] = _items + if _item_secrets: + _items.append(_item_secrets.to_dict()) + _dict['secrets'] = _items return _dict @classmethod @@ -92,14 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "secrets": [Secret.from_dict(_item) for _item in obj["secrets"]] - if obj.get("secrets") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "secrets": [Secret.from_dict(_item) for _item in obj["secrets"]] if obj.get("secrets") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api_async/models/list_service_events_reply.py b/koyeb/api_async/models/list_service_events_reply.py index 0d491f5b..d8c3e781 100644 --- a/koyeb/api_async/models/list_service_events_reply.py +++ b/koyeb/api_async/models/list_service_events_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListServiceEventsReply(BaseModel): """ ListServiceEventsReply - """ # noqa: E501 - + """ # noqa: E501 events: Optional[List[ServiceEvent]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None order: Optional[StrictStr] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "events", - "limit", - "offset", - "order", - "has_next", - ] + __properties: ClassVar[List[str]] = ["events", "limit", "offset", "order", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListServiceEventsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.events: for _item_events in self.events: - _items.append( - _item_events.to_dict() if _item_events is not None else None - ) - _dict["events"] = _items + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _items return _dict @classmethod @@ -99,15 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "events": [ServiceEvent.from_dict(_item) for _item in obj["events"]] - if obj.get("events") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "order": obj.get("order"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "events": [ServiceEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "order": obj.get("order"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api_async/models/list_service_pools_reply.py b/koyeb/api_async/models/list_service_pools_reply.py index 4d10fb8f..773b340d 100644 --- a/koyeb/api_async/models/list_service_pools_reply.py +++ b/koyeb/api_async/models/list_service_pools_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListServicePoolsReply(BaseModel): """ ListServicePoolsReply - """ # noqa: E501 - + """ # noqa: E501 service_pools: Optional[List[ServicePool]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None count: Optional[StrictInt] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "service_pools", - "limit", - "offset", - "count", - "has_next", - ] + __properties: ClassVar[List[str]] = ["service_pools", "limit", "offset", "count", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListServicePoolsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,12 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.service_pools: for _item_service_pools in self.service_pools: - _items.append( - _item_service_pools.to_dict() - if _item_service_pools is not None - else None - ) - _dict["service_pools"] = _items + if _item_service_pools: + _items.append(_item_service_pools.to_dict()) + _dict['service_pools'] = _items return _dict @classmethod @@ -101,17 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service_pools": [ - ServicePool.from_dict(_item) for _item in obj["service_pools"] - ] - if obj.get("service_pools") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "service_pools": [ServicePool.from_dict(_item) for _item in obj["service_pools"]] if obj.get("service_pools") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api_async/models/list_services_reply.py b/koyeb/api_async/models/list_services_reply.py index 2e728e73..a76e56c8 100644 --- a/koyeb/api_async/models/list_services_reply.py +++ b/koyeb/api_async/models/list_services_reply.py @@ -24,24 +24,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListServicesReply(BaseModel): """ ListServicesReply - """ # noqa: E501 - + """ # noqa: E501 services: Optional[List[ServiceListItem]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None count: Optional[StrictInt] = None has_next: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "services", - "limit", - "offset", - "count", - "has_next", - ] + __properties: ClassVar[List[str]] = ["services", "limit", "offset", "count", "has_next"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +42,7 @@ class ListServicesReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,10 +78,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.services: for _item_services in self.services: - _items.append( - _item_services.to_dict() if _item_services is not None else None - ) - _dict["services"] = _items + if _item_services: + _items.append(_item_services.to_dict()) + _dict['services'] = _items return _dict @classmethod @@ -99,17 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "services": [ - ServiceListItem.from_dict(_item) for _item in obj["services"] - ] - if obj.get("services") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "services": [ServiceListItem.from_dict(_item) for _item in obj["services"]] if obj.get("services") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api_async/models/list_snapshots_reply.py b/koyeb/api_async/models/list_snapshots_reply.py index 5d45a4d2..7bc53c1d 100644 --- a/koyeb/api_async/models/list_snapshots_reply.py +++ b/koyeb/api_async/models/list_snapshots_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListSnapshotsReply(BaseModel): """ ListSnapshotsReply - """ # noqa: E501 - + """ # noqa: E501 snapshots: Optional[List[Snapshot]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListSnapshotsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,10 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.snapshots: for _item_snapshots in self.snapshots: - _items.append( - _item_snapshots.to_dict() if _item_snapshots is not None else None - ) - _dict["snapshots"] = _items + if _item_snapshots: + _items.append(_item_snapshots.to_dict()) + _dict['snapshots'] = _items return _dict @classmethod @@ -92,14 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "snapshots": [Snapshot.from_dict(_item) for _item in obj["snapshots"]] - if obj.get("snapshots") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "snapshots": [Snapshot.from_dict(_item) for _item in obj["snapshots"]] if obj.get("snapshots") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api_async/models/list_usage_reply.py b/koyeb/api_async/models/list_usage_reply.py index 2e8bd9eb..b7c3b405 100644 --- a/koyeb/api_async/models/list_usage_reply.py +++ b/koyeb/api_async/models/list_usage_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListUsageReply(BaseModel): """ ListUsageReply - """ # noqa: E501 - + """ # noqa: E501 usage: Optional[CatalogUsage] = None __properties: ClassVar[List[str]] = ["usage"] @@ -40,6 +38,7 @@ class ListUsageReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of usage if self.usage: - _dict["usage"] = self.usage.to_dict() + _dict['usage'] = self.usage.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "usage": CatalogUsage.from_dict(obj["usage"]) - if obj.get("usage") is not None - else None - } - ) + _obj = cls.model_validate({ + "usage": CatalogUsage.from_dict(obj["usage"]) if obj.get("usage") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/list_user_organization_invitations_reply.py b/koyeb/api_async/models/list_user_organization_invitations_reply.py index 85c7cce7..11b4b52d 100644 --- a/koyeb/api_async/models/list_user_organization_invitations_reply.py +++ b/koyeb/api_async/models/list_user_organization_invitations_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListUserOrganizationInvitationsReply(BaseModel): """ ListUserOrganizationInvitationsReply - """ # noqa: E501 - + """ # noqa: E501 invitations: Optional[List[OrganizationInvitation]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListUserOrganizationInvitationsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,12 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.invitations: for _item_invitations in self.invitations: - _items.append( - _item_invitations.to_dict() - if _item_invitations is not None - else None - ) - _dict["invitations"] = _items + if _item_invitations: + _items.append(_item_invitations.to_dict()) + _dict['invitations'] = _items return _dict @classmethod @@ -94,17 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "invitations": [ - OrganizationInvitation.from_dict(_item) - for _item in obj["invitations"] - ] - if obj.get("invitations") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - } - ) + _obj = cls.model_validate({ + "invitations": [OrganizationInvitation.from_dict(_item) for _item in obj["invitations"]] if obj.get("invitations") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count") + }) return _obj + + diff --git a/koyeb/api_async/models/list_user_organizations_reply.py b/koyeb/api_async/models/list_user_organizations_reply.py index 66aacb72..75d38b7a 100644 --- a/koyeb/api_async/models/list_user_organizations_reply.py +++ b/koyeb/api_async/models/list_user_organizations_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ListUserOrganizationsReply(BaseModel): """ ListUserOrganizationsReply - """ # noqa: E501 - + """ # noqa: E501 organizations: Optional[List[Organization]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -43,6 +41,7 @@ class ListUserOrganizationsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,12 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.organizations: for _item_organizations in self.organizations: - _items.append( - _item_organizations.to_dict() - if _item_organizations is not None - else None - ) - _dict["organizations"] = _items + if _item_organizations: + _items.append(_item_organizations.to_dict()) + _dict['organizations'] = _items return _dict @classmethod @@ -94,16 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organizations": [ - Organization.from_dict(_item) for _item in obj["organizations"] - ] - if obj.get("organizations") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "has_next": obj.get("has_next"), - } - ) + _obj = cls.model_validate({ + "organizations": [Organization.from_dict(_item) for _item in obj["organizations"]] if obj.get("organizations") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "has_next": obj.get("has_next") + }) return _obj + + diff --git a/koyeb/api_async/models/log_entry.py b/koyeb/api_async/models/log_entry.py index 36b567ed..ab3e7573 100644 --- a/koyeb/api_async/models/log_entry.py +++ b/koyeb/api_async/models/log_entry.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class LogEntry(BaseModel): """ LogEntry - """ # noqa: E501 - + """ # noqa: E501 msg: Optional[StrictStr] = None created_at: Optional[datetime] = None labels: Optional[Dict[str, Any]] = None @@ -42,6 +40,7 @@ class LogEntry(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,11 +83,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "msg": obj.get("msg"), - "created_at": obj.get("created_at"), - "labels": obj.get("labels"), - } - ) + _obj = cls.model_validate({ + "msg": obj.get("msg"), + "created_at": obj.get("created_at"), + "labels": obj.get("labels") + }) return _obj + + diff --git a/koyeb/api_async/models/login_method_reply.py b/koyeb/api_async/models/login_method_reply.py index abf205b6..cbc8efdc 100644 --- a/koyeb/api_async/models/login_method_reply.py +++ b/koyeb/api_async/models/login_method_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class LoginMethodReply(BaseModel): """ LoginMethodReply - """ # noqa: E501 - + """ # noqa: E501 method: Optional[LoginMethodReplyMethod] = LoginMethodReplyMethod.KOYEB __properties: ClassVar[List[str]] = ["method"] @@ -40,6 +38,7 @@ class LoginMethodReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,11 +81,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "method": obj.get("method") - if obj.get("method") is not None - else LoginMethodReplyMethod.KOYEB - } - ) + _obj = cls.model_validate({ + "method": obj.get("method") if obj.get("method") is not None else LoginMethodReplyMethod.KOYEB + }) return _obj + + diff --git a/koyeb/api_async/models/login_method_reply_method.py b/koyeb/api_async/models/login_method_reply_method.py index c8eccaa8..a27e8297 100644 --- a/koyeb/api_async/models/login_method_reply_method.py +++ b/koyeb/api_async/models/login_method_reply_method.py @@ -26,10 +26,12 @@ class LoginMethodReplyMethod(str, Enum): """ allowed enum values """ - KOYEB = "KOYEB" - WORKOS = "WORKOS" + KOYEB = 'KOYEB' + WORKOS = 'WORKOS' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of LoginMethodReplyMethod from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/login_reply.py b/koyeb/api_async/models/login_reply.py index c6156926..fb0e509e 100644 --- a/koyeb/api_async/models/login_reply.py +++ b/koyeb/api_async/models/login_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class LoginReply(BaseModel): """ LoginReply - """ # noqa: E501 - + """ # noqa: E501 token: Optional[Token] = None __properties: ClassVar[List[str]] = ["token"] @@ -40,6 +38,7 @@ class LoginReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of token if self.token: - _dict["token"] = self.token.to_dict() + _dict['token'] = self.token.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "token": Token.from_dict(obj["token"]) - if obj.get("token") is not None - else None - } - ) + _obj = cls.model_validate({ + "token": Token.from_dict(obj["token"]) if obj.get("token") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/login_request.py b/koyeb/api_async/models/login_request.py index e8631098..8d89a070 100644 --- a/koyeb/api_async/models/login_request.py +++ b/koyeb/api_async/models/login_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class LoginRequest(BaseModel): """ LoginRequest - """ # noqa: E501 - + """ # noqa: E501 email: Optional[StrictStr] = None password: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None @@ -41,6 +39,7 @@ class LoginRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "email": obj.get("email"), - "password": obj.get("password"), - "organization_id": obj.get("organization_id"), - } - ) + _obj = cls.model_validate({ + "email": obj.get("email"), + "password": obj.get("password"), + "organization_id": obj.get("organization_id") + }) return _obj + + diff --git a/koyeb/api_async/models/manage_reply.py b/koyeb/api_async/models/manage_reply.py index 8a63ecb1..b997db88 100644 --- a/koyeb/api_async/models/manage_reply.py +++ b/koyeb/api_async/models/manage_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ManageReply(BaseModel): """ ManageReply - """ # noqa: E501 - + """ # noqa: E501 url: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["url"] @@ -39,6 +37,7 @@ class ManageReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"url": obj.get("url")}) + _obj = cls.model_validate({ + "url": obj.get("url") + }) return _obj + + diff --git a/koyeb/api_async/models/manual_service_scaling.py b/koyeb/api_async/models/manual_service_scaling.py index b66c1504..4de83018 100644 --- a/koyeb/api_async/models/manual_service_scaling.py +++ b/koyeb/api_async/models/manual_service_scaling.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ManualServiceScaling(BaseModel): """ ManualServiceScaling - """ # noqa: E501 - + """ # noqa: E501 scopes: Optional[List[StrictStr]] = None instances: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["scopes", "instances"] @@ -40,6 +38,7 @@ class ManualServiceScaling(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"scopes": obj.get("scopes"), "instances": obj.get("instances")} - ) + _obj = cls.model_validate({ + "scopes": obj.get("scopes"), + "instances": obj.get("instances") + }) return _obj + + diff --git a/koyeb/api_async/models/members_summary.py b/koyeb/api_async/models/members_summary.py index 7f8a146e..740fd1f3 100644 --- a/koyeb/api_async/models/members_summary.py +++ b/koyeb/api_async/models/members_summary.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class MembersSummary(BaseModel): """ MembersSummary - """ # noqa: E501 - + """ # noqa: E501 total: Optional[StrictStr] = None invitations_by_status: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["total", "invitations_by_status"] @@ -40,6 +38,7 @@ class MembersSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,10 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "total": obj.get("total"), - "invitations_by_status": obj.get("invitations_by_status"), - } - ) + _obj = cls.model_validate({ + "total": obj.get("total"), + "invitations_by_status": obj.get("invitations_by_status") + }) return _obj + + diff --git a/koyeb/api_async/models/mesh.py b/koyeb/api_async/models/mesh.py index 69e08f88..f6625a3a 100644 --- a/koyeb/api_async/models/mesh.py +++ b/koyeb/api_async/models/mesh.py @@ -24,17 +24,12 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Mesh(BaseModel): """ Mesh groups the mesh scope selector and the (optional) custom mesh name. Kept inside NetworkPolicy so scope/name and other network-policy dimensions (egress, future inbound) live together. - """ # noqa: E501 - + """ # noqa: E501 scope: Optional[MeshScope] = MeshScope.MESH_SCOPE_UNSPECIFIED - name: Optional[StrictStr] = Field( - default=None, - description="Custom mesh name — required when scope is MESH_SCOPE_CUSTOM, ignored otherwise. Combined with the workspace ID server-side to ensure the same custom name in different workspaces never collides.", - ) + name: Optional[StrictStr] = Field(default=None, description="Custom mesh name — required when scope is MESH_SCOPE_CUSTOM, ignored otherwise. Combined with the workspace ID server-side to ensure the same custom name in different workspaces never collides.") __properties: ClassVar[List[str]] = ["scope", "name"] model_config = ConfigDict( @@ -44,6 +39,7 @@ class Mesh(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -85,12 +82,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "scope": obj.get("scope") - if obj.get("scope") is not None - else MeshScope.MESH_SCOPE_UNSPECIFIED, - "name": obj.get("name"), - } - ) + _obj = cls.model_validate({ + "scope": obj.get("scope") if obj.get("scope") is not None else MeshScope.MESH_SCOPE_UNSPECIFIED, + "name": obj.get("name") + }) return _obj + + diff --git a/koyeb/api_async/models/mesh_scope.py b/koyeb/api_async/models/mesh_scope.py index 09c58074..c43773aa 100644 --- a/koyeb/api_async/models/mesh_scope.py +++ b/koyeb/api_async/models/mesh_scope.py @@ -26,13 +26,15 @@ class MeshScope(str, Enum): """ allowed enum values """ - MESH_SCOPE_UNSPECIFIED = "MESH_SCOPE_UNSPECIFIED" - MESH_SCOPE_ORGANIZATION = "MESH_SCOPE_ORGANIZATION" - MESH_SCOPE_WORKSPACE = "MESH_SCOPE_WORKSPACE" - MESH_SCOPE_APP = "MESH_SCOPE_APP" - MESH_SCOPE_CUSTOM = "MESH_SCOPE_CUSTOM" + MESH_SCOPE_UNSPECIFIED = 'MESH_SCOPE_UNSPECIFIED' + MESH_SCOPE_ORGANIZATION = 'MESH_SCOPE_ORGANIZATION' + MESH_SCOPE_WORKSPACE = 'MESH_SCOPE_WORKSPACE' + MESH_SCOPE_APP = 'MESH_SCOPE_APP' + MESH_SCOPE_CUSTOM = 'MESH_SCOPE_CUSTOM' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of MeshScope from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/metric_name.py b/koyeb/api_async/models/metric_name.py index 04fe8f9c..34f66cf4 100644 --- a/koyeb/api_async/models/metric_name.py +++ b/koyeb/api_async/models/metric_name.py @@ -26,18 +26,20 @@ class MetricName(str, Enum): """ allowed enum values """ - UNKNOWN = "UNKNOWN" - CPU_TOTAL_PERCENT = "CPU_TOTAL_PERCENT" - MEM_RSS = "MEM_RSS" - HTTP_THROUGHPUT = "HTTP_THROUGHPUT" - HTTP_RESPONSE_TIME_50_P = "HTTP_RESPONSE_TIME_50P" - HTTP_RESPONSE_TIME_90_P = "HTTP_RESPONSE_TIME_90P" - HTTP_RESPONSE_TIME_99_P = "HTTP_RESPONSE_TIME_99P" - HTTP_RESPONSE_TIME_MAX = "HTTP_RESPONSE_TIME_MAX" - PUBLIC_DATA_TRANSFER_IN = "PUBLIC_DATA_TRANSFER_IN" - PUBLIC_DATA_TRANSFER_OUT = "PUBLIC_DATA_TRANSFER_OUT" + UNKNOWN = 'UNKNOWN' + CPU_TOTAL_PERCENT = 'CPU_TOTAL_PERCENT' + MEM_RSS = 'MEM_RSS' + HTTP_THROUGHPUT = 'HTTP_THROUGHPUT' + HTTP_RESPONSE_TIME_50_P = 'HTTP_RESPONSE_TIME_50P' + HTTP_RESPONSE_TIME_90_P = 'HTTP_RESPONSE_TIME_90P' + HTTP_RESPONSE_TIME_99_P = 'HTTP_RESPONSE_TIME_99P' + HTTP_RESPONSE_TIME_MAX = 'HTTP_RESPONSE_TIME_MAX' + PUBLIC_DATA_TRANSFER_IN = 'PUBLIC_DATA_TRANSFER_IN' + PUBLIC_DATA_TRANSFER_OUT = 'PUBLIC_DATA_TRANSFER_OUT' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of MetricName from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/neon_postgres_database.py b/koyeb/api_async/models/neon_postgres_database.py index 4efa531f..84b7f8b8 100644 --- a/koyeb/api_async/models/neon_postgres_database.py +++ b/koyeb/api_async/models/neon_postgres_database.py @@ -19,34 +19,22 @@ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.neon_postgres_database_neon_database import ( - NeonPostgresDatabaseNeonDatabase, -) -from koyeb.api_async.models.neon_postgres_database_neon_role import ( - NeonPostgresDatabaseNeonRole, -) +from koyeb.api_async.models.neon_postgres_database_neon_database import NeonPostgresDatabaseNeonDatabase +from koyeb.api_async.models.neon_postgres_database_neon_role import NeonPostgresDatabaseNeonRole from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class NeonPostgresDatabase(BaseModel): """ NeonPostgresDatabase - """ # noqa: E501 - + """ # noqa: E501 pg_version: Optional[StrictInt] = None region: Optional[StrictStr] = None instance_type: Optional[StrictStr] = None roles: Optional[List[NeonPostgresDatabaseNeonRole]] = None databases: Optional[List[NeonPostgresDatabaseNeonDatabase]] = None - __properties: ClassVar[List[str]] = [ - "pg_version", - "region", - "instance_type", - "roles", - "databases", - ] + __properties: ClassVar[List[str]] = ["pg_version", "region", "instance_type", "roles", "databases"] model_config = ConfigDict( validate_by_name=True, @@ -55,6 +43,7 @@ class NeonPostgresDatabase(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -78,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -89,18 +79,16 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.roles: for _item_roles in self.roles: - _items.append( - _item_roles.to_dict() if _item_roles is not None else None - ) - _dict["roles"] = _items + if _item_roles: + _items.append(_item_roles.to_dict()) + _dict['roles'] = _items # override the default output from pydantic by calling `to_dict()` of each item in databases (list) _items = [] if self.databases: for _item_databases in self.databases: - _items.append( - _item_databases.to_dict() if _item_databases is not None else None - ) - _dict["databases"] = _items + if _item_databases: + _items.append(_item_databases.to_dict()) + _dict['databases'] = _items return _dict @classmethod @@ -112,23 +100,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "pg_version": obj.get("pg_version"), - "region": obj.get("region"), - "instance_type": obj.get("instance_type"), - "roles": [ - NeonPostgresDatabaseNeonRole.from_dict(_item) - for _item in obj["roles"] - ] - if obj.get("roles") is not None - else None, - "databases": [ - NeonPostgresDatabaseNeonDatabase.from_dict(_item) - for _item in obj["databases"] - ] - if obj.get("databases") is not None - else None, - } - ) + _obj = cls.model_validate({ + "pg_version": obj.get("pg_version"), + "region": obj.get("region"), + "instance_type": obj.get("instance_type"), + "roles": [NeonPostgresDatabaseNeonRole.from_dict(_item) for _item in obj["roles"]] if obj.get("roles") is not None else None, + "databases": [NeonPostgresDatabaseNeonDatabase.from_dict(_item) for _item in obj["databases"]] if obj.get("databases") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/neon_postgres_database_deployment_metadata.py b/koyeb/api_async/models/neon_postgres_database_deployment_metadata.py index 8319b37b..a17b3601 100644 --- a/koyeb/api_async/models/neon_postgres_database_deployment_metadata.py +++ b/koyeb/api_async/models/neon_postgres_database_deployment_metadata.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NeonPostgresDatabaseDeploymentMetadata(BaseModel): """ NeonPostgresDatabaseDeploymentMetadata - """ # noqa: E501 - + """ # noqa: E501 reset_role_passwords: Optional[List[StrictStr]] = None __properties: ClassVar[List[str]] = ["reset_role_passwords"] @@ -39,6 +37,7 @@ class NeonPostgresDatabaseDeploymentMetadata(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,7 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"reset_role_passwords": obj.get("reset_role_passwords")} - ) + _obj = cls.model_validate({ + "reset_role_passwords": obj.get("reset_role_passwords") + }) return _obj + + diff --git a/koyeb/api_async/models/neon_postgres_database_neon_database.py b/koyeb/api_async/models/neon_postgres_database_neon_database.py index 92ee9a8d..43beaaa5 100644 --- a/koyeb/api_async/models/neon_postgres_database_neon_database.py +++ b/koyeb/api_async/models/neon_postgres_database_neon_database.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NeonPostgresDatabaseNeonDatabase(BaseModel): """ NeonPostgresDatabaseNeonDatabase - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None owner: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name", "owner"] @@ -40,6 +38,7 @@ class NeonPostgresDatabaseNeonDatabase(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,5 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"name": obj.get("name"), "owner": obj.get("owner")}) + _obj = cls.model_validate({ + "name": obj.get("name"), + "owner": obj.get("owner") + }) return _obj + + diff --git a/koyeb/api_async/models/neon_postgres_database_neon_role.py b/koyeb/api_async/models/neon_postgres_database_neon_role.py index 197ccfca..bfd2d65a 100644 --- a/koyeb/api_async/models/neon_postgres_database_neon_role.py +++ b/koyeb/api_async/models/neon_postgres_database_neon_role.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NeonPostgresDatabaseNeonRole(BaseModel): """ NeonPostgresDatabaseNeonRole - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None secret: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name", "secret"] @@ -40,6 +38,7 @@ class NeonPostgresDatabaseNeonRole(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"name": obj.get("name"), "secret": obj.get("secret")} - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "secret": obj.get("secret") + }) return _obj + + diff --git a/koyeb/api_async/models/neon_postgres_summary.py b/koyeb/api_async/models/neon_postgres_summary.py index 1498922b..8994a6b2 100644 --- a/koyeb/api_async/models/neon_postgres_summary.py +++ b/koyeb/api_async/models/neon_postgres_summary.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NeonPostgresSummary(BaseModel): """ NeonPostgresSummary - """ # noqa: E501 - + """ # noqa: E501 total: Optional[StrictStr] = None by_instance_type: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["total", "by_instance_type"] @@ -40,6 +38,7 @@ class NeonPostgresSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"total": obj.get("total"), "by_instance_type": obj.get("by_instance_type")} - ) + _obj = cls.model_validate({ + "total": obj.get("total"), + "by_instance_type": obj.get("by_instance_type") + }) return _obj + + diff --git a/koyeb/api_async/models/network_policy.py b/koyeb/api_async/models/network_policy.py index 3a4264b0..6010c9bb 100644 --- a/koyeb/api_async/models/network_policy.py +++ b/koyeb/api_async/models/network_policy.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NetworkPolicy(BaseModel): """ NetworkPolicy - """ # noqa: E501 - + """ # noqa: E501 egress: Optional[EgressPolicy] = None mesh: Optional[Mesh] = None __properties: ClassVar[List[str]] = ["egress", "mesh"] @@ -42,6 +40,7 @@ class NetworkPolicy(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,10 +74,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of egress if self.egress: - _dict["egress"] = self.egress.to_dict() + _dict['egress'] = self.egress.to_dict() # override the default output from pydantic by calling `to_dict()` of mesh if self.mesh: - _dict["mesh"] = self.mesh.to_dict() + _dict['mesh'] = self.mesh.to_dict() return _dict @classmethod @@ -89,14 +89,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "egress": EgressPolicy.from_dict(obj["egress"]) - if obj.get("egress") is not None - else None, - "mesh": Mesh.from_dict(obj["mesh"]) - if obj.get("mesh") is not None - else None, - } - ) + _obj = cls.model_validate({ + "egress": EgressPolicy.from_dict(obj["egress"]) if obj.get("egress") is not None else None, + "mesh": Mesh.from_dict(obj["mesh"]) if obj.get("mesh") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/network_policy_destination.py b/koyeb/api_async/models/network_policy_destination.py index 74819999..d56457b4 100644 --- a/koyeb/api_async/models/network_policy_destination.py +++ b/koyeb/api_async/models/network_policy_destination.py @@ -23,16 +23,11 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NetworkPolicyDestination(BaseModel): """ NetworkPolicyDestination - """ # noqa: E501 - - cidr: Optional[StrictStr] = Field( - default=None, - description='IPv4 or IPv6 CIDR (e.g. "10.0.0.0/8", "2001:db8::/32"). Bare IPs are accepted at the API boundary and normalized to /32 (IPv4) or /128 (IPv6) before storage.', - ) + """ # noqa: E501 + cidr: Optional[StrictStr] = Field(default=None, description="IPv4 or IPv6 CIDR (e.g. \"10.0.0.0/8\", \"2001:db8::/32\"). Bare IPs are accepted at the API boundary and normalized to /32 (IPv4) or /128 (IPv6) before storage.") __properties: ClassVar[List[str]] = ["cidr"] model_config = ConfigDict( @@ -42,6 +37,7 @@ class NetworkPolicyDestination(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"cidr": obj.get("cidr")}) + _obj = cls.model_validate({ + "cidr": obj.get("cidr") + }) return _obj + + diff --git a/koyeb/api_async/models/next_invoice_reply.py b/koyeb/api_async/models/next_invoice_reply.py index cb612bcd..3feb4ae9 100644 --- a/koyeb/api_async/models/next_invoice_reply.py +++ b/koyeb/api_async/models/next_invoice_reply.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NextInvoiceReply(BaseModel): """ NextInvoiceReply - """ # noqa: E501 - + """ # noqa: E501 stripe_invoice: Optional[Dict[str, Any]] = None lines: Optional[List[NextInvoiceReplyLine]] = None discounts: Optional[List[NextInvoiceReplyDiscount]] = None @@ -43,6 +41,7 @@ class NextInvoiceReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,18 +77,16 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.lines: for _item_lines in self.lines: - _items.append( - _item_lines.to_dict() if _item_lines is not None else None - ) - _dict["lines"] = _items + if _item_lines: + _items.append(_item_lines.to_dict()) + _dict['lines'] = _items # override the default output from pydantic by calling `to_dict()` of each item in discounts (list) _items = [] if self.discounts: for _item_discounts in self.discounts: - _items.append( - _item_discounts.to_dict() if _item_discounts is not None else None - ) - _dict["discounts"] = _items + if _item_discounts: + _items.append(_item_discounts.to_dict()) + _dict['discounts'] = _items return _dict @classmethod @@ -100,20 +98,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "stripe_invoice": obj.get("stripe_invoice"), - "lines": [ - NextInvoiceReplyLine.from_dict(_item) for _item in obj["lines"] - ] - if obj.get("lines") is not None - else None, - "discounts": [ - NextInvoiceReplyDiscount.from_dict(_item) - for _item in obj["discounts"] - ] - if obj.get("discounts") is not None - else None, - } - ) + _obj = cls.model_validate({ + "stripe_invoice": obj.get("stripe_invoice"), + "lines": [NextInvoiceReplyLine.from_dict(_item) for _item in obj["lines"]] if obj.get("lines") is not None else None, + "discounts": [NextInvoiceReplyDiscount.from_dict(_item) for _item in obj["discounts"]] if obj.get("discounts") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/next_invoice_reply_discount.py b/koyeb/api_async/models/next_invoice_reply_discount.py index bb75d9a5..79cd0b9a 100644 --- a/koyeb/api_async/models/next_invoice_reply_discount.py +++ b/koyeb/api_async/models/next_invoice_reply_discount.py @@ -19,22 +19,16 @@ from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.next_invoice_reply_discount_type import ( - NextInvoiceReplyDiscountType, -) +from koyeb.api_async.models.next_invoice_reply_discount_type import NextInvoiceReplyDiscountType from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class NextInvoiceReplyDiscount(BaseModel): """ NextInvoiceReplyDiscount - """ # noqa: E501 - - type: Optional[ - NextInvoiceReplyDiscountType - ] = NextInvoiceReplyDiscountType.PERCENT_OFF + """ # noqa: E501 + type: Optional[NextInvoiceReplyDiscountType] = NextInvoiceReplyDiscountType.PERCENT_OFF name: Optional[StrictStr] = None amount: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["type", "name", "amount"] @@ -46,6 +40,7 @@ class NextInvoiceReplyDiscount(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -87,13 +83,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "type": obj.get("type") - if obj.get("type") is not None - else NextInvoiceReplyDiscountType.PERCENT_OFF, - "name": obj.get("name"), - "amount": obj.get("amount"), - } - ) + _obj = cls.model_validate({ + "type": obj.get("type") if obj.get("type") is not None else NextInvoiceReplyDiscountType.PERCENT_OFF, + "name": obj.get("name"), + "amount": obj.get("amount") + }) return _obj + + diff --git a/koyeb/api_async/models/next_invoice_reply_discount_type.py b/koyeb/api_async/models/next_invoice_reply_discount_type.py index 1e4d17b9..482f2960 100644 --- a/koyeb/api_async/models/next_invoice_reply_discount_type.py +++ b/koyeb/api_async/models/next_invoice_reply_discount_type.py @@ -26,10 +26,12 @@ class NextInvoiceReplyDiscountType(str, Enum): """ allowed enum values """ - PERCENT_OFF = "PERCENT_OFF" - AMOUNT_OFF = "AMOUNT_OFF" + PERCENT_OFF = 'PERCENT_OFF' + AMOUNT_OFF = 'AMOUNT_OFF' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of NextInvoiceReplyDiscountType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/next_invoice_reply_line.py b/koyeb/api_async/models/next_invoice_reply_line.py index 6599f3d1..ae9639bc 100644 --- a/koyeb/api_async/models/next_invoice_reply_line.py +++ b/koyeb/api_async/models/next_invoice_reply_line.py @@ -19,34 +19,22 @@ from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.next_invoice_reply_line_period import ( - NextInvoiceReplyLinePeriod, -) -from koyeb.api_async.models.next_invoice_reply_line_price import ( - NextInvoiceReplyLinePrice, -) +from koyeb.api_async.models.next_invoice_reply_line_period import NextInvoiceReplyLinePeriod +from koyeb.api_async.models.next_invoice_reply_line_price import NextInvoiceReplyLinePrice from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class NextInvoiceReplyLine(BaseModel): """ NextInvoiceReplyLine - """ # noqa: E501 - + """ # noqa: E501 amount_excluding_tax: Optional[StrictInt] = None period: Optional[NextInvoiceReplyLinePeriod] = None plan_nickname: Optional[StrictStr] = None price: Optional[NextInvoiceReplyLinePrice] = None quantity: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = [ - "amount_excluding_tax", - "period", - "plan_nickname", - "price", - "quantity", - ] + __properties: ClassVar[List[str]] = ["amount_excluding_tax", "period", "plan_nickname", "price", "quantity"] model_config = ConfigDict( validate_by_name=True, @@ -55,6 +43,7 @@ class NextInvoiceReplyLine(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -78,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -87,10 +77,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of period if self.period: - _dict["period"] = self.period.to_dict() + _dict['period'] = self.period.to_dict() # override the default output from pydantic by calling `to_dict()` of price if self.price: - _dict["price"] = self.price.to_dict() + _dict['price'] = self.price.to_dict() return _dict @classmethod @@ -102,17 +92,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "amount_excluding_tax": obj.get("amount_excluding_tax"), - "period": NextInvoiceReplyLinePeriod.from_dict(obj["period"]) - if obj.get("period") is not None - else None, - "plan_nickname": obj.get("plan_nickname"), - "price": NextInvoiceReplyLinePrice.from_dict(obj["price"]) - if obj.get("price") is not None - else None, - "quantity": obj.get("quantity"), - } - ) + _obj = cls.model_validate({ + "amount_excluding_tax": obj.get("amount_excluding_tax"), + "period": NextInvoiceReplyLinePeriod.from_dict(obj["period"]) if obj.get("period") is not None else None, + "plan_nickname": obj.get("plan_nickname"), + "price": NextInvoiceReplyLinePrice.from_dict(obj["price"]) if obj.get("price") is not None else None, + "quantity": obj.get("quantity") + }) return _obj + + diff --git a/koyeb/api_async/models/next_invoice_reply_line_period.py b/koyeb/api_async/models/next_invoice_reply_line_period.py index 2ab5705c..df3334a7 100644 --- a/koyeb/api_async/models/next_invoice_reply_line_period.py +++ b/koyeb/api_async/models/next_invoice_reply_line_period.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NextInvoiceReplyLinePeriod(BaseModel): """ NextInvoiceReplyLinePeriod - """ # noqa: E501 - + """ # noqa: E501 start: Optional[datetime] = None end: Optional[datetime] = None __properties: ClassVar[List[str]] = ["start", "end"] @@ -41,6 +39,7 @@ class NextInvoiceReplyLinePeriod(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,5 +82,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"start": obj.get("start"), "end": obj.get("end")}) + _obj = cls.model_validate({ + "start": obj.get("start"), + "end": obj.get("end") + }) return _obj + + diff --git a/koyeb/api_async/models/next_invoice_reply_line_price.py b/koyeb/api_async/models/next_invoice_reply_line_price.py index f63eab5a..9ef340d7 100644 --- a/koyeb/api_async/models/next_invoice_reply_line_price.py +++ b/koyeb/api_async/models/next_invoice_reply_line_price.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NextInvoiceReplyLinePrice(BaseModel): """ NextInvoiceReplyLinePrice - """ # noqa: E501 - + """ # noqa: E501 unit_amount_decimal: Optional[Union[StrictFloat, StrictInt]] = None __properties: ClassVar[List[str]] = ["unit_amount_decimal"] @@ -39,6 +37,7 @@ class NextInvoiceReplyLinePrice(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,7 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"unit_amount_decimal": obj.get("unit_amount_decimal")} - ) + _obj = cls.model_validate({ + "unit_amount_decimal": obj.get("unit_amount_decimal") + }) return _obj + + diff --git a/koyeb/api_async/models/notification.py b/koyeb/api_async/models/notification.py index b51fca1b..23f8d079 100644 --- a/koyeb/api_async/models/notification.py +++ b/koyeb/api_async/models/notification.py @@ -25,24 +25,16 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Notification(BaseModel): """ Notification - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None activity: Optional[Activity] = None is_read: Optional[StrictBool] = None is_seen: Optional[StrictBool] = None created_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = [ - "id", - "activity", - "is_read", - "is_seen", - "created_at", - ] + __properties: ClassVar[List[str]] = ["id", "activity", "is_read", "is_seen", "created_at"] model_config = ConfigDict( validate_by_name=True, @@ -51,6 +43,7 @@ class Notification(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of activity if self.activity: - _dict["activity"] = self.activity.to_dict() + _dict['activity'] = self.activity.to_dict() return _dict @classmethod @@ -95,15 +89,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "activity": Activity.from_dict(obj["activity"]) - if obj.get("activity") is not None - else None, - "is_read": obj.get("is_read"), - "is_seen": obj.get("is_seen"), - "created_at": obj.get("created_at"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "activity": Activity.from_dict(obj["activity"]) if obj.get("activity") is not None else None, + "is_read": obj.get("is_read"), + "is_seen": obj.get("is_seen"), + "created_at": obj.get("created_at") + }) return _obj + + diff --git a/koyeb/api_async/models/notification_list.py b/koyeb/api_async/models/notification_list.py index 39f76de1..9d6dcdf6 100644 --- a/koyeb/api_async/models/notification_list.py +++ b/koyeb/api_async/models/notification_list.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class NotificationList(BaseModel): """ NotificationList - """ # noqa: E501 - + """ # noqa: E501 notifications: Optional[List[Notification]] = None limit: Optional[StrictInt] = None offset: Optional[StrictInt] = None @@ -38,16 +36,7 @@ class NotificationList(BaseModel): is_seen: Optional[StrictBool] = None unread: Optional[StrictInt] = None unseen: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = [ - "notifications", - "limit", - "offset", - "count", - "is_read", - "is_seen", - "unread", - "unseen", - ] + __properties: ClassVar[List[str]] = ["notifications", "limit", "offset", "count", "is_read", "is_seen", "unread", "unseen"] model_config = ConfigDict( validate_by_name=True, @@ -56,6 +45,7 @@ class NotificationList(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -79,7 +69,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -90,12 +81,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.notifications: for _item_notifications in self.notifications: - _items.append( - _item_notifications.to_dict() - if _item_notifications is not None - else None - ) - _dict["notifications"] = _items + if _item_notifications: + _items.append(_item_notifications.to_dict()) + _dict['notifications'] = _items return _dict @classmethod @@ -107,20 +95,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "notifications": [ - Notification.from_dict(_item) for _item in obj["notifications"] - ] - if obj.get("notifications") is not None - else None, - "limit": obj.get("limit"), - "offset": obj.get("offset"), - "count": obj.get("count"), - "is_read": obj.get("is_read"), - "is_seen": obj.get("is_seen"), - "unread": obj.get("unread"), - "unseen": obj.get("unseen"), - } - ) + _obj = cls.model_validate({ + "notifications": [Notification.from_dict(_item) for _item in obj["notifications"]] if obj.get("notifications") is not None else None, + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "count": obj.get("count"), + "is_read": obj.get("is_read"), + "is_seen": obj.get("is_seen"), + "unread": obj.get("unread"), + "unseen": obj.get("unseen") + }) return _obj + + diff --git a/koyeb/api_async/models/o_auth_callback_reply.py b/koyeb/api_async/models/o_auth_callback_reply.py index 78b81071..10c18893 100644 --- a/koyeb/api_async/models/o_auth_callback_reply.py +++ b/koyeb/api_async/models/o_auth_callback_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class OAuthCallbackReply(BaseModel): """ OAuthCallbackReply - """ # noqa: E501 - + """ # noqa: E501 token: Optional[Token] = None __properties: ClassVar[List[str]] = ["token"] @@ -40,6 +38,7 @@ class OAuthCallbackReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of token if self.token: - _dict["token"] = self.token.to_dict() + _dict['token'] = self.token.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "token": Token.from_dict(obj["token"]) - if obj.get("token") is not None - else None - } - ) + _obj = cls.model_validate({ + "token": Token.from_dict(obj["token"]) if obj.get("token") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/o_auth_callback_request.py b/koyeb/api_async/models/o_auth_callback_request.py index 62512cc5..651da98e 100644 --- a/koyeb/api_async/models/o_auth_callback_request.py +++ b/koyeb/api_async/models/o_auth_callback_request.py @@ -23,28 +23,15 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class OAuthCallbackRequest(BaseModel): """ OAuthCallbackRequest - """ # noqa: E501 - + """ # noqa: E501 state: Optional[StrictStr] = None code: Optional[StrictStr] = None - setup_action: Optional[StrictStr] = Field( - default=None, - description="setup_action is populated in the context of a GitHub app installation request. For logins and signups, it is not set.", - ) - installation_id: Optional[StrictStr] = Field( - default=None, - description="installation_id is populated in the context of a GitHub app installation request. For logins and signups, it is not set.", - ) - __properties: ClassVar[List[str]] = [ - "state", - "code", - "setup_action", - "installation_id", - ] + setup_action: Optional[StrictStr] = Field(default=None, description="setup_action is populated in the context of a GitHub app installation request. For logins and signups, it is not set.") + installation_id: Optional[StrictStr] = Field(default=None, description="installation_id is populated in the context of a GitHub app installation request. For logins and signups, it is not set.") + __properties: ClassVar[List[str]] = ["state", "code", "setup_action", "installation_id"] model_config = ConfigDict( validate_by_name=True, @@ -53,6 +40,7 @@ class OAuthCallbackRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -76,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -94,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "state": obj.get("state"), - "code": obj.get("code"), - "setup_action": obj.get("setup_action"), - "installation_id": obj.get("installation_id"), - } - ) + _obj = cls.model_validate({ + "state": obj.get("state"), + "code": obj.get("code"), + "setup_action": obj.get("setup_action"), + "installation_id": obj.get("installation_id") + }) return _obj + + diff --git a/koyeb/api_async/models/o_auth_provider.py b/koyeb/api_async/models/o_auth_provider.py index 62da2980..5d3417f6 100644 --- a/koyeb/api_async/models/o_auth_provider.py +++ b/koyeb/api_async/models/o_auth_provider.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class OAuthProvider(BaseModel): """ OAuthProvider - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None url: Optional[StrictStr] = None state: Optional[StrictStr] = None @@ -41,6 +39,7 @@ class OAuthProvider(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,7 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"id": obj.get("id"), "url": obj.get("url"), "state": obj.get("state")} - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "url": obj.get("url"), + "state": obj.get("state") + }) return _obj + + diff --git a/koyeb/api_async/models/object.py b/koyeb/api_async/models/object.py index ae4edf2a..b89598e3 100644 --- a/koyeb/api_async/models/object.py +++ b/koyeb/api_async/models/object.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Object(BaseModel): """ Object - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None type: Optional[StrictStr] = None @@ -43,6 +41,7 @@ class Object(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -84,13 +84,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "type": obj.get("type"), - "metadata": obj.get("metadata"), - "deleted": obj.get("deleted"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "metadata": obj.get("metadata"), + "deleted": obj.get("deleted") + }) return _obj + + diff --git a/koyeb/api_async/models/organization.py b/koyeb/api_async/models/organization.py index bf99cde9..e1cfa0f0 100644 --- a/koyeb/api_async/models/organization.py +++ b/koyeb/api_async/models/organization.py @@ -20,24 +20,18 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.organization_deactivation_reason import ( - OrganizationDeactivationReason, -) -from koyeb.api_async.models.organization_detailed_status import ( - OrganizationDetailedStatus, -) +from koyeb.api_async.models.organization_deactivation_reason import OrganizationDeactivationReason +from koyeb.api_async.models.organization_detailed_status import OrganizationDetailedStatus from koyeb.api_async.models.organization_status import OrganizationStatus from koyeb.api_async.models.plan import Plan from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class Organization(BaseModel): """ Organization - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None external_id: Optional[StrictStr] = None provisioning: Optional[StrictBool] = None @@ -60,12 +54,8 @@ class Organization(BaseModel): latest_subscription_id: Optional[StrictStr] = None signup_qualification: Optional[Dict[str, Any]] = None status: Optional[OrganizationStatus] = OrganizationStatus.WARNING - status_message: Optional[ - OrganizationDetailedStatus - ] = OrganizationDetailedStatus.NEW - deactivation_reason: Optional[ - OrganizationDeactivationReason - ] = OrganizationDeactivationReason.INVALID + status_message: Optional[OrganizationDetailedStatus] = OrganizationDetailedStatus.NEW + deactivation_reason: Optional[OrganizationDeactivationReason] = OrganizationDeactivationReason.INVALID verified: Optional[StrictBool] = None qualifies_for_hobby23: Optional[StrictBool] = None reprocess_after: Optional[datetime] = None @@ -74,40 +64,7 @@ class Organization(BaseModel): trial_ends_at: Optional[datetime] = None email_domain_allowlist: Optional[List[StrictStr]] = None default_project_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "external_id", - "provisioning", - "address1", - "address2", - "city", - "postal_code", - "state", - "country", - "company", - "vat_number", - "billing_name", - "billing_email", - "name", - "plan", - "plan_updated_at", - "has_payment_method", - "subscription_id", - "current_subscription_id", - "latest_subscription_id", - "signup_qualification", - "status", - "status_message", - "deactivation_reason", - "verified", - "qualifies_for_hobby23", - "reprocess_after", - "trialing", - "trial_starts_at", - "trial_ends_at", - "email_domain_allowlist", - "default_project_id", - ] + __properties: ClassVar[List[str]] = ["id", "external_id", "provisioning", "address1", "address2", "city", "postal_code", "state", "country", "company", "vat_number", "billing_name", "billing_email", "name", "plan", "plan_updated_at", "has_payment_method", "subscription_id", "current_subscription_id", "latest_subscription_id", "signup_qualification", "status", "status_message", "deactivation_reason", "verified", "qualifies_for_hobby23", "reprocess_after", "trialing", "trial_starts_at", "trial_ends_at", "email_domain_allowlist", "default_project_id"] model_config = ConfigDict( validate_by_name=True, @@ -116,6 +73,7 @@ class Organization(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -139,7 +97,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -157,46 +116,40 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "external_id": obj.get("external_id"), - "provisioning": obj.get("provisioning"), - "address1": obj.get("address1"), - "address2": obj.get("address2"), - "city": obj.get("city"), - "postal_code": obj.get("postal_code"), - "state": obj.get("state"), - "country": obj.get("country"), - "company": obj.get("company"), - "vat_number": obj.get("vat_number"), - "billing_name": obj.get("billing_name"), - "billing_email": obj.get("billing_email"), - "name": obj.get("name"), - "plan": obj.get("plan") if obj.get("plan") is not None else Plan.HOBBY, - "plan_updated_at": obj.get("plan_updated_at"), - "has_payment_method": obj.get("has_payment_method"), - "subscription_id": obj.get("subscription_id"), - "current_subscription_id": obj.get("current_subscription_id"), - "latest_subscription_id": obj.get("latest_subscription_id"), - "signup_qualification": obj.get("signup_qualification"), - "status": obj.get("status") - if obj.get("status") is not None - else OrganizationStatus.WARNING, - "status_message": obj.get("status_message") - if obj.get("status_message") is not None - else OrganizationDetailedStatus.NEW, - "deactivation_reason": obj.get("deactivation_reason") - if obj.get("deactivation_reason") is not None - else OrganizationDeactivationReason.INVALID, - "verified": obj.get("verified"), - "qualifies_for_hobby23": obj.get("qualifies_for_hobby23"), - "reprocess_after": obj.get("reprocess_after"), - "trialing": obj.get("trialing"), - "trial_starts_at": obj.get("trial_starts_at"), - "trial_ends_at": obj.get("trial_ends_at"), - "email_domain_allowlist": obj.get("email_domain_allowlist"), - "default_project_id": obj.get("default_project_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "external_id": obj.get("external_id"), + "provisioning": obj.get("provisioning"), + "address1": obj.get("address1"), + "address2": obj.get("address2"), + "city": obj.get("city"), + "postal_code": obj.get("postal_code"), + "state": obj.get("state"), + "country": obj.get("country"), + "company": obj.get("company"), + "vat_number": obj.get("vat_number"), + "billing_name": obj.get("billing_name"), + "billing_email": obj.get("billing_email"), + "name": obj.get("name"), + "plan": obj.get("plan") if obj.get("plan") is not None else Plan.HOBBY, + "plan_updated_at": obj.get("plan_updated_at"), + "has_payment_method": obj.get("has_payment_method"), + "subscription_id": obj.get("subscription_id"), + "current_subscription_id": obj.get("current_subscription_id"), + "latest_subscription_id": obj.get("latest_subscription_id"), + "signup_qualification": obj.get("signup_qualification"), + "status": obj.get("status") if obj.get("status") is not None else OrganizationStatus.WARNING, + "status_message": obj.get("status_message") if obj.get("status_message") is not None else OrganizationDetailedStatus.NEW, + "deactivation_reason": obj.get("deactivation_reason") if obj.get("deactivation_reason") is not None else OrganizationDeactivationReason.INVALID, + "verified": obj.get("verified"), + "qualifies_for_hobby23": obj.get("qualifies_for_hobby23"), + "reprocess_after": obj.get("reprocess_after"), + "trialing": obj.get("trialing"), + "trial_starts_at": obj.get("trial_starts_at"), + "trial_ends_at": obj.get("trial_ends_at"), + "email_domain_allowlist": obj.get("email_domain_allowlist"), + "default_project_id": obj.get("default_project_id") + }) return _obj + + diff --git a/koyeb/api_async/models/organization_deactivation_reason.py b/koyeb/api_async/models/organization_deactivation_reason.py index be4ea25b..f7c78f6e 100644 --- a/koyeb/api_async/models/organization_deactivation_reason.py +++ b/koyeb/api_async/models/organization_deactivation_reason.py @@ -26,14 +26,16 @@ class OrganizationDeactivationReason(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - REQUESTED_BY_OWNER = "REQUESTED_BY_OWNER" - SUBSCRIPTION_TERMINATION = "SUBSCRIPTION_TERMINATION" - LOCKED_BY_ADMIN = "LOCKED_BY_ADMIN" - VERIFICATION_FAILED = "VERIFICATION_FAILED" - TRIAL_DID_NOT_CONVERT = "TRIAL_DID_NOT_CONVERT" + INVALID = 'INVALID' + REQUESTED_BY_OWNER = 'REQUESTED_BY_OWNER' + SUBSCRIPTION_TERMINATION = 'SUBSCRIPTION_TERMINATION' + LOCKED_BY_ADMIN = 'LOCKED_BY_ADMIN' + VERIFICATION_FAILED = 'VERIFICATION_FAILED' + TRIAL_DID_NOT_CONVERT = 'TRIAL_DID_NOT_CONVERT' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of OrganizationDeactivationReason from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/organization_detailed_status.py b/koyeb/api_async/models/organization_detailed_status.py index 97152a5a..18a8ad08 100644 --- a/koyeb/api_async/models/organization_detailed_status.py +++ b/koyeb/api_async/models/organization_detailed_status.py @@ -26,18 +26,20 @@ class OrganizationDetailedStatus(str, Enum): """ allowed enum values """ - NEW = "NEW" - EMAIL_NOT_VALIDATED = "EMAIL_NOT_VALIDATED" - BILLING_INFO_MISSING = "BILLING_INFO_MISSING" - LOCKED = "LOCKED" - PAYMENT_FAILURE = "PAYMENT_FAILURE" - VALID = "VALID" - PENDING_VERIFICATION = "PENDING_VERIFICATION" - VERIFICATION_FAILED = "VERIFICATION_FAILED" - REVIEWING_ACCOUNT = "REVIEWING_ACCOUNT" - PLAN_UPGRADE_REQUIRED = "PLAN_UPGRADE_REQUIRED" + NEW = 'NEW' + EMAIL_NOT_VALIDATED = 'EMAIL_NOT_VALIDATED' + BILLING_INFO_MISSING = 'BILLING_INFO_MISSING' + LOCKED = 'LOCKED' + PAYMENT_FAILURE = 'PAYMENT_FAILURE' + VALID = 'VALID' + PENDING_VERIFICATION = 'PENDING_VERIFICATION' + VERIFICATION_FAILED = 'VERIFICATION_FAILED' + REVIEWING_ACCOUNT = 'REVIEWING_ACCOUNT' + PLAN_UPGRADE_REQUIRED = 'PLAN_UPGRADE_REQUIRED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of OrganizationDetailedStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/organization_invitation.py b/koyeb/api_async/models/organization_invitation.py index 19cc9b79..5c4b0b74 100644 --- a/koyeb/api_async/models/organization_invitation.py +++ b/koyeb/api_async/models/organization_invitation.py @@ -20,9 +20,7 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.organization_invitation_status import ( - OrganizationInvitationStatus, -) +from koyeb.api_async.models.organization_invitation_status import OrganizationInvitationStatus from koyeb.api_async.models.public_organization import PublicOrganization from koyeb.api_async.models.public_user import PublicUser from koyeb.api_async.models.user_role_role import UserRoleRole @@ -30,18 +28,14 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class OrganizationInvitation(BaseModel): """ OrganizationInvitation - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None email: Optional[StrictStr] = None role: Optional[UserRoleRole] = UserRoleRole.INVALID - status: Optional[ - OrganizationInvitationStatus - ] = OrganizationInvitationStatus.INVALID + status: Optional[OrganizationInvitationStatus] = OrganizationInvitationStatus.INVALID expires_at: Optional[datetime] = None organization_id: Optional[StrictStr] = None organization: Optional[PublicOrganization] = None @@ -49,19 +43,7 @@ class OrganizationInvitation(BaseModel): invitee: Optional[PublicUser] = None inviter_id: Optional[StrictStr] = None inviter: Optional[PublicUser] = None - __properties: ClassVar[List[str]] = [ - "id", - "email", - "role", - "status", - "expires_at", - "organization_id", - "organization", - "invitee_id", - "invitee", - "inviter_id", - "inviter", - ] + __properties: ClassVar[List[str]] = ["id", "email", "role", "status", "expires_at", "organization_id", "organization", "invitee_id", "invitee", "inviter_id", "inviter"] model_config = ConfigDict( validate_by_name=True, @@ -70,6 +52,7 @@ class OrganizationInvitation(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -93,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -102,13 +86,13 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() # override the default output from pydantic by calling `to_dict()` of invitee if self.invitee: - _dict["invitee"] = self.invitee.to_dict() + _dict['invitee'] = self.invitee.to_dict() # override the default output from pydantic by calling `to_dict()` of inviter if self.inviter: - _dict["inviter"] = self.inviter.to_dict() + _dict['inviter'] = self.inviter.to_dict() return _dict @classmethod @@ -120,29 +104,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "email": obj.get("email"), - "role": obj.get("role") - if obj.get("role") is not None - else UserRoleRole.INVALID, - "status": obj.get("status") - if obj.get("status") is not None - else OrganizationInvitationStatus.INVALID, - "expires_at": obj.get("expires_at"), - "organization_id": obj.get("organization_id"), - "organization": PublicOrganization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None, - "invitee_id": obj.get("invitee_id"), - "invitee": PublicUser.from_dict(obj["invitee"]) - if obj.get("invitee") is not None - else None, - "inviter_id": obj.get("inviter_id"), - "inviter": PublicUser.from_dict(obj["inviter"]) - if obj.get("inviter") is not None - else None, - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "email": obj.get("email"), + "role": obj.get("role") if obj.get("role") is not None else UserRoleRole.INVALID, + "status": obj.get("status") if obj.get("status") is not None else OrganizationInvitationStatus.INVALID, + "expires_at": obj.get("expires_at"), + "organization_id": obj.get("organization_id"), + "organization": PublicOrganization.from_dict(obj["organization"]) if obj.get("organization") is not None else None, + "invitee_id": obj.get("invitee_id"), + "invitee": PublicUser.from_dict(obj["invitee"]) if obj.get("invitee") is not None else None, + "inviter_id": obj.get("inviter_id"), + "inviter": PublicUser.from_dict(obj["inviter"]) if obj.get("inviter") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/organization_invitation_status.py b/koyeb/api_async/models/organization_invitation_status.py index 79b188ac..256fce22 100644 --- a/koyeb/api_async/models/organization_invitation_status.py +++ b/koyeb/api_async/models/organization_invitation_status.py @@ -26,13 +26,15 @@ class OrganizationInvitationStatus(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - PENDING = "PENDING" - ACCEPTED = "ACCEPTED" - REFUSED = "REFUSED" - EXPIRED = "EXPIRED" + INVALID = 'INVALID' + PENDING = 'PENDING' + ACCEPTED = 'ACCEPTED' + REFUSED = 'REFUSED' + EXPIRED = 'EXPIRED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of OrganizationInvitationStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/organization_member.py b/koyeb/api_async/models/organization_member.py index d4442177..bbb504e4 100644 --- a/koyeb/api_async/models/organization_member.py +++ b/koyeb/api_async/models/organization_member.py @@ -28,12 +28,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class OrganizationMember(BaseModel): """ OrganizationMember - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None user_id: Optional[StrictStr] = None @@ -43,17 +41,7 @@ class OrganizationMember(BaseModel): status: Optional[OrganizationMemberStatus] = OrganizationMemberStatus.INVALID user: Optional[PublicUser] = None organization: Optional[PublicOrganization] = None - __properties: ClassVar[List[str]] = [ - "id", - "organization_id", - "user_id", - "external_id", - "joined_at", - "role", - "status", - "user", - "organization", - ] + __properties: ClassVar[List[str]] = ["id", "organization_id", "user_id", "external_id", "joined_at", "role", "status", "user", "organization"] model_config = ConfigDict( validate_by_name=True, @@ -62,6 +50,7 @@ class OrganizationMember(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -85,7 +74,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -94,10 +84,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of user if self.user: - _dict["user"] = self.user.to_dict() + _dict['user'] = self.user.to_dict() # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -109,25 +99,17 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "organization_id": obj.get("organization_id"), - "user_id": obj.get("user_id"), - "external_id": obj.get("external_id"), - "joined_at": obj.get("joined_at"), - "role": obj.get("role") - if obj.get("role") is not None - else UserRoleRole.INVALID, - "status": obj.get("status") - if obj.get("status") is not None - else OrganizationMemberStatus.INVALID, - "user": PublicUser.from_dict(obj["user"]) - if obj.get("user") is not None - else None, - "organization": PublicOrganization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None, - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "organization_id": obj.get("organization_id"), + "user_id": obj.get("user_id"), + "external_id": obj.get("external_id"), + "joined_at": obj.get("joined_at"), + "role": obj.get("role") if obj.get("role") is not None else UserRoleRole.INVALID, + "status": obj.get("status") if obj.get("status") is not None else OrganizationMemberStatus.INVALID, + "user": PublicUser.from_dict(obj["user"]) if obj.get("user") is not None else None, + "organization": PublicOrganization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/organization_member_status.py b/koyeb/api_async/models/organization_member_status.py index a3c3dfcf..eb1a7f38 100644 --- a/koyeb/api_async/models/organization_member_status.py +++ b/koyeb/api_async/models/organization_member_status.py @@ -26,11 +26,13 @@ class OrganizationMemberStatus(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - ACTIVE = "ACTIVE" - DELETED = "DELETED" + INVALID = 'INVALID' + ACTIVE = 'ACTIVE' + DELETED = 'DELETED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of OrganizationMemberStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/organization_status.py b/koyeb/api_async/models/organization_status.py index 7b71ec15..b8b6c050 100644 --- a/koyeb/api_async/models/organization_status.py +++ b/koyeb/api_async/models/organization_status.py @@ -26,15 +26,17 @@ class OrganizationStatus(str, Enum): """ allowed enum values """ - WARNING = "WARNING" - LOCKED = "LOCKED" - ACTIVE = "ACTIVE" - DEACTIVATING = "DEACTIVATING" - DEACTIVATED = "DEACTIVATED" - DELETING = "DELETING" - DELETED = "DELETED" + WARNING = 'WARNING' + LOCKED = 'LOCKED' + ACTIVE = 'ACTIVE' + DEACTIVATING = 'DEACTIVATING' + DEACTIVATED = 'DEACTIVATED' + DELETING = 'DELETING' + DELETED = 'DELETED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of OrganizationStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/organization_summary.py b/koyeb/api_async/models/organization_summary.py index b1fb8922..bd727222 100644 --- a/koyeb/api_async/models/organization_summary.py +++ b/koyeb/api_async/models/organization_summary.py @@ -30,12 +30,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class OrganizationSummary(BaseModel): """ OrganizationSummary - """ # noqa: E501 - + """ # noqa: E501 organization_id: Optional[StrictStr] = None instances: Optional[InstancesSummary] = None apps: Optional[AppsSummary] = None @@ -44,16 +42,7 @@ class OrganizationSummary(BaseModel): secrets: Optional[SecretsSummary] = None neon_postgres: Optional[NeonPostgresSummary] = None members: Optional[MembersSummary] = None - __properties: ClassVar[List[str]] = [ - "organization_id", - "instances", - "apps", - "services", - "domains", - "secrets", - "neon_postgres", - "members", - ] + __properties: ClassVar[List[str]] = ["organization_id", "instances", "apps", "services", "domains", "secrets", "neon_postgres", "members"] model_config = ConfigDict( validate_by_name=True, @@ -62,6 +51,7 @@ class OrganizationSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -85,7 +75,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -94,32 +85,29 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of instances if self.instances: - _dict["instances"] = self.instances.to_dict() + _dict['instances'] = self.instances.to_dict() # override the default output from pydantic by calling `to_dict()` of apps if self.apps: - _dict["apps"] = self.apps.to_dict() + _dict['apps'] = self.apps.to_dict() # override the default output from pydantic by calling `to_dict()` of each value in services (dict) _field_dict = {} if self.services: for _key_services in self.services: - _field_dict[_key_services] = ( - self.services[_key_services].to_dict() - if self.services[_key_services] is not None - else None - ) - _dict["services"] = _field_dict + if self.services[_key_services]: + _field_dict[_key_services] = self.services[_key_services].to_dict() + _dict['services'] = _field_dict # override the default output from pydantic by calling `to_dict()` of domains if self.domains: - _dict["domains"] = self.domains.to_dict() + _dict['domains'] = self.domains.to_dict() # override the default output from pydantic by calling `to_dict()` of secrets if self.secrets: - _dict["secrets"] = self.secrets.to_dict() + _dict['secrets'] = self.secrets.to_dict() # override the default output from pydantic by calling `to_dict()` of neon_postgres if self.neon_postgres: - _dict["neon_postgres"] = self.neon_postgres.to_dict() + _dict['neon_postgres'] = self.neon_postgres.to_dict() # override the default output from pydantic by calling `to_dict()` of members if self.members: - _dict["members"] = self.members.to_dict() + _dict['members'] = self.members.to_dict() return _dict @classmethod @@ -131,33 +119,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization_id": obj.get("organization_id"), - "instances": InstancesSummary.from_dict(obj["instances"]) - if obj.get("instances") is not None - else None, - "apps": AppsSummary.from_dict(obj["apps"]) - if obj.get("apps") is not None - else None, - "services": dict( - (_k, ServiceSummary.from_dict(_v)) - for _k, _v in obj["services"].items() - ) - if obj.get("services") is not None - else None, - "domains": DomainsSummary.from_dict(obj["domains"]) - if obj.get("domains") is not None - else None, - "secrets": SecretsSummary.from_dict(obj["secrets"]) - if obj.get("secrets") is not None - else None, - "neon_postgres": NeonPostgresSummary.from_dict(obj["neon_postgres"]) - if obj.get("neon_postgres") is not None - else None, - "members": MembersSummary.from_dict(obj["members"]) - if obj.get("members") is not None - else None, - } - ) + _obj = cls.model_validate({ + "organization_id": obj.get("organization_id"), + "instances": InstancesSummary.from_dict(obj["instances"]) if obj.get("instances") is not None else None, + "apps": AppsSummary.from_dict(obj["apps"]) if obj.get("apps") is not None else None, + "services": dict( + (_k, ServiceSummary.from_dict(_v)) + for _k, _v in obj["services"].items() + ) + if obj.get("services") is not None + else None, + "domains": DomainsSummary.from_dict(obj["domains"]) if obj.get("domains") is not None else None, + "secrets": SecretsSummary.from_dict(obj["secrets"]) if obj.get("secrets") is not None else None, + "neon_postgres": NeonPostgresSummary.from_dict(obj["neon_postgres"]) if obj.get("neon_postgres") is not None else None, + "members": MembersSummary.from_dict(obj["members"]) if obj.get("members") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/payment_method.py b/koyeb/api_async/models/payment_method.py index 9b642ad0..4dd35321 100644 --- a/koyeb/api_async/models/payment_method.py +++ b/koyeb/api_async/models/payment_method.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PaymentMethod(BaseModel): """ PaymentMethod - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -52,29 +50,7 @@ class PaymentMethod(BaseModel): card_last_digits: Optional[StrictStr] = None card_expiration_month: Optional[StrictInt] = None card_expiration_year: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "updated_at", - "version", - "organization_id", - "type", - "provider", - "status", - "messages", - "stripe_payment_method_id", - "authorization_verified_at", - "authorization_canceled_at", - "authorization_stripe_payment_intent_id", - "authorization_stripe_payment_intent_client_secret", - "card_brand", - "card_country", - "card_funding", - "card_fingerprint", - "card_last_digits", - "card_expiration_month", - "card_expiration_year", - ] + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "version", "organization_id", "type", "provider", "status", "messages", "stripe_payment_method_id", "authorization_verified_at", "authorization_canceled_at", "authorization_stripe_payment_intent_id", "authorization_stripe_payment_intent_client_secret", "card_brand", "card_country", "card_funding", "card_fingerprint", "card_last_digits", "card_expiration_month", "card_expiration_year"] model_config = ConfigDict( validate_by_name=True, @@ -83,6 +59,7 @@ class PaymentMethod(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -106,7 +83,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -124,35 +102,29 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "version": obj.get("version"), - "organization_id": obj.get("organization_id"), - "type": obj.get("type"), - "provider": obj.get("provider"), - "status": obj.get("status") - if obj.get("status") is not None - else PaymentMethodStatus.INVALID, - "messages": obj.get("messages"), - "stripe_payment_method_id": obj.get("stripe_payment_method_id"), - "authorization_verified_at": obj.get("authorization_verified_at"), - "authorization_canceled_at": obj.get("authorization_canceled_at"), - "authorization_stripe_payment_intent_id": obj.get( - "authorization_stripe_payment_intent_id" - ), - "authorization_stripe_payment_intent_client_secret": obj.get( - "authorization_stripe_payment_intent_client_secret" - ), - "card_brand": obj.get("card_brand"), - "card_country": obj.get("card_country"), - "card_funding": obj.get("card_funding"), - "card_fingerprint": obj.get("card_fingerprint"), - "card_last_digits": obj.get("card_last_digits"), - "card_expiration_month": obj.get("card_expiration_month"), - "card_expiration_year": obj.get("card_expiration_year"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "version": obj.get("version"), + "organization_id": obj.get("organization_id"), + "type": obj.get("type"), + "provider": obj.get("provider"), + "status": obj.get("status") if obj.get("status") is not None else PaymentMethodStatus.INVALID, + "messages": obj.get("messages"), + "stripe_payment_method_id": obj.get("stripe_payment_method_id"), + "authorization_verified_at": obj.get("authorization_verified_at"), + "authorization_canceled_at": obj.get("authorization_canceled_at"), + "authorization_stripe_payment_intent_id": obj.get("authorization_stripe_payment_intent_id"), + "authorization_stripe_payment_intent_client_secret": obj.get("authorization_stripe_payment_intent_client_secret"), + "card_brand": obj.get("card_brand"), + "card_country": obj.get("card_country"), + "card_funding": obj.get("card_funding"), + "card_fingerprint": obj.get("card_fingerprint"), + "card_last_digits": obj.get("card_last_digits"), + "card_expiration_month": obj.get("card_expiration_month"), + "card_expiration_year": obj.get("card_expiration_year") + }) return _obj + + diff --git a/koyeb/api_async/models/payment_method_status.py b/koyeb/api_async/models/payment_method_status.py index 23137302..bb5f4d84 100644 --- a/koyeb/api_async/models/payment_method_status.py +++ b/koyeb/api_async/models/payment_method_status.py @@ -26,15 +26,17 @@ class PaymentMethodStatus(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - CREATED = "CREATED" - AUTHORIZED = "AUTHORIZED" - DECLINED = "DECLINED" - CANCELED = "CANCELED" - EXPIRED = "EXPIRED" - UNCHECKED = "UNCHECKED" + INVALID = 'INVALID' + CREATED = 'CREATED' + AUTHORIZED = 'AUTHORIZED' + DECLINED = 'DECLINED' + CANCELED = 'CANCELED' + EXPIRED = 'EXPIRED' + UNCHECKED = 'UNCHECKED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of PaymentMethodStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/period_usage.py b/koyeb/api_async/models/period_usage.py index 0138089f..5e33e6a6 100644 --- a/koyeb/api_async/models/period_usage.py +++ b/koyeb/api_async/models/period_usage.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PeriodUsage(BaseModel): """ PeriodUsage - """ # noqa: E501 - + """ # noqa: E501 starting_time: Optional[datetime] = None ending_time: Optional[datetime] = None apps: Optional[List[AppUsage]] = None @@ -43,6 +41,7 @@ class PeriodUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -66,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -77,8 +77,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.apps: for _item_apps in self.apps: - _items.append(_item_apps.to_dict() if _item_apps is not None else None) - _dict["apps"] = _items + if _item_apps: + _items.append(_item_apps.to_dict()) + _dict['apps'] = _items return _dict @classmethod @@ -90,13 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "starting_time": obj.get("starting_time"), - "ending_time": obj.get("ending_time"), - "apps": [AppUsage.from_dict(_item) for _item in obj["apps"]] - if obj.get("apps") is not None - else None, - } - ) + _obj = cls.model_validate({ + "starting_time": obj.get("starting_time"), + "ending_time": obj.get("ending_time"), + "apps": [AppUsage.from_dict(_item) for _item in obj["apps"]] if obj.get("apps") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/persistent_volume.py b/koyeb/api_async/models/persistent_volume.py index ffb08ed2..abf47cc7 100644 --- a/koyeb/api_async/models/persistent_volume.py +++ b/koyeb/api_async/models/persistent_volume.py @@ -20,20 +20,16 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.persistent_volume_backing_store import ( - PersistentVolumeBackingStore, -) +from koyeb.api_async.models.persistent_volume_backing_store import PersistentVolumeBackingStore from koyeb.api_async.models.persistent_volume_status import PersistentVolumeStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class PersistentVolume(BaseModel): """ PersistentVolume - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None snapshot_id: Optional[StrictStr] = None @@ -46,28 +42,9 @@ class PersistentVolume(BaseModel): read_only: Optional[StrictBool] = None max_size: Optional[StrictInt] = None cur_size: Optional[StrictInt] = None - status: Optional[ - PersistentVolumeStatus - ] = PersistentVolumeStatus.PERSISTENT_VOLUME_STATUS_INVALID - backing_store: Optional[ - PersistentVolumeBackingStore - ] = PersistentVolumeBackingStore.PERSISTENT_VOLUME_BACKING_STORE_INVALID - __properties: ClassVar[List[str]] = [ - "id", - "name", - "snapshot_id", - "created_at", - "updated_at", - "deleted_at", - "organization_id", - "service_id", - "region", - "read_only", - "max_size", - "cur_size", - "status", - "backing_store", - ] + status: Optional[PersistentVolumeStatus] = PersistentVolumeStatus.PERSISTENT_VOLUME_STATUS_INVALID + backing_store: Optional[PersistentVolumeBackingStore] = PersistentVolumeBackingStore.PERSISTENT_VOLUME_BACKING_STORE_INVALID + __properties: ClassVar[List[str]] = ["id", "name", "snapshot_id", "created_at", "updated_at", "deleted_at", "organization_id", "service_id", "region", "read_only", "max_size", "cur_size", "status", "backing_store"] model_config = ConfigDict( validate_by_name=True, @@ -76,6 +53,7 @@ class PersistentVolume(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -99,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -117,26 +96,22 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "snapshot_id": obj.get("snapshot_id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "deleted_at": obj.get("deleted_at"), - "organization_id": obj.get("organization_id"), - "service_id": obj.get("service_id"), - "region": obj.get("region"), - "read_only": obj.get("read_only"), - "max_size": obj.get("max_size"), - "cur_size": obj.get("cur_size"), - "status": obj.get("status") - if obj.get("status") is not None - else PersistentVolumeStatus.PERSISTENT_VOLUME_STATUS_INVALID, - "backing_store": obj.get("backing_store") - if obj.get("backing_store") is not None - else PersistentVolumeBackingStore.PERSISTENT_VOLUME_BACKING_STORE_INVALID, - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "snapshot_id": obj.get("snapshot_id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "deleted_at": obj.get("deleted_at"), + "organization_id": obj.get("organization_id"), + "service_id": obj.get("service_id"), + "region": obj.get("region"), + "read_only": obj.get("read_only"), + "max_size": obj.get("max_size"), + "cur_size": obj.get("cur_size"), + "status": obj.get("status") if obj.get("status") is not None else PersistentVolumeStatus.PERSISTENT_VOLUME_STATUS_INVALID, + "backing_store": obj.get("backing_store") if obj.get("backing_store") is not None else PersistentVolumeBackingStore.PERSISTENT_VOLUME_BACKING_STORE_INVALID + }) return _obj + + diff --git a/koyeb/api_async/models/persistent_volume_backing_store.py b/koyeb/api_async/models/persistent_volume_backing_store.py index b0b52db9..9f8a3494 100644 --- a/koyeb/api_async/models/persistent_volume_backing_store.py +++ b/koyeb/api_async/models/persistent_volume_backing_store.py @@ -26,12 +26,12 @@ class PersistentVolumeBackingStore(str, Enum): """ allowed enum values """ - PERSISTENT_VOLUME_BACKING_STORE_INVALID = "PERSISTENT_VOLUME_BACKING_STORE_INVALID" - PERSISTENT_VOLUME_BACKING_STORE_LOCAL_BLK = ( - "PERSISTENT_VOLUME_BACKING_STORE_LOCAL_BLK" - ) + PERSISTENT_VOLUME_BACKING_STORE_INVALID = 'PERSISTENT_VOLUME_BACKING_STORE_INVALID' + PERSISTENT_VOLUME_BACKING_STORE_LOCAL_BLK = 'PERSISTENT_VOLUME_BACKING_STORE_LOCAL_BLK' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of PersistentVolumeBackingStore from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/persistent_volume_event.py b/koyeb/api_async/models/persistent_volume_event.py index f04abe91..723404ea 100644 --- a/koyeb/api_async/models/persistent_volume_event.py +++ b/koyeb/api_async/models/persistent_volume_event.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PersistentVolumeEvent(BaseModel): """ PersistentVolumeEvent - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None when: Optional[datetime] = None organization_id: Optional[StrictStr] = None @@ -37,15 +35,7 @@ class PersistentVolumeEvent(BaseModel): type: Optional[StrictStr] = None message: Optional[StrictStr] = None metadata: Optional[Dict[str, Any]] = None - __properties: ClassVar[List[str]] = [ - "id", - "when", - "organization_id", - "persistent_volume_id", - "type", - "message", - "metadata", - ] + __properties: ClassVar[List[str]] = ["id", "when", "organization_id", "persistent_volume_id", "type", "message", "metadata"] model_config = ConfigDict( validate_by_name=True, @@ -54,6 +44,7 @@ class PersistentVolumeEvent(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -95,15 +87,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "when": obj.get("when"), - "organization_id": obj.get("organization_id"), - "persistent_volume_id": obj.get("persistent_volume_id"), - "type": obj.get("type"), - "message": obj.get("message"), - "metadata": obj.get("metadata"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "when": obj.get("when"), + "organization_id": obj.get("organization_id"), + "persistent_volume_id": obj.get("persistent_volume_id"), + "type": obj.get("type"), + "message": obj.get("message"), + "metadata": obj.get("metadata") + }) return _obj + + diff --git a/koyeb/api_async/models/persistent_volume_quotas.py b/koyeb/api_async/models/persistent_volume_quotas.py index d250f912..b33bb37d 100644 --- a/koyeb/api_async/models/persistent_volume_quotas.py +++ b/koyeb/api_async/models/persistent_volume_quotas.py @@ -23,28 +23,14 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PersistentVolumeQuotas(BaseModel): """ PersistentVolumeQuotas - """ # noqa: E501 - - max_total_size: Optional[StrictInt] = Field( - default=None, - description="MaxTotalSize for all volumes on a region (in Gigabyte / GB).", - ) - max_volume_size: Optional[StrictInt] = Field( - default=None, description="MaxVolumeSize for one volume (in Gigabyte / GB)." - ) - max_per_instance_size: Optional[StrictInt] = Field( - default=None, - description="MaxPerInstanceSize for all volumes on an instance (in Gigabyte / GB).", - ) - __properties: ClassVar[List[str]] = [ - "max_total_size", - "max_volume_size", - "max_per_instance_size", - ] + """ # noqa: E501 + max_total_size: Optional[StrictInt] = Field(default=None, description="MaxTotalSize for all volumes on a region (in Gigabyte / GB).") + max_volume_size: Optional[StrictInt] = Field(default=None, description="MaxVolumeSize for one volume (in Gigabyte / GB).") + max_per_instance_size: Optional[StrictInt] = Field(default=None, description="MaxPerInstanceSize for all volumes on an instance (in Gigabyte / GB).") + __properties: ClassVar[List[str]] = ["max_total_size", "max_volume_size", "max_per_instance_size"] model_config = ConfigDict( validate_by_name=True, @@ -53,6 +39,7 @@ class PersistentVolumeQuotas(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -76,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -94,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "max_total_size": obj.get("max_total_size"), - "max_volume_size": obj.get("max_volume_size"), - "max_per_instance_size": obj.get("max_per_instance_size"), - } - ) + _obj = cls.model_validate({ + "max_total_size": obj.get("max_total_size"), + "max_volume_size": obj.get("max_volume_size"), + "max_per_instance_size": obj.get("max_per_instance_size") + }) return _obj + + diff --git a/koyeb/api_async/models/persistent_volume_region_usage.py b/koyeb/api_async/models/persistent_volume_region_usage.py index 11ec76f7..62a5e0a0 100644 --- a/koyeb/api_async/models/persistent_volume_region_usage.py +++ b/koyeb/api_async/models/persistent_volume_region_usage.py @@ -23,20 +23,14 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PersistentVolumeRegionUsage(BaseModel): """ PersistentVolumeRegionUsage - """ # noqa: E501 - + """ # noqa: E501 region: Optional[StrictStr] = None total_size_gb_used: Optional[StrictInt] = None total_size_gb_limit: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = [ - "region", - "total_size_gb_used", - "total_size_gb_limit", - ] + __properties: ClassVar[List[str]] = ["region", "total_size_gb_used", "total_size_gb_limit"] model_config = ConfigDict( validate_by_name=True, @@ -45,6 +39,7 @@ class PersistentVolumeRegionUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -86,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "region": obj.get("region"), - "total_size_gb_used": obj.get("total_size_gb_used"), - "total_size_gb_limit": obj.get("total_size_gb_limit"), - } - ) + _obj = cls.model_validate({ + "region": obj.get("region"), + "total_size_gb_used": obj.get("total_size_gb_used"), + "total_size_gb_limit": obj.get("total_size_gb_limit") + }) return _obj + + diff --git a/koyeb/api_async/models/persistent_volume_status.py b/koyeb/api_async/models/persistent_volume_status.py index 3ad575e0..9e8fae12 100644 --- a/koyeb/api_async/models/persistent_volume_status.py +++ b/koyeb/api_async/models/persistent_volume_status.py @@ -26,14 +26,16 @@ class PersistentVolumeStatus(str, Enum): """ allowed enum values """ - PERSISTENT_VOLUME_STATUS_INVALID = "PERSISTENT_VOLUME_STATUS_INVALID" - PERSISTENT_VOLUME_STATUS_ATTACHED = "PERSISTENT_VOLUME_STATUS_ATTACHED" - PERSISTENT_VOLUME_STATUS_DETACHED = "PERSISTENT_VOLUME_STATUS_DETACHED" - PERSISTENT_VOLUME_STATUS_DELETING = "PERSISTENT_VOLUME_STATUS_DELETING" - PERSISTENT_VOLUME_STATUS_DELETED = "PERSISTENT_VOLUME_STATUS_DELETED" - PERSISTENT_VOLUME_STATUS_ARCHIVING = "PERSISTENT_VOLUME_STATUS_ARCHIVING" + PERSISTENT_VOLUME_STATUS_INVALID = 'PERSISTENT_VOLUME_STATUS_INVALID' + PERSISTENT_VOLUME_STATUS_ATTACHED = 'PERSISTENT_VOLUME_STATUS_ATTACHED' + PERSISTENT_VOLUME_STATUS_DETACHED = 'PERSISTENT_VOLUME_STATUS_DETACHED' + PERSISTENT_VOLUME_STATUS_DELETING = 'PERSISTENT_VOLUME_STATUS_DELETING' + PERSISTENT_VOLUME_STATUS_DELETED = 'PERSISTENT_VOLUME_STATUS_DELETED' + PERSISTENT_VOLUME_STATUS_ARCHIVING = 'PERSISTENT_VOLUME_STATUS_ARCHIVING' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of PersistentVolumeStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/plan.py b/koyeb/api_async/models/plan.py index 08b1384e..ea762666 100644 --- a/koyeb/api_async/models/plan.py +++ b/koyeb/api_async/models/plan.py @@ -26,20 +26,22 @@ class Plan(str, Enum): """ allowed enum values """ - HOBBY = "hobby" - STARTER = "starter" - STARTUP = "startup" - BUSINESS = "business" - ENTERPRISE = "enterprise" - INTERNAL = "internal" - HOBBY23 = "hobby23" - NO_PLAN = "no_plan" - PRO = "pro" - SCALE = "scale" - PARTNER_CSP = "partner_csp" - PARTNER_CSP_UNIT = "partner_csp_unit" + HOBBY = 'hobby' + STARTER = 'starter' + STARTUP = 'startup' + BUSINESS = 'business' + ENTERPRISE = 'enterprise' + INTERNAL = 'internal' + HOBBY23 = 'hobby23' + NO_PLAN = 'no_plan' + PRO = 'pro' + SCALE = 'scale' + PARTNER_CSP = 'partner_csp' + PARTNER_CSP_UNIT = 'partner_csp_unit' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of Plan from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/pool_claim.py b/koyeb/api_async/models/pool_claim.py index eeca02b3..f324bda2 100644 --- a/koyeb/api_async/models/pool_claim.py +++ b/koyeb/api_async/models/pool_claim.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PoolClaim(BaseModel): """ PoolClaim - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None pool_id: Optional[StrictStr] = None service_id: Optional[StrictStr] = None @@ -43,20 +41,7 @@ class PoolClaim(BaseModel): fulfilled_at: Optional[datetime] = None released_at: Optional[datetime] = None pool_generation: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "pool_id", - "service_id", - "request_id", - "status", - "organization_id", - "workspace_id", - "customer_id", - "created_at", - "fulfilled_at", - "released_at", - "pool_generation", - ] + __properties: ClassVar[List[str]] = ["id", "pool_id", "service_id", "request_id", "status", "organization_id", "workspace_id", "customer_id", "created_at", "fulfilled_at", "released_at", "pool_generation"] model_config = ConfigDict( validate_by_name=True, @@ -65,6 +50,7 @@ class PoolClaim(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -88,7 +74,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -106,22 +93,20 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "pool_id": obj.get("pool_id"), - "service_id": obj.get("service_id"), - "request_id": obj.get("request_id"), - "status": obj.get("status") - if obj.get("status") is not None - else PoolClaimStatus.UNSPECIFIED, - "organization_id": obj.get("organization_id"), - "workspace_id": obj.get("workspace_id"), - "customer_id": obj.get("customer_id"), - "created_at": obj.get("created_at"), - "fulfilled_at": obj.get("fulfilled_at"), - "released_at": obj.get("released_at"), - "pool_generation": obj.get("pool_generation"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "pool_id": obj.get("pool_id"), + "service_id": obj.get("service_id"), + "request_id": obj.get("request_id"), + "status": obj.get("status") if obj.get("status") is not None else PoolClaimStatus.UNSPECIFIED, + "organization_id": obj.get("organization_id"), + "workspace_id": obj.get("workspace_id"), + "customer_id": obj.get("customer_id"), + "created_at": obj.get("created_at"), + "fulfilled_at": obj.get("fulfilled_at"), + "released_at": obj.get("released_at"), + "pool_generation": obj.get("pool_generation") + }) return _obj + + diff --git a/koyeb/api_async/models/pool_claim_reply.py b/koyeb/api_async/models/pool_claim_reply.py index 208ec011..20cbcbcf 100644 --- a/koyeb/api_async/models/pool_claim_reply.py +++ b/koyeb/api_async/models/pool_claim_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PoolClaimReply(BaseModel): """ PoolClaimReply - """ # noqa: E501 - + """ # noqa: E501 claim_id: Optional[StrictStr] = None service_id: Optional[StrictStr] = None prewarmed: Optional[StrictBool] = None @@ -41,6 +39,7 @@ class PoolClaimReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "claim_id": obj.get("claim_id"), - "service_id": obj.get("service_id"), - "prewarmed": obj.get("prewarmed"), - } - ) + _obj = cls.model_validate({ + "claim_id": obj.get("claim_id"), + "service_id": obj.get("service_id"), + "prewarmed": obj.get("prewarmed") + }) return _obj + + diff --git a/koyeb/api_async/models/pool_claim_request.py b/koyeb/api_async/models/pool_claim_request.py index 9d2968cb..354f87bd 100644 --- a/koyeb/api_async/models/pool_claim_request.py +++ b/koyeb/api_async/models/pool_claim_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PoolClaimRequest(BaseModel): """ PoolClaimRequest - """ # noqa: E501 - + """ # noqa: E501 pool_id: Optional[StrictStr] = None request_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["pool_id", "request_id"] @@ -40,6 +38,7 @@ class PoolClaimRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"pool_id": obj.get("pool_id"), "request_id": obj.get("request_id")} - ) + _obj = cls.model_validate({ + "pool_id": obj.get("pool_id"), + "request_id": obj.get("request_id") + }) return _obj + + diff --git a/koyeb/api_async/models/pool_claim_status.py b/koyeb/api_async/models/pool_claim_status.py index b05f69b1..abefaa47 100644 --- a/koyeb/api_async/models/pool_claim_status.py +++ b/koyeb/api_async/models/pool_claim_status.py @@ -26,13 +26,15 @@ class PoolClaimStatus(str, Enum): """ allowed enum values """ - UNSPECIFIED = "UNSPECIFIED" - PENDING = "PENDING" - FULFILLED = "FULFILLED" - FAILED = "FAILED" - RELEASED = "RELEASED" + UNSPECIFIED = 'UNSPECIFIED' + PENDING = 'PENDING' + FULFILLED = 'FULFILLED' + FAILED = 'FAILED' + RELEASED = 'RELEASED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of PoolClaimStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/port.py b/koyeb/api_async/models/port.py index 6c990f5a..11bc010b 100644 --- a/koyeb/api_async/models/port.py +++ b/koyeb/api_async/models/port.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Port(BaseModel): """ Port - """ # noqa: E501 - + """ # noqa: E501 port: Optional[StrictInt] = None protocol: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["port", "protocol"] @@ -40,6 +38,7 @@ class Port(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"port": obj.get("port"), "protocol": obj.get("protocol")} - ) + _obj = cls.model_validate({ + "port": obj.get("port"), + "protocol": obj.get("protocol") + }) return _obj + + diff --git a/koyeb/api_async/models/private_registry_configuration.py b/koyeb/api_async/models/private_registry_configuration.py index 029aa86b..6d45b615 100644 --- a/koyeb/api_async/models/private_registry_configuration.py +++ b/koyeb/api_async/models/private_registry_configuration.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PrivateRegistryConfiguration(BaseModel): """ PrivateRegistryConfiguration - """ # noqa: E501 - + """ # noqa: E501 username: Optional[StrictStr] = None password: Optional[StrictStr] = None url: Optional[StrictStr] = None @@ -41,6 +39,7 @@ class PrivateRegistryConfiguration(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "username": obj.get("username"), - "password": obj.get("password"), - "url": obj.get("url"), - } - ) + _obj = cls.model_validate({ + "username": obj.get("username"), + "password": obj.get("password"), + "url": obj.get("url") + }) return _obj + + diff --git a/koyeb/api_async/models/project.py b/koyeb/api_async/models/project.py index 2b0db6f3..4f244dc0 100644 --- a/koyeb/api_async/models/project.py +++ b/koyeb/api_async/models/project.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Project(BaseModel): """ Project - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None description: Optional[StrictStr] = None @@ -37,15 +35,7 @@ class Project(BaseModel): updated_at: Optional[datetime] = None created_at: Optional[datetime] = None service_count: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "name", - "description", - "organization_id", - "updated_at", - "created_at", - "service_count", - ] + __properties: ClassVar[List[str]] = ["id", "name", "description", "organization_id", "updated_at", "created_at", "service_count"] model_config = ConfigDict( validate_by_name=True, @@ -54,6 +44,7 @@ class Project(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -95,15 +87,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "description": obj.get("description"), - "organization_id": obj.get("organization_id"), - "updated_at": obj.get("updated_at"), - "created_at": obj.get("created_at"), - "service_count": obj.get("service_count"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "description": obj.get("description"), + "organization_id": obj.get("organization_id"), + "updated_at": obj.get("updated_at"), + "created_at": obj.get("created_at"), + "service_count": obj.get("service_count") + }) return _obj + + diff --git a/koyeb/api_async/models/proxy_port_protocol.py b/koyeb/api_async/models/proxy_port_protocol.py index 886bb3bc..3d253437 100644 --- a/koyeb/api_async/models/proxy_port_protocol.py +++ b/koyeb/api_async/models/proxy_port_protocol.py @@ -26,9 +26,11 @@ class ProxyPortProtocol(str, Enum): """ allowed enum values """ - TCP = "tcp" + TCP = 'tcp' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ProxyPortProtocol from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/public_organization.py b/koyeb/api_async/models/public_organization.py index dc325f71..775d52b9 100644 --- a/koyeb/api_async/models/public_organization.py +++ b/koyeb/api_async/models/public_organization.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PublicOrganization(BaseModel): """ PublicOrganization - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None plan: Optional[Plan] = Plan.HOBBY @@ -45,6 +43,7 @@ class PublicOrganization(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,7 +67,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -86,15 +86,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "plan": obj.get("plan") if obj.get("plan") is not None else Plan.HOBBY, - "status": obj.get("status") - if obj.get("status") is not None - else OrganizationStatus.WARNING, - "external_id": obj.get("external_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "plan": obj.get("plan") if obj.get("plan") is not None else Plan.HOBBY, + "status": obj.get("status") if obj.get("status") is not None else OrganizationStatus.WARNING, + "external_id": obj.get("external_id") + }) return _obj + + diff --git a/koyeb/api_async/models/public_user.py b/koyeb/api_async/models/public_user.py index 7cc3859e..9a899158 100644 --- a/koyeb/api_async/models/public_user.py +++ b/koyeb/api_async/models/public_user.py @@ -23,26 +23,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class PublicUser(BaseModel): """ PublicUser - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None email: Optional[StrictStr] = None name: Optional[StrictStr] = None avatar_url: Optional[StrictStr] = None github_id: Optional[StrictStr] = None github_user: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "email", - "name", - "avatar_url", - "github_id", - "github_user", - ] + __properties: ClassVar[List[str]] = ["id", "email", "name", "avatar_url", "github_id", "github_user"] model_config = ConfigDict( validate_by_name=True, @@ -51,6 +42,7 @@ class PublicUser(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -92,14 +85,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "email": obj.get("email"), - "name": obj.get("name"), - "avatar_url": obj.get("avatar_url"), - "github_id": obj.get("github_id"), - "github_user": obj.get("github_user"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "email": obj.get("email"), + "name": obj.get("name"), + "avatar_url": obj.get("avatar_url"), + "github_id": obj.get("github_id"), + "github_user": obj.get("github_user") + }) return _obj + + diff --git a/koyeb/api_async/models/query_logs_reply.py b/koyeb/api_async/models/query_logs_reply.py index 6d2b6ddd..23e47854 100644 --- a/koyeb/api_async/models/query_logs_reply.py +++ b/koyeb/api_async/models/query_logs_reply.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class QueryLogsReply(BaseModel): """ QueryLogsReply - """ # noqa: E501 - + """ # noqa: E501 data: Optional[List[LogEntry]] = None pagination: Optional[QueryLogsReplyPagination] = None __properties: ClassVar[List[str]] = ["data", "pagination"] @@ -42,6 +40,7 @@ class QueryLogsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -76,11 +76,12 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.data: for _item_data in self.data: - _items.append(_item_data.to_dict() if _item_data is not None else None) - _dict["data"] = _items + if _item_data: + _items.append(_item_data.to_dict()) + _dict['data'] = _items # override the default output from pydantic by calling `to_dict()` of pagination if self.pagination: - _dict["pagination"] = self.pagination.to_dict() + _dict['pagination'] = self.pagination.to_dict() return _dict @classmethod @@ -92,14 +93,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "data": [LogEntry.from_dict(_item) for _item in obj["data"]] - if obj.get("data") is not None - else None, - "pagination": QueryLogsReplyPagination.from_dict(obj["pagination"]) - if obj.get("pagination") is not None - else None, - } - ) + _obj = cls.model_validate({ + "data": [LogEntry.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "pagination": QueryLogsReplyPagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/query_logs_reply_pagination.py b/koyeb/api_async/models/query_logs_reply_pagination.py index 3c478605..59a7151a 100644 --- a/koyeb/api_async/models/query_logs_reply_pagination.py +++ b/koyeb/api_async/models/query_logs_reply_pagination.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class QueryLogsReplyPagination(BaseModel): """ QueryLogsReplyPagination - """ # noqa: E501 - + """ # noqa: E501 has_more: Optional[StrictBool] = None next_start: Optional[datetime] = None next_end: Optional[datetime] = None @@ -42,6 +40,7 @@ class QueryLogsReplyPagination(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,11 +83,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "has_more": obj.get("has_more"), - "next_start": obj.get("next_start"), - "next_end": obj.get("next_end"), - } - ) + _obj = cls.model_validate({ + "has_more": obj.get("has_more"), + "next_start": obj.get("next_start"), + "next_end": obj.get("next_end") + }) return _obj + + diff --git a/koyeb/api_async/models/quota_usage.py b/koyeb/api_async/models/quota_usage.py index b32926f2..f125611d 100644 --- a/koyeb/api_async/models/quota_usage.py +++ b/koyeb/api_async/models/quota_usage.py @@ -19,23 +19,17 @@ from pydantic import BaseModel, ConfigDict, StrictInt from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.instance_snapshot_type_usage import ( - InstanceSnapshotTypeUsage, -) +from koyeb.api_async.models.instance_snapshot_type_usage import InstanceSnapshotTypeUsage from koyeb.api_async.models.instance_type_usage import InstanceTypeUsage -from koyeb.api_async.models.persistent_volume_region_usage import ( - PersistentVolumeRegionUsage, -) +from koyeb.api_async.models.persistent_volume_region_usage import PersistentVolumeRegionUsage from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class QuotaUsage(BaseModel): """ QuotaUsage carries an organization's current resource consumption alongside the corresponding plan limits (from the caller's InternalToken.Quotas). Paused services are included in services_used but excluded from memory / instances_by_type / proxy_ports totals, matching enforcement semantics. - """ # noqa: E501 - + """ # noqa: E501 apps_used: Optional[StrictInt] = None apps_limit: Optional[StrictInt] = None services_used: Optional[StrictInt] = None @@ -51,23 +45,7 @@ class QuotaUsage(BaseModel): instances_by_type: Optional[List[InstanceTypeUsage]] = None persistent_volumes_by_region: Optional[List[PersistentVolumeRegionUsage]] = None instance_snapshots_by_type: Optional[List[InstanceSnapshotTypeUsage]] = None - __properties: ClassVar[List[str]] = [ - "apps_used", - "apps_limit", - "services_used", - "services_limit", - "memory_mb_used", - "memory_mb_limit", - "custom_domains_used", - "custom_domains_limit", - "koyeb_lb_domains_used", - "koyeb_lb_domains_limit", - "proxy_ports_used", - "proxy_ports_limit", - "instances_by_type", - "persistent_volumes_by_region", - "instance_snapshots_by_type", - ] + __properties: ClassVar[List[str]] = ["apps_used", "apps_limit", "services_used", "services_limit", "memory_mb_used", "memory_mb_limit", "custom_domains_used", "custom_domains_limit", "koyeb_lb_domains_used", "koyeb_lb_domains_limit", "proxy_ports_used", "proxy_ports_limit", "instances_by_type", "persistent_volumes_by_region", "instance_snapshots_by_type"] model_config = ConfigDict( validate_by_name=True, @@ -76,6 +54,7 @@ class QuotaUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -99,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -110,32 +90,23 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.instances_by_type: for _item_instances_by_type in self.instances_by_type: - _items.append( - _item_instances_by_type.to_dict() - if _item_instances_by_type is not None - else None - ) - _dict["instances_by_type"] = _items + if _item_instances_by_type: + _items.append(_item_instances_by_type.to_dict()) + _dict['instances_by_type'] = _items # override the default output from pydantic by calling `to_dict()` of each item in persistent_volumes_by_region (list) _items = [] if self.persistent_volumes_by_region: for _item_persistent_volumes_by_region in self.persistent_volumes_by_region: - _items.append( - _item_persistent_volumes_by_region.to_dict() - if _item_persistent_volumes_by_region is not None - else None - ) - _dict["persistent_volumes_by_region"] = _items + if _item_persistent_volumes_by_region: + _items.append(_item_persistent_volumes_by_region.to_dict()) + _dict['persistent_volumes_by_region'] = _items # override the default output from pydantic by calling `to_dict()` of each item in instance_snapshots_by_type (list) _items = [] if self.instance_snapshots_by_type: for _item_instance_snapshots_by_type in self.instance_snapshots_by_type: - _items.append( - _item_instance_snapshots_by_type.to_dict() - if _item_instance_snapshots_by_type is not None - else None - ) - _dict["instance_snapshots_by_type"] = _items + if _item_instance_snapshots_by_type: + _items.append(_item_instance_snapshots_by_type.to_dict()) + _dict['instance_snapshots_by_type'] = _items return _dict @classmethod @@ -147,38 +118,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "apps_used": obj.get("apps_used"), - "apps_limit": obj.get("apps_limit"), - "services_used": obj.get("services_used"), - "services_limit": obj.get("services_limit"), - "memory_mb_used": obj.get("memory_mb_used"), - "memory_mb_limit": obj.get("memory_mb_limit"), - "custom_domains_used": obj.get("custom_domains_used"), - "custom_domains_limit": obj.get("custom_domains_limit"), - "koyeb_lb_domains_used": obj.get("koyeb_lb_domains_used"), - "koyeb_lb_domains_limit": obj.get("koyeb_lb_domains_limit"), - "proxy_ports_used": obj.get("proxy_ports_used"), - "proxy_ports_limit": obj.get("proxy_ports_limit"), - "instances_by_type": [ - InstanceTypeUsage.from_dict(_item) - for _item in obj["instances_by_type"] - ] - if obj.get("instances_by_type") is not None - else None, - "persistent_volumes_by_region": [ - PersistentVolumeRegionUsage.from_dict(_item) - for _item in obj["persistent_volumes_by_region"] - ] - if obj.get("persistent_volumes_by_region") is not None - else None, - "instance_snapshots_by_type": [ - InstanceSnapshotTypeUsage.from_dict(_item) - for _item in obj["instance_snapshots_by_type"] - ] - if obj.get("instance_snapshots_by_type") is not None - else None, - } - ) + _obj = cls.model_validate({ + "apps_used": obj.get("apps_used"), + "apps_limit": obj.get("apps_limit"), + "services_used": obj.get("services_used"), + "services_limit": obj.get("services_limit"), + "memory_mb_used": obj.get("memory_mb_used"), + "memory_mb_limit": obj.get("memory_mb_limit"), + "custom_domains_used": obj.get("custom_domains_used"), + "custom_domains_limit": obj.get("custom_domains_limit"), + "koyeb_lb_domains_used": obj.get("koyeb_lb_domains_used"), + "koyeb_lb_domains_limit": obj.get("koyeb_lb_domains_limit"), + "proxy_ports_used": obj.get("proxy_ports_used"), + "proxy_ports_limit": obj.get("proxy_ports_limit"), + "instances_by_type": [InstanceTypeUsage.from_dict(_item) for _item in obj["instances_by_type"]] if obj.get("instances_by_type") is not None else None, + "persistent_volumes_by_region": [PersistentVolumeRegionUsage.from_dict(_item) for _item in obj["persistent_volumes_by_region"]] if obj.get("persistent_volumes_by_region") is not None else None, + "instance_snapshots_by_type": [InstanceSnapshotTypeUsage.from_dict(_item) for _item in obj["instance_snapshots_by_type"]] if obj.get("instance_snapshots_by_type") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/quotas.py b/koyeb/api_async/models/quotas.py index 7c8d114b..95d4e953 100644 --- a/koyeb/api_async/models/quotas.py +++ b/koyeb/api_async/models/quotas.py @@ -28,12 +28,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Quotas(BaseModel): """ Quotas - """ # noqa: E501 - + """ # noqa: E501 apps: Optional[StrictStr] = None services: Optional[StrictStr] = None domains: Optional[StrictStr] = None @@ -57,31 +55,7 @@ class Quotas(BaseModel): lifecycle: Optional[LifecycleQuotas] = None max_projects: Optional[StrictStr] = None instance_snapshots: Optional[InstanceSnapshotQuotas] = None - __properties: ClassVar[List[str]] = [ - "apps", - "services", - "domains", - "services_by_app", - "service_provisioning_concurrency", - "memory_mb", - "instance_types", - "regions", - "max_organization_members", - "max_instances_by_type", - "persistent_volumes_by_region", - "custom_domains", - "domains_load_balancer", - "metrics_retention", - "logs_retention", - "access_reserved_subdomains", - "proxy_ports", - "scale_to_zero", - "archives", - "archive_max_size_mb", - "lifecycle", - "max_projects", - "instance_snapshots", - ] + __properties: ClassVar[List[str]] = ["apps", "services", "domains", "services_by_app", "service_provisioning_concurrency", "memory_mb", "instance_types", "regions", "max_organization_members", "max_instances_by_type", "persistent_volumes_by_region", "custom_domains", "domains_load_balancer", "metrics_retention", "logs_retention", "access_reserved_subdomains", "proxy_ports", "scale_to_zero", "archives", "archive_max_size_mb", "lifecycle", "max_projects", "instance_snapshots"] model_config = ConfigDict( validate_by_name=True, @@ -90,6 +64,7 @@ class Quotas(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -113,7 +88,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -124,29 +100,21 @@ def to_dict(self) -> Dict[str, Any]: _field_dict = {} if self.persistent_volumes_by_region: for _key_persistent_volumes_by_region in self.persistent_volumes_by_region: - _field_dict[_key_persistent_volumes_by_region] = ( - self.persistent_volumes_by_region[ - _key_persistent_volumes_by_region - ].to_dict() - if self.persistent_volumes_by_region[ - _key_persistent_volumes_by_region - ] - is not None - else None - ) - _dict["persistent_volumes_by_region"] = _field_dict + if self.persistent_volumes_by_region[_key_persistent_volumes_by_region]: + _field_dict[_key_persistent_volumes_by_region] = self.persistent_volumes_by_region[_key_persistent_volumes_by_region].to_dict() + _dict['persistent_volumes_by_region'] = _field_dict # override the default output from pydantic by calling `to_dict()` of domains_load_balancer if self.domains_load_balancer: - _dict["domains_load_balancer"] = self.domains_load_balancer.to_dict() + _dict['domains_load_balancer'] = self.domains_load_balancer.to_dict() # override the default output from pydantic by calling `to_dict()` of scale_to_zero if self.scale_to_zero: - _dict["scale_to_zero"] = self.scale_to_zero.to_dict() + _dict['scale_to_zero'] = self.scale_to_zero.to_dict() # override the default output from pydantic by calling `to_dict()` of lifecycle if self.lifecycle: - _dict["lifecycle"] = self.lifecycle.to_dict() + _dict['lifecycle'] = self.lifecycle.to_dict() # override the default output from pydantic by calling `to_dict()` of instance_snapshots if self.instance_snapshots: - _dict["instance_snapshots"] = self.instance_snapshots.to_dict() + _dict['instance_snapshots'] = self.instance_snapshots.to_dict() return _dict @classmethod @@ -158,50 +126,36 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "apps": obj.get("apps"), - "services": obj.get("services"), - "domains": obj.get("domains"), - "services_by_app": obj.get("services_by_app"), - "service_provisioning_concurrency": obj.get( - "service_provisioning_concurrency" - ), - "memory_mb": obj.get("memory_mb"), - "instance_types": obj.get("instance_types"), - "regions": obj.get("regions"), - "max_organization_members": obj.get("max_organization_members"), - "max_instances_by_type": obj.get("max_instances_by_type"), - "persistent_volumes_by_region": dict( - (_k, PersistentVolumeQuotas.from_dict(_v)) - for _k, _v in obj["persistent_volumes_by_region"].items() - ) - if obj.get("persistent_volumes_by_region") is not None - else None, - "custom_domains": obj.get("custom_domains"), - "domains_load_balancer": DomainLoadBalancerQuotas.from_dict( - obj["domains_load_balancer"] - ) - if obj.get("domains_load_balancer") is not None - else None, - "metrics_retention": obj.get("metrics_retention"), - "logs_retention": obj.get("logs_retention"), - "access_reserved_subdomains": obj.get("access_reserved_subdomains"), - "proxy_ports": obj.get("proxy_ports"), - "scale_to_zero": ScaleToZeroQuotas.from_dict(obj["scale_to_zero"]) - if obj.get("scale_to_zero") is not None - else None, - "archives": obj.get("archives"), - "archive_max_size_mb": obj.get("archive_max_size_mb"), - "lifecycle": LifecycleQuotas.from_dict(obj["lifecycle"]) - if obj.get("lifecycle") is not None - else None, - "max_projects": obj.get("max_projects"), - "instance_snapshots": InstanceSnapshotQuotas.from_dict( - obj["instance_snapshots"] - ) - if obj.get("instance_snapshots") is not None - else None, - } - ) + _obj = cls.model_validate({ + "apps": obj.get("apps"), + "services": obj.get("services"), + "domains": obj.get("domains"), + "services_by_app": obj.get("services_by_app"), + "service_provisioning_concurrency": obj.get("service_provisioning_concurrency"), + "memory_mb": obj.get("memory_mb"), + "instance_types": obj.get("instance_types"), + "regions": obj.get("regions"), + "max_organization_members": obj.get("max_organization_members"), + "max_instances_by_type": obj.get("max_instances_by_type"), + "persistent_volumes_by_region": dict( + (_k, PersistentVolumeQuotas.from_dict(_v)) + for _k, _v in obj["persistent_volumes_by_region"].items() + ) + if obj.get("persistent_volumes_by_region") is not None + else None, + "custom_domains": obj.get("custom_domains"), + "domains_load_balancer": DomainLoadBalancerQuotas.from_dict(obj["domains_load_balancer"]) if obj.get("domains_load_balancer") is not None else None, + "metrics_retention": obj.get("metrics_retention"), + "logs_retention": obj.get("logs_retention"), + "access_reserved_subdomains": obj.get("access_reserved_subdomains"), + "proxy_ports": obj.get("proxy_ports"), + "scale_to_zero": ScaleToZeroQuotas.from_dict(obj["scale_to_zero"]) if obj.get("scale_to_zero") is not None else None, + "archives": obj.get("archives"), + "archive_max_size_mb": obj.get("archive_max_size_mb"), + "lifecycle": LifecycleQuotas.from_dict(obj["lifecycle"]) if obj.get("lifecycle") is not None else None, + "max_projects": obj.get("max_projects"), + "instance_snapshots": InstanceSnapshotQuotas.from_dict(obj["instance_snapshots"]) if obj.get("instance_snapshots") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/reactivate_organization_reply.py b/koyeb/api_async/models/reactivate_organization_reply.py index c1a5034e..e3243e0a 100644 --- a/koyeb/api_async/models/reactivate_organization_reply.py +++ b/koyeb/api_async/models/reactivate_organization_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ReactivateOrganizationReply(BaseModel): """ ReactivateOrganizationReply - """ # noqa: E501 - + """ # noqa: E501 organization: Optional[Organization] = None __properties: ClassVar[List[str]] = ["organization"] @@ -40,6 +38,7 @@ class ReactivateOrganizationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization": Organization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None - } - ) + _obj = cls.model_validate({ + "organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/redeem_coupon_request.py b/koyeb/api_async/models/redeem_coupon_request.py index 724890fd..08156d17 100644 --- a/koyeb/api_async/models/redeem_coupon_request.py +++ b/koyeb/api_async/models/redeem_coupon_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RedeemCouponRequest(BaseModel): """ RedeemCouponRequest - """ # noqa: E501 - + """ # noqa: E501 code: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["code"] @@ -39,6 +37,7 @@ class RedeemCouponRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"code": obj.get("code")}) + _obj = cls.model_validate({ + "code": obj.get("code") + }) return _obj + + diff --git a/koyeb/api_async/models/redeploy_reply.py b/koyeb/api_async/models/redeploy_reply.py index 1f2d5527..8167c557 100644 --- a/koyeb/api_async/models/redeploy_reply.py +++ b/koyeb/api_async/models/redeploy_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RedeployReply(BaseModel): """ RedeployReply - """ # noqa: E501 - + """ # noqa: E501 deployment: Optional[Deployment] = None __properties: ClassVar[List[str]] = ["deployment"] @@ -40,6 +38,7 @@ class RedeployReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of deployment if self.deployment: - _dict["deployment"] = self.deployment.to_dict() + _dict['deployment'] = self.deployment.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "deployment": Deployment.from_dict(obj["deployment"]) - if obj.get("deployment") is not None - else None - } - ) + _obj = cls.model_validate({ + "deployment": Deployment.from_dict(obj["deployment"]) if obj.get("deployment") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/redeploy_request_info.py b/koyeb/api_async/models/redeploy_request_info.py index 6889b0c3..1f606e7a 100644 --- a/koyeb/api_async/models/redeploy_request_info.py +++ b/koyeb/api_async/models/redeploy_request_info.py @@ -23,25 +23,15 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RedeployRequestInfo(BaseModel): """ RedeployRequestInfo - """ # noqa: E501 - + """ # noqa: E501 deployment_group: Optional[StrictStr] = None sha: Optional[StrictStr] = None use_cache: Optional[StrictBool] = None - skip_build: Optional[StrictBool] = Field( - default=None, - description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened.", - ) - __properties: ClassVar[List[str]] = [ - "deployment_group", - "sha", - "use_cache", - "skip_build", - ] + skip_build: Optional[StrictBool] = Field(default=None, description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened.") + __properties: ClassVar[List[str]] = ["deployment_group", "sha", "use_cache", "skip_build"] model_config = ConfigDict( validate_by_name=True, @@ -50,6 +40,7 @@ class RedeployRequestInfo(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -73,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -91,12 +83,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "deployment_group": obj.get("deployment_group"), - "sha": obj.get("sha"), - "use_cache": obj.get("use_cache"), - "skip_build": obj.get("skip_build"), - } - ) + _obj = cls.model_validate({ + "deployment_group": obj.get("deployment_group"), + "sha": obj.get("sha"), + "use_cache": obj.get("use_cache"), + "skip_build": obj.get("skip_build") + }) return _obj + + diff --git a/koyeb/api_async/models/region.py b/koyeb/api_async/models/region.py index da918102..7af81cd7 100644 --- a/koyeb/api_async/models/region.py +++ b/koyeb/api_async/models/region.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Region(BaseModel): """ Region - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None coordinates: Optional[List[StrictStr]] = None @@ -36,20 +34,8 @@ class Region(BaseModel): instances: Optional[List[StrictStr]] = None datacenters: Optional[List[StrictStr]] = None volumes_enabled: Optional[StrictBool] = None - scope: Optional[StrictStr] = Field( - default=None, - description="The scope of the region, continent, metropolitan area, etc.", - ) - __properties: ClassVar[List[str]] = [ - "id", - "name", - "coordinates", - "status", - "instances", - "datacenters", - "volumes_enabled", - "scope", - ] + scope: Optional[StrictStr] = Field(default=None, description="The scope of the region, continent, metropolitan area, etc.") + __properties: ClassVar[List[str]] = ["id", "name", "coordinates", "status", "instances", "datacenters", "volumes_enabled", "scope"] model_config = ConfigDict( validate_by_name=True, @@ -58,6 +44,7 @@ class Region(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -81,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -99,16 +87,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "coordinates": obj.get("coordinates"), - "status": obj.get("status"), - "instances": obj.get("instances"), - "datacenters": obj.get("datacenters"), - "volumes_enabled": obj.get("volumes_enabled"), - "scope": obj.get("scope"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "coordinates": obj.get("coordinates"), + "status": obj.get("status"), + "instances": obj.get("instances"), + "datacenters": obj.get("datacenters"), + "volumes_enabled": obj.get("volumes_enabled"), + "scope": obj.get("scope") + }) return _obj + + diff --git a/koyeb/api_async/models/region_availability.py b/koyeb/api_async/models/region_availability.py index 0c965c28..a4b24f98 100644 --- a/koyeb/api_async/models/region_availability.py +++ b/koyeb/api_async/models/region_availability.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RegionAvailability(BaseModel): """ RegionAvailability - """ # noqa: E501 - + """ # noqa: E501 availability: Optional[AvailabilityLevel] = AvailabilityLevel.UNKNOWN __properties: ClassVar[List[str]] = ["availability"] @@ -40,6 +38,7 @@ class RegionAvailability(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,11 +81,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "availability": obj.get("availability") - if obj.get("availability") is not None - else AvailabilityLevel.UNKNOWN - } - ) + _obj = cls.model_validate({ + "availability": obj.get("availability") if obj.get("availability") is not None else AvailabilityLevel.UNKNOWN + }) return _obj + + diff --git a/koyeb/api_async/models/region_list_item.py b/koyeb/api_async/models/region_list_item.py index fc808a2f..2e407704 100644 --- a/koyeb/api_async/models/region_list_item.py +++ b/koyeb/api_async/models/region_list_item.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RegionListItem(BaseModel): """ RegionListItem - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None coordinates: Optional[List[StrictStr]] = None @@ -36,20 +34,8 @@ class RegionListItem(BaseModel): instances: Optional[List[StrictStr]] = None datacenters: Optional[List[StrictStr]] = None volumes_enabled: Optional[StrictBool] = None - scope: Optional[StrictStr] = Field( - default=None, - description="The scope of the region, continent, metropolitan area, etc.", - ) - __properties: ClassVar[List[str]] = [ - "id", - "name", - "coordinates", - "status", - "instances", - "datacenters", - "volumes_enabled", - "scope", - ] + scope: Optional[StrictStr] = Field(default=None, description="The scope of the region, continent, metropolitan area, etc.") + __properties: ClassVar[List[str]] = ["id", "name", "coordinates", "status", "instances", "datacenters", "volumes_enabled", "scope"] model_config = ConfigDict( validate_by_name=True, @@ -58,6 +44,7 @@ class RegionListItem(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -81,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -99,16 +87,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "coordinates": obj.get("coordinates"), - "status": obj.get("status"), - "instances": obj.get("instances"), - "datacenters": obj.get("datacenters"), - "volumes_enabled": obj.get("volumes_enabled"), - "scope": obj.get("scope"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "coordinates": obj.get("coordinates"), + "status": obj.get("status"), + "instances": obj.get("instances"), + "datacenters": obj.get("datacenters"), + "volumes_enabled": obj.get("volumes_enabled"), + "scope": obj.get("scope") + }) return _obj + + diff --git a/koyeb/api_async/models/region_usage.py b/koyeb/api_async/models/region_usage.py index b7374c7f..b625ff40 100644 --- a/koyeb/api_async/models/region_usage.py +++ b/koyeb/api_async/models/region_usage.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RegionUsage(BaseModel): """ RegionUsage - """ # noqa: E501 - + """ # noqa: E501 instances: Optional[Dict[str, InstanceUsage]] = None __properties: ClassVar[List[str]] = ["instances"] @@ -40,6 +38,7 @@ class RegionUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,12 +74,9 @@ def to_dict(self) -> Dict[str, Any]: _field_dict = {} if self.instances: for _key_instances in self.instances: - _field_dict[_key_instances] = ( - self.instances[_key_instances].to_dict() - if self.instances[_key_instances] is not None - else None - ) - _dict["instances"] = _field_dict + if self.instances[_key_instances]: + _field_dict[_key_instances] = self.instances[_key_instances].to_dict() + _dict['instances'] = _field_dict return _dict @classmethod @@ -91,14 +88,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "instances": dict( - (_k, InstanceUsage.from_dict(_v)) - for _k, _v in obj["instances"].items() - ) - if obj.get("instances") is not None - else None - } - ) + _obj = cls.model_validate({ + "instances": dict( + (_k, InstanceUsage.from_dict(_v)) + for _k, _v in obj["instances"].items() + ) + if obj.get("instances") is not None + else None + }) return _obj + + diff --git a/koyeb/api_async/models/regional_deployment.py b/koyeb/api_async/models/regional_deployment.py index 32fdb004..183bd6da 100644 --- a/koyeb/api_async/models/regional_deployment.py +++ b/koyeb/api_async/models/regional_deployment.py @@ -20,24 +20,18 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.deployment_provisioning_info import ( - DeploymentProvisioningInfo, -) -from koyeb.api_async.models.regional_deployment_definition import ( - RegionalDeploymentDefinition, -) +from koyeb.api_async.models.deployment_provisioning_info import DeploymentProvisioningInfo +from koyeb.api_async.models.regional_deployment_definition import RegionalDeploymentDefinition from koyeb.api_async.models.regional_deployment_role import RegionalDeploymentRole from koyeb.api_async.models.regional_deployment_status import RegionalDeploymentStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class RegionalDeployment(BaseModel): """ RegionalDeployment - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -63,33 +57,7 @@ class RegionalDeployment(BaseModel): version: Optional[StrictStr] = None deployment_group: Optional[StrictStr] = None deployment_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "updated_at", - "scheduled_at", - "allocated_at", - "started_at", - "succeeded_at", - "terminated_at", - "organization_id", - "app_id", - "service_id", - "region", - "parent_id", - "child_id", - "status", - "messages", - "definition", - "datacenters", - "metadata", - "provisioning_info", - "role", - "instance_snapshot_id", - "version", - "deployment_group", - "deployment_id", - ] + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "scheduled_at", "allocated_at", "started_at", "succeeded_at", "terminated_at", "organization_id", "app_id", "service_id", "region", "parent_id", "child_id", "status", "messages", "definition", "datacenters", "metadata", "provisioning_info", "role", "instance_snapshot_id", "version", "deployment_group", "deployment_id"] model_config = ConfigDict( validate_by_name=True, @@ -98,6 +66,7 @@ class RegionalDeployment(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -121,7 +90,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -130,10 +100,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of definition if self.definition: - _dict["definition"] = self.definition.to_dict() + _dict['definition'] = self.definition.to_dict() # override the default output from pydantic by calling `to_dict()` of provisioning_info if self.provisioning_info: - _dict["provisioning_info"] = self.provisioning_info.to_dict() + _dict['provisioning_info'] = self.provisioning_info.to_dict() return _dict @classmethod @@ -145,43 +115,33 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "scheduled_at": obj.get("scheduled_at"), - "allocated_at": obj.get("allocated_at"), - "started_at": obj.get("started_at"), - "succeeded_at": obj.get("succeeded_at"), - "terminated_at": obj.get("terminated_at"), - "organization_id": obj.get("organization_id"), - "app_id": obj.get("app_id"), - "service_id": obj.get("service_id"), - "region": obj.get("region"), - "parent_id": obj.get("parent_id"), - "child_id": obj.get("child_id"), - "status": obj.get("status") - if obj.get("status") is not None - else RegionalDeploymentStatus.PENDING, - "messages": obj.get("messages"), - "definition": RegionalDeploymentDefinition.from_dict(obj["definition"]) - if obj.get("definition") is not None - else None, - "datacenters": obj.get("datacenters"), - "metadata": obj.get("metadata"), - "provisioning_info": DeploymentProvisioningInfo.from_dict( - obj["provisioning_info"] - ) - if obj.get("provisioning_info") is not None - else None, - "role": obj.get("role") - if obj.get("role") is not None - else RegionalDeploymentRole.INVALID, - "instance_snapshot_id": obj.get("instance_snapshot_id"), - "version": obj.get("version"), - "deployment_group": obj.get("deployment_group"), - "deployment_id": obj.get("deployment_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "scheduled_at": obj.get("scheduled_at"), + "allocated_at": obj.get("allocated_at"), + "started_at": obj.get("started_at"), + "succeeded_at": obj.get("succeeded_at"), + "terminated_at": obj.get("terminated_at"), + "organization_id": obj.get("organization_id"), + "app_id": obj.get("app_id"), + "service_id": obj.get("service_id"), + "region": obj.get("region"), + "parent_id": obj.get("parent_id"), + "child_id": obj.get("child_id"), + "status": obj.get("status") if obj.get("status") is not None else RegionalDeploymentStatus.PENDING, + "messages": obj.get("messages"), + "definition": RegionalDeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None, + "datacenters": obj.get("datacenters"), + "metadata": obj.get("metadata"), + "provisioning_info": DeploymentProvisioningInfo.from_dict(obj["provisioning_info"]) if obj.get("provisioning_info") is not None else None, + "role": obj.get("role") if obj.get("role") is not None else RegionalDeploymentRole.INVALID, + "instance_snapshot_id": obj.get("instance_snapshot_id"), + "version": obj.get("version"), + "deployment_group": obj.get("deployment_group"), + "deployment_id": obj.get("deployment_id") + }) return _obj + + diff --git a/koyeb/api_async/models/regional_deployment_definition.py b/koyeb/api_async/models/regional_deployment_definition.py index 88cc9589..abcbb4a5 100644 --- a/koyeb/api_async/models/regional_deployment_definition.py +++ b/koyeb/api_async/models/regional_deployment_definition.py @@ -28,9 +28,7 @@ from koyeb.api_async.models.git_source import GitSource from koyeb.api_async.models.network_policy import NetworkPolicy from koyeb.api_async.models.port import Port -from koyeb.api_async.models.regional_deployment_definition_type import ( - RegionalDeploymentDefinitionType, -) +from koyeb.api_async.models.regional_deployment_definition_type import RegionalDeploymentDefinitionType from koyeb.api_async.models.regional_deployment_mesh import RegionalDeploymentMesh from koyeb.api_async.models.regional_deployment_volume import RegionalDeploymentVolume from koyeb.api_async.models.route import Route @@ -39,16 +37,12 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RegionalDeploymentDefinition(BaseModel): """ RegionalDeploymentDefinition - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None - type: Optional[ - RegionalDeploymentDefinitionType - ] = RegionalDeploymentDefinitionType.INVALID + type: Optional[RegionalDeploymentDefinitionType] = RegionalDeploymentDefinitionType.INVALID strategy: Optional[DeploymentStrategy] = None routes: Optional[List[Route]] = None ports: Optional[List[Port]] = None @@ -61,34 +55,12 @@ class RegionalDeploymentDefinition(BaseModel): volumes: Optional[List[RegionalDeploymentVolume]] = None config_files: Optional[List[ConfigFile]] = None skip_cache: Optional[StrictBool] = None - mesh: Optional[ - RegionalDeploymentMesh - ] = RegionalDeploymentMesh.REGIONAL_DEPLOYMENT_MESH_AUTO + mesh: Optional[RegionalDeploymentMesh] = RegionalDeploymentMesh.REGIONAL_DEPLOYMENT_MESH_AUTO network_policy: Optional[NetworkPolicy] = None docker: Optional[DockerSource] = None git: Optional[GitSource] = None archive: Optional[ArchiveSource] = None - __properties: ClassVar[List[str]] = [ - "name", - "type", - "strategy", - "routes", - "ports", - "env", - "region", - "scaling", - "instance_type", - "deployment_group", - "health_checks", - "volumes", - "config_files", - "skip_cache", - "mesh", - "network_policy", - "docker", - "git", - "archive", - ] + __properties: ClassVar[List[str]] = ["name", "type", "strategy", "routes", "ports", "env", "region", "scaling", "instance_type", "deployment_group", "health_checks", "volumes", "config_files", "skip_cache", "mesh", "network_policy", "docker", "git", "archive"] model_config = ConfigDict( validate_by_name=True, @@ -97,6 +69,7 @@ class RegionalDeploymentDefinition(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -120,7 +93,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -129,72 +103,64 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of strategy if self.strategy: - _dict["strategy"] = self.strategy.to_dict() + _dict['strategy'] = self.strategy.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in routes (list) _items = [] if self.routes: for _item_routes in self.routes: - _items.append( - _item_routes.to_dict() if _item_routes is not None else None - ) - _dict["routes"] = _items + if _item_routes: + _items.append(_item_routes.to_dict()) + _dict['routes'] = _items # override the default output from pydantic by calling `to_dict()` of each item in ports (list) _items = [] if self.ports: for _item_ports in self.ports: - _items.append( - _item_ports.to_dict() if _item_ports is not None else None - ) - _dict["ports"] = _items + if _item_ports: + _items.append(_item_ports.to_dict()) + _dict['ports'] = _items # override the default output from pydantic by calling `to_dict()` of each item in env (list) _items = [] if self.env: for _item_env in self.env: - _items.append(_item_env.to_dict() if _item_env is not None else None) - _dict["env"] = _items + if _item_env: + _items.append(_item_env.to_dict()) + _dict['env'] = _items # override the default output from pydantic by calling `to_dict()` of scaling if self.scaling: - _dict["scaling"] = self.scaling.to_dict() + _dict['scaling'] = self.scaling.to_dict() # override the default output from pydantic by calling `to_dict()` of each item in health_checks (list) _items = [] if self.health_checks: for _item_health_checks in self.health_checks: - _items.append( - _item_health_checks.to_dict() - if _item_health_checks is not None - else None - ) - _dict["health_checks"] = _items + if _item_health_checks: + _items.append(_item_health_checks.to_dict()) + _dict['health_checks'] = _items # override the default output from pydantic by calling `to_dict()` of each item in volumes (list) _items = [] if self.volumes: for _item_volumes in self.volumes: - _items.append( - _item_volumes.to_dict() if _item_volumes is not None else None - ) - _dict["volumes"] = _items + if _item_volumes: + _items.append(_item_volumes.to_dict()) + _dict['volumes'] = _items # override the default output from pydantic by calling `to_dict()` of each item in config_files (list) _items = [] if self.config_files: for _item_config_files in self.config_files: - _items.append( - _item_config_files.to_dict() - if _item_config_files is not None - else None - ) - _dict["config_files"] = _items + if _item_config_files: + _items.append(_item_config_files.to_dict()) + _dict['config_files'] = _items # override the default output from pydantic by calling `to_dict()` of network_policy if self.network_policy: - _dict["network_policy"] = self.network_policy.to_dict() + _dict['network_policy'] = self.network_policy.to_dict() # override the default output from pydantic by calling `to_dict()` of docker if self.docker: - _dict["docker"] = self.docker.to_dict() + _dict['docker'] = self.docker.to_dict() # override the default output from pydantic by calling `to_dict()` of git if self.git: - _dict["git"] = self.git.to_dict() + _dict['git'] = self.git.to_dict() # override the default output from pydantic by calling `to_dict()` of archive if self.archive: - _dict["archive"] = self.archive.to_dict() + _dict['archive'] = self.archive.to_dict() return _dict @classmethod @@ -206,63 +172,27 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "type": obj.get("type") - if obj.get("type") is not None - else RegionalDeploymentDefinitionType.INVALID, - "strategy": DeploymentStrategy.from_dict(obj["strategy"]) - if obj.get("strategy") is not None - else None, - "routes": [Route.from_dict(_item) for _item in obj["routes"]] - if obj.get("routes") is not None - else None, - "ports": [Port.from_dict(_item) for _item in obj["ports"]] - if obj.get("ports") is not None - else None, - "env": [Env.from_dict(_item) for _item in obj["env"]] - if obj.get("env") is not None - else None, - "region": obj.get("region"), - "scaling": Scaling.from_dict(obj["scaling"]) - if obj.get("scaling") is not None - else None, - "instance_type": obj.get("instance_type"), - "deployment_group": obj.get("deployment_group"), - "health_checks": [ - DeploymentHealthCheck.from_dict(_item) - for _item in obj["health_checks"] - ] - if obj.get("health_checks") is not None - else None, - "volumes": [ - RegionalDeploymentVolume.from_dict(_item) - for _item in obj["volumes"] - ] - if obj.get("volumes") is not None - else None, - "config_files": [ - ConfigFile.from_dict(_item) for _item in obj["config_files"] - ] - if obj.get("config_files") is not None - else None, - "skip_cache": obj.get("skip_cache"), - "mesh": obj.get("mesh") - if obj.get("mesh") is not None - else RegionalDeploymentMesh.REGIONAL_DEPLOYMENT_MESH_AUTO, - "network_policy": NetworkPolicy.from_dict(obj["network_policy"]) - if obj.get("network_policy") is not None - else None, - "docker": DockerSource.from_dict(obj["docker"]) - if obj.get("docker") is not None - else None, - "git": GitSource.from_dict(obj["git"]) - if obj.get("git") is not None - else None, - "archive": ArchiveSource.from_dict(obj["archive"]) - if obj.get("archive") is not None - else None, - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "type": obj.get("type") if obj.get("type") is not None else RegionalDeploymentDefinitionType.INVALID, + "strategy": DeploymentStrategy.from_dict(obj["strategy"]) if obj.get("strategy") is not None else None, + "routes": [Route.from_dict(_item) for _item in obj["routes"]] if obj.get("routes") is not None else None, + "ports": [Port.from_dict(_item) for _item in obj["ports"]] if obj.get("ports") is not None else None, + "env": [Env.from_dict(_item) for _item in obj["env"]] if obj.get("env") is not None else None, + "region": obj.get("region"), + "scaling": Scaling.from_dict(obj["scaling"]) if obj.get("scaling") is not None else None, + "instance_type": obj.get("instance_type"), + "deployment_group": obj.get("deployment_group"), + "health_checks": [DeploymentHealthCheck.from_dict(_item) for _item in obj["health_checks"]] if obj.get("health_checks") is not None else None, + "volumes": [RegionalDeploymentVolume.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None, + "config_files": [ConfigFile.from_dict(_item) for _item in obj["config_files"]] if obj.get("config_files") is not None else None, + "skip_cache": obj.get("skip_cache"), + "mesh": obj.get("mesh") if obj.get("mesh") is not None else RegionalDeploymentMesh.REGIONAL_DEPLOYMENT_MESH_AUTO, + "network_policy": NetworkPolicy.from_dict(obj["network_policy"]) if obj.get("network_policy") is not None else None, + "docker": DockerSource.from_dict(obj["docker"]) if obj.get("docker") is not None else None, + "git": GitSource.from_dict(obj["git"]) if obj.get("git") is not None else None, + "archive": ArchiveSource.from_dict(obj["archive"]) if obj.get("archive") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/regional_deployment_definition_type.py b/koyeb/api_async/models/regional_deployment_definition_type.py index cf99a593..d130da32 100644 --- a/koyeb/api_async/models/regional_deployment_definition_type.py +++ b/koyeb/api_async/models/regional_deployment_definition_type.py @@ -26,13 +26,15 @@ class RegionalDeploymentDefinitionType(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - WEB = "WEB" - WORKER = "WORKER" - UNDERSCORE = "_" - SANDBOX = "SANDBOX" + INVALID = 'INVALID' + WEB = 'WEB' + WORKER = 'WORKER' + UNDERSCORE = '_' + SANDBOX = 'SANDBOX' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of RegionalDeploymentDefinitionType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/regional_deployment_event.py b/koyeb/api_async/models/regional_deployment_event.py index 0d1c6dec..9d09295a 100644 --- a/koyeb/api_async/models/regional_deployment_event.py +++ b/koyeb/api_async/models/regional_deployment_event.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RegionalDeploymentEvent(BaseModel): """ RegionalDeploymentEvent - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None when: Optional[datetime] = None organization_id: Optional[StrictStr] = None @@ -37,15 +35,7 @@ class RegionalDeploymentEvent(BaseModel): type: Optional[StrictStr] = None message: Optional[StrictStr] = None metadata: Optional[Dict[str, Any]] = None - __properties: ClassVar[List[str]] = [ - "id", - "when", - "organization_id", - "regional_deployment_id", - "type", - "message", - "metadata", - ] + __properties: ClassVar[List[str]] = ["id", "when", "organization_id", "regional_deployment_id", "type", "message", "metadata"] model_config = ConfigDict( validate_by_name=True, @@ -54,6 +44,7 @@ class RegionalDeploymentEvent(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -95,15 +87,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "when": obj.get("when"), - "organization_id": obj.get("organization_id"), - "regional_deployment_id": obj.get("regional_deployment_id"), - "type": obj.get("type"), - "message": obj.get("message"), - "metadata": obj.get("metadata"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "when": obj.get("when"), + "organization_id": obj.get("organization_id"), + "regional_deployment_id": obj.get("regional_deployment_id"), + "type": obj.get("type"), + "message": obj.get("message"), + "metadata": obj.get("metadata") + }) return _obj + + diff --git a/koyeb/api_async/models/regional_deployment_list_item.py b/koyeb/api_async/models/regional_deployment_list_item.py index 908cd4f6..3a6a3a96 100644 --- a/koyeb/api_async/models/regional_deployment_list_item.py +++ b/koyeb/api_async/models/regional_deployment_list_item.py @@ -20,20 +20,16 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.regional_deployment_definition import ( - RegionalDeploymentDefinition, -) +from koyeb.api_async.models.regional_deployment_definition import RegionalDeploymentDefinition from koyeb.api_async.models.regional_deployment_status import RegionalDeploymentStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class RegionalDeploymentListItem(BaseModel): """ RegionalDeploymentListItem - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -42,16 +38,7 @@ class RegionalDeploymentListItem(BaseModel): messages: Optional[List[StrictStr]] = None definition: Optional[RegionalDeploymentDefinition] = None instance_snapshot_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "updated_at", - "region", - "status", - "messages", - "definition", - "instance_snapshot_id", - ] + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "region", "status", "messages", "definition", "instance_snapshot_id"] model_config = ConfigDict( validate_by_name=True, @@ -60,6 +47,7 @@ class RegionalDeploymentListItem(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -83,7 +71,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -92,7 +81,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of definition if self.definition: - _dict["definition"] = self.definition.to_dict() + _dict['definition'] = self.definition.to_dict() return _dict @classmethod @@ -104,20 +93,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "region": obj.get("region"), - "status": obj.get("status") - if obj.get("status") is not None - else RegionalDeploymentStatus.PENDING, - "messages": obj.get("messages"), - "definition": RegionalDeploymentDefinition.from_dict(obj["definition"]) - if obj.get("definition") is not None - else None, - "instance_snapshot_id": obj.get("instance_snapshot_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "region": obj.get("region"), + "status": obj.get("status") if obj.get("status") is not None else RegionalDeploymentStatus.PENDING, + "messages": obj.get("messages"), + "definition": RegionalDeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None, + "instance_snapshot_id": obj.get("instance_snapshot_id") + }) return _obj + + diff --git a/koyeb/api_async/models/regional_deployment_mesh.py b/koyeb/api_async/models/regional_deployment_mesh.py index 2a819434..6de8183d 100644 --- a/koyeb/api_async/models/regional_deployment_mesh.py +++ b/koyeb/api_async/models/regional_deployment_mesh.py @@ -26,11 +26,13 @@ class RegionalDeploymentMesh(str, Enum): """ allowed enum values """ - REGIONAL_DEPLOYMENT_MESH_AUTO = "REGIONAL_DEPLOYMENT_MESH_AUTO" - REGIONAL_DEPLOYMENT_MESH_ENABLED = "REGIONAL_DEPLOYMENT_MESH_ENABLED" - REGIONAL_DEPLOYMENT_MESH_DISABLED = "REGIONAL_DEPLOYMENT_MESH_DISABLED" + REGIONAL_DEPLOYMENT_MESH_AUTO = 'REGIONAL_DEPLOYMENT_MESH_AUTO' + REGIONAL_DEPLOYMENT_MESH_ENABLED = 'REGIONAL_DEPLOYMENT_MESH_ENABLED' + REGIONAL_DEPLOYMENT_MESH_DISABLED = 'REGIONAL_DEPLOYMENT_MESH_DISABLED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of RegionalDeploymentMesh from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/regional_deployment_role.py b/koyeb/api_async/models/regional_deployment_role.py index 92908b22..1a17b3e3 100644 --- a/koyeb/api_async/models/regional_deployment_role.py +++ b/koyeb/api_async/models/regional_deployment_role.py @@ -26,12 +26,14 @@ class RegionalDeploymentRole(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - ACTIVE = "ACTIVE" - UPCOMING = "UPCOMING" - CURRENT = "CURRENT" + INVALID = 'INVALID' + ACTIVE = 'ACTIVE' + UPCOMING = 'UPCOMING' + CURRENT = 'CURRENT' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of RegionalDeploymentRole from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/regional_deployment_status.py b/koyeb/api_async/models/regional_deployment_status.py index 7b21b754..fc0a3635 100644 --- a/koyeb/api_async/models/regional_deployment_status.py +++ b/koyeb/api_async/models/regional_deployment_status.py @@ -26,23 +26,25 @@ class RegionalDeploymentStatus(str, Enum): """ allowed enum values """ - PENDING = "PENDING" - PROVISIONING = "PROVISIONING" - SCHEDULED = "SCHEDULED" - CANCELING = "CANCELING" - CANCELED = "CANCELED" - ALLOCATING = "ALLOCATING" - STARTING = "STARTING" - HEALTHY = "HEALTHY" - DEGRADED = "DEGRADED" - UNHEALTHY = "UNHEALTHY" - STOPPING = "STOPPING" - STOPPED = "STOPPED" - ERRORING = "ERRORING" - ERROR = "ERROR" - SLEEPING = "SLEEPING" + PENDING = 'PENDING' + PROVISIONING = 'PROVISIONING' + SCHEDULED = 'SCHEDULED' + CANCELING = 'CANCELING' + CANCELED = 'CANCELED' + ALLOCATING = 'ALLOCATING' + STARTING = 'STARTING' + HEALTHY = 'HEALTHY' + DEGRADED = 'DEGRADED' + UNHEALTHY = 'UNHEALTHY' + STOPPING = 'STOPPING' + STOPPED = 'STOPPED' + ERRORING = 'ERRORING' + ERROR = 'ERROR' + SLEEPING = 'SLEEPING' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of RegionalDeploymentStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/regional_deployment_volume.py b/koyeb/api_async/models/regional_deployment_volume.py index 0758da9e..51e48ee7 100644 --- a/koyeb/api_async/models/regional_deployment_volume.py +++ b/koyeb/api_async/models/regional_deployment_volume.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RegionalDeploymentVolume(BaseModel): """ RegionalDeploymentVolume - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None path: Optional[StrictStr] = None replica_index: Optional[StrictInt] = None @@ -41,6 +39,7 @@ class RegionalDeploymentVolume(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,11 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "path": obj.get("path"), - "replica_index": obj.get("replica_index"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "path": obj.get("path"), + "replica_index": obj.get("replica_index") + }) return _obj + + diff --git a/koyeb/api_async/models/remove_organization_member_reply.py b/koyeb/api_async/models/remove_organization_member_reply.py index 4d5600d5..7559c562 100644 --- a/koyeb/api_async/models/remove_organization_member_reply.py +++ b/koyeb/api_async/models/remove_organization_member_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RemoveOrganizationMemberReply(BaseModel): """ RemoveOrganizationMemberReply - """ # noqa: E501 - + """ # noqa: E501 member: Optional[OrganizationMember] = None __properties: ClassVar[List[str]] = ["member"] @@ -40,6 +38,7 @@ class RemoveOrganizationMemberReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of member if self.member: - _dict["member"] = self.member.to_dict() + _dict['member'] = self.member.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "member": OrganizationMember.from_dict(obj["member"]) - if obj.get("member") is not None - else None - } - ) + _obj = cls.model_validate({ + "member": OrganizationMember.from_dict(obj["member"]) if obj.get("member") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/resend_organization_invitation_reply.py b/koyeb/api_async/models/resend_organization_invitation_reply.py index fffa6b21..b799e09d 100644 --- a/koyeb/api_async/models/resend_organization_invitation_reply.py +++ b/koyeb/api_async/models/resend_organization_invitation_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ResendOrganizationInvitationReply(BaseModel): """ ResendOrganizationInvitationReply - """ # noqa: E501 - + """ # noqa: E501 invitation: Optional[OrganizationInvitation] = None __properties: ClassVar[List[str]] = ["invitation"] @@ -40,6 +38,7 @@ class ResendOrganizationInvitationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of invitation if self.invitation: - _dict["invitation"] = self.invitation.to_dict() + _dict['invitation'] = self.invitation.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "invitation": OrganizationInvitation.from_dict(obj["invitation"]) - if obj.get("invitation") is not None - else None - } - ) + _obj = cls.model_validate({ + "invitation": OrganizationInvitation.from_dict(obj["invitation"]) if obj.get("invitation") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/reset_password_request.py b/koyeb/api_async/models/reset_password_request.py index 911dd4a1..f2016ae1 100644 --- a/koyeb/api_async/models/reset_password_request.py +++ b/koyeb/api_async/models/reset_password_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ResetPasswordRequest(BaseModel): """ ResetPasswordRequest - """ # noqa: E501 - + """ # noqa: E501 email: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["email"] @@ -39,6 +37,7 @@ class ResetPasswordRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"email": obj.get("email")}) + _obj = cls.model_validate({ + "email": obj.get("email") + }) return _obj + + diff --git a/koyeb/api_async/models/reveal_secret_reply.py b/koyeb/api_async/models/reveal_secret_reply.py index de3b4836..ccb8be1c 100644 --- a/koyeb/api_async/models/reveal_secret_reply.py +++ b/koyeb/api_async/models/reveal_secret_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class RevealSecretReply(BaseModel): """ RevealSecretReply - """ # noqa: E501 - + """ # noqa: E501 value: Optional[Dict[str, Any]] = None __properties: ClassVar[List[str]] = ["value"] @@ -39,6 +37,7 @@ class RevealSecretReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"value": obj.get("value")}) + _obj = cls.model_validate({ + "value": obj.get("value") + }) return _obj + + diff --git a/koyeb/api_async/models/review_organization_capacity_reply.py b/koyeb/api_async/models/review_organization_capacity_reply.py index ffce029e..4d053dac 100644 --- a/koyeb/api_async/models/review_organization_capacity_reply.py +++ b/koyeb/api_async/models/review_organization_capacity_reply.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ReviewOrganizationCapacityReply(BaseModel): """ ReviewOrganizationCapacityReply - """ # noqa: E501 - + """ # noqa: E501 has_capacity: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["has_capacity"] @@ -39,6 +37,7 @@ class ReviewOrganizationCapacityReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"has_capacity": obj.get("has_capacity")}) + _obj = cls.model_validate({ + "has_capacity": obj.get("has_capacity") + }) return _obj + + diff --git a/koyeb/api_async/models/review_organization_capacity_request.py b/koyeb/api_async/models/review_organization_capacity_request.py index accb33be..e945f69a 100644 --- a/koyeb/api_async/models/review_organization_capacity_request.py +++ b/koyeb/api_async/models/review_organization_capacity_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ReviewOrganizationCapacityRequest(BaseModel): """ ReviewOrganizationCapacityRequest - """ # noqa: E501 - + """ # noqa: E501 plan: Optional[StrictStr] = None trialing: Optional[StrictBool] = None __properties: ClassVar[List[str]] = ["plan", "trialing"] @@ -40,6 +38,7 @@ class ReviewOrganizationCapacityRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"plan": obj.get("plan"), "trialing": obj.get("trialing")} - ) + _obj = cls.model_validate({ + "plan": obj.get("plan"), + "trialing": obj.get("trialing") + }) return _obj + + diff --git a/koyeb/api_async/models/route.py b/koyeb/api_async/models/route.py index 23efe0b0..da23b40b 100644 --- a/koyeb/api_async/models/route.py +++ b/koyeb/api_async/models/route.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Route(BaseModel): """ Route - """ # noqa: E501 - + """ # noqa: E501 port: Optional[StrictInt] = None path: Optional[StrictStr] = None security_policies: Optional[SecurityPolicies] = None @@ -42,6 +40,7 @@ class Route(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,7 +74,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of security_policies if self.security_policies: - _dict["security_policies"] = self.security_policies.to_dict() + _dict['security_policies'] = self.security_policies.to_dict() return _dict @classmethod @@ -86,15 +86,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "port": obj.get("port"), - "path": obj.get("path"), - "security_policies": SecurityPolicies.from_dict( - obj["security_policies"] - ) - if obj.get("security_policies") is not None - else None, - } - ) + _obj = cls.model_validate({ + "port": obj.get("port"), + "path": obj.get("path"), + "security_policies": SecurityPolicies.from_dict(obj["security_policies"]) if obj.get("security_policies") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/sample.py b/koyeb/api_async/models/sample.py index a462263c..a21ef90f 100644 --- a/koyeb/api_async/models/sample.py +++ b/koyeb/api_async/models/sample.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Sample(BaseModel): """ Sample - """ # noqa: E501 - + """ # noqa: E501 timestamp: Optional[StrictStr] = None value: Optional[Union[StrictFloat, StrictInt]] = None __properties: ClassVar[List[str]] = ["timestamp", "value"] @@ -40,6 +38,7 @@ class Sample(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"timestamp": obj.get("timestamp"), "value": obj.get("value")} - ) + _obj = cls.model_validate({ + "timestamp": obj.get("timestamp"), + "value": obj.get("value") + }) return _obj + + diff --git a/koyeb/api_async/models/sandbox_metadata.py b/koyeb/api_async/models/sandbox_metadata.py index 3868167c..9233fbc2 100644 --- a/koyeb/api_async/models/sandbox_metadata.py +++ b/koyeb/api_async/models/sandbox_metadata.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class SandboxMetadata(BaseModel): """ SandboxMetadata - """ # noqa: E501 - + """ # noqa: E501 public_url: Optional[StrictStr] = None routing_key: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["public_url", "routing_key"] @@ -40,6 +38,7 @@ class SandboxMetadata(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"public_url": obj.get("public_url"), "routing_key": obj.get("routing_key")} - ) + _obj = cls.model_validate({ + "public_url": obj.get("public_url"), + "routing_key": obj.get("routing_key") + }) return _obj + + diff --git a/koyeb/api_async/models/scale_to_zero_quotas.py b/koyeb/api_async/models/scale_to_zero_quotas.py index afe4e3d7..9f6ce06d 100644 --- a/koyeb/api_async/models/scale_to_zero_quotas.py +++ b/koyeb/api_async/models/scale_to_zero_quotas.py @@ -23,26 +23,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ScaleToZeroQuotas(BaseModel): """ ScaleToZeroQuotas - """ # noqa: E501 - + """ # noqa: E501 is_deep_sleep_enabled: Optional[StrictBool] = None deep_sleep_idle_delay_min: Optional[StrictInt] = None deep_sleep_idle_delay_max: Optional[StrictInt] = None is_light_sleep_enabled: Optional[StrictBool] = None light_sleep_idle_delay_min: Optional[StrictInt] = None light_sleep_idle_delay_max: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = [ - "is_deep_sleep_enabled", - "deep_sleep_idle_delay_min", - "deep_sleep_idle_delay_max", - "is_light_sleep_enabled", - "light_sleep_idle_delay_min", - "light_sleep_idle_delay_max", - ] + __properties: ClassVar[List[str]] = ["is_deep_sleep_enabled", "deep_sleep_idle_delay_min", "deep_sleep_idle_delay_max", "is_light_sleep_enabled", "light_sleep_idle_delay_min", "light_sleep_idle_delay_max"] model_config = ConfigDict( validate_by_name=True, @@ -51,6 +42,7 @@ class ScaleToZeroQuotas(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -92,14 +85,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "is_deep_sleep_enabled": obj.get("is_deep_sleep_enabled"), - "deep_sleep_idle_delay_min": obj.get("deep_sleep_idle_delay_min"), - "deep_sleep_idle_delay_max": obj.get("deep_sleep_idle_delay_max"), - "is_light_sleep_enabled": obj.get("is_light_sleep_enabled"), - "light_sleep_idle_delay_min": obj.get("light_sleep_idle_delay_min"), - "light_sleep_idle_delay_max": obj.get("light_sleep_idle_delay_max"), - } - ) + _obj = cls.model_validate({ + "is_deep_sleep_enabled": obj.get("is_deep_sleep_enabled"), + "deep_sleep_idle_delay_min": obj.get("deep_sleep_idle_delay_min"), + "deep_sleep_idle_delay_max": obj.get("deep_sleep_idle_delay_max"), + "is_light_sleep_enabled": obj.get("is_light_sleep_enabled"), + "light_sleep_idle_delay_min": obj.get("light_sleep_idle_delay_min"), + "light_sleep_idle_delay_max": obj.get("light_sleep_idle_delay_max") + }) return _obj + + diff --git a/koyeb/api_async/models/scaling.py b/koyeb/api_async/models/scaling.py index 6aaaf565..d4873533 100644 --- a/koyeb/api_async/models/scaling.py +++ b/koyeb/api_async/models/scaling.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Scaling(BaseModel): """ Scaling - """ # noqa: E501 - + """ # noqa: E501 min: Optional[StrictInt] = None max: Optional[StrictInt] = None targets: Optional[List[DeploymentScalingTarget]] = None @@ -42,6 +40,7 @@ class Scaling(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -76,10 +76,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.targets: for _item_targets in self.targets: - _items.append( - _item_targets.to_dict() if _item_targets is not None else None - ) - _dict["targets"] = _items + if _item_targets: + _items.append(_item_targets.to_dict()) + _dict['targets'] = _items return _dict @classmethod @@ -91,15 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "min": obj.get("min"), - "max": obj.get("max"), - "targets": [ - DeploymentScalingTarget.from_dict(_item) for _item in obj["targets"] - ] - if obj.get("targets") is not None - else None, - } - ) + _obj = cls.model_validate({ + "min": obj.get("min"), + "max": obj.get("max"), + "targets": [DeploymentScalingTarget.from_dict(_item) for _item in obj["targets"]] if obj.get("targets") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/secret.py b/koyeb/api_async/models/secret.py index 11d054e6..3dc3cedb 100644 --- a/koyeb/api_async/models/secret.py +++ b/koyeb/api_async/models/secret.py @@ -20,49 +20,30 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.azure_container_registry_configuration import ( - AzureContainerRegistryConfiguration, -) +from koyeb.api_async.models.azure_container_registry_configuration import AzureContainerRegistryConfiguration from koyeb.api_async.models.database_role_password import DatabaseRolePassword -from koyeb.api_async.models.digital_ocean_registry_configuration import ( - DigitalOceanRegistryConfiguration, -) -from koyeb.api_async.models.docker_hub_registry_configuration import ( - DockerHubRegistryConfiguration, -) -from koyeb.api_async.models.gcp_container_registry_configuration import ( - GCPContainerRegistryConfiguration, -) -from koyeb.api_async.models.git_hub_registry_configuration import ( - GitHubRegistryConfiguration, -) -from koyeb.api_async.models.git_lab_registry_configuration import ( - GitLabRegistryConfiguration, -) -from koyeb.api_async.models.private_registry_configuration import ( - PrivateRegistryConfiguration, -) +from koyeb.api_async.models.digital_ocean_registry_configuration import DigitalOceanRegistryConfiguration +from koyeb.api_async.models.docker_hub_registry_configuration import DockerHubRegistryConfiguration +from koyeb.api_async.models.gcp_container_registry_configuration import GCPContainerRegistryConfiguration +from koyeb.api_async.models.git_hub_registry_configuration import GitHubRegistryConfiguration +from koyeb.api_async.models.git_lab_registry_configuration import GitLabRegistryConfiguration +from koyeb.api_async.models.private_registry_configuration import PrivateRegistryConfiguration from koyeb.api_async.models.secret_type import SecretType from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class Secret(BaseModel): """ Secret - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None type: Optional[SecretType] = SecretType.SIMPLE updated_at: Optional[datetime] = None created_at: Optional[datetime] = None - project_id: Optional[StrictStr] = Field( - default=None, - description="The project ID this secret belongs to. Empty if the secret is organization-level.", - ) + project_id: Optional[StrictStr] = Field(default=None, description="The project ID this secret belongs to. Empty if the secret is organization-level.") value: Optional[StrictStr] = None docker_hub_registry: Optional[DockerHubRegistryConfiguration] = None private_registry: Optional[PrivateRegistryConfiguration] = None @@ -72,24 +53,7 @@ class Secret(BaseModel): gcp_container_registry: Optional[GCPContainerRegistryConfiguration] = None azure_container_registry: Optional[AzureContainerRegistryConfiguration] = None database_role_password: Optional[DatabaseRolePassword] = None - __properties: ClassVar[List[str]] = [ - "id", - "name", - "organization_id", - "type", - "updated_at", - "created_at", - "project_id", - "value", - "docker_hub_registry", - "private_registry", - "digital_ocean_registry", - "github_registry", - "gitlab_registry", - "gcp_container_registry", - "azure_container_registry", - "database_role_password", - ] + __properties: ClassVar[List[str]] = ["id", "name", "organization_id", "type", "updated_at", "created_at", "project_id", "value", "docker_hub_registry", "private_registry", "digital_ocean_registry", "github_registry", "gitlab_registry", "gcp_container_registry", "azure_container_registry", "database_role_password"] model_config = ConfigDict( validate_by_name=True, @@ -98,6 +62,7 @@ class Secret(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -121,7 +86,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -130,28 +96,28 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of docker_hub_registry if self.docker_hub_registry: - _dict["docker_hub_registry"] = self.docker_hub_registry.to_dict() + _dict['docker_hub_registry'] = self.docker_hub_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of private_registry if self.private_registry: - _dict["private_registry"] = self.private_registry.to_dict() + _dict['private_registry'] = self.private_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of digital_ocean_registry if self.digital_ocean_registry: - _dict["digital_ocean_registry"] = self.digital_ocean_registry.to_dict() + _dict['digital_ocean_registry'] = self.digital_ocean_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of github_registry if self.github_registry: - _dict["github_registry"] = self.github_registry.to_dict() + _dict['github_registry'] = self.github_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of gitlab_registry if self.gitlab_registry: - _dict["gitlab_registry"] = self.gitlab_registry.to_dict() + _dict['gitlab_registry'] = self.gitlab_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of gcp_container_registry if self.gcp_container_registry: - _dict["gcp_container_registry"] = self.gcp_container_registry.to_dict() + _dict['gcp_container_registry'] = self.gcp_container_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of azure_container_registry if self.azure_container_registry: - _dict["azure_container_registry"] = self.azure_container_registry.to_dict() + _dict['azure_container_registry'] = self.azure_container_registry.to_dict() # override the default output from pydantic by calling `to_dict()` of database_role_password if self.database_role_password: - _dict["database_role_password"] = self.database_role_password.to_dict() + _dict['database_role_password'] = self.database_role_password.to_dict() return _dict @classmethod @@ -163,58 +129,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "organization_id": obj.get("organization_id"), - "type": obj.get("type") - if obj.get("type") is not None - else SecretType.SIMPLE, - "updated_at": obj.get("updated_at"), - "created_at": obj.get("created_at"), - "project_id": obj.get("project_id"), - "value": obj.get("value"), - "docker_hub_registry": DockerHubRegistryConfiguration.from_dict( - obj["docker_hub_registry"] - ) - if obj.get("docker_hub_registry") is not None - else None, - "private_registry": PrivateRegistryConfiguration.from_dict( - obj["private_registry"] - ) - if obj.get("private_registry") is not None - else None, - "digital_ocean_registry": DigitalOceanRegistryConfiguration.from_dict( - obj["digital_ocean_registry"] - ) - if obj.get("digital_ocean_registry") is not None - else None, - "github_registry": GitHubRegistryConfiguration.from_dict( - obj["github_registry"] - ) - if obj.get("github_registry") is not None - else None, - "gitlab_registry": GitLabRegistryConfiguration.from_dict( - obj["gitlab_registry"] - ) - if obj.get("gitlab_registry") is not None - else None, - "gcp_container_registry": GCPContainerRegistryConfiguration.from_dict( - obj["gcp_container_registry"] - ) - if obj.get("gcp_container_registry") is not None - else None, - "azure_container_registry": AzureContainerRegistryConfiguration.from_dict( - obj["azure_container_registry"] - ) - if obj.get("azure_container_registry") is not None - else None, - "database_role_password": DatabaseRolePassword.from_dict( - obj["database_role_password"] - ) - if obj.get("database_role_password") is not None - else None, - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "organization_id": obj.get("organization_id"), + "type": obj.get("type") if obj.get("type") is not None else SecretType.SIMPLE, + "updated_at": obj.get("updated_at"), + "created_at": obj.get("created_at"), + "project_id": obj.get("project_id"), + "value": obj.get("value"), + "docker_hub_registry": DockerHubRegistryConfiguration.from_dict(obj["docker_hub_registry"]) if obj.get("docker_hub_registry") is not None else None, + "private_registry": PrivateRegistryConfiguration.from_dict(obj["private_registry"]) if obj.get("private_registry") is not None else None, + "digital_ocean_registry": DigitalOceanRegistryConfiguration.from_dict(obj["digital_ocean_registry"]) if obj.get("digital_ocean_registry") is not None else None, + "github_registry": GitHubRegistryConfiguration.from_dict(obj["github_registry"]) if obj.get("github_registry") is not None else None, + "gitlab_registry": GitLabRegistryConfiguration.from_dict(obj["gitlab_registry"]) if obj.get("gitlab_registry") is not None else None, + "gcp_container_registry": GCPContainerRegistryConfiguration.from_dict(obj["gcp_container_registry"]) if obj.get("gcp_container_registry") is not None else None, + "azure_container_registry": AzureContainerRegistryConfiguration.from_dict(obj["azure_container_registry"]) if obj.get("azure_container_registry") is not None else None, + "database_role_password": DatabaseRolePassword.from_dict(obj["database_role_password"]) if obj.get("database_role_password") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/secret_type.py b/koyeb/api_async/models/secret_type.py index d58e874a..241aca98 100644 --- a/koyeb/api_async/models/secret_type.py +++ b/koyeb/api_async/models/secret_type.py @@ -26,11 +26,13 @@ class SecretType(str, Enum): """ allowed enum values """ - SIMPLE = "SIMPLE" - REGISTRY = "REGISTRY" - MANAGED = "MANAGED" + SIMPLE = 'SIMPLE' + REGISTRY = 'REGISTRY' + MANAGED = 'MANAGED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SecretType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/secrets_summary.py b/koyeb/api_async/models/secrets_summary.py index c9ebbe40..83f0d8a9 100644 --- a/koyeb/api_async/models/secrets_summary.py +++ b/koyeb/api_async/models/secrets_summary.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class SecretsSummary(BaseModel): """ SecretsSummary - """ # noqa: E501 - + """ # noqa: E501 total: Optional[StrictStr] = None by_type: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["total", "by_type"] @@ -40,6 +38,7 @@ class SecretsSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"total": obj.get("total"), "by_type": obj.get("by_type")} - ) + _obj = cls.model_validate({ + "total": obj.get("total"), + "by_type": obj.get("by_type") + }) return _obj + + diff --git a/koyeb/api_async/models/security_policies.py b/koyeb/api_async/models/security_policies.py index 0ad1f95d..11a060c2 100644 --- a/koyeb/api_async/models/security_policies.py +++ b/koyeb/api_async/models/security_policies.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class SecurityPolicies(BaseModel): """ SecurityPolicies - """ # noqa: E501 - + """ # noqa: E501 basic_auths: Optional[List[BasicAuthPolicy]] = None api_keys: Optional[List[StrictStr]] = None __properties: ClassVar[List[str]] = ["basic_auths", "api_keys"] @@ -41,6 +39,7 @@ class SecurityPolicies(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -75,12 +75,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.basic_auths: for _item_basic_auths in self.basic_auths: - _items.append( - _item_basic_auths.to_dict() - if _item_basic_auths is not None - else None - ) - _dict["basic_auths"] = _items + if _item_basic_auths: + _items.append(_item_basic_auths.to_dict()) + _dict['basic_auths'] = _items return _dict @classmethod @@ -92,14 +89,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "basic_auths": [ - BasicAuthPolicy.from_dict(_item) for _item in obj["basic_auths"] - ] - if obj.get("basic_auths") is not None - else None, - "api_keys": obj.get("api_keys"), - } - ) + _obj = cls.model_validate({ + "basic_auths": [BasicAuthPolicy.from_dict(_item) for _item in obj["basic_auths"]] if obj.get("basic_auths") is not None else None, + "api_keys": obj.get("api_keys") + }) return _obj + + diff --git a/koyeb/api_async/models/service.py b/koyeb/api_async/models/service.py index da189219..614a1e87 100644 --- a/koyeb/api_async/models/service.py +++ b/koyeb/api_async/models/service.py @@ -28,12 +28,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Service(BaseModel): """ Service - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -56,30 +54,7 @@ class Service(BaseModel): state: Optional[ServiceState] = None life_cycle: Optional[ServiceLifeCycle] = None service_account_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "updated_at", - "started_at", - "succeeded_at", - "paused_at", - "resumed_at", - "terminated_at", - "name", - "type", - "organization_id", - "project_id", - "app_id", - "status", - "messages", - "version", - "active_deployment_id", - "latest_deployment_id", - "last_provisioned_deployment_id", - "state", - "life_cycle", - "service_account_id", - ] + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "started_at", "succeeded_at", "paused_at", "resumed_at", "terminated_at", "name", "type", "organization_id", "project_id", "app_id", "status", "messages", "version", "active_deployment_id", "latest_deployment_id", "last_provisioned_deployment_id", "state", "life_cycle", "service_account_id"] model_config = ConfigDict( validate_by_name=True, @@ -88,6 +63,7 @@ class Service(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -111,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -120,10 +97,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of state if self.state: - _dict["state"] = self.state.to_dict() + _dict['state'] = self.state.to_dict() # override the default output from pydantic by calling `to_dict()` of life_cycle if self.life_cycle: - _dict["life_cycle"] = self.life_cycle.to_dict() + _dict['life_cycle'] = self.life_cycle.to_dict() return _dict @classmethod @@ -135,40 +112,30 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "started_at": obj.get("started_at"), - "succeeded_at": obj.get("succeeded_at"), - "paused_at": obj.get("paused_at"), - "resumed_at": obj.get("resumed_at"), - "terminated_at": obj.get("terminated_at"), - "name": obj.get("name"), - "type": obj.get("type") - if obj.get("type") is not None - else ServiceType.INVALID_TYPE, - "organization_id": obj.get("organization_id"), - "project_id": obj.get("project_id"), - "app_id": obj.get("app_id"), - "status": obj.get("status") - if obj.get("status") is not None - else ServiceStatus.STARTING, - "messages": obj.get("messages"), - "version": obj.get("version"), - "active_deployment_id": obj.get("active_deployment_id"), - "latest_deployment_id": obj.get("latest_deployment_id"), - "last_provisioned_deployment_id": obj.get( - "last_provisioned_deployment_id" - ), - "state": ServiceState.from_dict(obj["state"]) - if obj.get("state") is not None - else None, - "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) - if obj.get("life_cycle") is not None - else None, - "service_account_id": obj.get("service_account_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "started_at": obj.get("started_at"), + "succeeded_at": obj.get("succeeded_at"), + "paused_at": obj.get("paused_at"), + "resumed_at": obj.get("resumed_at"), + "terminated_at": obj.get("terminated_at"), + "name": obj.get("name"), + "type": obj.get("type") if obj.get("type") is not None else ServiceType.INVALID_TYPE, + "organization_id": obj.get("organization_id"), + "project_id": obj.get("project_id"), + "app_id": obj.get("app_id"), + "status": obj.get("status") if obj.get("status") is not None else ServiceStatus.STARTING, + "messages": obj.get("messages"), + "version": obj.get("version"), + "active_deployment_id": obj.get("active_deployment_id"), + "latest_deployment_id": obj.get("latest_deployment_id"), + "last_provisioned_deployment_id": obj.get("last_provisioned_deployment_id"), + "state": ServiceState.from_dict(obj["state"]) if obj.get("state") is not None else None, + "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) if obj.get("life_cycle") is not None else None, + "service_account_id": obj.get("service_account_id") + }) return _obj + + diff --git a/koyeb/api_async/models/service_event.py b/koyeb/api_async/models/service_event.py index 5146ee01..381f2b0e 100644 --- a/koyeb/api_async/models/service_event.py +++ b/koyeb/api_async/models/service_event.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ServiceEvent(BaseModel): """ ServiceEvent - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None when: Optional[datetime] = None organization_id: Optional[StrictStr] = None @@ -37,15 +35,7 @@ class ServiceEvent(BaseModel): type: Optional[StrictStr] = None message: Optional[StrictStr] = None metadata: Optional[Dict[str, Any]] = None - __properties: ClassVar[List[str]] = [ - "id", - "when", - "organization_id", - "service_id", - "type", - "message", - "metadata", - ] + __properties: ClassVar[List[str]] = ["id", "when", "organization_id", "service_id", "type", "message", "metadata"] model_config = ConfigDict( validate_by_name=True, @@ -54,6 +44,7 @@ class ServiceEvent(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +68,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -95,15 +87,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "when": obj.get("when"), - "organization_id": obj.get("organization_id"), - "service_id": obj.get("service_id"), - "type": obj.get("type"), - "message": obj.get("message"), - "metadata": obj.get("metadata"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "when": obj.get("when"), + "organization_id": obj.get("organization_id"), + "service_id": obj.get("service_id"), + "type": obj.get("type"), + "message": obj.get("message"), + "metadata": obj.get("metadata") + }) return _obj + + diff --git a/koyeb/api_async/models/service_life_cycle.py b/koyeb/api_async/models/service_life_cycle.py index bcec37e4..f0ee3a76 100644 --- a/koyeb/api_async/models/service_life_cycle.py +++ b/koyeb/api_async/models/service_life_cycle.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ServiceLifeCycle(BaseModel): """ ServiceLifeCycle - """ # noqa: E501 - + """ # noqa: E501 delete_after_sleep: Optional[StrictInt] = None delete_after_create: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["delete_after_sleep", "delete_after_create"] @@ -40,6 +38,7 @@ class ServiceLifeCycle(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,10 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "delete_after_sleep": obj.get("delete_after_sleep"), - "delete_after_create": obj.get("delete_after_create"), - } - ) + _obj = cls.model_validate({ + "delete_after_sleep": obj.get("delete_after_sleep"), + "delete_after_create": obj.get("delete_after_create") + }) return _obj + + diff --git a/koyeb/api_async/models/service_list_item.py b/koyeb/api_async/models/service_list_item.py index 033a4f2b..04f484b9 100644 --- a/koyeb/api_async/models/service_list_item.py +++ b/koyeb/api_async/models/service_list_item.py @@ -28,12 +28,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ServiceListItem(BaseModel): """ ServiceListItem - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None type: Optional[ServiceType] = ServiceType.INVALID_TYPE @@ -50,24 +48,7 @@ class ServiceListItem(BaseModel): latest_deployment_id: Optional[StrictStr] = None life_cycle: Optional[ServiceLifeCycle] = None service_account_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "name", - "type", - "organization_id", - "project_id", - "app_id", - "updated_at", - "created_at", - "status", - "messages", - "version", - "state", - "active_deployment_id", - "latest_deployment_id", - "life_cycle", - "service_account_id", - ] + __properties: ClassVar[List[str]] = ["id", "name", "type", "organization_id", "project_id", "app_id", "updated_at", "created_at", "status", "messages", "version", "state", "active_deployment_id", "latest_deployment_id", "life_cycle", "service_account_id"] model_config = ConfigDict( validate_by_name=True, @@ -76,6 +57,7 @@ class ServiceListItem(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -99,7 +81,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -108,10 +91,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of state if self.state: - _dict["state"] = self.state.to_dict() + _dict['state'] = self.state.to_dict() # override the default output from pydantic by calling `to_dict()` of life_cycle if self.life_cycle: - _dict["life_cycle"] = self.life_cycle.to_dict() + _dict['life_cycle'] = self.life_cycle.to_dict() return _dict @classmethod @@ -123,32 +106,24 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "type": obj.get("type") - if obj.get("type") is not None - else ServiceType.INVALID_TYPE, - "organization_id": obj.get("organization_id"), - "project_id": obj.get("project_id"), - "app_id": obj.get("app_id"), - "updated_at": obj.get("updated_at"), - "created_at": obj.get("created_at"), - "status": obj.get("status") - if obj.get("status") is not None - else ServiceStatus.STARTING, - "messages": obj.get("messages"), - "version": obj.get("version"), - "state": ServiceState.from_dict(obj["state"]) - if obj.get("state") is not None - else None, - "active_deployment_id": obj.get("active_deployment_id"), - "latest_deployment_id": obj.get("latest_deployment_id"), - "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) - if obj.get("life_cycle") is not None - else None, - "service_account_id": obj.get("service_account_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type") if obj.get("type") is not None else ServiceType.INVALID_TYPE, + "organization_id": obj.get("organization_id"), + "project_id": obj.get("project_id"), + "app_id": obj.get("app_id"), + "updated_at": obj.get("updated_at"), + "created_at": obj.get("created_at"), + "status": obj.get("status") if obj.get("status") is not None else ServiceStatus.STARTING, + "messages": obj.get("messages"), + "version": obj.get("version"), + "state": ServiceState.from_dict(obj["state"]) if obj.get("state") is not None else None, + "active_deployment_id": obj.get("active_deployment_id"), + "latest_deployment_id": obj.get("latest_deployment_id"), + "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) if obj.get("life_cycle") is not None else None, + "service_account_id": obj.get("service_account_id") + }) return _obj + + diff --git a/koyeb/api_async/models/service_pool.py b/koyeb/api_async/models/service_pool.py index f4a63daf..89704085 100644 --- a/koyeb/api_async/models/service_pool.py +++ b/koyeb/api_async/models/service_pool.py @@ -26,12 +26,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ServicePool(BaseModel): """ ServicePool - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -45,21 +43,7 @@ class ServicePool(BaseModel): messages: Optional[List[StrictStr]] = None generation: Optional[StrictStr] = None customer_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "updated_at", - "organization_id", - "workspace_id", - "name", - "size", - "ready_count", - "definition", - "status", - "messages", - "generation", - "customer_id", - ] + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "organization_id", "workspace_id", "name", "size", "ready_count", "definition", "status", "messages", "generation", "customer_id"] model_config = ConfigDict( validate_by_name=True, @@ -68,6 +52,7 @@ class ServicePool(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -91,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -100,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of definition if self.definition: - _dict["definition"] = self.definition.to_dict() + _dict['definition'] = self.definition.to_dict() return _dict @classmethod @@ -112,25 +98,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "organization_id": obj.get("organization_id"), - "workspace_id": obj.get("workspace_id"), - "name": obj.get("name"), - "size": obj.get("size"), - "ready_count": obj.get("ready_count"), - "definition": DeploymentDefinition.from_dict(obj["definition"]) - if obj.get("definition") is not None - else None, - "status": obj.get("status") - if obj.get("status") is not None - else ServicePoolStatus.UNSPECIFIED, - "messages": obj.get("messages"), - "generation": obj.get("generation"), - "customer_id": obj.get("customer_id"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "organization_id": obj.get("organization_id"), + "workspace_id": obj.get("workspace_id"), + "name": obj.get("name"), + "size": obj.get("size"), + "ready_count": obj.get("ready_count"), + "definition": DeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None, + "status": obj.get("status") if obj.get("status") is not None else ServicePoolStatus.UNSPECIFIED, + "messages": obj.get("messages"), + "generation": obj.get("generation"), + "customer_id": obj.get("customer_id") + }) return _obj + + diff --git a/koyeb/api_async/models/service_pool_status.py b/koyeb/api_async/models/service_pool_status.py index fd5a03dc..331fe51f 100644 --- a/koyeb/api_async/models/service_pool_status.py +++ b/koyeb/api_async/models/service_pool_status.py @@ -26,13 +26,15 @@ class ServicePoolStatus(str, Enum): """ allowed enum values """ - UNSPECIFIED = "UNSPECIFIED" - READY = "READY" - PROVISIONING = "PROVISIONING" - ERROR = "ERROR" - DELETING = "DELETING" + UNSPECIFIED = 'UNSPECIFIED' + READY = 'READY' + PROVISIONING = 'PROVISIONING' + ERROR = 'ERROR' + DELETING = 'DELETING' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ServicePoolStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/service_state.py b/koyeb/api_async/models/service_state.py index 7f1d6e8a..4f8522db 100644 --- a/koyeb/api_async/models/service_state.py +++ b/koyeb/api_async/models/service_state.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ServiceState(BaseModel): """ ServiceState - """ # noqa: E501 - + """ # noqa: E501 desired_deployment: Optional[DesiredDeployment] = None auto_release: Optional[AutoRelease] = None __properties: ClassVar[List[str]] = ["desired_deployment", "auto_release"] @@ -42,6 +40,7 @@ class ServiceState(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,10 +74,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of desired_deployment if self.desired_deployment: - _dict["desired_deployment"] = self.desired_deployment.to_dict() + _dict['desired_deployment'] = self.desired_deployment.to_dict() # override the default output from pydantic by calling `to_dict()` of auto_release if self.auto_release: - _dict["auto_release"] = self.auto_release.to_dict() + _dict['auto_release'] = self.auto_release.to_dict() return _dict @classmethod @@ -89,16 +89,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "desired_deployment": DesiredDeployment.from_dict( - obj["desired_deployment"] - ) - if obj.get("desired_deployment") is not None - else None, - "auto_release": AutoRelease.from_dict(obj["auto_release"]) - if obj.get("auto_release") is not None - else None, - } - ) + _obj = cls.model_validate({ + "desired_deployment": DesiredDeployment.from_dict(obj["desired_deployment"]) if obj.get("desired_deployment") is not None else None, + "auto_release": AutoRelease.from_dict(obj["auto_release"]) if obj.get("auto_release") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/service_status.py b/koyeb/api_async/models/service_status.py index 2fde4c67..f0f5bfb1 100644 --- a/koyeb/api_async/models/service_status.py +++ b/koyeb/api_async/models/service_status.py @@ -26,17 +26,19 @@ class ServiceStatus(str, Enum): """ allowed enum values """ - STARTING = "STARTING" - HEALTHY = "HEALTHY" - DEGRADED = "DEGRADED" - UNHEALTHY = "UNHEALTHY" - DELETING = "DELETING" - DELETED = "DELETED" - PAUSING = "PAUSING" - PAUSED = "PAUSED" - RESUMING = "RESUMING" + STARTING = 'STARTING' + HEALTHY = 'HEALTHY' + DEGRADED = 'DEGRADED' + UNHEALTHY = 'UNHEALTHY' + DELETING = 'DELETING' + DELETED = 'DELETED' + PAUSING = 'PAUSING' + PAUSED = 'PAUSED' + RESUMING = 'RESUMING' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ServiceStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/service_summary.py b/koyeb/api_async/models/service_summary.py index 8c661d03..5f36d154 100644 --- a/koyeb/api_async/models/service_summary.py +++ b/koyeb/api_async/models/service_summary.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ServiceSummary(BaseModel): """ ServiceSummary - """ # noqa: E501 - + """ # noqa: E501 total: Optional[StrictStr] = None by_status: Optional[Dict[str, StrictStr]] = None __properties: ClassVar[List[str]] = ["total", "by_status"] @@ -40,6 +38,7 @@ class ServiceSummary(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"total": obj.get("total"), "by_status": obj.get("by_status")} - ) + _obj = cls.model_validate({ + "total": obj.get("total"), + "by_status": obj.get("by_status") + }) return _obj + + diff --git a/koyeb/api_async/models/service_type.py b/koyeb/api_async/models/service_type.py index 7f839c5b..684e867e 100644 --- a/koyeb/api_async/models/service_type.py +++ b/koyeb/api_async/models/service_type.py @@ -26,13 +26,15 @@ class ServiceType(str, Enum): """ allowed enum values """ - INVALID_TYPE = "INVALID_TYPE" - WEB = "WEB" - WORKER = "WORKER" - DATABASE = "DATABASE" - SANDBOX = "SANDBOX" + INVALID_TYPE = 'INVALID_TYPE' + WEB = 'WEB' + WORKER = 'WORKER' + DATABASE = 'DATABASE' + SANDBOX = 'SANDBOX' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ServiceType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/service_usage.py b/koyeb/api_async/models/service_usage.py index 39dfb07f..7bab570e 100644 --- a/koyeb/api_async/models/service_usage.py +++ b/koyeb/api_async/models/service_usage.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class ServiceUsage(BaseModel): """ ServiceUsage - """ # noqa: E501 - + """ # noqa: E501 service_id: Optional[StrictStr] = None service_name: Optional[StrictStr] = None regions: Optional[Dict[str, RegionUsage]] = None @@ -42,6 +40,7 @@ class ServiceUsage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -76,12 +76,9 @@ def to_dict(self) -> Dict[str, Any]: _field_dict = {} if self.regions: for _key_regions in self.regions: - _field_dict[_key_regions] = ( - self.regions[_key_regions].to_dict() - if self.regions[_key_regions] is not None - else None - ) - _dict["regions"] = _field_dict + if self.regions[_key_regions]: + _field_dict[_key_regions] = self.regions[_key_regions].to_dict() + _dict['regions'] = _field_dict return _dict @classmethod @@ -93,15 +90,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service_id": obj.get("service_id"), - "service_name": obj.get("service_name"), - "regions": dict( - (_k, RegionUsage.from_dict(_v)) for _k, _v in obj["regions"].items() - ) - if obj.get("regions") is not None - else None, - } - ) + _obj = cls.model_validate({ + "service_id": obj.get("service_id"), + "service_name": obj.get("service_name"), + "regions": dict( + (_k, RegionUsage.from_dict(_v)) + for _k, _v in obj["regions"].items() + ) + if obj.get("regions") is not None + else None + }) return _obj + + diff --git a/koyeb/api_async/models/snapshot.py b/koyeb/api_async/models/snapshot.py index 341d134a..81abf422 100644 --- a/koyeb/api_async/models/snapshot.py +++ b/koyeb/api_async/models/snapshot.py @@ -26,12 +26,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Snapshot(BaseModel): """ The object that represents a snapshot. It can either be local, on a node, or remote, in a cold storage. - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None size: Optional[StrictInt] = None @@ -43,19 +41,7 @@ class Snapshot(BaseModel): region: Optional[StrictStr] = None status: Optional[SnapshotStatus] = SnapshotStatus.SNAPSHOT_STATUS_INVALID type: Optional[SnapshotType] = SnapshotType.SNAPSHOT_TYPE_INVALID - __properties: ClassVar[List[str]] = [ - "id", - "name", - "size", - "created_at", - "updated_at", - "deleted_at", - "organization_id", - "parent_volume_id", - "region", - "status", - "type", - ] + __properties: ClassVar[List[str]] = ["id", "name", "size", "created_at", "updated_at", "deleted_at", "organization_id", "parent_volume_id", "region", "status", "type"] model_config = ConfigDict( validate_by_name=True, @@ -64,6 +50,7 @@ class Snapshot(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -87,7 +74,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -105,23 +93,19 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "name": obj.get("name"), - "size": obj.get("size"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "deleted_at": obj.get("deleted_at"), - "organization_id": obj.get("organization_id"), - "parent_volume_id": obj.get("parent_volume_id"), - "region": obj.get("region"), - "status": obj.get("status") - if obj.get("status") is not None - else SnapshotStatus.SNAPSHOT_STATUS_INVALID, - "type": obj.get("type") - if obj.get("type") is not None - else SnapshotType.SNAPSHOT_TYPE_INVALID, - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "size": obj.get("size"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "deleted_at": obj.get("deleted_at"), + "organization_id": obj.get("organization_id"), + "parent_volume_id": obj.get("parent_volume_id"), + "region": obj.get("region"), + "status": obj.get("status") if obj.get("status") is not None else SnapshotStatus.SNAPSHOT_STATUS_INVALID, + "type": obj.get("type") if obj.get("type") is not None else SnapshotType.SNAPSHOT_TYPE_INVALID + }) return _obj + + diff --git a/koyeb/api_async/models/snapshot_status.py b/koyeb/api_async/models/snapshot_status.py index 014feb59..ec7f810c 100644 --- a/koyeb/api_async/models/snapshot_status.py +++ b/koyeb/api_async/models/snapshot_status.py @@ -26,14 +26,16 @@ class SnapshotStatus(str, Enum): """ allowed enum values """ - SNAPSHOT_STATUS_INVALID = "SNAPSHOT_STATUS_INVALID" - SNAPSHOT_STATUS_CREATING = "SNAPSHOT_STATUS_CREATING" - SNAPSHOT_STATUS_AVAILABLE = "SNAPSHOT_STATUS_AVAILABLE" - SNAPSHOT_STATUS_MIGRATING = "SNAPSHOT_STATUS_MIGRATING" - SNAPSHOT_STATUS_DELETING = "SNAPSHOT_STATUS_DELETING" - SNAPSHOT_STATUS_DELETED = "SNAPSHOT_STATUS_DELETED" + SNAPSHOT_STATUS_INVALID = 'SNAPSHOT_STATUS_INVALID' + SNAPSHOT_STATUS_CREATING = 'SNAPSHOT_STATUS_CREATING' + SNAPSHOT_STATUS_AVAILABLE = 'SNAPSHOT_STATUS_AVAILABLE' + SNAPSHOT_STATUS_MIGRATING = 'SNAPSHOT_STATUS_MIGRATING' + SNAPSHOT_STATUS_DELETING = 'SNAPSHOT_STATUS_DELETING' + SNAPSHOT_STATUS_DELETED = 'SNAPSHOT_STATUS_DELETED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SnapshotStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/snapshot_type.py b/koyeb/api_async/models/snapshot_type.py index ff34880b..bbe3f47a 100644 --- a/koyeb/api_async/models/snapshot_type.py +++ b/koyeb/api_async/models/snapshot_type.py @@ -26,11 +26,13 @@ class SnapshotType(str, Enum): """ allowed enum values """ - SNAPSHOT_TYPE_INVALID = "SNAPSHOT_TYPE_INVALID" - SNAPSHOT_TYPE_LOCAL = "SNAPSHOT_TYPE_LOCAL" - SNAPSHOT_TYPE_REMOTE = "SNAPSHOT_TYPE_REMOTE" + SNAPSHOT_TYPE_INVALID = 'SNAPSHOT_TYPE_INVALID' + SNAPSHOT_TYPE_LOCAL = 'SNAPSHOT_TYPE_LOCAL' + SNAPSHOT_TYPE_REMOTE = 'SNAPSHOT_TYPE_REMOTE' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SnapshotType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/stream_result_of_exec_command_reply.py b/koyeb/api_async/models/stream_result_of_exec_command_reply.py index 161bb889..4233ea21 100644 --- a/koyeb/api_async/models/stream_result_of_exec_command_reply.py +++ b/koyeb/api_async/models/stream_result_of_exec_command_reply.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class StreamResultOfExecCommandReply(BaseModel): """ StreamResultOfExecCommandReply - """ # noqa: E501 - + """ # noqa: E501 result: Optional[ExecCommandReply] = None error: Optional[GoogleRpcStatus] = None __properties: ClassVar[List[str]] = ["result", "error"] @@ -42,6 +40,7 @@ class StreamResultOfExecCommandReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,10 +74,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of result if self.result: - _dict["result"] = self.result.to_dict() + _dict['result'] = self.result.to_dict() # override the default output from pydantic by calling `to_dict()` of error if self.error: - _dict["error"] = self.error.to_dict() + _dict['error'] = self.error.to_dict() return _dict @classmethod @@ -89,14 +89,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "result": ExecCommandReply.from_dict(obj["result"]) - if obj.get("result") is not None - else None, - "error": GoogleRpcStatus.from_dict(obj["error"]) - if obj.get("error") is not None - else None, - } - ) + _obj = cls.model_validate({ + "result": ExecCommandReply.from_dict(obj["result"]) if obj.get("result") is not None else None, + "error": GoogleRpcStatus.from_dict(obj["error"]) if obj.get("error") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/stream_result_of_log_entry.py b/koyeb/api_async/models/stream_result_of_log_entry.py index 694d0a59..c65d364e 100644 --- a/koyeb/api_async/models/stream_result_of_log_entry.py +++ b/koyeb/api_async/models/stream_result_of_log_entry.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class StreamResultOfLogEntry(BaseModel): """ StreamResultOfLogEntry - """ # noqa: E501 - + """ # noqa: E501 result: Optional[LogEntry] = None error: Optional[GoogleRpcStatus] = None __properties: ClassVar[List[str]] = ["result", "error"] @@ -42,6 +40,7 @@ class StreamResultOfLogEntry(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,10 +74,10 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of result if self.result: - _dict["result"] = self.result.to_dict() + _dict['result'] = self.result.to_dict() # override the default output from pydantic by calling `to_dict()` of error if self.error: - _dict["error"] = self.error.to_dict() + _dict['error'] = self.error.to_dict() return _dict @classmethod @@ -89,14 +89,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "result": LogEntry.from_dict(obj["result"]) - if obj.get("result") is not None - else None, - "error": GoogleRpcStatus.from_dict(obj["error"]) - if obj.get("error") is not None - else None, - } - ) + _obj = cls.model_validate({ + "result": LogEntry.from_dict(obj["result"]) if obj.get("result") is not None else None, + "error": GoogleRpcStatus.from_dict(obj["error"]) if obj.get("error") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/subscription.py b/koyeb/api_async/models/subscription.py index bb8041ff..99af857c 100644 --- a/koyeb/api_async/models/subscription.py +++ b/koyeb/api_async/models/subscription.py @@ -20,20 +20,16 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.subscription_payment_failure import ( - SubscriptionPaymentFailure, -) +from koyeb.api_async.models.subscription_payment_failure import SubscriptionPaymentFailure from koyeb.api_async.models.subscription_status import SubscriptionStatus from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class Subscription(BaseModel): """ Subscription - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None @@ -58,32 +54,7 @@ class Subscription(BaseModel): trial_ends_at: Optional[datetime] = None trial_max_spend: Optional[StrictStr] = None current_spend: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "created_at", - "updated_at", - "version", - "organization_id", - "stripe_subscription_id", - "status", - "messages", - "has_pending_update", - "stripe_pending_invoice_id", - "terminate_at", - "canceled_at", - "terminated_at", - "current_period_start", - "current_period_end", - "currency", - "amount_payable", - "amount_paid", - "amount_remaining", - "payment_failure", - "trialing", - "trial_ends_at", - "trial_max_spend", - "current_spend", - ] + __properties: ClassVar[List[str]] = ["id", "created_at", "updated_at", "version", "organization_id", "stripe_subscription_id", "status", "messages", "has_pending_update", "stripe_pending_invoice_id", "terminate_at", "canceled_at", "terminated_at", "current_period_start", "current_period_end", "currency", "amount_payable", "amount_paid", "amount_remaining", "payment_failure", "trialing", "trial_ends_at", "trial_max_spend", "current_spend"] model_config = ConfigDict( validate_by_name=True, @@ -92,6 +63,7 @@ class Subscription(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -115,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -124,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of payment_failure if self.payment_failure: - _dict["payment_failure"] = self.payment_failure.to_dict() + _dict['payment_failure'] = self.payment_failure.to_dict() return _dict @classmethod @@ -136,38 +109,32 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "created_at": obj.get("created_at"), - "updated_at": obj.get("updated_at"), - "version": obj.get("version"), - "organization_id": obj.get("organization_id"), - "stripe_subscription_id": obj.get("stripe_subscription_id"), - "status": obj.get("status") - if obj.get("status") is not None - else SubscriptionStatus.INVALID, - "messages": obj.get("messages"), - "has_pending_update": obj.get("has_pending_update"), - "stripe_pending_invoice_id": obj.get("stripe_pending_invoice_id"), - "terminate_at": obj.get("terminate_at"), - "canceled_at": obj.get("canceled_at"), - "terminated_at": obj.get("terminated_at"), - "current_period_start": obj.get("current_period_start"), - "current_period_end": obj.get("current_period_end"), - "currency": obj.get("currency"), - "amount_payable": obj.get("amount_payable"), - "amount_paid": obj.get("amount_paid"), - "amount_remaining": obj.get("amount_remaining"), - "payment_failure": SubscriptionPaymentFailure.from_dict( - obj["payment_failure"] - ) - if obj.get("payment_failure") is not None - else None, - "trialing": obj.get("trialing"), - "trial_ends_at": obj.get("trial_ends_at"), - "trial_max_spend": obj.get("trial_max_spend"), - "current_spend": obj.get("current_spend"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "created_at": obj.get("created_at"), + "updated_at": obj.get("updated_at"), + "version": obj.get("version"), + "organization_id": obj.get("organization_id"), + "stripe_subscription_id": obj.get("stripe_subscription_id"), + "status": obj.get("status") if obj.get("status") is not None else SubscriptionStatus.INVALID, + "messages": obj.get("messages"), + "has_pending_update": obj.get("has_pending_update"), + "stripe_pending_invoice_id": obj.get("stripe_pending_invoice_id"), + "terminate_at": obj.get("terminate_at"), + "canceled_at": obj.get("canceled_at"), + "terminated_at": obj.get("terminated_at"), + "current_period_start": obj.get("current_period_start"), + "current_period_end": obj.get("current_period_end"), + "currency": obj.get("currency"), + "amount_payable": obj.get("amount_payable"), + "amount_paid": obj.get("amount_paid"), + "amount_remaining": obj.get("amount_remaining"), + "payment_failure": SubscriptionPaymentFailure.from_dict(obj["payment_failure"]) if obj.get("payment_failure") is not None else None, + "trialing": obj.get("trialing"), + "trial_ends_at": obj.get("trial_ends_at"), + "trial_max_spend": obj.get("trial_max_spend"), + "current_spend": obj.get("current_spend") + }) return _obj + + diff --git a/koyeb/api_async/models/subscription_payment_failure.py b/koyeb/api_async/models/subscription_payment_failure.py index 065a8e6d..00b4ff9e 100644 --- a/koyeb/api_async/models/subscription_payment_failure.py +++ b/koyeb/api_async/models/subscription_payment_failure.py @@ -20,19 +20,15 @@ from datetime import datetime from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.subscription_payment_failure_stripe_sdk import ( - SubscriptionPaymentFailureStripeSDK, -) +from koyeb.api_async.models.subscription_payment_failure_stripe_sdk import SubscriptionPaymentFailureStripeSDK from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class SubscriptionPaymentFailure(BaseModel): """ SubscriptionPaymentFailure - """ # noqa: E501 - + """ # noqa: E501 failed_at: Optional[datetime] = None next_attempt: Optional[datetime] = None attempt_count: Optional[StrictStr] = None @@ -43,18 +39,7 @@ class SubscriptionPaymentFailure(BaseModel): payment_method_required: Optional[StrictBool] = None redirect_url: Optional[StrictStr] = None stripe_sdk: Optional[SubscriptionPaymentFailureStripeSDK] = None - __properties: ClassVar[List[str]] = [ - "failed_at", - "next_attempt", - "attempt_count", - "error_code", - "error_reason", - "error_type", - "error_message", - "payment_method_required", - "redirect_url", - "stripe_sdk", - ] + __properties: ClassVar[List[str]] = ["failed_at", "next_attempt", "attempt_count", "error_code", "error_reason", "error_type", "error_message", "payment_method_required", "redirect_url", "stripe_sdk"] model_config = ConfigDict( validate_by_name=True, @@ -63,6 +48,7 @@ class SubscriptionPaymentFailure(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -86,7 +72,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -95,7 +82,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of stripe_sdk if self.stripe_sdk: - _dict["stripe_sdk"] = self.stripe_sdk.to_dict() + _dict['stripe_sdk'] = self.stripe_sdk.to_dict() return _dict @classmethod @@ -107,22 +94,18 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "failed_at": obj.get("failed_at"), - "next_attempt": obj.get("next_attempt"), - "attempt_count": obj.get("attempt_count"), - "error_code": obj.get("error_code"), - "error_reason": obj.get("error_reason"), - "error_type": obj.get("error_type"), - "error_message": obj.get("error_message"), - "payment_method_required": obj.get("payment_method_required"), - "redirect_url": obj.get("redirect_url"), - "stripe_sdk": SubscriptionPaymentFailureStripeSDK.from_dict( - obj["stripe_sdk"] - ) - if obj.get("stripe_sdk") is not None - else None, - } - ) + _obj = cls.model_validate({ + "failed_at": obj.get("failed_at"), + "next_attempt": obj.get("next_attempt"), + "attempt_count": obj.get("attempt_count"), + "error_code": obj.get("error_code"), + "error_reason": obj.get("error_reason"), + "error_type": obj.get("error_type"), + "error_message": obj.get("error_message"), + "payment_method_required": obj.get("payment_method_required"), + "redirect_url": obj.get("redirect_url"), + "stripe_sdk": SubscriptionPaymentFailureStripeSDK.from_dict(obj["stripe_sdk"]) if obj.get("stripe_sdk") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/subscription_payment_failure_stripe_sdk.py b/koyeb/api_async/models/subscription_payment_failure_stripe_sdk.py index 3e97164c..7af992ae 100644 --- a/koyeb/api_async/models/subscription_payment_failure_stripe_sdk.py +++ b/koyeb/api_async/models/subscription_payment_failure_stripe_sdk.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class SubscriptionPaymentFailureStripeSDK(BaseModel): """ SubscriptionPaymentFailureStripeSDK - """ # noqa: E501 - + """ # noqa: E501 client_secret_key: Optional[StrictStr] = None raw_json: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["client_secret_key", "raw_json"] @@ -40,6 +38,7 @@ class SubscriptionPaymentFailureStripeSDK(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,10 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "client_secret_key": obj.get("client_secret_key"), - "raw_json": obj.get("raw_json"), - } - ) + _obj = cls.model_validate({ + "client_secret_key": obj.get("client_secret_key"), + "raw_json": obj.get("raw_json") + }) return _obj + + diff --git a/koyeb/api_async/models/subscription_status.py b/koyeb/api_async/models/subscription_status.py index 9ca68e76..486f6efa 100644 --- a/koyeb/api_async/models/subscription_status.py +++ b/koyeb/api_async/models/subscription_status.py @@ -26,17 +26,19 @@ class SubscriptionStatus(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - CREATED = "CREATED" - ACTIVE = "ACTIVE" - WARNING = "WARNING" - URGENT = "URGENT" - CANCELING = "CANCELING" - CANCELED = "CANCELED" - TERMINATING = "TERMINATING" - TERMINATED = "TERMINATED" + INVALID = 'INVALID' + CREATED = 'CREATED' + ACTIVE = 'ACTIVE' + WARNING = 'WARNING' + URGENT = 'URGENT' + CANCELING = 'CANCELING' + CANCELED = 'CANCELED' + TERMINATING = 'TERMINATING' + TERMINATED = 'TERMINATED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of SubscriptionStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/tcp_health_check.py b/koyeb/api_async/models/tcp_health_check.py index a2938aed..dc9ba685 100644 --- a/koyeb/api_async/models/tcp_health_check.py +++ b/koyeb/api_async/models/tcp_health_check.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class TCPHealthCheck(BaseModel): """ TCPHealthCheck - """ # noqa: E501 - + """ # noqa: E501 port: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["port"] @@ -39,6 +37,7 @@ class TCPHealthCheck(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"port": obj.get("port")}) + _obj = cls.model_validate({ + "port": obj.get("port") + }) return _obj + + diff --git a/koyeb/api_async/models/token.py b/koyeb/api_async/models/token.py index bc4f8c88..79f495a6 100644 --- a/koyeb/api_async/models/token.py +++ b/koyeb/api_async/models/token.py @@ -24,22 +24,15 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Token(BaseModel): """ Token - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None user_id: Optional[StrictStr] = None organization_id: Optional[StrictStr] = None expires_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = [ - "id", - "user_id", - "organization_id", - "expires_at", - ] + __properties: ClassVar[List[str]] = ["id", "user_id", "organization_id", "expires_at"] model_config = ConfigDict( validate_by_name=True, @@ -48,6 +41,7 @@ class Token(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -71,7 +65,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -89,12 +84,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "user_id": obj.get("user_id"), - "organization_id": obj.get("organization_id"), - "expires_at": obj.get("expires_at"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "user_id": obj.get("user_id"), + "organization_id": obj.get("organization_id"), + "expires_at": obj.get("expires_at") + }) return _obj + + diff --git a/koyeb/api_async/models/trigger_deployment_metadata.py b/koyeb/api_async/models/trigger_deployment_metadata.py index 8a3707b6..e2454f39 100644 --- a/koyeb/api_async/models/trigger_deployment_metadata.py +++ b/koyeb/api_async/models/trigger_deployment_metadata.py @@ -19,31 +19,19 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.trigger_deployment_metadata_actor_type import ( - TriggerDeploymentMetadataActorType, -) -from koyeb.api_async.models.trigger_deployment_metadata_trigger_type import ( - TriggerDeploymentMetadataTriggerType, -) -from koyeb.api_async.models.trigger_git_deployment_metadata import ( - TriggerGitDeploymentMetadata, -) +from koyeb.api_async.models.trigger_deployment_metadata_actor_type import TriggerDeploymentMetadataActorType +from koyeb.api_async.models.trigger_deployment_metadata_trigger_type import TriggerDeploymentMetadataTriggerType +from koyeb.api_async.models.trigger_git_deployment_metadata import TriggerGitDeploymentMetadata from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class TriggerDeploymentMetadata(BaseModel): """ TriggerDeploymentMetadata - """ # noqa: E501 - - type: Optional[ - TriggerDeploymentMetadataTriggerType - ] = TriggerDeploymentMetadataTriggerType.UNKNOWN_TYPE - actor: Optional[ - TriggerDeploymentMetadataActorType - ] = TriggerDeploymentMetadataActorType.UNKNOWN_ACTOR + """ # noqa: E501 + type: Optional[TriggerDeploymentMetadataTriggerType] = TriggerDeploymentMetadataTriggerType.UNKNOWN_TYPE + actor: Optional[TriggerDeploymentMetadataActorType] = TriggerDeploymentMetadataActorType.UNKNOWN_ACTOR git: Optional[TriggerGitDeploymentMetadata] = None __properties: ClassVar[List[str]] = ["type", "actor", "git"] @@ -54,6 +42,7 @@ class TriggerDeploymentMetadata(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -77,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -86,7 +76,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of git if self.git: - _dict["git"] = self.git.to_dict() + _dict['git'] = self.git.to_dict() return _dict @classmethod @@ -98,17 +88,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "type": obj.get("type") - if obj.get("type") is not None - else TriggerDeploymentMetadataTriggerType.UNKNOWN_TYPE, - "actor": obj.get("actor") - if obj.get("actor") is not None - else TriggerDeploymentMetadataActorType.UNKNOWN_ACTOR, - "git": TriggerGitDeploymentMetadata.from_dict(obj["git"]) - if obj.get("git") is not None - else None, - } - ) + _obj = cls.model_validate({ + "type": obj.get("type") if obj.get("type") is not None else TriggerDeploymentMetadataTriggerType.UNKNOWN_TYPE, + "actor": obj.get("actor") if obj.get("actor") is not None else TriggerDeploymentMetadataActorType.UNKNOWN_ACTOR, + "git": TriggerGitDeploymentMetadata.from_dict(obj["git"]) if obj.get("git") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/trigger_deployment_metadata_actor_type.py b/koyeb/api_async/models/trigger_deployment_metadata_actor_type.py index 13d05047..a74aa835 100644 --- a/koyeb/api_async/models/trigger_deployment_metadata_actor_type.py +++ b/koyeb/api_async/models/trigger_deployment_metadata_actor_type.py @@ -26,11 +26,13 @@ class TriggerDeploymentMetadataActorType(str, Enum): """ allowed enum values """ - UNKNOWN_ACTOR = "UNKNOWN_ACTOR" - USER = "USER" - SYSTEM = "SYSTEM" + UNKNOWN_ACTOR = 'UNKNOWN_ACTOR' + USER = 'USER' + SYSTEM = 'SYSTEM' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of TriggerDeploymentMetadataActorType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/trigger_deployment_metadata_trigger_type.py b/koyeb/api_async/models/trigger_deployment_metadata_trigger_type.py index 71bfb900..3aac8381 100644 --- a/koyeb/api_async/models/trigger_deployment_metadata_trigger_type.py +++ b/koyeb/api_async/models/trigger_deployment_metadata_trigger_type.py @@ -26,12 +26,14 @@ class TriggerDeploymentMetadataTriggerType(str, Enum): """ allowed enum values """ - UNKNOWN_TYPE = "UNKNOWN_TYPE" - GIT = "GIT" - RESUME = "RESUME" - DATABASE_SYNC = "DATABASE_SYNC" + UNKNOWN_TYPE = 'UNKNOWN_TYPE' + GIT = 'GIT' + RESUME = 'RESUME' + DATABASE_SYNC = 'DATABASE_SYNC' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of TriggerDeploymentMetadataTriggerType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/trigger_git_deployment_metadata.py b/koyeb/api_async/models/trigger_git_deployment_metadata.py index ed920527..cd5c99af 100644 --- a/koyeb/api_async/models/trigger_git_deployment_metadata.py +++ b/koyeb/api_async/models/trigger_git_deployment_metadata.py @@ -19,22 +19,16 @@ from pydantic import BaseModel, ConfigDict, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.trigger_git_deployment_metadata_provider import ( - TriggerGitDeploymentMetadataProvider, -) +from koyeb.api_async.models.trigger_git_deployment_metadata_provider import TriggerGitDeploymentMetadataProvider from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class TriggerGitDeploymentMetadata(BaseModel): """ TriggerGitDeploymentMetadata - """ # noqa: E501 - - provider: Optional[ - TriggerGitDeploymentMetadataProvider - ] = TriggerGitDeploymentMetadataProvider.UNKNOWN + """ # noqa: E501 + provider: Optional[TriggerGitDeploymentMetadataProvider] = TriggerGitDeploymentMetadataProvider.UNKNOWN repository: Optional[StrictStr] = None branch: Optional[StrictStr] = None sha: Optional[StrictStr] = None @@ -42,16 +36,7 @@ class TriggerGitDeploymentMetadata(BaseModel): sender_username: Optional[StrictStr] = None sender_avatar_url: Optional[StrictStr] = None sender_profile_url: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "provider", - "repository", - "branch", - "sha", - "message", - "sender_username", - "sender_avatar_url", - "sender_profile_url", - ] + __properties: ClassVar[List[str]] = ["provider", "repository", "branch", "sha", "message", "sender_username", "sender_avatar_url", "sender_profile_url"] model_config = ConfigDict( validate_by_name=True, @@ -60,6 +45,7 @@ class TriggerGitDeploymentMetadata(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -83,7 +69,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -101,18 +88,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "provider": obj.get("provider") - if obj.get("provider") is not None - else TriggerGitDeploymentMetadataProvider.UNKNOWN, - "repository": obj.get("repository"), - "branch": obj.get("branch"), - "sha": obj.get("sha"), - "message": obj.get("message"), - "sender_username": obj.get("sender_username"), - "sender_avatar_url": obj.get("sender_avatar_url"), - "sender_profile_url": obj.get("sender_profile_url"), - } - ) + _obj = cls.model_validate({ + "provider": obj.get("provider") if obj.get("provider") is not None else TriggerGitDeploymentMetadataProvider.UNKNOWN, + "repository": obj.get("repository"), + "branch": obj.get("branch"), + "sha": obj.get("sha"), + "message": obj.get("message"), + "sender_username": obj.get("sender_username"), + "sender_avatar_url": obj.get("sender_avatar_url"), + "sender_profile_url": obj.get("sender_profile_url") + }) return _obj + + diff --git a/koyeb/api_async/models/trigger_git_deployment_metadata_provider.py b/koyeb/api_async/models/trigger_git_deployment_metadata_provider.py index 41c0f8de..c2f10198 100644 --- a/koyeb/api_async/models/trigger_git_deployment_metadata_provider.py +++ b/koyeb/api_async/models/trigger_git_deployment_metadata_provider.py @@ -26,10 +26,12 @@ class TriggerGitDeploymentMetadataProvider(str, Enum): """ allowed enum values """ - UNKNOWN = "UNKNOWN" - GITHUB = "GITHUB" + UNKNOWN = 'UNKNOWN' + GITHUB = 'GITHUB' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of TriggerGitDeploymentMetadataProvider from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/update_app.py b/koyeb/api_async/models/update_app.py index b24c995a..7259d74d 100644 --- a/koyeb/api_async/models/update_app.py +++ b/koyeb/api_async/models/update_app.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateApp(BaseModel): """ UpdateApp - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None life_cycle: Optional[AppLifeCycle] = None __properties: ClassVar[List[str]] = ["name", "life_cycle"] @@ -41,6 +39,7 @@ class UpdateApp(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of life_cycle if self.life_cycle: - _dict["life_cycle"] = self.life_cycle.to_dict() + _dict['life_cycle'] = self.life_cycle.to_dict() return _dict @classmethod @@ -85,12 +85,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "name": obj.get("name"), - "life_cycle": AppLifeCycle.from_dict(obj["life_cycle"]) - if obj.get("life_cycle") is not None - else None, - } - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "life_cycle": AppLifeCycle.from_dict(obj["life_cycle"]) if obj.get("life_cycle") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/update_app_reply.py b/koyeb/api_async/models/update_app_reply.py index 7bd3acb9..1711dc26 100644 --- a/koyeb/api_async/models/update_app_reply.py +++ b/koyeb/api_async/models/update_app_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateAppReply(BaseModel): """ UpdateAppReply - """ # noqa: E501 - + """ # noqa: E501 app: Optional[App] = None __properties: ClassVar[List[str]] = ["app"] @@ -40,6 +38,7 @@ class UpdateAppReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of app if self.app: - _dict["app"] = self.app.to_dict() + _dict['app'] = self.app.to_dict() return _dict @classmethod @@ -84,7 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"app": App.from_dict(obj["app"]) if obj.get("app") is not None else None} - ) + _obj = cls.model_validate({ + "app": App.from_dict(obj["app"]) if obj.get("app") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/update_budget_reply.py b/koyeb/api_async/models/update_budget_reply.py index f1baf2f1..c66c07b6 100644 --- a/koyeb/api_async/models/update_budget_reply.py +++ b/koyeb/api_async/models/update_budget_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateBudgetReply(BaseModel): """ UpdateBudgetReply - """ # noqa: E501 - + """ # noqa: E501 budget: Optional[Budget] = None __properties: ClassVar[List[str]] = ["budget"] @@ -40,6 +38,7 @@ class UpdateBudgetReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of budget if self.budget: - _dict["budget"] = self.budget.to_dict() + _dict['budget'] = self.budget.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "budget": Budget.from_dict(obj["budget"]) - if obj.get("budget") is not None - else None - } - ) + _obj = cls.model_validate({ + "budget": Budget.from_dict(obj["budget"]) if obj.get("budget") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/update_budget_request.py b/koyeb/api_async/models/update_budget_request.py index 03739342..37e6e091 100644 --- a/koyeb/api_async/models/update_budget_request.py +++ b/koyeb/api_async/models/update_budget_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateBudgetRequest(BaseModel): """ UpdateBudgetRequest - """ # noqa: E501 - + """ # noqa: E501 amount: Optional[StrictStr] = Field(default=None, description="In cents.") __properties: ClassVar[List[str]] = ["amount"] @@ -39,6 +37,7 @@ class UpdateBudgetRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"amount": obj.get("amount")}) + _obj = cls.model_validate({ + "amount": obj.get("amount") + }) return _obj + + diff --git a/koyeb/api_async/models/update_credential_reply.py b/koyeb/api_async/models/update_credential_reply.py index d680b946..92f18bcd 100644 --- a/koyeb/api_async/models/update_credential_reply.py +++ b/koyeb/api_async/models/update_credential_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateCredentialReply(BaseModel): """ UpdateCredentialReply - """ # noqa: E501 - + """ # noqa: E501 credential: Optional[Credential] = None __properties: ClassVar[List[str]] = ["credential"] @@ -40,6 +38,7 @@ class UpdateCredentialReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of credential if self.credential: - _dict["credential"] = self.credential.to_dict() + _dict['credential'] = self.credential.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "credential": Credential.from_dict(obj["credential"]) - if obj.get("credential") is not None - else None - } - ) + _obj = cls.model_validate({ + "credential": Credential.from_dict(obj["credential"]) if obj.get("credential") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/update_domain.py b/koyeb/api_async/models/update_domain.py index ab77593a..603ab46e 100644 --- a/koyeb/api_async/models/update_domain.py +++ b/koyeb/api_async/models/update_domain.py @@ -23,18 +23,12 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateDomain(BaseModel): """ UpdateDomain - """ # noqa: E501 - - app_id: Optional[StrictStr] = Field( - default=None, description="To attach or detach from an app for custom domain." - ) - subdomain: Optional[StrictStr] = Field( - default=None, description="To change subdomain for auto-assigned domain." - ) + """ # noqa: E501 + app_id: Optional[StrictStr] = Field(default=None, description="To attach or detach from an app for custom domain.") + subdomain: Optional[StrictStr] = Field(default=None, description="To change subdomain for auto-assigned domain.") __properties: ClassVar[List[str]] = ["app_id", "subdomain"] model_config = ConfigDict( @@ -44,6 +38,7 @@ class UpdateDomain(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -67,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -85,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"app_id": obj.get("app_id"), "subdomain": obj.get("subdomain")} - ) + _obj = cls.model_validate({ + "app_id": obj.get("app_id"), + "subdomain": obj.get("subdomain") + }) return _obj + + diff --git a/koyeb/api_async/models/update_domain_reply.py b/koyeb/api_async/models/update_domain_reply.py index 6f19a86a..4a781750 100644 --- a/koyeb/api_async/models/update_domain_reply.py +++ b/koyeb/api_async/models/update_domain_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateDomainReply(BaseModel): """ UpdateDomainReply - """ # noqa: E501 - + """ # noqa: E501 domain: Optional[Domain] = None __properties: ClassVar[List[str]] = ["domain"] @@ -40,6 +38,7 @@ class UpdateDomainReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of domain if self.domain: - _dict["domain"] = self.domain.to_dict() + _dict['domain'] = self.domain.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "domain": Domain.from_dict(obj["domain"]) - if obj.get("domain") is not None - else None - } - ) + _obj = cls.model_validate({ + "domain": Domain.from_dict(obj["domain"]) if obj.get("domain") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/update_organization_default_project_reply.py b/koyeb/api_async/models/update_organization_default_project_reply.py index 9899b550..86b4a791 100644 --- a/koyeb/api_async/models/update_organization_default_project_reply.py +++ b/koyeb/api_async/models/update_organization_default_project_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateOrganizationDefaultProjectReply(BaseModel): """ UpdateOrganizationDefaultProjectReply - """ # noqa: E501 - + """ # noqa: E501 organization: Optional[Organization] = None __properties: ClassVar[List[str]] = ["organization"] @@ -40,6 +38,7 @@ class UpdateOrganizationDefaultProjectReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization": Organization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None - } - ) + _obj = cls.model_validate({ + "organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/update_organization_default_project_request.py b/koyeb/api_async/models/update_organization_default_project_request.py index 6a94af83..9170f668 100644 --- a/koyeb/api_async/models/update_organization_default_project_request.py +++ b/koyeb/api_async/models/update_organization_default_project_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateOrganizationDefaultProjectRequest(BaseModel): """ UpdateOrganizationDefaultProjectRequest - """ # noqa: E501 - + """ # noqa: E501 default_project_id: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["default_project_id"] @@ -39,6 +37,7 @@ class UpdateOrganizationDefaultProjectRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"default_project_id": obj.get("default_project_id")}) + _obj = cls.model_validate({ + "default_project_id": obj.get("default_project_id") + }) return _obj + + diff --git a/koyeb/api_async/models/update_organization_name_reply.py b/koyeb/api_async/models/update_organization_name_reply.py index cb8f5453..17aece35 100644 --- a/koyeb/api_async/models/update_organization_name_reply.py +++ b/koyeb/api_async/models/update_organization_name_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateOrganizationNameReply(BaseModel): """ UpdateOrganizationNameReply - """ # noqa: E501 - + """ # noqa: E501 organization: Optional[Organization] = None __properties: ClassVar[List[str]] = ["organization"] @@ -40,6 +38,7 @@ class UpdateOrganizationNameReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization": Organization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None - } - ) + _obj = cls.model_validate({ + "organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/update_organization_name_request.py b/koyeb/api_async/models/update_organization_name_request.py index 93f1f05e..a2c26fc5 100644 --- a/koyeb/api_async/models/update_organization_name_request.py +++ b/koyeb/api_async/models/update_organization_name_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateOrganizationNameRequest(BaseModel): """ UpdateOrganizationNameRequest - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name"] @@ -39,6 +37,7 @@ class UpdateOrganizationNameRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"name": obj.get("name")}) + _obj = cls.model_validate({ + "name": obj.get("name") + }) return _obj + + diff --git a/koyeb/api_async/models/update_organization_plan_reply.py b/koyeb/api_async/models/update_organization_plan_reply.py index ad586cd9..854ed2e7 100644 --- a/koyeb/api_async/models/update_organization_plan_reply.py +++ b/koyeb/api_async/models/update_organization_plan_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateOrganizationPlanReply(BaseModel): """ UpdateOrganizationPlanReply - """ # noqa: E501 - + """ # noqa: E501 organization: Optional[Organization] = None __properties: ClassVar[List[str]] = ["organization"] @@ -40,6 +38,7 @@ class UpdateOrganizationPlanReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization": Organization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None - } - ) + _obj = cls.model_validate({ + "organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/update_organization_plan_request.py b/koyeb/api_async/models/update_organization_plan_request.py index a9f636a7..37456e26 100644 --- a/koyeb/api_async/models/update_organization_plan_request.py +++ b/koyeb/api_async/models/update_organization_plan_request.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateOrganizationPlanRequest(BaseModel): """ UpdateOrganizationPlanRequest - """ # noqa: E501 - + """ # noqa: E501 plan: Optional[Plan] = Plan.HOBBY coupon_code: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["plan", "coupon_code"] @@ -41,6 +39,7 @@ class UpdateOrganizationPlanRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -82,10 +82,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "plan": obj.get("plan") if obj.get("plan") is not None else Plan.HOBBY, - "coupon_code": obj.get("coupon_code"), - } - ) + _obj = cls.model_validate({ + "plan": obj.get("plan") if obj.get("plan") is not None else Plan.HOBBY, + "coupon_code": obj.get("coupon_code") + }) return _obj + + diff --git a/koyeb/api_async/models/update_organization_reply.py b/koyeb/api_async/models/update_organization_reply.py index 676cfc5b..6c90951d 100644 --- a/koyeb/api_async/models/update_organization_reply.py +++ b/koyeb/api_async/models/update_organization_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateOrganizationReply(BaseModel): """ UpdateOrganizationReply - """ # noqa: E501 - + """ # noqa: E501 organization: Optional[Organization] = None __properties: ClassVar[List[str]] = ["organization"] @@ -40,6 +38,7 @@ class UpdateOrganizationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization": Organization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None - } - ) + _obj = cls.model_validate({ + "organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/update_password_request.py b/koyeb/api_async/models/update_password_request.py index 14dd558e..f87f352c 100644 --- a/koyeb/api_async/models/update_password_request.py +++ b/koyeb/api_async/models/update_password_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdatePasswordRequest(BaseModel): """ UpdatePasswordRequest - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None password: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["id", "password"] @@ -40,6 +38,7 @@ class UpdatePasswordRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"id": obj.get("id"), "password": obj.get("password")} - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "password": obj.get("password") + }) return _obj + + diff --git a/koyeb/api_async/models/update_persistent_volume_reply.py b/koyeb/api_async/models/update_persistent_volume_reply.py index f5d9b437..04d4b00c 100644 --- a/koyeb/api_async/models/update_persistent_volume_reply.py +++ b/koyeb/api_async/models/update_persistent_volume_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdatePersistentVolumeReply(BaseModel): """ UpdatePersistentVolumeReply - """ # noqa: E501 - + """ # noqa: E501 volume: Optional[PersistentVolume] = None __properties: ClassVar[List[str]] = ["volume"] @@ -40,6 +38,7 @@ class UpdatePersistentVolumeReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of volume if self.volume: - _dict["volume"] = self.volume.to_dict() + _dict['volume'] = self.volume.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "volume": PersistentVolume.from_dict(obj["volume"]) - if obj.get("volume") is not None - else None - } - ) + _obj = cls.model_validate({ + "volume": PersistentVolume.from_dict(obj["volume"]) if obj.get("volume") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/update_persistent_volume_request.py b/koyeb/api_async/models/update_persistent_volume_request.py index 26974afa..14852a46 100644 --- a/koyeb/api_async/models/update_persistent_volume_request.py +++ b/koyeb/api_async/models/update_persistent_volume_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdatePersistentVolumeRequest(BaseModel): """ UpdatePersistentVolumeRequest - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None max_size: Optional[StrictInt] = None __properties: ClassVar[List[str]] = ["name", "max_size"] @@ -40,6 +38,7 @@ class UpdatePersistentVolumeRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -81,7 +81,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"name": obj.get("name"), "max_size": obj.get("max_size")} - ) + _obj = cls.model_validate({ + "name": obj.get("name"), + "max_size": obj.get("max_size") + }) return _obj + + diff --git a/koyeb/api_async/models/update_project_reply.py b/koyeb/api_async/models/update_project_reply.py index 1de6f19e..5919495f 100644 --- a/koyeb/api_async/models/update_project_reply.py +++ b/koyeb/api_async/models/update_project_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateProjectReply(BaseModel): """ UpdateProjectReply - """ # noqa: E501 - + """ # noqa: E501 project: Optional[Project] = None __properties: ClassVar[List[str]] = ["project"] @@ -40,6 +38,7 @@ class UpdateProjectReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of project if self.project: - _dict["project"] = self.project.to_dict() + _dict['project'] = self.project.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "project": Project.from_dict(obj["project"]) - if obj.get("project") is not None - else None - } - ) + _obj = cls.model_validate({ + "project": Project.from_dict(obj["project"]) if obj.get("project") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/update_secret_reply.py b/koyeb/api_async/models/update_secret_reply.py index 22989e7b..7d189ba0 100644 --- a/koyeb/api_async/models/update_secret_reply.py +++ b/koyeb/api_async/models/update_secret_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateSecretReply(BaseModel): """ UpdateSecretReply - """ # noqa: E501 - + """ # noqa: E501 secret: Optional[Secret] = None __properties: ClassVar[List[str]] = ["secret"] @@ -40,6 +38,7 @@ class UpdateSecretReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of secret if self.secret: - _dict["secret"] = self.secret.to_dict() + _dict['secret'] = self.secret.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "secret": Secret.from_dict(obj["secret"]) - if obj.get("secret") is not None - else None - } - ) + _obj = cls.model_validate({ + "secret": Secret.from_dict(obj["secret"]) if obj.get("secret") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/update_service.py b/koyeb/api_async/models/update_service.py index f0c7de53..ef64dd45 100644 --- a/koyeb/api_async/models/update_service.py +++ b/koyeb/api_async/models/update_service.py @@ -26,29 +26,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateService(BaseModel): """ UpdateService - """ # noqa: E501 - + """ # noqa: E501 definition: Optional[DeploymentDefinition] = None metadata: Optional[DeploymentMetadata] = None - skip_build: Optional[StrictBool] = Field( - default=None, - description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened.", - ) + skip_build: Optional[StrictBool] = Field(default=None, description="If set to true, the build stage will be skipped and the image coming from the last successful build step will be used instead. The call fails if no previous successful builds happened.") save_only: Optional[StrictBool] = None life_cycle: Optional[ServiceLifeCycle] = None instance_snapshot_id: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "definition", - "metadata", - "skip_build", - "save_only", - "life_cycle", - "instance_snapshot_id", - ] + __properties: ClassVar[List[str]] = ["definition", "metadata", "skip_build", "save_only", "life_cycle", "instance_snapshot_id"] model_config = ConfigDict( validate_by_name=True, @@ -57,6 +45,7 @@ class UpdateService(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -80,7 +69,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -89,13 +79,13 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of definition if self.definition: - _dict["definition"] = self.definition.to_dict() + _dict['definition'] = self.definition.to_dict() # override the default output from pydantic by calling `to_dict()` of metadata if self.metadata: - _dict["metadata"] = self.metadata.to_dict() + _dict['metadata'] = self.metadata.to_dict() # override the default output from pydantic by calling `to_dict()` of life_cycle if self.life_cycle: - _dict["life_cycle"] = self.life_cycle.to_dict() + _dict['life_cycle'] = self.life_cycle.to_dict() return _dict @classmethod @@ -107,20 +97,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "definition": DeploymentDefinition.from_dict(obj["definition"]) - if obj.get("definition") is not None - else None, - "metadata": DeploymentMetadata.from_dict(obj["metadata"]) - if obj.get("metadata") is not None - else None, - "skip_build": obj.get("skip_build"), - "save_only": obj.get("save_only"), - "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) - if obj.get("life_cycle") is not None - else None, - "instance_snapshot_id": obj.get("instance_snapshot_id"), - } - ) + _obj = cls.model_validate({ + "definition": DeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None, + "metadata": DeploymentMetadata.from_dict(obj["metadata"]) if obj.get("metadata") is not None else None, + "skip_build": obj.get("skip_build"), + "save_only": obj.get("save_only"), + "life_cycle": ServiceLifeCycle.from_dict(obj["life_cycle"]) if obj.get("life_cycle") is not None else None, + "instance_snapshot_id": obj.get("instance_snapshot_id") + }) return _obj + + diff --git a/koyeb/api_async/models/update_service_pool.py b/koyeb/api_async/models/update_service_pool.py index 49a5d33c..55475a8c 100644 --- a/koyeb/api_async/models/update_service_pool.py +++ b/koyeb/api_async/models/update_service_pool.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateServicePool(BaseModel): """ UpdateServicePool - """ # noqa: E501 - + """ # noqa: E501 size: Optional[StrictInt] = None definition: Optional[DeploymentDefinition] = None __properties: ClassVar[List[str]] = ["size", "definition"] @@ -41,6 +39,7 @@ class UpdateServicePool(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of definition if self.definition: - _dict["definition"] = self.definition.to_dict() + _dict['definition'] = self.definition.to_dict() return _dict @classmethod @@ -85,12 +85,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "size": obj.get("size"), - "definition": DeploymentDefinition.from_dict(obj["definition"]) - if obj.get("definition") is not None - else None, - } - ) + _obj = cls.model_validate({ + "size": obj.get("size"), + "definition": DeploymentDefinition.from_dict(obj["definition"]) if obj.get("definition") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/update_service_pool_reply.py b/koyeb/api_async/models/update_service_pool_reply.py index 1795dcda..8b6eabab 100644 --- a/koyeb/api_async/models/update_service_pool_reply.py +++ b/koyeb/api_async/models/update_service_pool_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateServicePoolReply(BaseModel): """ UpdateServicePoolReply - """ # noqa: E501 - + """ # noqa: E501 service_pool: Optional[ServicePool] = None __properties: ClassVar[List[str]] = ["service_pool"] @@ -40,6 +38,7 @@ class UpdateServicePoolReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of service_pool if self.service_pool: - _dict["service_pool"] = self.service_pool.to_dict() + _dict['service_pool'] = self.service_pool.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service_pool": ServicePool.from_dict(obj["service_pool"]) - if obj.get("service_pool") is not None - else None - } - ) + _obj = cls.model_validate({ + "service_pool": ServicePool.from_dict(obj["service_pool"]) if obj.get("service_pool") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/update_service_reply.py b/koyeb/api_async/models/update_service_reply.py index d9cbce3f..2a61677c 100644 --- a/koyeb/api_async/models/update_service_reply.py +++ b/koyeb/api_async/models/update_service_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateServiceReply(BaseModel): """ UpdateServiceReply - """ # noqa: E501 - + """ # noqa: E501 service: Optional[Service] = None __properties: ClassVar[List[str]] = ["service"] @@ -40,6 +38,7 @@ class UpdateServiceReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of service if self.service: - _dict["service"] = self.service.to_dict() + _dict['service'] = self.service.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "service": Service.from_dict(obj["service"]) - if obj.get("service") is not None - else None - } - ) + _obj = cls.model_validate({ + "service": Service.from_dict(obj["service"]) if obj.get("service") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/update_service_scaling_request.py b/koyeb/api_async/models/update_service_scaling_request.py index 15f4b3e2..d096dcfb 100644 --- a/koyeb/api_async/models/update_service_scaling_request.py +++ b/koyeb/api_async/models/update_service_scaling_request.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateServiceScalingRequest(BaseModel): """ UpdateServiceScalingRequest - """ # noqa: E501 - + """ # noqa: E501 scalings: Optional[List[ManualServiceScaling]] = None __properties: ClassVar[List[str]] = ["scalings"] @@ -40,6 +38,7 @@ class UpdateServiceScalingRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -74,10 +74,9 @@ def to_dict(self) -> Dict[str, Any]: _items = [] if self.scalings: for _item_scalings in self.scalings: - _items.append( - _item_scalings.to_dict() if _item_scalings is not None else None - ) - _dict["scalings"] = _items + if _item_scalings: + _items.append(_item_scalings.to_dict()) + _dict['scalings'] = _items return _dict @classmethod @@ -89,13 +88,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "scalings": [ - ManualServiceScaling.from_dict(_item) for _item in obj["scalings"] - ] - if obj.get("scalings") is not None - else None - } - ) + _obj = cls.model_validate({ + "scalings": [ManualServiceScaling.from_dict(_item) for _item in obj["scalings"]] if obj.get("scalings") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/update_snapshot_reply.py b/koyeb/api_async/models/update_snapshot_reply.py index 64b59cae..5f59bd4a 100644 --- a/koyeb/api_async/models/update_snapshot_reply.py +++ b/koyeb/api_async/models/update_snapshot_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateSnapshotReply(BaseModel): """ UpdateSnapshotReply - """ # noqa: E501 - + """ # noqa: E501 snapshot: Optional[Snapshot] = None __properties: ClassVar[List[str]] = ["snapshot"] @@ -40,6 +38,7 @@ class UpdateSnapshotReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of snapshot if self.snapshot: - _dict["snapshot"] = self.snapshot.to_dict() + _dict['snapshot'] = self.snapshot.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "snapshot": Snapshot.from_dict(obj["snapshot"]) - if obj.get("snapshot") is not None - else None - } - ) + _obj = cls.model_validate({ + "snapshot": Snapshot.from_dict(obj["snapshot"]) if obj.get("snapshot") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/update_snapshot_request.py b/koyeb/api_async/models/update_snapshot_request.py index f466cbee..801fc6b0 100644 --- a/koyeb/api_async/models/update_snapshot_request.py +++ b/koyeb/api_async/models/update_snapshot_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateSnapshotRequest(BaseModel): """ UpdateSnapshotRequest - """ # noqa: E501 - + """ # noqa: E501 name: Optional[StrictStr] = None __properties: ClassVar[List[str]] = ["name"] @@ -39,6 +37,7 @@ class UpdateSnapshotRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,5 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate({"name": obj.get("name")}) + _obj = cls.model_validate({ + "name": obj.get("name") + }) return _obj + + diff --git a/koyeb/api_async/models/update_user_request_user_update_body.py b/koyeb/api_async/models/update_user_request_user_update_body.py index 0769c582..0a05660b 100644 --- a/koyeb/api_async/models/update_user_request_user_update_body.py +++ b/koyeb/api_async/models/update_user_request_user_update_body.py @@ -23,26 +23,17 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateUserRequestUserUpdateBody(BaseModel): """ UpdateUserRequestUserUpdateBody - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None email: Optional[StrictStr] = None current_password: Optional[StrictStr] = None password: Optional[StrictStr] = None newsletter_subscribed: Optional[StrictBool] = None name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = [ - "id", - "email", - "current_password", - "password", - "newsletter_subscribed", - "name", - ] + __properties: ClassVar[List[str]] = ["id", "email", "current_password", "password", "newsletter_subscribed", "name"] model_config = ConfigDict( validate_by_name=True, @@ -51,6 +42,7 @@ class UpdateUserRequestUserUpdateBody(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -74,7 +66,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -92,14 +85,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "email": obj.get("email"), - "current_password": obj.get("current_password"), - "password": obj.get("password"), - "newsletter_subscribed": obj.get("newsletter_subscribed"), - "name": obj.get("name"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "email": obj.get("email"), + "current_password": obj.get("current_password"), + "password": obj.get("password"), + "newsletter_subscribed": obj.get("newsletter_subscribed"), + "name": obj.get("name") + }) return _obj + + diff --git a/koyeb/api_async/models/update_user_settings_reply.py b/koyeb/api_async/models/update_user_settings_reply.py index 775850a5..f50a8920 100644 --- a/koyeb/api_async/models/update_user_settings_reply.py +++ b/koyeb/api_async/models/update_user_settings_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateUserSettingsReply(BaseModel): """ UpdateUserSettingsReply - """ # noqa: E501 - + """ # noqa: E501 settings: Optional[UserSettings] = None __properties: ClassVar[List[str]] = ["settings"] @@ -40,6 +38,7 @@ class UpdateUserSettingsReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of settings if self.settings: - _dict["settings"] = self.settings.to_dict() + _dict['settings'] = self.settings.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "settings": UserSettings.from_dict(obj["settings"]) - if obj.get("settings") is not None - else None - } - ) + _obj = cls.model_validate({ + "settings": UserSettings.from_dict(obj["settings"]) if obj.get("settings") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/update_user_settings_request.py b/koyeb/api_async/models/update_user_settings_request.py index 0dd06786..33ff27fe 100644 --- a/koyeb/api_async/models/update_user_settings_request.py +++ b/koyeb/api_async/models/update_user_settings_request.py @@ -23,16 +23,11 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpdateUserSettingsRequest(BaseModel): """ UpdateUserSettingsRequest - """ # noqa: E501 - - failed_deployment_email_notification: Optional[StrictBool] = Field( - default=None, - description="(Optional) Toggle failed deployment email notification.", - ) + """ # noqa: E501 + failed_deployment_email_notification: Optional[StrictBool] = Field(default=None, description="(Optional) Toggle failed deployment email notification.") __properties: ClassVar[List[str]] = ["failed_deployment_email_notification"] model_config = ConfigDict( @@ -42,6 +37,7 @@ class UpdateUserSettingsRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -65,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -83,11 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "failed_deployment_email_notification": obj.get( - "failed_deployment_email_notification" - ) - } - ) + _obj = cls.model_validate({ + "failed_deployment_email_notification": obj.get("failed_deployment_email_notification") + }) return _obj + + diff --git a/koyeb/api_async/models/upsert_signup_qualification_reply.py b/koyeb/api_async/models/upsert_signup_qualification_reply.py index 052015b9..5440a5bf 100644 --- a/koyeb/api_async/models/upsert_signup_qualification_reply.py +++ b/koyeb/api_async/models/upsert_signup_qualification_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpsertSignupQualificationReply(BaseModel): """ UpsertSignupQualificationReply - """ # noqa: E501 - + """ # noqa: E501 organization: Optional[Organization] = None __properties: ClassVar[List[str]] = ["organization"] @@ -40,6 +38,7 @@ class UpsertSignupQualificationReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of organization if self.organization: - _dict["organization"] = self.organization.to_dict() + _dict['organization'] = self.organization.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization": Organization.from_dict(obj["organization"]) - if obj.get("organization") is not None - else None - } - ) + _obj = cls.model_validate({ + "organization": Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/upsert_signup_qualification_request.py b/koyeb/api_async/models/upsert_signup_qualification_request.py index 3391bbb9..f89bab9b 100644 --- a/koyeb/api_async/models/upsert_signup_qualification_request.py +++ b/koyeb/api_async/models/upsert_signup_qualification_request.py @@ -23,12 +23,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UpsertSignupQualificationRequest(BaseModel): """ UpsertSignupQualificationRequest - """ # noqa: E501 - + """ # noqa: E501 signup_qualification: Optional[Dict[str, Any]] = None __properties: ClassVar[List[str]] = ["signup_qualification"] @@ -39,6 +37,7 @@ class UpsertSignupQualificationRequest(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -62,7 +61,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -80,7 +80,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - {"signup_qualification": obj.get("signup_qualification")} - ) + _obj = cls.model_validate({ + "signup_qualification": obj.get("signup_qualification") + }) return _obj + + diff --git a/koyeb/api_async/models/usage.py b/koyeb/api_async/models/usage.py index 16cc272d..7172e7fc 100644 --- a/koyeb/api_async/models/usage.py +++ b/koyeb/api_async/models/usage.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class Usage(BaseModel): """ Usage - """ # noqa: E501 - + """ # noqa: E501 organization_id: Optional[StrictStr] = None periods: Optional[Dict[str, PeriodUsage]] = None __properties: ClassVar[List[str]] = ["organization_id", "periods"] @@ -41,6 +39,7 @@ class Usage(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -64,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -75,12 +75,9 @@ def to_dict(self) -> Dict[str, Any]: _field_dict = {} if self.periods: for _key_periods in self.periods: - _field_dict[_key_periods] = ( - self.periods[_key_periods].to_dict() - if self.periods[_key_periods] is not None - else None - ) - _dict["periods"] = _field_dict + if self.periods[_key_periods]: + _field_dict[_key_periods] = self.periods[_key_periods].to_dict() + _dict['periods'] = _field_dict return _dict @classmethod @@ -92,14 +89,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization_id": obj.get("organization_id"), - "periods": dict( - (_k, PeriodUsage.from_dict(_v)) for _k, _v in obj["periods"].items() - ) - if obj.get("periods") is not None - else None, - } - ) + _obj = cls.model_validate({ + "organization_id": obj.get("organization_id"), + "periods": dict( + (_k, PeriodUsage.from_dict(_v)) + for _k, _v in obj["periods"].items() + ) + if obj.get("periods") is not None + else None + }) return _obj + + diff --git a/koyeb/api_async/models/usage_details.py b/koyeb/api_async/models/usage_details.py index 4476e91f..1063d0da 100644 --- a/koyeb/api_async/models/usage_details.py +++ b/koyeb/api_async/models/usage_details.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UsageDetails(BaseModel): """ UsageDetails - """ # noqa: E501 - + """ # noqa: E501 organization_id: Optional[StrictStr] = None instance_id: Optional[StrictStr] = None app_id: Optional[StrictStr] = None @@ -43,21 +41,7 @@ class UsageDetails(BaseModel): duration_seconds: Optional[StrictInt] = None started_at: Optional[datetime] = None terminated_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = [ - "organization_id", - "instance_id", - "app_id", - "app_name", - "service_id", - "service_name", - "regional_deployment_id", - "region", - "deployment_id", - "instance_type", - "duration_seconds", - "started_at", - "terminated_at", - ] + __properties: ClassVar[List[str]] = ["organization_id", "instance_id", "app_id", "app_name", "service_id", "service_name", "regional_deployment_id", "region", "deployment_id", "instance_type", "duration_seconds", "started_at", "terminated_at"] model_config = ConfigDict( validate_by_name=True, @@ -66,6 +50,7 @@ class UsageDetails(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -89,7 +74,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -107,21 +93,21 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "organization_id": obj.get("organization_id"), - "instance_id": obj.get("instance_id"), - "app_id": obj.get("app_id"), - "app_name": obj.get("app_name"), - "service_id": obj.get("service_id"), - "service_name": obj.get("service_name"), - "regional_deployment_id": obj.get("regional_deployment_id"), - "region": obj.get("region"), - "deployment_id": obj.get("deployment_id"), - "instance_type": obj.get("instance_type"), - "duration_seconds": obj.get("duration_seconds"), - "started_at": obj.get("started_at"), - "terminated_at": obj.get("terminated_at"), - } - ) + _obj = cls.model_validate({ + "organization_id": obj.get("organization_id"), + "instance_id": obj.get("instance_id"), + "app_id": obj.get("app_id"), + "app_name": obj.get("app_name"), + "service_id": obj.get("service_id"), + "service_name": obj.get("service_name"), + "regional_deployment_id": obj.get("regional_deployment_id"), + "region": obj.get("region"), + "deployment_id": obj.get("deployment_id"), + "instance_type": obj.get("instance_type"), + "duration_seconds": obj.get("duration_seconds"), + "started_at": obj.get("started_at"), + "terminated_at": obj.get("terminated_at") + }) return _obj + + diff --git a/koyeb/api_async/models/user.py b/koyeb/api_async/models/user.py index ac9c9094..b790bb72 100644 --- a/koyeb/api_async/models/user.py +++ b/koyeb/api_async/models/user.py @@ -25,12 +25,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class User(BaseModel): """ User - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None email: Optional[StrictStr] = None avatar_url: Optional[StrictStr] = None @@ -46,23 +44,7 @@ class User(BaseModel): name: Optional[StrictStr] = None email_validated: Optional[StrictBool] = None trialed: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "id", - "email", - "avatar_url", - "two_factor_authentication", - "last_login", - "last_login_ip", - "updated_at", - "created_at", - "newsletter_subscribed", - "github_id", - "github_user", - "flags", - "name", - "email_validated", - "trialed", - ] + __properties: ClassVar[List[str]] = ["id", "email", "avatar_url", "two_factor_authentication", "last_login", "last_login_ip", "updated_at", "created_at", "newsletter_subscribed", "github_id", "github_user", "flags", "name", "email_validated", "trialed"] model_config = ConfigDict( validate_by_name=True, @@ -71,6 +53,7 @@ class User(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -94,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -112,23 +96,23 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "email": obj.get("email"), - "avatar_url": obj.get("avatar_url"), - "two_factor_authentication": obj.get("two_factor_authentication"), - "last_login": obj.get("last_login"), - "last_login_ip": obj.get("last_login_ip"), - "updated_at": obj.get("updated_at"), - "created_at": obj.get("created_at"), - "newsletter_subscribed": obj.get("newsletter_subscribed"), - "github_id": obj.get("github_id"), - "github_user": obj.get("github_user"), - "flags": obj.get("flags"), - "name": obj.get("name"), - "email_validated": obj.get("email_validated"), - "trialed": obj.get("trialed"), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "email": obj.get("email"), + "avatar_url": obj.get("avatar_url"), + "two_factor_authentication": obj.get("two_factor_authentication"), + "last_login": obj.get("last_login"), + "last_login_ip": obj.get("last_login_ip"), + "updated_at": obj.get("updated_at"), + "created_at": obj.get("created_at"), + "newsletter_subscribed": obj.get("newsletter_subscribed"), + "github_id": obj.get("github_id"), + "github_user": obj.get("github_user"), + "flags": obj.get("flags"), + "name": obj.get("name"), + "email_validated": obj.get("email_validated"), + "trialed": obj.get("trialed") + }) return _obj + + diff --git a/koyeb/api_async/models/user_flags.py b/koyeb/api_async/models/user_flags.py index d17ba64c..4a31b7c9 100644 --- a/koyeb/api_async/models/user_flags.py +++ b/koyeb/api_async/models/user_flags.py @@ -26,23 +26,23 @@ class UserFlags(str, Enum): """ allowed enum values """ - ADMIN = "ADMIN" - TEST = "TEST" - RESTRICTED = "RESTRICTED" - ACTIVE = "ACTIVE" - BETA = "BETA" - MAX_ORGANIZATIONS_25 = "MAX_ORGANIZATIONS_25" - MAX_ORGANIZATIONS_100 = "MAX_ORGANIZATIONS_100" - MAX_ORGANIZATIONS_1000 = "MAX_ORGANIZATIONS_1000" - MAX_ORGANIZATIONS_10000 = "MAX_ORGANIZATIONS_10000" - MAX_ORGANIZATIONS_100000 = "MAX_ORGANIZATIONS_100000" - MAX_ORGANIZATIONS_1000000 = "MAX_ORGANIZATIONS_1000000" - PARTNER_CSP = "PARTNER_CSP" - IGNORE_ORGANIZATION_NAME_RESERVATION_RULE_NEON_PREFIX = ( - "IGNORE_ORGANIZATION_NAME_RESERVATION_RULE_NEON_PREFIX" - ) + ADMIN = 'ADMIN' + TEST = 'TEST' + RESTRICTED = 'RESTRICTED' + ACTIVE = 'ACTIVE' + BETA = 'BETA' + MAX_ORGANIZATIONS_25 = 'MAX_ORGANIZATIONS_25' + MAX_ORGANIZATIONS_100 = 'MAX_ORGANIZATIONS_100' + MAX_ORGANIZATIONS_1000 = 'MAX_ORGANIZATIONS_1000' + MAX_ORGANIZATIONS_10000 = 'MAX_ORGANIZATIONS_10000' + MAX_ORGANIZATIONS_100000 = 'MAX_ORGANIZATIONS_100000' + MAX_ORGANIZATIONS_1000000 = 'MAX_ORGANIZATIONS_1000000' + PARTNER_CSP = 'PARTNER_CSP' + IGNORE_ORGANIZATION_NAME_RESERVATION_RULE_NEON_PREFIX = 'IGNORE_ORGANIZATION_NAME_RESERVATION_RULE_NEON_PREFIX' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of UserFlags from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/user_reply.py b/koyeb/api_async/models/user_reply.py index 233a17f7..74dd2336 100644 --- a/koyeb/api_async/models/user_reply.py +++ b/koyeb/api_async/models/user_reply.py @@ -24,12 +24,10 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UserReply(BaseModel): """ UserReply - """ # noqa: E501 - + """ # noqa: E501 user: Optional[User] = None __properties: ClassVar[List[str]] = ["user"] @@ -40,6 +38,7 @@ class UserReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -63,7 +62,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -72,7 +72,7 @@ def to_dict(self) -> Dict[str, Any]: ) # override the default output from pydantic by calling `to_dict()` of user if self.user: - _dict["user"] = self.user.to_dict() + _dict['user'] = self.user.to_dict() return _dict @classmethod @@ -84,11 +84,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "user": User.from_dict(obj["user"]) - if obj.get("user") is not None - else None - } - ) + _obj = cls.model_validate({ + "user": User.from_dict(obj["user"]) if obj.get("user") is not None else None + }) return _obj + + diff --git a/koyeb/api_async/models/user_role_role.py b/koyeb/api_async/models/user_role_role.py index 900874be..f964e609 100644 --- a/koyeb/api_async/models/user_role_role.py +++ b/koyeb/api_async/models/user_role_role.py @@ -26,10 +26,12 @@ class UserRoleRole(str, Enum): """ allowed enum values """ - INVALID = "INVALID" - OWNER = "OWNER" + INVALID = 'INVALID' + OWNER = 'OWNER' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of UserRoleRole from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/models/user_settings.py b/koyeb/api_async/models/user_settings.py index 3e77725c..1e7118b4 100644 --- a/koyeb/api_async/models/user_settings.py +++ b/koyeb/api_async/models/user_settings.py @@ -23,20 +23,14 @@ from typing_extensions import Self from pydantic_core import to_jsonable_python - class UserSettings(BaseModel): """ UserSettings - """ # noqa: E501 - + """ # noqa: E501 id: Optional[StrictStr] = None user_id: Optional[StrictStr] = None failed_deployment_email_notification: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = [ - "id", - "user_id", - "failed_deployment_email_notification", - ] + __properties: ClassVar[List[str]] = ["id", "user_id", "failed_deployment_email_notification"] model_config = ConfigDict( validate_by_name=True, @@ -45,6 +39,7 @@ class UserSettings(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -68,7 +63,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -86,13 +82,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "id": obj.get("id"), - "user_id": obj.get("user_id"), - "failed_deployment_email_notification": obj.get( - "failed_deployment_email_notification" - ), - } - ) + _obj = cls.model_validate({ + "id": obj.get("id"), + "user_id": obj.get("user_id"), + "failed_deployment_email_notification": obj.get("failed_deployment_email_notification") + }) return _obj + + diff --git a/koyeb/api_async/models/verify_docker_image_reply.py b/koyeb/api_async/models/verify_docker_image_reply.py index d551ea17..a4e88f5a 100644 --- a/koyeb/api_async/models/verify_docker_image_reply.py +++ b/koyeb/api_async/models/verify_docker_image_reply.py @@ -19,24 +19,18 @@ from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional -from koyeb.api_async.models.verify_docker_image_reply_err_code import ( - VerifyDockerImageReplyErrCode, -) +from koyeb.api_async.models.verify_docker_image_reply_err_code import VerifyDockerImageReplyErrCode from typing import Optional, Set from typing_extensions import Self from pydantic_core import to_jsonable_python - class VerifyDockerImageReply(BaseModel): """ VerifyDockerImageReply - """ # noqa: E501 - + """ # noqa: E501 success: Optional[StrictBool] = None reason: Optional[StrictStr] = None - code: Optional[ - VerifyDockerImageReplyErrCode - ] = VerifyDockerImageReplyErrCode.UNKNOWN + code: Optional[VerifyDockerImageReplyErrCode] = VerifyDockerImageReplyErrCode.UNKNOWN __properties: ClassVar[List[str]] = ["success", "reason", "code"] model_config = ConfigDict( @@ -46,6 +40,7 @@ class VerifyDockerImageReply(BaseModel): protected_namespaces=(), ) + def to_str(self) -> str: """Returns the string representation of the model using alias""" return pprint.pformat(self.model_dump(by_alias=True)) @@ -69,7 +64,8 @@ def to_dict(self) -> Dict[str, Any]: were set at model initialization. Other fields with value `None` are ignored. """ - excluded_fields: Set[str] = set([]) + excluded_fields: Set[str] = set([ + ]) _dict = self.model_dump( by_alias=True, @@ -87,13 +83,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if not isinstance(obj, dict): return cls.model_validate(obj) - _obj = cls.model_validate( - { - "success": obj.get("success"), - "reason": obj.get("reason"), - "code": obj.get("code") - if obj.get("code") is not None - else VerifyDockerImageReplyErrCode.UNKNOWN, - } - ) + _obj = cls.model_validate({ + "success": obj.get("success"), + "reason": obj.get("reason"), + "code": obj.get("code") if obj.get("code") is not None else VerifyDockerImageReplyErrCode.UNKNOWN + }) return _obj + + diff --git a/koyeb/api_async/models/verify_docker_image_reply_err_code.py b/koyeb/api_async/models/verify_docker_image_reply_err_code.py index b3212b42..fb4d4ae6 100644 --- a/koyeb/api_async/models/verify_docker_image_reply_err_code.py +++ b/koyeb/api_async/models/verify_docker_image_reply_err_code.py @@ -26,21 +26,23 @@ class VerifyDockerImageReplyErrCode(str, Enum): """ allowed enum values """ - UNKNOWN = "UNKNOWN" - AUTH_ACCESS_DENIED = "AUTH_ACCESS_DENIED" - ANON_ACCESS_DENIED = "ANON_ACCESS_DENIED" - AUTH_NOT_FOUND = "AUTH_NOT_FOUND" - ANON_NOT_FOUND = "ANON_NOT_FOUND" - REGISTRY_ERROR = "REGISTRY_ERROR" - TIMEOUT = "TIMEOUT" - DNS = "DNS" - MALFORMED = "MALFORMED" - INVALID_OS = "INVALID_OS" - INVALID_ARCH = "INVALID_ARCH" - INVALID_SCHEME = "INVALID_SCHEME" - GENERIC = "GENERIC" + UNKNOWN = 'UNKNOWN' + AUTH_ACCESS_DENIED = 'AUTH_ACCESS_DENIED' + ANON_ACCESS_DENIED = 'ANON_ACCESS_DENIED' + AUTH_NOT_FOUND = 'AUTH_NOT_FOUND' + ANON_NOT_FOUND = 'ANON_NOT_FOUND' + REGISTRY_ERROR = 'REGISTRY_ERROR' + TIMEOUT = 'TIMEOUT' + DNS = 'DNS' + MALFORMED = 'MALFORMED' + INVALID_OS = 'INVALID_OS' + INVALID_ARCH = 'INVALID_ARCH' + INVALID_SCHEME = 'INVALID_SCHEME' + GENERIC = 'GENERIC' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of VerifyDockerImageReplyErrCode from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/koyeb/api_async/rest.py b/koyeb/api_async/rest.py index ed28ca0f..46365f8f 100644 --- a/koyeb/api_async/rest.py +++ b/koyeb/api_async/rest.py @@ -24,8 +24,8 @@ RESTResponseType = httpx.Response - class RESTResponse(io.IOBase): + def __init__(self, resp) -> None: self.response = resp self.status = resp.status_code @@ -52,7 +52,9 @@ def getheader(self, name, default=None): class RESTClientObject: + def __init__(self, configuration) -> None: + # maxsize is number of requests to host that are allowed in parallel self.maxsize = configuration.connection_pool_maxsize @@ -79,14 +81,13 @@ async def close(self): await self.pool_manager.aclose() async def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None, - ): + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None): """Execute request :param method: http request method @@ -102,7 +103,15 @@ async def request( (connection, read) timeouts. """ method = method.upper() - assert method in ["GET", "HEAD", "DELETE", "POST", "PUT", "PATCH", "OPTIONS"] + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] if post_params and body: raise ApiValueError( @@ -113,26 +122,29 @@ async def request( headers = headers or {} timeout = _request_timeout or 5 * 60 - if "Content-Type" not in headers: - headers["Content-Type"] = "application/json" + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' - args = {"method": method, "url": url, "timeout": timeout, "headers": headers} + args = { + "method": method, + "url": url, + "timeout": timeout, + "headers": headers + } # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]: - if re.search("json", headers["Content-Type"], re.IGNORECASE): + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if re.search('json', headers['Content-Type'], re.IGNORECASE): if body is not None: args["json"] = body if body is None and post_params: args["json"] = dict(post_params) - elif ( - headers["Content-Type"] == "application/x-www-form-urlencoded" - ): # noqa: E501 + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 args["data"] = dict(post_params) - elif headers["Content-Type"] == "multipart/form-data": + elif headers['Content-Type'] == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by httpx - del headers["Content-Type"] + del headers['Content-Type'] files = [] data = {} @@ -176,8 +188,14 @@ def _create_pool_manager(self) -> httpx.AsyncClient: proxy = None if self.proxy: - proxy = httpx.Proxy(url=self.proxy, headers=self.proxy_headers) + proxy = httpx.Proxy( + url=self.proxy, + headers=self.proxy_headers + ) return httpx.AsyncClient( - limits=limits, proxy=proxy, verify=self.ssl_context, trust_env=True + limits=limits, + proxy=proxy, + verify=self.ssl_context, + trust_env=True ) diff --git a/koyeb/api_async_README.md b/koyeb/api_async_README.md index 5d2fe329..6c855f78 100644 --- a/koyeb/api_async_README.md +++ b/koyeb/api_async_README.md @@ -5,7 +5,7 @@ The `koyeb.api_async` package is automatically generated by the [OpenAPI Generat - API version: 1.0.0 - Package version: 1.5.3 -- Generator version: 7.26.0-SNAPSHOT +- Generator version: 7.24.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. @@ -198,6 +198,7 @@ Class | Method | HTTP request | Description *SecretsApi* | [**update_secret**](koyeb/api_async/docs/SecretsApi.md#update_secret) | **PUT** /v1/secrets/{id} | Update Secret *SecretsApi* | [**update_secret2**](koyeb/api_async/docs/SecretsApi.md#update_secret2) | **PATCH** /v1/secrets/{id} | Update Secret *ServicePoolsApi* | [**create_service_pool**](koyeb/api_async/docs/ServicePoolsApi.md#create_service_pool) | **POST** /v1/service_pools | Create a ServicePool +*ServicePoolsApi* | [**delete_service_pool**](koyeb/api_async/docs/ServicePoolsApi.md#delete_service_pool) | **DELETE** /v1/service_pools/{id} | Delete a ServicePool *ServicePoolsApi* | [**get_service_pool**](koyeb/api_async/docs/ServicePoolsApi.md#get_service_pool) | **GET** /v1/service_pools/{id} | Get a ServicePool *ServicePoolsApi* | [**list_service_pools**](koyeb/api_async/docs/ServicePoolsApi.md#list_service_pools) | **GET** /v1/service_pools | List ServicePools *ServicePoolsApi* | [**update_service_pool**](koyeb/api_async/docs/ServicePoolsApi.md#update_service_pool) | **PUT** /v1/service_pools/{id} | diff --git a/spec/openapi.json b/spec/openapi.json index 1bd1ef77..7da4a6e9 100644 --- a/spec/openapi.json +++ b/spec/openapi.json @@ -10309,6 +10309,12 @@ "in": "path", "required": true, "type": "string" + }, + { + "name": "request_id", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -11888,6 +11894,71 @@ "ServicePools" ] }, + "delete": { + "summary": "Delete a ServicePool", + "operationId": "DeleteServicePool", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/DeleteServicePoolReply" + } + }, + "400": { + "description": "Validation error", + "schema": { + "$ref": "#/definitions/ErrorWithFields" + } + }, + "401": { + "description": "Returned when the token is not valid.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "403": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "404": { + "description": "Returned when the resource does not exist.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "500": { + "description": "Returned in case of server error.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "503": { + "description": "Service is unavailable.", + "schema": { + "$ref": "#/definitions/Error" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/google.rpc.Status" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "ServicePools" + ] + }, "put": { "operationId": "UpdateServicePool", "responses": {