@ -987,6 +987,7 @@ def getRequestBodyRefs(endpoint: dict) -> [str]:
|
|||||||
|
|
||||||
return refs
|
return refs
|
||||||
|
|
||||||
|
|
||||||
def getRequestBodyType(endpoint: dict) -> str:
|
def getRequestBodyType(endpoint: dict) -> str:
|
||||||
type_name = None
|
type_name = None
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ from .models import FileConversion, ValidOutputFileFormat, ValidSourceFileFormat
|
|||||||
from .api.file import post_file_conversion_with_base64_helper
|
from .api.file import post_file_conversion_with_base64_helper
|
||||||
from .api.meta import auth_session, instance_metadata, ping
|
from .api.meta import auth_session, instance_metadata, ping
|
||||||
|
|
||||||
|
|
||||||
def test_get_session():
|
def test_get_session():
|
||||||
# Create our client.
|
# Create our client.
|
||||||
client = ClientFromEnv()
|
client = ClientFromEnv()
|
||||||
@ -14,10 +15,11 @@ def test_get_session():
|
|||||||
# Get the session.
|
# Get the session.
|
||||||
session: AuthSession = auth_session.sync(client=client)
|
session: AuthSession = auth_session.sync(client=client)
|
||||||
|
|
||||||
assert session != None
|
assert session is not None
|
||||||
|
|
||||||
print(f"Session: {session}")
|
print(f"Session: {session}")
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_get_session_async():
|
async def test_get_session_async():
|
||||||
# Create our client.
|
# Create our client.
|
||||||
@ -26,10 +28,11 @@ async def test_get_session_async():
|
|||||||
# Get the session.
|
# Get the session.
|
||||||
session: AuthSession = await auth_session.asyncio(client=client)
|
session: AuthSession = await auth_session.asyncio(client=client)
|
||||||
|
|
||||||
assert session != None
|
assert session is not None
|
||||||
|
|
||||||
print(f"Session: {session}")
|
print(f"Session: {session}")
|
||||||
|
|
||||||
|
|
||||||
def test_get_instance():
|
def test_get_instance():
|
||||||
# Create our client.
|
# Create our client.
|
||||||
client = ClientFromEnv()
|
client = ClientFromEnv()
|
||||||
@ -37,10 +40,11 @@ def test_get_instance():
|
|||||||
# Get the instance.
|
# Get the instance.
|
||||||
instance: InstanceMetadata = instance_metadata.sync(client=client)
|
instance: InstanceMetadata = instance_metadata.sync(client=client)
|
||||||
|
|
||||||
assert instance != None
|
assert instance is not None
|
||||||
|
|
||||||
print(f"Instance: {instance}")
|
print(f"Instance: {instance}")
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_get_instance_async():
|
async def test_get_instance_async():
|
||||||
# Create our client.
|
# Create our client.
|
||||||
@ -49,10 +53,11 @@ async def test_get_instance_async():
|
|||||||
# Get the instance.
|
# Get the instance.
|
||||||
instance: InstanceMetadata = await instance_metadata.asyncio(client=client)
|
instance: InstanceMetadata = await instance_metadata.asyncio(client=client)
|
||||||
|
|
||||||
assert instance != None
|
assert instance is not None
|
||||||
|
|
||||||
print(f"Instance: {instance}")
|
print(f"Instance: {instance}")
|
||||||
|
|
||||||
|
|
||||||
def test_ping():
|
def test_ping():
|
||||||
# Create our client.
|
# Create our client.
|
||||||
client = ClientFromEnv()
|
client = ClientFromEnv()
|
||||||
@ -60,10 +65,11 @@ def test_ping():
|
|||||||
# Get the message.
|
# Get the message.
|
||||||
message: Message = ping.sync(client=client)
|
message: Message = ping.sync(client=client)
|
||||||
|
|
||||||
assert message != None
|
assert message is not None
|
||||||
|
|
||||||
print(f"Message: {message}")
|
print(f"Message: {message}")
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_ping_async():
|
async def test_ping_async():
|
||||||
# Create our client.
|
# Create our client.
|
||||||
@ -72,10 +78,11 @@ async def test_ping_async():
|
|||||||
# Get the message.
|
# Get the message.
|
||||||
message: Message = await ping.asyncio(client=client)
|
message: Message = await ping.asyncio(client=client)
|
||||||
|
|
||||||
assert message != None
|
assert message is not None
|
||||||
|
|
||||||
print(f"Message: {message}")
|
print(f"Message: {message}")
|
||||||
|
|
||||||
|
|
||||||
def test_file_convert_stl():
|
def test_file_convert_stl():
|
||||||
# Create our client.
|
# Create our client.
|
||||||
client = ClientFromEnv()
|
client = ClientFromEnv()
|
||||||
@ -86,12 +93,17 @@ def test_file_convert_stl():
|
|||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
# Get the fc.
|
# Get the fc.
|
||||||
fc: FileConversion = post_file_convertsion_with_base64_helper.sync(client=client, content=content, source_format=ValidSourceFileFormat.STL, output_format=ValidOutputFileFormat.OBJ)
|
fc: FileConversion = post_file_convertsion_with_base64_helper.sync(
|
||||||
|
client=client,
|
||||||
|
content=content,
|
||||||
|
source_format=ValidSourceFileFormat.STL,
|
||||||
|
output_format=ValidOutputFileFormat.OBJ)
|
||||||
|
|
||||||
assert fc != None
|
assert fc is not None
|
||||||
|
|
||||||
print(f"FileConversion: {fc}")
|
print(f"FileConversion: {fc}")
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_file_convert_stl_async():
|
async def test_file_convert_stl_async():
|
||||||
# Create our client.
|
# Create our client.
|
||||||
@ -105,6 +117,6 @@ async def test_file_convert_stl_async():
|
|||||||
# Get the fc.
|
# Get the fc.
|
||||||
fc: FileConversion = await post_file_convertsion_with_base64_helper.asyncio(client=client, content=content, source_format=ValidSourceFileFormat.STL, output_format=ValidOutputFileFormat.OBJ)
|
fc: FileConversion = await post_file_convertsion_with_base64_helper.asyncio(client=client, content=content, source_format=ValidSourceFileFormat.STL, output_format=ValidOutputFileFormat.OBJ)
|
||||||
|
|
||||||
assert fc != None
|
assert fc is not None
|
||||||
|
|
||||||
print(f"FileConversion: {fc}")
|
print(f"FileConversion: {fc}")
|
||||||
|
@ -8,6 +8,7 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
T = TypeVar("T", bound="AuthSession")
|
T = TypeVar("T", bound="AuthSession")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class AuthSession:
|
class AuthSession:
|
||||||
""" """
|
""" """
|
||||||
@ -80,16 +81,15 @@ class AuthSession:
|
|||||||
|
|
||||||
user_id = d.pop("user_id", UNSET)
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
|
|
||||||
auth_session = cls(
|
auth_session = cls(
|
||||||
created_at= created_at,
|
created_at=created_at,
|
||||||
email= email,
|
email=email,
|
||||||
id= id,
|
id=id,
|
||||||
image= image,
|
image=image,
|
||||||
ip_address= ip_address,
|
ip_address=ip_address,
|
||||||
is_valid= is_valid,
|
is_valid=is_valid,
|
||||||
token= token,
|
token=token,
|
||||||
user_id= user_id,
|
user_id=user_id,
|
||||||
)
|
)
|
||||||
|
|
||||||
auth_session.additional_properties = d
|
auth_session.additional_properties = d
|
||||||
|
@ -6,6 +6,7 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
T = TypeVar("T", bound="ErrorMessage")
|
T = TypeVar("T", bound="ErrorMessage")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class ErrorMessage:
|
class ErrorMessage:
|
||||||
""" """
|
""" """
|
||||||
@ -41,11 +42,10 @@ class ErrorMessage:
|
|||||||
|
|
||||||
status = d.pop("status", UNSET)
|
status = d.pop("status", UNSET)
|
||||||
|
|
||||||
|
|
||||||
error_message = cls(
|
error_message = cls(
|
||||||
code= code,
|
code=code,
|
||||||
message= message,
|
message=message,
|
||||||
status= status,
|
status=status,
|
||||||
)
|
)
|
||||||
|
|
||||||
error_message.additional_properties = d
|
error_message.additional_properties = d
|
||||||
|
@ -11,6 +11,7 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
T = TypeVar("T", bound="FileConversion")
|
T = TypeVar("T", bound="FileConversion")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class FileConversion:
|
class FileConversion:
|
||||||
""" """
|
""" """
|
||||||
@ -118,16 +119,15 @@ class FileConversion:
|
|||||||
else:
|
else:
|
||||||
status = FileConversionStatus(_status)
|
status = FileConversionStatus(_status)
|
||||||
|
|
||||||
|
|
||||||
file_conversion = cls(
|
file_conversion = cls(
|
||||||
completed_at= completed_at,
|
completed_at=completed_at,
|
||||||
created_at= created_at,
|
created_at=created_at,
|
||||||
id= id,
|
id=id,
|
||||||
output= output,
|
output=output,
|
||||||
output_format= output_format,
|
output_format=output_format,
|
||||||
src_format= src_format,
|
src_format=src_format,
|
||||||
started_at= started_at,
|
started_at=started_at,
|
||||||
status= status,
|
status=status,
|
||||||
)
|
)
|
||||||
|
|
||||||
file_conversion.additional_properties = d
|
file_conversion.additional_properties = d
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
class FileConversionStatus(str, Enum):
|
class FileConversionStatus(str, Enum):
|
||||||
QUEUED = 'Queued'
|
QUEUED = 'Queued'
|
||||||
UPLOADED = 'Uploaded'
|
UPLOADED = 'Uploaded'
|
||||||
|
@ -6,6 +6,7 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
T = TypeVar("T", bound="GPUDevice")
|
T = TypeVar("T", bound="GPUDevice")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class GPUDevice:
|
class GPUDevice:
|
||||||
""" """
|
""" """
|
||||||
@ -53,13 +54,12 @@ class GPUDevice:
|
|||||||
|
|
||||||
peak_memory_bandwidth = d.pop("peak_memory_bandwidth", UNSET)
|
peak_memory_bandwidth = d.pop("peak_memory_bandwidth", UNSET)
|
||||||
|
|
||||||
|
|
||||||
gpu_device = cls(
|
gpu_device = cls(
|
||||||
id= id,
|
id=id,
|
||||||
memory_bus_width= memory_bus_width,
|
memory_bus_width=memory_bus_width,
|
||||||
memory_clock_rate= memory_clock_rate,
|
memory_clock_rate=memory_clock_rate,
|
||||||
name= name,
|
name=name,
|
||||||
peak_memory_bandwidth= peak_memory_bandwidth,
|
peak_memory_bandwidth=peak_memory_bandwidth,
|
||||||
)
|
)
|
||||||
|
|
||||||
gpu_device.additional_properties = d
|
gpu_device.additional_properties = d
|
||||||
|
@ -7,6 +7,7 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
T = TypeVar("T", bound="Instance")
|
T = TypeVar("T", bound="Instance")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class Instance:
|
class Instance:
|
||||||
""" """
|
""" """
|
||||||
@ -97,19 +98,18 @@ class Instance:
|
|||||||
|
|
||||||
zone = d.pop("zone", UNSET)
|
zone = d.pop("zone", UNSET)
|
||||||
|
|
||||||
|
|
||||||
instance = cls(
|
instance = cls(
|
||||||
cpu_platform= cpu_platform,
|
cpu_platform=cpu_platform,
|
||||||
description= description,
|
description=description,
|
||||||
environment= environment,
|
environment=environment,
|
||||||
git_hash= git_hash,
|
git_hash=git_hash,
|
||||||
hostname= hostname,
|
hostname=hostname,
|
||||||
id= id,
|
id=id,
|
||||||
image= image,
|
image=image,
|
||||||
ip_address= ip_address,
|
ip_address=ip_address,
|
||||||
machine_type= machine_type,
|
machine_type=machine_type,
|
||||||
name= name,
|
name=name,
|
||||||
zone= zone,
|
zone=zone,
|
||||||
)
|
)
|
||||||
|
|
||||||
instance.additional_properties = d
|
instance.additional_properties = d
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
class PongEnum(str, Enum):
|
class PongEnum(str, Enum):
|
||||||
PONG = 'pong'
|
PONG = 'pong'
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
T = TypeVar("T", bound="PongMessage")
|
T = TypeVar("T", bound="PongMessage")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class PongMessage:
|
class PongMessage:
|
||||||
""" """
|
""" """
|
||||||
@ -37,9 +38,8 @@ class PongMessage:
|
|||||||
else:
|
else:
|
||||||
message = PongEnum(_message)
|
message = PongEnum(_message)
|
||||||
|
|
||||||
|
|
||||||
pong_message = cls(
|
pong_message = cls(
|
||||||
message= message,
|
message=message,
|
||||||
)
|
)
|
||||||
|
|
||||||
pong_message.additional_properties = d
|
pong_message.additional_properties = d
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
class ServerEnv(str, Enum):
|
class ServerEnv(str, Enum):
|
||||||
PRODUCTION = 'production'
|
PRODUCTION = 'production'
|
||||||
DEVELOPMENT = 'development'
|
DEVELOPMENT = 'development'
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
class ValidOutputFileFormat(str, Enum):
|
class ValidOutputFileFormat(str, Enum):
|
||||||
STL = 'stl'
|
STL = 'stl'
|
||||||
OBJ = 'obj'
|
OBJ = 'obj'
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
class ValidSourceFileFormat(str, Enum):
|
class ValidSourceFileFormat(str, Enum):
|
||||||
STL = 'stl'
|
STL = 'stl'
|
||||||
OBJ = 'obj'
|
OBJ = 'obj'
|
||||||
|
Reference in New Issue
Block a user