Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Add missing files
Jakub Novak4856fdcb3dd9
diff --git a/packages/python-sdk/e2b/api/v1/client/models/instances_instance_id_refreshes_post_request.py b/packages/python-sdk/e2b/api/v1/client/models/instances_instance_id_refreshes_post_request.pynew file mode 100644index 000000000..d95e43c78--- /dev/null+++ b/packages/python-sdk/e2b/api/v1/client/models/instances_instance_id_refreshes_post_request.py@@ -0,0 +1,79 @@+# coding: utf-8++"""+ E2B API++ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501++ The version of the OpenAPI document: 0.1.0+ Generated by OpenAPI Generator (https://openapi-generator.tech)++ Do not edit the class manually.+"""+++from __future__ import annotations+import pprint+import re # noqa: F401+import json+++from pydantic import BaseModel, Field, conint+++class InstancesInstanceIDRefreshesPostRequest(BaseModel):+ """+ InstancesInstanceIDRefreshesPostRequest+ """++ duration: conint(strict=True, le=3600, ge=0) = Field(+ ...,+ description="Duration for which the instance should be kept alive in seconds",+ )+ __properties = ["duration"]++ class Config:+ """Pydantic configuration"""++ allow_population_by_field_name = True+ validate_assignment = True++ def to_str(self) -> str:+ """Returns the string representation of the model using alias"""+ return pprint.pformat(self.dict(by_alias=True))++ def to_json(self) -> str:+ """Returns the JSON representation of the model using alias"""+ return json.dumps(self.to_dict())++ @classmethod+ def from_json(cls, json_str: str) -> InstancesInstanceIDRefreshesPostRequest:+ """Create an instance of InstancesInstanceIDRefreshesPostRequest from a JSON string"""+ return cls.from_dict(json.loads(json_str))++ def to_dict(self):+ """Returns the dictionary representation of the model using alias"""+ _dict = self.dict(by_alias=True, exclude={}, exclude_none=True)+ return _dict++ @classmethod+ def from_dict(cls, obj: dict) -> InstancesInstanceIDRefreshesPostRequest:+ """Create an instance of InstancesInstanceIDRefreshesPostRequest from a dict"""+ if obj is None:+ return None++ if not isinstance(obj, dict):+ return InstancesInstanceIDRefreshesPostRequest.parse_obj(obj)++ # raise errors for additional fields in the input+ for _key in obj.keys():+ if _key not in cls.__properties:+ raise ValueError(+ "Error due to additional fields (not defined in InstancesInstanceIDRefreshesPostRequest) in the input: "+ + obj+ )++ _obj = InstancesInstanceIDRefreshesPostRequest.parse_obj(+ {"duration": obj.get("duration")}+ )+ return _objdiff --git a/packages/python-sdk/e2b/api/v2/client/models/instances_instance_id_refreshes_post_request.py b/packages/python-sdk/e2b/api/v2/client/models/instances_instance_id_refreshes_post_request.pynew file mode 100644index 000000000..e81f9f35f--- /dev/null+++ b/packages/python-sdk/e2b/api/v2/client/models/instances_instance_id_refreshes_post_request.py@@ -0,0 +1,78 @@+# coding: utf-8++"""+ E2B API++ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)++ The version of the OpenAPI document: 0.1.0+ Generated by OpenAPI Generator (https://openapi-generator.tech)++ Do not edit the class manually.+""" # noqa: E501+++from __future__ import annotations+import pprint+import re # noqa: F401+import json+++from pydantic import BaseModel, Field, conint+++class InstancesInstanceIDRefreshesPostRequest(BaseModel):+ """+ InstancesInstanceIDRefreshesPostRequest+ """++ duration: conint(strict=True, le=3600, ge=0) = Field(+ ...,+ description="Duration for which the instance should be kept alive in seconds",+ )++ """Pydantic configuration"""+ model_config = {+ "populate_by_name": True,+ "validate_assignment": True,+ }++ def to_str(self) -> str:+ """Returns the string representation of the model using alias"""+ return pprint.pformat(self.model_dump(by_alias=True))++ def to_json(self) -> str:+ """Returns the JSON representation of the model using alias"""+ return json.dumps(self.to_dict())++ @classmethod+ def from_json(cls, json_str: str) -> InstancesInstanceIDRefreshesPostRequest:+ """Create an instance of InstancesInstanceIDRefreshesPostRequest from a JSON string"""+ return cls.from_dict(json.loads(json_str))++ def to_dict(self):+ """Returns the dictionary representation of the model using alias"""+ _dict = self.model_dump(by_alias=True, exclude={}, exclude_none=True)+ return _dict++ @classmethod+ def from_dict(cls, obj: dict) -> InstancesInstanceIDRefreshesPostRequest:+ """Create an instance of InstancesInstanceIDRefreshesPostRequest from a dict"""+ if obj is None:+ return None++ if not isinstance(obj, dict):+ return InstancesInstanceIDRefreshesPostRequest.model_validate(obj)++ # raise errors for additional fields in the input+ for _key in obj.keys():+ if _key not in ["duration"]:+ raise ValueError(+ "Error due to additional fields (not defined in InstancesInstanceIDRefreshesPostRequest) in the input: "+ + obj+ )++ _obj = InstancesInstanceIDRefreshesPostRequest.model_validate(+ {"duration": obj.get("duration")}+ )+ return _obj