diff --git a/kittycad/models/gpu_device.py b/kittycad/models/gpu_device.py new file mode 100644 index 000000000..069a0cf72 --- /dev/null +++ b/kittycad/models/gpu_device.py @@ -0,0 +1,82 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="GPUDevice") + +@attr.s(auto_attribs=True) +class GPUDevice: + """ """ + id: Union[Unset, int] = UNSET + memory_bus_width: Union[Unset, int] = UNSET + memory_clock_rate: Union[Unset, int] = UNSET + name: Union[Unset, str] = UNSET + peak_memory_bandwidth: Union[Unset, int] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + id = self.id + memory_bus_width = self.memory_bus_width + memory_clock_rate = self.memory_clock_rate + name = self.name + peak_memory_bandwidth = self.peak_memory_bandwidth + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if id is not UNSET: + field_dict['id'] = id + if memory_bus_width is not UNSET: + field_dict['memory_bus_width'] = memory_bus_width + if memory_clock_rate is not UNSET: + field_dict['memory_clock_rate'] = memory_clock_rate + if name is not UNSET: + field_dict['name'] = name + if peak_memory_bandwidth is not UNSET: + field_dict['peak_memory_bandwidth'] = peak_memory_bandwidth + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + id = d.pop("id", UNSET) + + memory_bus_width = d.pop("memory_bus_width", UNSET) + + memory_clock_rate = d.pop("memory_clock_rate", UNSET) + + name = d.pop("name", UNSET) + + peak_memory_bandwidth = d.pop("peak_memory_bandwidth", UNSET) + + + gpu_device = cls( + id= id, + memory_bus_width= memory_bus_width, + memory_clock_rate= memory_clock_rate, + name= name, + peak_memory_bandwidth= peak_memory_bandwidth, + ) + + gpu_device.additional_properties = d +return gpu_device + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/instance.py b/kittycad/models/instance.py new file mode 100644 index 000000000..2b2122934 --- /dev/null +++ b/kittycad/models/instance.py @@ -0,0 +1,132 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.server_env import ServerEnv +from ..types import UNSET, Unset + +T = TypeVar("T", bound="Instance") + +@attr.s(auto_attribs=True) +class Instance: + """ """ + cpu_platform: Union[Unset, str] = UNSET + description: Union[Unset, str] = UNSET + environment: Union[Unset, ServerEnv] = UNSET + git_hash: Union[Unset, str] = UNSET + hostname: Union[Unset, str] = UNSET + id: Union[Unset, str] = UNSET + image: Union[Unset, str] = UNSET + ip_address: Union[Unset, str] = UNSET + machine_type: Union[Unset, str] = UNSET + name: Union[Unset, str] = UNSET + zone: Union[Unset, str] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + cpu_platform = self.cpu_platform + description = self.description + environment: Union[Unset, str] = UNSET + if not isinstance(self.environment, Unset): + environment = self.environment.value + git_hash = self.git_hash + hostname = self.hostname + id = self.id + image = self.image + ip_address = self.ip_address + machine_type = self.machine_type + name = self.name + zone = self.zone + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if cpu_platform is not UNSET: + field_dict['cpu_platform'] = cpu_platform + if description is not UNSET: + field_dict['description'] = description + if environment is not UNSET: + field_dict['environment'] = environment + if git_hash is not UNSET: + field_dict['git_hash'] = git_hash + if hostname is not UNSET: + field_dict['hostname'] = hostname + if id is not UNSET: + field_dict['id'] = id + if image is not UNSET: + field_dict['image'] = image + if ip_address is not UNSET: + field_dict['ip_address'] = ip_address + if machine_type is not UNSET: + field_dict['machine_type'] = machine_type + if name is not UNSET: + field_dict['name'] = name + if zone is not UNSET: + field_dict['zone'] = zone + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + cpu_platform = d.pop("cpu_platform", UNSET) + + description = d.pop("description", UNSET) + + _environment = d.pop("environment", UNSET) + environment: Union[Unset, ServerEnv] + if not isinstance(_environment, Unset): + environment = UNSET + else: + environment = ServerEnv(_environment) + + git_hash = d.pop("git_hash", UNSET) + + hostname = d.pop("hostname", UNSET) + + id = d.pop("id", UNSET) + + image = d.pop("image", UNSET) + + ip_address = d.pop("ip_address", UNSET) + + machine_type = d.pop("machine_type", UNSET) + + name = d.pop("name", UNSET) + + zone = d.pop("zone", UNSET) + + + instance = cls( + cpu_platform= cpu_platform, + description= description, + environment= environment, + git_hash= git_hash, + hostname= hostname, + id= id, + image= image, + ip_address= ip_address, + machine_type= machine_type, + name= name, + zone= zone, + ) + + instance.additional_properties = d +return instance + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/pong_enum.py b/kittycad/models/pong_enum.py new file mode 100644 index 000000000..32940a120 --- /dev/null +++ b/kittycad/models/pong_enum.py @@ -0,0 +1,7 @@ +from enum import Enum + +class PongEnum(str, Enum): + PONG = 'pong' + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/pong_message.py b/kittycad/models/pong_message.py new file mode 100644 index 000000000..bbd2d9f7a --- /dev/null +++ b/kittycad/models/pong_message.py @@ -0,0 +1,62 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..models.pong_enum import PongEnum +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PongMessage") + +@attr.s(auto_attribs=True) +class PongMessage: + """ """ + message: Union[Unset, PongEnum] = UNSET + + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + message: Union[Unset, str] = UNSET + if not isinstance(self.message, Unset): + message = self.message.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if message is not UNSET: + field_dict['message'] = message + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _message = d.pop("message", UNSET) + message: Union[Unset, PongEnum] + if not isinstance(_message, Unset): + message = UNSET + else: + message = PongEnum(_message) + + + pong_message = cls( + message= message, + ) + + pong_message.additional_properties = d +return pong_message + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/kittycad/models/server_env.py b/kittycad/models/server_env.py new file mode 100644 index 000000000..5b37c9852 --- /dev/null +++ b/kittycad/models/server_env.py @@ -0,0 +1,9 @@ +from enum import Enum + +class ServerEnv(str, Enum): + PRODUCTION = 'production' + DEVELOPMENT = 'development' + PREVIEW = 'preview' + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/valid_output_file_format.py b/kittycad/models/valid_output_file_format.py new file mode 100644 index 000000000..8059e58cd --- /dev/null +++ b/kittycad/models/valid_output_file_format.py @@ -0,0 +1,12 @@ +from enum import Enum + +class ValidOutputFileFormat(str, Enum): + STL = 'stl' + OBJ = 'obj' + DAE = 'dae' + STEP = 'step' + FBX = 'fbx' + FBXB = 'fbxb' + + def __str__(self) -> str: + return str(self.value) diff --git a/kittycad/models/valid_source_file_format.py b/kittycad/models/valid_source_file_format.py new file mode 100644 index 000000000..6f11479e3 --- /dev/null +++ b/kittycad/models/valid_source_file_format.py @@ -0,0 +1,11 @@ +from enum import Enum + +class ValidSourceFileFormat(str, Enum): + STL = 'stl' + OBJ = 'obj' + DAE = 'dae' + STEP = 'step' + FBX = 'fbx' + + def __str__(self) -> str: + return str(self.value)