2
.github/workflows/build-test.yml
vendored
2
.github/workflows/build-test.yml
vendored
@ -47,7 +47,7 @@ jobs:
|
|||||||
# stop the build if there are Python syntax errors or undefined names
|
# stop the build if there are Python syntax errors or undefined names
|
||||||
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||||
poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
#poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||||
|
|
||||||
- name: Run pytest
|
- name: Run pytest
|
||||||
shell: bash
|
shell: bash
|
||||||
|
@ -114,7 +114,7 @@ def generatePath(
|
|||||||
|
|
||||||
success_type = endoint_refs[0]
|
success_type = endoint_refs[0]
|
||||||
|
|
||||||
if fn_name == 'file_conversion_status' or fn_name == 'post_file_conversion':
|
if fn_name == 'get_file_conversion' or fn_name == 'create_file_conversion':
|
||||||
fn_name += '_with_base64_helper'
|
fn_name += '_with_base64_helper'
|
||||||
|
|
||||||
# Iterate over the parameters.
|
# Iterate over the parameters.
|
||||||
@ -1048,9 +1048,19 @@ def generateType(path: str, name: str, schema: dict):
|
|||||||
f.write("\n")
|
f.write("\n")
|
||||||
f.write("\tdef __str__(self) -> str:\n")
|
f.write("\tdef __str__(self) -> str:\n")
|
||||||
f.write("\t\treturn str(self.value)\n")
|
f.write("\t\treturn str(self.value)\n")
|
||||||
|
elif type_name == 'integer':
|
||||||
|
f.write("class " + name + "(int):\n")
|
||||||
|
f.write("\n")
|
||||||
|
f.write("\tdef __int__(self) -> int:\n")
|
||||||
|
f.write("\t\treturn self\n")
|
||||||
|
elif type_name == 'string':
|
||||||
|
f.write("class " + name + "(str):\n")
|
||||||
|
f.write("\n")
|
||||||
|
f.write("\tdef __str__(self) -> str:\n")
|
||||||
|
f.write("\t\treturn self\n")
|
||||||
else:
|
else:
|
||||||
print(" unsupported type: ", type_name)
|
print(" unsupported type: ", type_name)
|
||||||
return
|
raise Exception(" unsupported type: ", type_name)
|
||||||
|
|
||||||
# Close the file.
|
# Close the file.
|
||||||
f.close()
|
f.close()
|
||||||
|
@ -1 +0,0 @@
|
|||||||
""" Contains methods for accessing the beta API paths: Beta API endpoints. """
|
|
@ -4,56 +4,56 @@ import base64
|
|||||||
import httpx
|
import httpx
|
||||||
|
|
||||||
from ...client import Client
|
from ...client import Client
|
||||||
from ...models.error_message import ErrorMessage
|
from ...models import Error
|
||||||
from ...models.file_conversion import FileConversion
|
from ...models import FileConversionWithOutput
|
||||||
from ...models.valid_source_file_format import ValidSourceFileFormat
|
from ...models import FileConversionSourceFormat
|
||||||
from ...models.valid_output_file_format import ValidOutputFileFormat
|
from ...models import FileConversionOutputFormat
|
||||||
from ...types import Response
|
from ...types import Response
|
||||||
from ...api.file.post_file_conversion import sync as fc_sync, asyncio as fc_asyncio
|
from ...api.file.create_file_conversion import sync as fc_sync, asyncio as fc_asyncio
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
source_format: ValidSourceFileFormat,
|
src_format: FileConversionSourceFormat,
|
||||||
output_format: ValidOutputFileFormat,
|
output_format: FileConversionOutputFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Any, FileConversion, ErrorMessage]]:
|
) -> Optional[Union[Any, FileConversionWithOutput, Error]]:
|
||||||
"""Convert a CAD file from one format to another. If the file being converted is larger than a certain size it will be performed asynchronously. This function automatically base64 encodes the request body and base64 decodes the request output."""
|
"""Convert a CAD file from one format to another. If the file being converted is larger than a certain size it will be performed asynchronously. This function automatically base64 encodes the request body and base64 decodes the request output."""
|
||||||
|
|
||||||
encoded = base64.b64encode(body)
|
encoded = base64.b64encode(body)
|
||||||
|
|
||||||
fc = fc_sync(
|
fc = fc_sync(
|
||||||
source_format=source_format,
|
src_format=src_format,
|
||||||
output_format=output_format,
|
output_format=output_format,
|
||||||
body=encoded,
|
body=encoded,
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
if isinstance(fc, FileConversion) and fc.output != "":
|
if isinstance(fc, FileConversionWithOutput) and fc.output != "":
|
||||||
fc.output = base64.b64decode(fc.output)
|
fc.output = base64.b64decode(fc.output)
|
||||||
|
|
||||||
return fc
|
return fc
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
async def asyncio(
|
||||||
source_format: ValidSourceFileFormat,
|
src_format: FileConversionSourceFormat,
|
||||||
output_format: ValidOutputFileFormat,
|
output_format: FileConversionOutputFormat,
|
||||||
body: bytes,
|
body: bytes,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Any, FileConversion, ErrorMessage]]:
|
) -> Optional[Union[Any, FileConversionWithOutput, Error]]:
|
||||||
"""Convert a CAD file from one format to another. If the file being converted is larger than a certain size it will be performed asynchronously. This function automatically base64 encodes the request body and base64 decodes the request output."""
|
"""Convert a CAD file from one format to another. If the file being converted is larger than a certain size it will be performed asynchronously. This function automatically base64 encodes the request body and base64 decodes the request output."""
|
||||||
|
|
||||||
encoded = base64.b64encode(body)
|
encoded = base64.b64encode(body)
|
||||||
|
|
||||||
fc = await fc_asyncio(
|
fc = await fc_asyncio(
|
||||||
source_format=source_format,
|
src_format=src_format,
|
||||||
output_format=output_format,
|
output_format=output_format,
|
||||||
body=encoded,
|
body=encoded,
|
||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
if isinstance(fc, FileConversion) and fc.output != "":
|
if isinstance(fc, FileConversionWithOutput) and fc.output != "":
|
||||||
fc.output = base64.b64decode(fc.output)
|
fc.output = base64.b64decode(fc.output)
|
||||||
|
|
||||||
return fc
|
return fc
|
@ -1,118 +0,0 @@
|
|||||||
from typing import Any, Dict, Optional, Union
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ...client import Client
|
|
||||||
from ...models.file_conversion import FileConversion
|
|
||||||
from ...models.error_message import ErrorMessage
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
def _get_kwargs(
|
|
||||||
id: str,
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Dict[str, Any]:
|
|
||||||
url = "{}/file/conversion/{id}".format(client.base_url, id=id)
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
|
||||||
|
|
||||||
return {
|
|
||||||
"url": url,
|
|
||||||
"headers": headers,
|
|
||||||
"cookies": cookies,
|
|
||||||
"timeout": client.get_timeout(),
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, ErrorMessage]]:
|
|
||||||
if response.status_code == 200:
|
|
||||||
response_200 = FileConversion.from_dict(response.json())
|
|
||||||
return response_200
|
|
||||||
if response.status_code == 401:
|
|
||||||
response_401 = ErrorMessage.from_dict(response.json())
|
|
||||||
return response_401
|
|
||||||
if response.status_code == 403:
|
|
||||||
response_403 = ErrorMessage.from_dict(response.json())
|
|
||||||
return response_403
|
|
||||||
if response.status_code == 404:
|
|
||||||
response_404 = ErrorMessage.from_dict(response.json())
|
|
||||||
return response_404
|
|
||||||
if response.status_code == 406:
|
|
||||||
response_406 = ErrorMessage.from_dict(response.json())
|
|
||||||
return response_406
|
|
||||||
if response.status_code == 500:
|
|
||||||
response_500 = ErrorMessage.from_dict(response.json())
|
|
||||||
return response_500
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, ErrorMessage]]:
|
|
||||||
return Response(
|
|
||||||
status_code=response.status_code,
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
id: str,
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Response[Union[Any, FileConversion, ErrorMessage]]:
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
id=id,
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = httpx.get(
|
|
||||||
verify=client.verify_ssl,
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
id: str,
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Optional[Union[Any, FileConversion, ErrorMessage]]:
|
|
||||||
""" Get the status and output of an async file conversion. """
|
|
||||||
|
|
||||||
return sync_detailed(
|
|
||||||
id=id,
|
|
||||||
client=client,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
id: str,
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Response[Union[Any, FileConversion, ErrorMessage]]:
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
id=id,
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
||||||
response = await _client.get(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
id: str,
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Optional[Union[Any, FileConversion, ErrorMessage]]:
|
|
||||||
""" Get the status and output of an async file conversion. """
|
|
||||||
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
id=id,
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
).parsed
|
|
@ -4,17 +4,17 @@ import base64
|
|||||||
import httpx
|
import httpx
|
||||||
|
|
||||||
from ...client import Client
|
from ...client import Client
|
||||||
from ...models.error_message import ErrorMessage
|
from ...models import Error
|
||||||
from ...models.file_conversion import FileConversion
|
from ...models.file_conversion import FileConversionWithOutput
|
||||||
from ...types import Response
|
from ...types import Response
|
||||||
from ...api.file.file_conversion_status import sync as fc_sync, asyncio as fc_asyncio
|
from ...api.file.get_file_conversion import sync as fc_sync, asyncio as fc_asyncio
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
def sync(
|
||||||
id: str,
|
id: str,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Any, FileConversion, ErrorMessage]]:
|
) -> Optional[Union[Any, FileConversionWithOutput, Error]]:
|
||||||
"""Get the status of a file conversion. This function automatically base64 decodes the output response if there is one."""
|
"""Get the status of a file conversion. This function automatically base64 decodes the output response if there is one."""
|
||||||
|
|
||||||
fc = fc_sync(
|
fc = fc_sync(
|
||||||
@ -22,7 +22,7 @@ def sync(
|
|||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
if isinstance(fc, FileConversion) and fc.output != "":
|
if isinstance(fc, FileConversionWithOutput) and fc.output != "":
|
||||||
fc.output = base64.b64decode(fc.output)
|
fc.output = base64.b64decode(fc.output)
|
||||||
|
|
||||||
return fc
|
return fc
|
||||||
@ -32,7 +32,7 @@ async def asyncio(
|
|||||||
id: str,
|
id: str,
|
||||||
*,
|
*,
|
||||||
client: Client,
|
client: Client,
|
||||||
) -> Optional[Union[Any, FileConversion, ErrorMessage]]:
|
) -> Optional[Union[Any, FileConversionWithOutput, Error]]:
|
||||||
"""Get the status of a file conversion. This function automatically base64 decodes the output response if there is one."""
|
"""Get the status of a file conversion. This function automatically base64 decodes the output response if there is one."""
|
||||||
|
|
||||||
fc = await fc_asyncio(
|
fc = await fc_asyncio(
|
||||||
@ -40,7 +40,7 @@ async def asyncio(
|
|||||||
client=client,
|
client=client,
|
||||||
)
|
)
|
||||||
|
|
||||||
if isinstance(fc, FileConversion) and fc.output != "":
|
if isinstance(fc, FileConversionWithOutput) and fc.output != "":
|
||||||
fc.output = base64.b64decode(fc.output)
|
fc.output = base64.b64decode(fc.output)
|
||||||
|
|
||||||
return fc
|
return fc
|
@ -1,142 +0,0 @@
|
|||||||
from typing import Any, Dict, Optional, Union
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ...client import Client
|
|
||||||
from ...models.file_conversion import FileConversion
|
|
||||||
from ...models.error_message import ErrorMessage
|
|
||||||
from ...models.valid_source_file_format import ValidSourceFileFormat
|
|
||||||
from ...models.valid_output_file_format import ValidOutputFileFormat
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
def _get_kwargs(
|
|
||||||
source_format: ValidSourceFileFormat,
|
|
||||||
output_format: ValidOutputFileFormat,
|
|
||||||
body: bytes,
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Dict[str, Any]:
|
|
||||||
url = "{}/file/conversion/{sourceFormat}/{outputFormat}".format(client.base_url, sourceFormat=source_format, outputFormat=output_format)
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
|
||||||
|
|
||||||
return {
|
|
||||||
"url": url,
|
|
||||||
"headers": headers,
|
|
||||||
"cookies": cookies,
|
|
||||||
"timeout": client.get_timeout(),
|
|
||||||
"content": body,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, ErrorMessage]]:
|
|
||||||
if response.status_code == 200:
|
|
||||||
response_200 = FileConversion.from_dict(response.json())
|
|
||||||
return response_200
|
|
||||||
if response.status_code == 202:
|
|
||||||
response_202 = FileConversion.from_dict(response.json())
|
|
||||||
return response_202
|
|
||||||
if response.status_code == 400:
|
|
||||||
response_400 = ErrorMessage.from_dict(response.json())
|
|
||||||
return response_400
|
|
||||||
if response.status_code == 401:
|
|
||||||
response_401 = ErrorMessage.from_dict(response.json())
|
|
||||||
return response_401
|
|
||||||
if response.status_code == 403:
|
|
||||||
response_403 = ErrorMessage.from_dict(response.json())
|
|
||||||
return response_403
|
|
||||||
if response.status_code == 406:
|
|
||||||
response_406 = ErrorMessage.from_dict(response.json())
|
|
||||||
return response_406
|
|
||||||
if response.status_code == 500:
|
|
||||||
response_500 = ErrorMessage.from_dict(response.json())
|
|
||||||
return response_500
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, ErrorMessage]]:
|
|
||||||
return Response(
|
|
||||||
status_code=response.status_code,
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
source_format: ValidSourceFileFormat,
|
|
||||||
output_format: ValidOutputFileFormat,
|
|
||||||
body: bytes,
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Response[Union[Any, FileConversion, ErrorMessage]]:
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
source_format=source_format,
|
|
||||||
output_format=output_format,
|
|
||||||
body=body,
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = httpx.post(
|
|
||||||
verify=client.verify_ssl,
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
source_format: ValidSourceFileFormat,
|
|
||||||
output_format: ValidOutputFileFormat,
|
|
||||||
body: bytes,
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Optional[Union[Any, FileConversion, ErrorMessage]]:
|
|
||||||
""" Convert a CAD file from one format to another. If the file being converted is larger than 30MB, it will be performed asynchronously. """
|
|
||||||
|
|
||||||
return sync_detailed(
|
|
||||||
source_format=source_format,
|
|
||||||
output_format=output_format,
|
|
||||||
body=body,
|
|
||||||
client=client,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
source_format: ValidSourceFileFormat,
|
|
||||||
output_format: ValidOutputFileFormat,
|
|
||||||
body: bytes,
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Response[Union[Any, FileConversion, ErrorMessage]]:
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
source_format=source_format,
|
|
||||||
output_format=output_format,
|
|
||||||
body=body,
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
||||||
response = await _client.post(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
source_format: ValidSourceFileFormat,
|
|
||||||
output_format: ValidOutputFileFormat,
|
|
||||||
body: bytes,
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Optional[Union[Any, FileConversion, ErrorMessage]]:
|
|
||||||
""" Convert a CAD file from one format to another. If the file being converted is larger than 30MB, it will be performed asynchronously. """
|
|
||||||
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
source_format=source_format,
|
|
||||||
output_format=output_format,
|
|
||||||
body=body,
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
).parsed
|
|
@ -1 +0,0 @@
|
|||||||
""" Contains methods for accessing the internal API paths: Internal API endpoints. """
|
|
@ -1,103 +0,0 @@
|
|||||||
from typing import Any, Dict, Optional, Union
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ...client import Client
|
|
||||||
from ...models.gpu_device import GPUDevice
|
|
||||||
from ...models.error_message import ErrorMessage
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
def _get_kwargs(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Dict[str, Any]:
|
|
||||||
url = "{}/_internal/gpu/devices".format(client.base_url)
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
|
||||||
|
|
||||||
return {
|
|
||||||
"url": url,
|
|
||||||
"headers": headers,
|
|
||||||
"cookies": cookies,
|
|
||||||
"timeout": client.get_timeout(),
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, [GPUDevice], ErrorMessage]]:
|
|
||||||
if response.status_code == 200:
|
|
||||||
response_200 = [
|
|
||||||
GPUDevice.from_dict(item)
|
|
||||||
for item in response.json()
|
|
||||||
]
|
|
||||||
return response_200
|
|
||||||
if response.status_code == 401:
|
|
||||||
response_401 = ErrorMessage.from_dict(response.json())
|
|
||||||
return response_401
|
|
||||||
if response.status_code == 403:
|
|
||||||
response_403 = ErrorMessage.from_dict(response.json())
|
|
||||||
return response_403
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, [GPUDevice], ErrorMessage]]:
|
|
||||||
return Response(
|
|
||||||
status_code=response.status_code,
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Response[Union[Any, [GPUDevice], ErrorMessage]]:
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = httpx.get(
|
|
||||||
verify=client.verify_ssl,
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Optional[Union[Any, [GPUDevice], ErrorMessage]]:
|
|
||||||
""" Get information about GPU devices on this server. This is primarily used for debugging. This endpoint can only be used by specific KittyCAD employees. """
|
|
||||||
|
|
||||||
return sync_detailed(
|
|
||||||
client=client,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Response[Union[Any, [GPUDevice], ErrorMessage]]:
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
||||||
response = await _client.get(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Optional[Union[Any, [GPUDevice], ErrorMessage]]:
|
|
||||||
""" Get information about GPU devices on this server. This is primarily used for debugging. This endpoint can only be used by specific KittyCAD employees. """
|
|
||||||
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
).parsed
|
|
@ -1,103 +0,0 @@
|
|||||||
from typing import Any, Dict, Optional, Union
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ...client import Client
|
|
||||||
from ...models.file_conversion import FileConversion
|
|
||||||
from ...models.error_message import ErrorMessage
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
def _get_kwargs(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Dict[str, Any]:
|
|
||||||
url = "{}/_internal/async/conversions/stop".format(client.base_url)
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
|
||||||
|
|
||||||
return {
|
|
||||||
"url": url,
|
|
||||||
"headers": headers,
|
|
||||||
"cookies": cookies,
|
|
||||||
"timeout": client.get_timeout(),
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, FileConversion, ErrorMessage]]:
|
|
||||||
if response.status_code == 200:
|
|
||||||
response_200 = FileConversion.from_dict(response.json())
|
|
||||||
return response_200
|
|
||||||
if response.status_code == 401:
|
|
||||||
response_401 = ErrorMessage.from_dict(response.json())
|
|
||||||
return response_401
|
|
||||||
if response.status_code == 403:
|
|
||||||
response_403 = ErrorMessage.from_dict(response.json())
|
|
||||||
return response_403
|
|
||||||
if response.status_code == 404:
|
|
||||||
response_404 = ErrorMessage.from_dict(response.json())
|
|
||||||
return response_404
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, FileConversion, ErrorMessage]]:
|
|
||||||
return Response(
|
|
||||||
status_code=response.status_code,
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Response[Union[Any, FileConversion, ErrorMessage]]:
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = httpx.post(
|
|
||||||
verify=client.verify_ssl,
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Optional[Union[Any, FileConversion, ErrorMessage]]:
|
|
||||||
""" Stop all async conversions that are currently running. This endpoint can only be used by specific KittyCAD employees. """
|
|
||||||
|
|
||||||
return sync_detailed(
|
|
||||||
client=client,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Response[Union[Any, FileConversion, ErrorMessage]]:
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
||||||
response = await _client.post(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Optional[Union[Any, FileConversion, ErrorMessage]]:
|
|
||||||
""" Stop all async conversions that are currently running. This endpoint can only be used by specific KittyCAD employees. """
|
|
||||||
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
).parsed
|
|
@ -1,100 +0,0 @@
|
|||||||
from typing import Any, Dict, Optional, Union
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ...client import Client
|
|
||||||
from ...models.auth_session import AuthSession
|
|
||||||
from ...models.error_message import ErrorMessage
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
def _get_kwargs(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Dict[str, Any]:
|
|
||||||
url = "{}/_meta/debug/session".format(client.base_url)
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
|
||||||
|
|
||||||
return {
|
|
||||||
"url": url,
|
|
||||||
"headers": headers,
|
|
||||||
"cookies": cookies,
|
|
||||||
"timeout": client.get_timeout(),
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, AuthSession, ErrorMessage]]:
|
|
||||||
if response.status_code == 200:
|
|
||||||
response_200 = AuthSession.from_dict(response.json())
|
|
||||||
return response_200
|
|
||||||
if response.status_code == 401:
|
|
||||||
response_401 = ErrorMessage.from_dict(response.json())
|
|
||||||
return response_401
|
|
||||||
if response.status_code == 403:
|
|
||||||
response_403 = ErrorMessage.from_dict(response.json())
|
|
||||||
return response_403
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, AuthSession, ErrorMessage]]:
|
|
||||||
return Response(
|
|
||||||
status_code=response.status_code,
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Response[Union[Any, AuthSession, ErrorMessage]]:
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = httpx.get(
|
|
||||||
verify=client.verify_ssl,
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Optional[Union[Any, AuthSession, ErrorMessage]]:
|
|
||||||
""" Get information about your API request session. This is primarily used for debugging. """
|
|
||||||
|
|
||||||
return sync_detailed(
|
|
||||||
client=client,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Response[Union[Any, AuthSession, ErrorMessage]]:
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
||||||
response = await _client.get(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Optional[Union[Any, AuthSession, ErrorMessage]]:
|
|
||||||
""" Get information about your API request session. This is primarily used for debugging. """
|
|
||||||
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
).parsed
|
|
@ -1,100 +0,0 @@
|
|||||||
from typing import Any, Dict, Optional, Union
|
|
||||||
|
|
||||||
import httpx
|
|
||||||
|
|
||||||
from ...client import Client
|
|
||||||
from ...models.instance import Instance
|
|
||||||
from ...models.error_message import ErrorMessage
|
|
||||||
from ...types import Response
|
|
||||||
|
|
||||||
def _get_kwargs(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Dict[str, Any]:
|
|
||||||
url = "{}/_meta/debug/instance".format(client.base_url)
|
|
||||||
|
|
||||||
headers: Dict[str, Any] = client.get_headers()
|
|
||||||
cookies: Dict[str, Any] = client.get_cookies()
|
|
||||||
|
|
||||||
return {
|
|
||||||
"url": url,
|
|
||||||
"headers": headers,
|
|
||||||
"cookies": cookies,
|
|
||||||
"timeout": client.get_timeout(),
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, Instance, ErrorMessage]]:
|
|
||||||
if response.status_code == 200:
|
|
||||||
response_200 = Instance.from_dict(response.json())
|
|
||||||
return response_200
|
|
||||||
if response.status_code == 401:
|
|
||||||
response_401 = ErrorMessage.from_dict(response.json())
|
|
||||||
return response_401
|
|
||||||
if response.status_code == 403:
|
|
||||||
response_403 = ErrorMessage.from_dict(response.json())
|
|
||||||
return response_403
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, Instance, ErrorMessage]]:
|
|
||||||
return Response(
|
|
||||||
status_code=response.status_code,
|
|
||||||
content=response.content,
|
|
||||||
headers=response.headers,
|
|
||||||
parsed=_parse_response(response=response),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def sync_detailed(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Response[Union[Any, Instance, ErrorMessage]]:
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
response = httpx.get(
|
|
||||||
verify=client.verify_ssl,
|
|
||||||
**kwargs,
|
|
||||||
)
|
|
||||||
|
|
||||||
return _build_response(response=response)
|
|
||||||
|
|
||||||
|
|
||||||
def sync(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Optional[Union[Any, Instance, ErrorMessage]]:
|
|
||||||
""" Get information about this specific API server instance. This is primarily used for debugging. """
|
|
||||||
|
|
||||||
return sync_detailed(
|
|
||||||
client=client,
|
|
||||||
).parsed
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio_detailed(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Response[Union[Any, Instance, ErrorMessage]]:
|
|
||||||
kwargs = _get_kwargs(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
|
|
||||||
async with httpx.AsyncClient(verify=client.verify_ssl) as _client:
|
|
||||||
response = await _client.get(**kwargs)
|
|
||||||
|
|
||||||
return _build_response(response=response)
|
|
||||||
|
|
||||||
|
|
||||||
async def asyncio(
|
|
||||||
*,
|
|
||||||
client: Client,
|
|
||||||
) -> Optional[Union[Any, Instance, ErrorMessage]]:
|
|
||||||
""" Get information about this specific API server instance. This is primarily used for debugging. """
|
|
||||||
|
|
||||||
return (
|
|
||||||
await asyncio_detailed(
|
|
||||||
client=client,
|
|
||||||
)
|
|
||||||
).parsed
|
|
@ -3,9 +3,10 @@ import pytest
|
|||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
from .client import ClientFromEnv
|
from .client import ClientFromEnv
|
||||||
from .models import FileConversion, ValidOutputFileFormat, ValidSourceFileFormat, AuthSession, Instance, PongMessage, FileConversionStatus
|
from .models import FileConversion, FileConversionOutputFormat, FileConversionSourceFormat, User, Pong, FileConversionStatus
|
||||||
from .api.file import post_file_conversion_with_base64_helper
|
from .api.file import create_file_conversion_with_base64_helper
|
||||||
from .api.meta import auth_session, instance_metadata, ping
|
from .api.meta import ping
|
||||||
|
from .api.users import get_user_self
|
||||||
|
|
||||||
|
|
||||||
def test_get_session():
|
def test_get_session():
|
||||||
@ -13,7 +14,7 @@ def test_get_session():
|
|||||||
client = ClientFromEnv()
|
client = ClientFromEnv()
|
||||||
|
|
||||||
# Get the session.
|
# Get the session.
|
||||||
session: AuthSession = auth_session.sync(client=client)
|
session: User = get_user_self.sync(client=client)
|
||||||
|
|
||||||
assert session is not None
|
assert session is not None
|
||||||
|
|
||||||
@ -26,44 +27,19 @@ async def test_get_session_async():
|
|||||||
client = ClientFromEnv()
|
client = ClientFromEnv()
|
||||||
|
|
||||||
# Get the session.
|
# Get the session.
|
||||||
session: AuthSession = await auth_session.asyncio(client=client)
|
session: User = await get_user_self.asyncio(client=client)
|
||||||
|
|
||||||
assert session is not None
|
assert session is not None
|
||||||
|
|
||||||
print(f"Session: {session}")
|
print(f"Session: {session}")
|
||||||
|
|
||||||
|
|
||||||
def test_get_instance():
|
|
||||||
# Create our client.
|
|
||||||
client = ClientFromEnv()
|
|
||||||
|
|
||||||
# Get the instance.
|
|
||||||
instance: Instance = instance_metadata.sync(client=client)
|
|
||||||
|
|
||||||
assert instance is not None
|
|
||||||
|
|
||||||
print(f"Instance: {instance}")
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
|
||||||
async def test_get_instance_async():
|
|
||||||
# Create our client.
|
|
||||||
client = ClientFromEnv()
|
|
||||||
|
|
||||||
# Get the instance.
|
|
||||||
instance: Instance = await instance_metadata.asyncio(client=client)
|
|
||||||
|
|
||||||
assert instance is not None
|
|
||||||
|
|
||||||
print(f"Instance: {instance}")
|
|
||||||
|
|
||||||
|
|
||||||
def test_ping():
|
def test_ping():
|
||||||
# Create our client.
|
# Create our client.
|
||||||
client = ClientFromEnv()
|
client = ClientFromEnv()
|
||||||
|
|
||||||
# Get the message.
|
# Get the message.
|
||||||
message: PongMessage = ping.sync(client=client)
|
message: Pong = ping.sync(client=client)
|
||||||
|
|
||||||
assert message is not None
|
assert message is not None
|
||||||
|
|
||||||
@ -76,7 +52,7 @@ async def test_ping_async():
|
|||||||
client = ClientFromEnv()
|
client = ClientFromEnv()
|
||||||
|
|
||||||
# Get the message.
|
# Get the message.
|
||||||
message: PongMessage = await ping.asyncio(client=client)
|
message: Pong = await ping.asyncio(client=client)
|
||||||
|
|
||||||
assert message is not None
|
assert message is not None
|
||||||
|
|
||||||
@ -93,11 +69,11 @@ def test_file_convert_stl():
|
|||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
# Get the fc.
|
# Get the fc.
|
||||||
fc: FileConversion = post_file_conversion_with_base64_helper.sync(
|
fc: FileConversion = create_file_conversion_with_base64_helper.sync(
|
||||||
client=client,
|
client=client,
|
||||||
body=content,
|
body=content,
|
||||||
source_format=ValidSourceFileFormat.STL,
|
src_format=FileConversionSourceFormat.STL,
|
||||||
output_format=ValidOutputFileFormat.OBJ)
|
output_format=FileConversionOutputFormat.OBJ)
|
||||||
|
|
||||||
assert fc is not None
|
assert fc is not None
|
||||||
|
|
||||||
@ -121,7 +97,7 @@ async def test_file_convert_stl_async():
|
|||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
# Get the fc.
|
# Get the fc.
|
||||||
fc: FileConversion = await post_file_conversion_with_base64_helper.asyncio(client=client, body=content, source_format=ValidSourceFileFormat.STL, output_format=ValidOutputFileFormat.OBJ)
|
fc: FileConversion = await create_file_conversion_with_base64_helper.asyncio(client=client, body=content, src_format=FileConversionSourceFormat.STL, output_format=FileConversionOutputFormat.OBJ)
|
||||||
|
|
||||||
assert fc is not None
|
assert fc is not None
|
||||||
|
|
||||||
|
@ -6,56 +6,56 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
T = TypeVar("T", bound="ApiCallQueryGroup")
|
T = TypeVar("T", bound="ApiCallQueryGroup")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class ApiCallQueryGroup:
|
class ApiCallQueryGroup:
|
||||||
""" """
|
""" """
|
||||||
count: Union[Unset, int] = UNSET
|
count: Union[Unset, int] = UNSET
|
||||||
query: Union[Unset, str] = UNSET
|
query: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
count = self.count
|
count = self.count
|
||||||
query = self.query
|
query = self.query
|
||||||
|
|
||||||
field_dict: Dict[str, Any] = {}
|
field_dict: Dict[str, Any] = {}
|
||||||
field_dict.update(self.additional_properties)
|
field_dict.update(self.additional_properties)
|
||||||
field_dict.update({})
|
field_dict.update({})
|
||||||
if count is not UNSET:
|
if count is not UNSET:
|
||||||
field_dict['count'] = count
|
field_dict['count'] = count
|
||||||
if query is not UNSET:
|
if query is not UNSET:
|
||||||
field_dict['query'] = query
|
field_dict['query'] = query
|
||||||
|
|
||||||
return field_dict
|
return field_dict
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
d = src_dict.copy()
|
d = src_dict.copy()
|
||||||
count = d.pop("count", UNSET)
|
count = d.pop("count", UNSET)
|
||||||
|
|
||||||
query = d.pop("query", UNSET)
|
query = d.pop("query", UNSET)
|
||||||
|
|
||||||
api_call_query_group = cls(
|
|
||||||
count=count,
|
|
||||||
query=query,
|
|
||||||
)
|
|
||||||
|
|
||||||
api_call_query_group.additional_properties = d
|
api_call_query_group = cls(
|
||||||
return api_call_query_group
|
count= count,
|
||||||
|
query= query,
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
api_call_query_group.additional_properties = d
|
||||||
def additional_keys(self) -> List[str]:
|
return api_call_query_group
|
||||||
return list(self.additional_properties.keys())
|
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> Any:
|
@property
|
||||||
return self.additional_properties[key]
|
def additional_keys(self) -> List[str]:
|
||||||
|
return list(self.additional_properties.keys())
|
||||||
|
|
||||||
def __setitem__(self, key: str, value: Any) -> None:
|
def __getitem__(self, key: str) -> Any:
|
||||||
self.additional_properties[key] = value
|
return self.additional_properties[key]
|
||||||
|
|
||||||
def __delitem__(self, key: str) -> None:
|
def __setitem__(self, key: str, value: Any) -> None:
|
||||||
del self.additional_properties[key]
|
self.additional_properties[key] = value
|
||||||
|
|
||||||
def __contains__(self, key: str) -> bool:
|
def __delitem__(self, key: str) -> None:
|
||||||
return key in self.additional_properties
|
del self.additional_properties[key]
|
||||||
|
|
||||||
|
def __contains__(self, key: str) -> bool:
|
||||||
|
return key in self.additional_properties
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
class ApiCallQueryGroupBy(str, Enum):
|
class ApiCallQueryGroupBy(str, Enum):
|
||||||
EMAIL = 'email'
|
EMAIL = 'email'
|
||||||
METHOD = 'method'
|
METHOD = 'method'
|
||||||
ENDPOINT = 'endpoint'
|
ENDPOINT = 'endpoint'
|
||||||
USER_ID = 'user_id'
|
USER_ID = 'user_id'
|
||||||
ORIGIN = 'origin'
|
ORIGIN = 'origin'
|
||||||
IP_ADDRESS = 'ip_address'
|
IP_ADDRESS = 'ip_address'
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return str(self.value)
|
return str(self.value)
|
||||||
|
@ -11,245 +11,245 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
T = TypeVar("T", bound="ApiCallWithPrice")
|
T = TypeVar("T", bound="ApiCallWithPrice")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class ApiCallWithPrice:
|
class ApiCallWithPrice:
|
||||||
""" """
|
""" """
|
||||||
completed_at: Union[Unset, datetime.datetime] = UNSET
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
duration: Union[Unset, int] = UNSET
|
duration: Union[Unset, int] = UNSET
|
||||||
email: Union[Unset, str] = UNSET
|
email: Union[Unset, str] = UNSET
|
||||||
endpoint: Union[Unset, str] = UNSET
|
endpoint: Union[Unset, str] = UNSET
|
||||||
id: Union[Unset, Uuid] = UNSET
|
id: Union[Unset, Uuid] = UNSET
|
||||||
ip_address: Union[Unset, str] = UNSET
|
ip_address: Union[Unset, str] = UNSET
|
||||||
method: Union[Unset, Method] = UNSET
|
method: Union[Unset, Method] = UNSET
|
||||||
minutes: Union[Unset, int] = UNSET
|
minutes: Union[Unset, int] = UNSET
|
||||||
origin: Union[Unset, str] = UNSET
|
origin: Union[Unset, str] = UNSET
|
||||||
price: Union[Unset, float] = UNSET
|
price: Union[Unset, float] = UNSET
|
||||||
request_body: Union[Unset, str] = UNSET
|
request_body: Union[Unset, str] = UNSET
|
||||||
request_query_params: Union[Unset, str] = UNSET
|
request_query_params: Union[Unset, str] = UNSET
|
||||||
response_body: Union[Unset, str] = UNSET
|
response_body: Union[Unset, str] = UNSET
|
||||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
status_code: Union[Unset, StatusCode] = UNSET
|
status_code: Union[Unset, StatusCode] = UNSET
|
||||||
stripe_invoice_item_id: Union[Unset, str] = UNSET
|
stripe_invoice_item_id: Union[Unset, str] = UNSET
|
||||||
token: Union[Unset, Uuid] = UNSET
|
token: Union[Unset, Uuid] = UNSET
|
||||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
user_agent: Union[Unset, str] = UNSET
|
user_agent: Union[Unset, str] = UNSET
|
||||||
user_id: Union[Unset, str] = UNSET
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
completed_at: Union[Unset, str] = UNSET
|
completed_at: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.completed_at, Unset):
|
if not isinstance(self.completed_at, Unset):
|
||||||
completed_at = self.completed_at.isoformat()
|
completed_at = self.completed_at.isoformat()
|
||||||
created_at: Union[Unset, str] = UNSET
|
created_at: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.created_at, Unset):
|
if not isinstance(self.created_at, Unset):
|
||||||
created_at = self.created_at.isoformat()
|
created_at = self.created_at.isoformat()
|
||||||
duration = self.duration
|
duration = self.duration
|
||||||
email = self.email
|
email = self.email
|
||||||
endpoint = self.endpoint
|
endpoint = self.endpoint
|
||||||
id: Union[Unset, str] = UNSET
|
id: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.id, Unset):
|
if not isinstance(self.id, Unset):
|
||||||
id = self.id.value
|
id = self.id.value
|
||||||
ip_address = self.ip_address
|
ip_address = self.ip_address
|
||||||
method: Union[Unset, str] = UNSET
|
method: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.method, Unset):
|
if not isinstance(self.method, Unset):
|
||||||
method = self.method.value
|
method = self.method.value
|
||||||
minutes = self.minutes
|
minutes = self.minutes
|
||||||
origin = self.origin
|
origin = self.origin
|
||||||
price = self.price
|
price = self.price
|
||||||
request_body = self.request_body
|
request_body = self.request_body
|
||||||
request_query_params = self.request_query_params
|
request_query_params = self.request_query_params
|
||||||
response_body = self.response_body
|
response_body = self.response_body
|
||||||
started_at: Union[Unset, str] = UNSET
|
started_at: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.started_at, Unset):
|
if not isinstance(self.started_at, Unset):
|
||||||
started_at = self.started_at.isoformat()
|
started_at = self.started_at.isoformat()
|
||||||
status_code: Union[Unset, str] = UNSET
|
status_code: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.status_code, Unset):
|
if not isinstance(self.status_code, Unset):
|
||||||
status_code = self.status_code.value
|
status_code = self.status_code.value
|
||||||
stripe_invoice_item_id = self.stripe_invoice_item_id
|
stripe_invoice_item_id = self.stripe_invoice_item_id
|
||||||
token: Union[Unset, str] = UNSET
|
token: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.token, Unset):
|
if not isinstance(self.token, Unset):
|
||||||
token = self.token.value
|
token = self.token.value
|
||||||
updated_at: Union[Unset, str] = UNSET
|
updated_at: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.updated_at, Unset):
|
if not isinstance(self.updated_at, Unset):
|
||||||
updated_at = self.updated_at.isoformat()
|
updated_at = self.updated_at.isoformat()
|
||||||
user_agent = self.user_agent
|
user_agent = self.user_agent
|
||||||
user_id = self.user_id
|
user_id = self.user_id
|
||||||
|
|
||||||
field_dict: Dict[str, Any] = {}
|
field_dict: Dict[str, Any] = {}
|
||||||
field_dict.update(self.additional_properties)
|
field_dict.update(self.additional_properties)
|
||||||
field_dict.update({})
|
field_dict.update({})
|
||||||
if completed_at is not UNSET:
|
if completed_at is not UNSET:
|
||||||
field_dict['completed_at'] = completed_at
|
field_dict['completed_at'] = completed_at
|
||||||
if created_at is not UNSET:
|
if created_at is not UNSET:
|
||||||
field_dict['created_at'] = created_at
|
field_dict['created_at'] = created_at
|
||||||
if duration is not UNSET:
|
if duration is not UNSET:
|
||||||
field_dict['duration'] = duration
|
field_dict['duration'] = duration
|
||||||
if email is not UNSET:
|
if email is not UNSET:
|
||||||
field_dict['email'] = email
|
field_dict['email'] = email
|
||||||
if endpoint is not UNSET:
|
if endpoint is not UNSET:
|
||||||
field_dict['endpoint'] = endpoint
|
field_dict['endpoint'] = endpoint
|
||||||
if id is not UNSET:
|
if id is not UNSET:
|
||||||
field_dict['id'] = id
|
field_dict['id'] = id
|
||||||
if ip_address is not UNSET:
|
if ip_address is not UNSET:
|
||||||
field_dict['ip_address'] = ip_address
|
field_dict['ip_address'] = ip_address
|
||||||
if method is not UNSET:
|
if method is not UNSET:
|
||||||
field_dict['method'] = method
|
field_dict['method'] = method
|
||||||
if minutes is not UNSET:
|
if minutes is not UNSET:
|
||||||
field_dict['minutes'] = minutes
|
field_dict['minutes'] = minutes
|
||||||
if origin is not UNSET:
|
if origin is not UNSET:
|
||||||
field_dict['origin'] = origin
|
field_dict['origin'] = origin
|
||||||
if price is not UNSET:
|
if price is not UNSET:
|
||||||
field_dict['price'] = price
|
field_dict['price'] = price
|
||||||
if request_body is not UNSET:
|
if request_body is not UNSET:
|
||||||
field_dict['request_body'] = request_body
|
field_dict['request_body'] = request_body
|
||||||
if request_query_params is not UNSET:
|
if request_query_params is not UNSET:
|
||||||
field_dict['request_query_params'] = request_query_params
|
field_dict['request_query_params'] = request_query_params
|
||||||
if response_body is not UNSET:
|
if response_body is not UNSET:
|
||||||
field_dict['response_body'] = response_body
|
field_dict['response_body'] = response_body
|
||||||
if started_at is not UNSET:
|
if started_at is not UNSET:
|
||||||
field_dict['started_at'] = started_at
|
field_dict['started_at'] = started_at
|
||||||
if status_code is not UNSET:
|
if status_code is not UNSET:
|
||||||
field_dict['status_code'] = status_code
|
field_dict['status_code'] = status_code
|
||||||
if stripe_invoice_item_id is not UNSET:
|
if stripe_invoice_item_id is not UNSET:
|
||||||
field_dict['stripe_invoice_item_id'] = stripe_invoice_item_id
|
field_dict['stripe_invoice_item_id'] = stripe_invoice_item_id
|
||||||
if token is not UNSET:
|
if token is not UNSET:
|
||||||
field_dict['token'] = token
|
field_dict['token'] = token
|
||||||
if updated_at is not UNSET:
|
if updated_at is not UNSET:
|
||||||
field_dict['updated_at'] = updated_at
|
field_dict['updated_at'] = updated_at
|
||||||
if user_agent is not UNSET:
|
if user_agent is not UNSET:
|
||||||
field_dict['user_agent'] = user_agent
|
field_dict['user_agent'] = user_agent
|
||||||
if user_id is not UNSET:
|
if user_id is not UNSET:
|
||||||
field_dict['user_id'] = user_id
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
return field_dict
|
return field_dict
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
d = src_dict.copy()
|
d = src_dict.copy()
|
||||||
_completed_at = d.pop("completed_at", UNSET)
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
completed_at: Union[Unset, datetime.datetime]
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
if isinstance(_completed_at, Unset):
|
if isinstance(_completed_at, Unset):
|
||||||
completed_at = UNSET
|
completed_at = UNSET
|
||||||
else:
|
else:
|
||||||
completed_at = isoparse(_completed_at)
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
_created_at = d.pop("created_at", UNSET)
|
_created_at = d.pop("created_at", UNSET)
|
||||||
created_at: Union[Unset, datetime.datetime]
|
created_at: Union[Unset, datetime.datetime]
|
||||||
if isinstance(_created_at, Unset):
|
if isinstance(_created_at, Unset):
|
||||||
created_at = UNSET
|
created_at = UNSET
|
||||||
else:
|
else:
|
||||||
created_at = isoparse(_created_at)
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
duration = d.pop("duration", UNSET)
|
duration = d.pop("duration", UNSET)
|
||||||
|
|
||||||
email = d.pop("email", UNSET)
|
email = d.pop("email", UNSET)
|
||||||
|
|
||||||
endpoint = d.pop("endpoint", UNSET)
|
endpoint = d.pop("endpoint", UNSET)
|
||||||
|
|
||||||
_id = d.pop("id", UNSET)
|
_id = d.pop("id", UNSET)
|
||||||
id: Union[Unset, Uuid]
|
id: Union[Unset, Uuid]
|
||||||
if isinstance(_id, Unset):
|
if isinstance(_id, Unset):
|
||||||
id = UNSET
|
id = UNSET
|
||||||
else:
|
else:
|
||||||
id = Uuid(_id)
|
id = Uuid(_id)
|
||||||
|
|
||||||
ip_address = d.pop("ip_address", UNSET)
|
ip_address = d.pop("ip_address", UNSET)
|
||||||
|
|
||||||
_method = d.pop("method", UNSET)
|
_method = d.pop("method", UNSET)
|
||||||
method: Union[Unset, Method]
|
method: Union[Unset, Method]
|
||||||
if isinstance(_method, Unset):
|
if isinstance(_method, Unset):
|
||||||
method = UNSET
|
method = UNSET
|
||||||
else:
|
else:
|
||||||
method = Method(_method)
|
method = Method(_method)
|
||||||
|
|
||||||
minutes = d.pop("minutes", UNSET)
|
minutes = d.pop("minutes", UNSET)
|
||||||
|
|
||||||
origin = d.pop("origin", UNSET)
|
origin = d.pop("origin", UNSET)
|
||||||
|
|
||||||
price = d.pop("price", UNSET)
|
price = d.pop("price", UNSET)
|
||||||
|
|
||||||
request_body = d.pop("request_body", UNSET)
|
request_body = d.pop("request_body", UNSET)
|
||||||
|
|
||||||
request_query_params = d.pop("request_query_params", UNSET)
|
request_query_params = d.pop("request_query_params", UNSET)
|
||||||
|
|
||||||
response_body = d.pop("response_body", UNSET)
|
response_body = d.pop("response_body", UNSET)
|
||||||
|
|
||||||
_started_at = d.pop("started_at", UNSET)
|
_started_at = d.pop("started_at", UNSET)
|
||||||
started_at: Union[Unset, datetime.datetime]
|
started_at: Union[Unset, datetime.datetime]
|
||||||
if isinstance(_started_at, Unset):
|
if isinstance(_started_at, Unset):
|
||||||
started_at = UNSET
|
started_at = UNSET
|
||||||
else:
|
else:
|
||||||
started_at = isoparse(_started_at)
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
_status_code = d.pop("status_code", UNSET)
|
_status_code = d.pop("status_code", UNSET)
|
||||||
status_code: Union[Unset, StatusCode]
|
status_code: Union[Unset, StatusCode]
|
||||||
if isinstance(_status_code, Unset):
|
if isinstance(_status_code, Unset):
|
||||||
status_code = UNSET
|
status_code = UNSET
|
||||||
else:
|
else:
|
||||||
status_code = StatusCode(_status_code)
|
status_code = StatusCode(_status_code)
|
||||||
|
|
||||||
stripe_invoice_item_id = d.pop("stripe_invoice_item_id", UNSET)
|
stripe_invoice_item_id = d.pop("stripe_invoice_item_id", UNSET)
|
||||||
|
|
||||||
_token = d.pop("token", UNSET)
|
_token = d.pop("token", UNSET)
|
||||||
token: Union[Unset, Uuid]
|
token: Union[Unset, Uuid]
|
||||||
if isinstance(_token, Unset):
|
if isinstance(_token, Unset):
|
||||||
token = UNSET
|
token = UNSET
|
||||||
else:
|
else:
|
||||||
token = Uuid(_token)
|
token = Uuid(_token)
|
||||||
|
|
||||||
_updated_at = d.pop("updated_at", UNSET)
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
updated_at: Union[Unset, datetime.datetime]
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
if isinstance(_updated_at, Unset):
|
if isinstance(_updated_at, Unset):
|
||||||
updated_at = UNSET
|
updated_at = UNSET
|
||||||
else:
|
else:
|
||||||
updated_at = isoparse(_updated_at)
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
user_agent = d.pop("user_agent", UNSET)
|
user_agent = d.pop("user_agent", UNSET)
|
||||||
|
|
||||||
user_id = d.pop("user_id", UNSET)
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
api_call_with_price = cls(
|
|
||||||
completed_at=completed_at,
|
|
||||||
created_at=created_at,
|
|
||||||
duration=duration,
|
|
||||||
email=email,
|
|
||||||
endpoint=endpoint,
|
|
||||||
id=id,
|
|
||||||
ip_address=ip_address,
|
|
||||||
method=method,
|
|
||||||
minutes=minutes,
|
|
||||||
origin=origin,
|
|
||||||
price=price,
|
|
||||||
request_body=request_body,
|
|
||||||
request_query_params=request_query_params,
|
|
||||||
response_body=response_body,
|
|
||||||
started_at=started_at,
|
|
||||||
status_code=status_code,
|
|
||||||
stripe_invoice_item_id=stripe_invoice_item_id,
|
|
||||||
token=token,
|
|
||||||
updated_at=updated_at,
|
|
||||||
user_agent=user_agent,
|
|
||||||
user_id=user_id,
|
|
||||||
)
|
|
||||||
|
|
||||||
api_call_with_price.additional_properties = d
|
api_call_with_price = cls(
|
||||||
return api_call_with_price
|
completed_at= completed_at,
|
||||||
|
created_at= created_at,
|
||||||
|
duration= duration,
|
||||||
|
email= email,
|
||||||
|
endpoint= endpoint,
|
||||||
|
id= id,
|
||||||
|
ip_address= ip_address,
|
||||||
|
method= method,
|
||||||
|
minutes= minutes,
|
||||||
|
origin= origin,
|
||||||
|
price= price,
|
||||||
|
request_body= request_body,
|
||||||
|
request_query_params= request_query_params,
|
||||||
|
response_body= response_body,
|
||||||
|
started_at= started_at,
|
||||||
|
status_code= status_code,
|
||||||
|
stripe_invoice_item_id= stripe_invoice_item_id,
|
||||||
|
token= token,
|
||||||
|
updated_at= updated_at,
|
||||||
|
user_agent= user_agent,
|
||||||
|
user_id= user_id,
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
api_call_with_price.additional_properties = d
|
||||||
def additional_keys(self) -> List[str]:
|
return api_call_with_price
|
||||||
return list(self.additional_properties.keys())
|
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> Any:
|
@property
|
||||||
return self.additional_properties[key]
|
def additional_keys(self) -> List[str]:
|
||||||
|
return list(self.additional_properties.keys())
|
||||||
|
|
||||||
def __setitem__(self, key: str, value: Any) -> None:
|
def __getitem__(self, key: str) -> Any:
|
||||||
self.additional_properties[key] = value
|
return self.additional_properties[key]
|
||||||
|
|
||||||
def __delitem__(self, key: str) -> None:
|
def __setitem__(self, key: str, value: Any) -> None:
|
||||||
del self.additional_properties[key]
|
self.additional_properties[key] = value
|
||||||
|
|
||||||
def __contains__(self, key: str) -> bool:
|
def __delitem__(self, key: str) -> None:
|
||||||
return key in self.additional_properties
|
del self.additional_properties[key]
|
||||||
|
|
||||||
|
def __contains__(self, key: str) -> bool:
|
||||||
|
return key in self.additional_properties
|
||||||
|
@ -9,105 +9,105 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
T = TypeVar("T", bound="ApiToken")
|
T = TypeVar("T", bound="ApiToken")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class ApiToken:
|
class ApiToken:
|
||||||
""" """
|
""" """
|
||||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
id: Union[Unset, str] = UNSET
|
id: Union[Unset, str] = UNSET
|
||||||
is_valid: Union[Unset, bool] = False
|
is_valid: Union[Unset, bool] = False
|
||||||
token: Union[Unset, Uuid] = UNSET
|
token: Union[Unset, Uuid] = UNSET
|
||||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
user_id: Union[Unset, str] = UNSET
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
created_at: Union[Unset, str] = UNSET
|
created_at: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.created_at, Unset):
|
if not isinstance(self.created_at, Unset):
|
||||||
created_at = self.created_at.isoformat()
|
created_at = self.created_at.isoformat()
|
||||||
id = self.id
|
id = self.id
|
||||||
is_valid = self.is_valid
|
is_valid = self.is_valid
|
||||||
token: Union[Unset, str] = UNSET
|
token: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.token, Unset):
|
if not isinstance(self.token, Unset):
|
||||||
token = self.token.value
|
token = self.token.value
|
||||||
updated_at: Union[Unset, str] = UNSET
|
updated_at: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.updated_at, Unset):
|
if not isinstance(self.updated_at, Unset):
|
||||||
updated_at = self.updated_at.isoformat()
|
updated_at = self.updated_at.isoformat()
|
||||||
user_id = self.user_id
|
user_id = self.user_id
|
||||||
|
|
||||||
field_dict: Dict[str, Any] = {}
|
field_dict: Dict[str, Any] = {}
|
||||||
field_dict.update(self.additional_properties)
|
field_dict.update(self.additional_properties)
|
||||||
field_dict.update({})
|
field_dict.update({})
|
||||||
if created_at is not UNSET:
|
if created_at is not UNSET:
|
||||||
field_dict['created_at'] = created_at
|
field_dict['created_at'] = created_at
|
||||||
if id is not UNSET:
|
if id is not UNSET:
|
||||||
field_dict['id'] = id
|
field_dict['id'] = id
|
||||||
if is_valid is not UNSET:
|
if is_valid is not UNSET:
|
||||||
field_dict['is_valid'] = is_valid
|
field_dict['is_valid'] = is_valid
|
||||||
if token is not UNSET:
|
if token is not UNSET:
|
||||||
field_dict['token'] = token
|
field_dict['token'] = token
|
||||||
if updated_at is not UNSET:
|
if updated_at is not UNSET:
|
||||||
field_dict['updated_at'] = updated_at
|
field_dict['updated_at'] = updated_at
|
||||||
if user_id is not UNSET:
|
if user_id is not UNSET:
|
||||||
field_dict['user_id'] = user_id
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
return field_dict
|
return field_dict
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
d = src_dict.copy()
|
d = src_dict.copy()
|
||||||
_created_at = d.pop("created_at", UNSET)
|
_created_at = d.pop("created_at", UNSET)
|
||||||
created_at: Union[Unset, datetime.datetime]
|
created_at: Union[Unset, datetime.datetime]
|
||||||
if isinstance(_created_at, Unset):
|
if isinstance(_created_at, Unset):
|
||||||
created_at = UNSET
|
created_at = UNSET
|
||||||
else:
|
else:
|
||||||
created_at = isoparse(_created_at)
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
id = d.pop("id", UNSET)
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
is_valid = d.pop("is_valid", UNSET)
|
is_valid = d.pop("is_valid", UNSET)
|
||||||
|
|
||||||
_token = d.pop("token", UNSET)
|
_token = d.pop("token", UNSET)
|
||||||
token: Union[Unset, Uuid]
|
token: Union[Unset, Uuid]
|
||||||
if isinstance(_token, Unset):
|
if isinstance(_token, Unset):
|
||||||
token = UNSET
|
token = UNSET
|
||||||
else:
|
else:
|
||||||
token = Uuid(_token)
|
token = Uuid(_token)
|
||||||
|
|
||||||
_updated_at = d.pop("updated_at", UNSET)
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
updated_at: Union[Unset, datetime.datetime]
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
if isinstance(_updated_at, Unset):
|
if isinstance(_updated_at, Unset):
|
||||||
updated_at = UNSET
|
updated_at = UNSET
|
||||||
else:
|
else:
|
||||||
updated_at = isoparse(_updated_at)
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
user_id = d.pop("user_id", UNSET)
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
api_token = cls(
|
|
||||||
created_at=created_at,
|
|
||||||
id=id,
|
|
||||||
is_valid=is_valid,
|
|
||||||
token=token,
|
|
||||||
updated_at=updated_at,
|
|
||||||
user_id=user_id,
|
|
||||||
)
|
|
||||||
|
|
||||||
api_token.additional_properties = d
|
api_token = cls(
|
||||||
return api_token
|
created_at= created_at,
|
||||||
|
id= id,
|
||||||
|
is_valid= is_valid,
|
||||||
|
token= token,
|
||||||
|
updated_at= updated_at,
|
||||||
|
user_id= user_id,
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
api_token.additional_properties = d
|
||||||
def additional_keys(self) -> List[str]:
|
return api_token
|
||||||
return list(self.additional_properties.keys())
|
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> Any:
|
@property
|
||||||
return self.additional_properties[key]
|
def additional_keys(self) -> List[str]:
|
||||||
|
return list(self.additional_properties.keys())
|
||||||
|
|
||||||
def __setitem__(self, key: str, value: Any) -> None:
|
def __getitem__(self, key: str) -> Any:
|
||||||
self.additional_properties[key] = value
|
return self.additional_properties[key]
|
||||||
|
|
||||||
def __delitem__(self, key: str) -> None:
|
def __setitem__(self, key: str, value: Any) -> None:
|
||||||
del self.additional_properties[key]
|
self.additional_properties[key] = value
|
||||||
|
|
||||||
def __contains__(self, key: str) -> bool:
|
def __delitem__(self, key: str) -> None:
|
||||||
return key in self.additional_properties
|
del self.additional_properties[key]
|
||||||
|
|
||||||
|
def __contains__(self, key: str) -> bool:
|
||||||
|
return key in self.additional_properties
|
||||||
|
@ -1,112 +0,0 @@
|
|||||||
import datetime
|
|
||||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
|
||||||
|
|
||||||
import attr
|
|
||||||
from dateutil.parser import isoparse
|
|
||||||
|
|
||||||
from ..types import UNSET, Unset
|
|
||||||
|
|
||||||
T = TypeVar("T", bound="AuthSession")
|
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
|
||||||
class AuthSession:
|
|
||||||
""" """
|
|
||||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
|
||||||
email: Union[Unset, str] = UNSET
|
|
||||||
id: Union[Unset, str] = UNSET
|
|
||||||
image: Union[Unset, str] = UNSET
|
|
||||||
ip_address: Union[Unset, str] = UNSET
|
|
||||||
is_valid: Union[Unset, bool] = False
|
|
||||||
token: Union[Unset, str] = UNSET
|
|
||||||
user_id: Union[Unset, str] = UNSET
|
|
||||||
|
|
||||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
|
||||||
created_at: Union[Unset, str] = UNSET
|
|
||||||
if not isinstance(self.created_at, Unset):
|
|
||||||
created_at = self.created_at.isoformat()
|
|
||||||
email = self.email
|
|
||||||
id = self.id
|
|
||||||
image = self.image
|
|
||||||
ip_address = self.ip_address
|
|
||||||
is_valid = self.is_valid
|
|
||||||
token = self.token
|
|
||||||
user_id = self.user_id
|
|
||||||
|
|
||||||
field_dict: Dict[str, Any] = {}
|
|
||||||
field_dict.update(self.additional_properties)
|
|
||||||
field_dict.update({})
|
|
||||||
if created_at is not UNSET:
|
|
||||||
field_dict['created_at'] = created_at
|
|
||||||
if email is not UNSET:
|
|
||||||
field_dict['email'] = email
|
|
||||||
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 is_valid is not UNSET:
|
|
||||||
field_dict['is_valid'] = is_valid
|
|
||||||
if token is not UNSET:
|
|
||||||
field_dict['token'] = token
|
|
||||||
if user_id is not UNSET:
|
|
||||||
field_dict['user_id'] = user_id
|
|
||||||
|
|
||||||
return field_dict
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
||||||
d = src_dict.copy()
|
|
||||||
_created_at = d.pop("created_at", UNSET)
|
|
||||||
created_at: Union[Unset, datetime.datetime]
|
|
||||||
if isinstance(_created_at, Unset):
|
|
||||||
created_at = UNSET
|
|
||||||
else:
|
|
||||||
created_at = isoparse(_created_at)
|
|
||||||
|
|
||||||
email = d.pop("email", UNSET)
|
|
||||||
|
|
||||||
id = d.pop("id", UNSET)
|
|
||||||
|
|
||||||
image = d.pop("image", UNSET)
|
|
||||||
|
|
||||||
ip_address = d.pop("ip_address", UNSET)
|
|
||||||
|
|
||||||
is_valid = d.pop("is_valid", UNSET)
|
|
||||||
|
|
||||||
token = d.pop("token", UNSET)
|
|
||||||
|
|
||||||
user_id = d.pop("user_id", UNSET)
|
|
||||||
|
|
||||||
auth_session = cls(
|
|
||||||
created_at=created_at,
|
|
||||||
email=email,
|
|
||||||
id=id,
|
|
||||||
image=image,
|
|
||||||
ip_address=ip_address,
|
|
||||||
is_valid=is_valid,
|
|
||||||
token=token,
|
|
||||||
user_id=user_id,
|
|
||||||
)
|
|
||||||
|
|
||||||
auth_session.additional_properties = d
|
|
||||||
return auth_session
|
|
||||||
|
|
||||||
@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
|
|
@ -1,9 +1,8 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
class CreatedAtSortMode(str, Enum):
|
class CreatedAtSortMode(str, Enum):
|
||||||
CREATED_AT_ASCENDING = 'created-at-ascending'
|
CREATED_AT_ASCENDING = 'created-at-ascending'
|
||||||
CREATED_AT_DESCENDING = 'created-at-descending'
|
CREATED_AT_DESCENDING = 'created-at-descending'
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return str(self.value)
|
return str(self.value)
|
||||||
|
@ -6,63 +6,63 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
T = TypeVar("T", bound="Error")
|
T = TypeVar("T", bound="Error")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class Error:
|
class Error:
|
||||||
""" """
|
""" """
|
||||||
error_code: Union[Unset, str] = UNSET
|
error_code: Union[Unset, str] = UNSET
|
||||||
message: Union[Unset, str] = UNSET
|
message: Union[Unset, str] = UNSET
|
||||||
request_id: Union[Unset, str] = UNSET
|
request_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
error_code = self.error_code
|
error_code = self.error_code
|
||||||
message = self.message
|
message = self.message
|
||||||
request_id = self.request_id
|
request_id = self.request_id
|
||||||
|
|
||||||
field_dict: Dict[str, Any] = {}
|
field_dict: Dict[str, Any] = {}
|
||||||
field_dict.update(self.additional_properties)
|
field_dict.update(self.additional_properties)
|
||||||
field_dict.update({})
|
field_dict.update({})
|
||||||
if error_code is not UNSET:
|
if error_code is not UNSET:
|
||||||
field_dict['error_code'] = error_code
|
field_dict['error_code'] = error_code
|
||||||
if message is not UNSET:
|
if message is not UNSET:
|
||||||
field_dict['message'] = message
|
field_dict['message'] = message
|
||||||
if request_id is not UNSET:
|
if request_id is not UNSET:
|
||||||
field_dict['request_id'] = request_id
|
field_dict['request_id'] = request_id
|
||||||
|
|
||||||
return field_dict
|
return field_dict
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
d = src_dict.copy()
|
d = src_dict.copy()
|
||||||
error_code = d.pop("error_code", UNSET)
|
error_code = d.pop("error_code", UNSET)
|
||||||
|
|
||||||
message = d.pop("message", UNSET)
|
message = d.pop("message", UNSET)
|
||||||
|
|
||||||
request_id = d.pop("request_id", UNSET)
|
request_id = d.pop("request_id", UNSET)
|
||||||
|
|
||||||
error = cls(
|
|
||||||
error_code=error_code,
|
|
||||||
message=message,
|
|
||||||
request_id=request_id,
|
|
||||||
)
|
|
||||||
|
|
||||||
error.additional_properties = d
|
error = cls(
|
||||||
return error
|
error_code= error_code,
|
||||||
|
message= message,
|
||||||
|
request_id= request_id,
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
error.additional_properties = d
|
||||||
def additional_keys(self) -> List[str]:
|
return error
|
||||||
return list(self.additional_properties.keys())
|
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> Any:
|
@property
|
||||||
return self.additional_properties[key]
|
def additional_keys(self) -> List[str]:
|
||||||
|
return list(self.additional_properties.keys())
|
||||||
|
|
||||||
def __setitem__(self, key: str, value: Any) -> None:
|
def __getitem__(self, key: str) -> Any:
|
||||||
self.additional_properties[key] = value
|
return self.additional_properties[key]
|
||||||
|
|
||||||
def __delitem__(self, key: str) -> None:
|
def __setitem__(self, key: str, value: Any) -> None:
|
||||||
del self.additional_properties[key]
|
self.additional_properties[key] = value
|
||||||
|
|
||||||
def __contains__(self, key: str) -> bool:
|
def __delitem__(self, key: str) -> None:
|
||||||
return key in self.additional_properties
|
del self.additional_properties[key]
|
||||||
|
|
||||||
|
def __contains__(self, key: str) -> bool:
|
||||||
|
return key in self.additional_properties
|
||||||
|
@ -1,68 +0,0 @@
|
|||||||
from typing import Any, Dict, List, Type, TypeVar, Union
|
|
||||||
|
|
||||||
import attr
|
|
||||||
|
|
||||||
from ..types import UNSET, Unset
|
|
||||||
|
|
||||||
T = TypeVar("T", bound="ErrorMessage")
|
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
|
||||||
class ErrorMessage:
|
|
||||||
""" """
|
|
||||||
code: Union[Unset, int] = UNSET
|
|
||||||
message: Union[Unset, str] = UNSET
|
|
||||||
status: Union[Unset, str] = UNSET
|
|
||||||
|
|
||||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
|
||||||
code = self.code
|
|
||||||
message = self.message
|
|
||||||
status = self.status
|
|
||||||
|
|
||||||
field_dict: Dict[str, Any] = {}
|
|
||||||
field_dict.update(self.additional_properties)
|
|
||||||
field_dict.update({})
|
|
||||||
if code is not UNSET:
|
|
||||||
field_dict['code'] = code
|
|
||||||
if message is not UNSET:
|
|
||||||
field_dict['message'] = message
|
|
||||||
if status is not UNSET:
|
|
||||||
field_dict['status'] = status
|
|
||||||
|
|
||||||
return field_dict
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
||||||
d = src_dict.copy()
|
|
||||||
code = d.pop("code", UNSET)
|
|
||||||
|
|
||||||
message = d.pop("message", UNSET)
|
|
||||||
|
|
||||||
status = d.pop("status", UNSET)
|
|
||||||
|
|
||||||
error_message = cls(
|
|
||||||
code=code,
|
|
||||||
message=message,
|
|
||||||
status=status,
|
|
||||||
)
|
|
||||||
|
|
||||||
error_message.additional_properties = d
|
|
||||||
return error_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
|
|
@ -8,175 +8,175 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
T = TypeVar("T", bound="ExtendedUser")
|
T = TypeVar("T", bound="ExtendedUser")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class ExtendedUser:
|
class ExtendedUser:
|
||||||
""" """
|
""" """
|
||||||
company: Union[Unset, str] = UNSET
|
company: Union[Unset, str] = UNSET
|
||||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
discord: Union[Unset, str] = UNSET
|
discord: Union[Unset, str] = UNSET
|
||||||
email: Union[Unset, str] = UNSET
|
email: Union[Unset, str] = UNSET
|
||||||
email_verified: Union[Unset, datetime.datetime] = UNSET
|
email_verified: Union[Unset, datetime.datetime] = UNSET
|
||||||
first_name: Union[Unset, str] = UNSET
|
first_name: Union[Unset, str] = UNSET
|
||||||
github: Union[Unset, str] = UNSET
|
github: Union[Unset, str] = UNSET
|
||||||
id: Union[Unset, str] = UNSET
|
id: Union[Unset, str] = UNSET
|
||||||
image: Union[Unset, str] = UNSET
|
image: Union[Unset, str] = UNSET
|
||||||
last_name: Union[Unset, str] = UNSET
|
last_name: Union[Unset, str] = UNSET
|
||||||
mailchimp_id: Union[Unset, str] = UNSET
|
mailchimp_id: Union[Unset, str] = UNSET
|
||||||
name: Union[Unset, str] = UNSET
|
name: Union[Unset, str] = UNSET
|
||||||
phone: Union[Unset, str] = UNSET
|
phone: Union[Unset, str] = UNSET
|
||||||
stripe_id: Union[Unset, str] = UNSET
|
stripe_id: Union[Unset, str] = UNSET
|
||||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
zendesk_id: Union[Unset, str] = UNSET
|
zendesk_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
company = self.company
|
company = self.company
|
||||||
created_at: Union[Unset, str] = UNSET
|
created_at: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.created_at, Unset):
|
if not isinstance(self.created_at, Unset):
|
||||||
created_at = self.created_at.isoformat()
|
created_at = self.created_at.isoformat()
|
||||||
discord = self.discord
|
discord = self.discord
|
||||||
email = self.email
|
email = self.email
|
||||||
email_verified: Union[Unset, str] = UNSET
|
email_verified: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.email_verified, Unset):
|
if not isinstance(self.email_verified, Unset):
|
||||||
email_verified = self.email_verified.isoformat()
|
email_verified = self.email_verified.isoformat()
|
||||||
first_name = self.first_name
|
first_name = self.first_name
|
||||||
github = self.github
|
github = self.github
|
||||||
id = self.id
|
id = self.id
|
||||||
image = self.image
|
image = self.image
|
||||||
last_name = self.last_name
|
last_name = self.last_name
|
||||||
mailchimp_id = self.mailchimp_id
|
mailchimp_id = self.mailchimp_id
|
||||||
name = self.name
|
name = self.name
|
||||||
phone = self.phone
|
phone = self.phone
|
||||||
stripe_id = self.stripe_id
|
stripe_id = self.stripe_id
|
||||||
updated_at: Union[Unset, str] = UNSET
|
updated_at: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.updated_at, Unset):
|
if not isinstance(self.updated_at, Unset):
|
||||||
updated_at = self.updated_at.isoformat()
|
updated_at = self.updated_at.isoformat()
|
||||||
zendesk_id = self.zendesk_id
|
zendesk_id = self.zendesk_id
|
||||||
|
|
||||||
field_dict: Dict[str, Any] = {}
|
field_dict: Dict[str, Any] = {}
|
||||||
field_dict.update(self.additional_properties)
|
field_dict.update(self.additional_properties)
|
||||||
field_dict.update({})
|
field_dict.update({})
|
||||||
if company is not UNSET:
|
if company is not UNSET:
|
||||||
field_dict['company'] = company
|
field_dict['company'] = company
|
||||||
if created_at is not UNSET:
|
if created_at is not UNSET:
|
||||||
field_dict['created_at'] = created_at
|
field_dict['created_at'] = created_at
|
||||||
if discord is not UNSET:
|
if discord is not UNSET:
|
||||||
field_dict['discord'] = discord
|
field_dict['discord'] = discord
|
||||||
if email is not UNSET:
|
if email is not UNSET:
|
||||||
field_dict['email'] = email
|
field_dict['email'] = email
|
||||||
if email_verified is not UNSET:
|
if email_verified is not UNSET:
|
||||||
field_dict['email_verified'] = email_verified
|
field_dict['email_verified'] = email_verified
|
||||||
if first_name is not UNSET:
|
if first_name is not UNSET:
|
||||||
field_dict['first_name'] = first_name
|
field_dict['first_name'] = first_name
|
||||||
if github is not UNSET:
|
if github is not UNSET:
|
||||||
field_dict['github'] = github
|
field_dict['github'] = github
|
||||||
if id is not UNSET:
|
if id is not UNSET:
|
||||||
field_dict['id'] = id
|
field_dict['id'] = id
|
||||||
if image is not UNSET:
|
if image is not UNSET:
|
||||||
field_dict['image'] = image
|
field_dict['image'] = image
|
||||||
if last_name is not UNSET:
|
if last_name is not UNSET:
|
||||||
field_dict['last_name'] = last_name
|
field_dict['last_name'] = last_name
|
||||||
if mailchimp_id is not UNSET:
|
if mailchimp_id is not UNSET:
|
||||||
field_dict['mailchimp_id'] = mailchimp_id
|
field_dict['mailchimp_id'] = mailchimp_id
|
||||||
if name is not UNSET:
|
if name is not UNSET:
|
||||||
field_dict['name'] = name
|
field_dict['name'] = name
|
||||||
if phone is not UNSET:
|
if phone is not UNSET:
|
||||||
field_dict['phone'] = phone
|
field_dict['phone'] = phone
|
||||||
if stripe_id is not UNSET:
|
if stripe_id is not UNSET:
|
||||||
field_dict['stripe_id'] = stripe_id
|
field_dict['stripe_id'] = stripe_id
|
||||||
if updated_at is not UNSET:
|
if updated_at is not UNSET:
|
||||||
field_dict['updated_at'] = updated_at
|
field_dict['updated_at'] = updated_at
|
||||||
if zendesk_id is not UNSET:
|
if zendesk_id is not UNSET:
|
||||||
field_dict['zendesk_id'] = zendesk_id
|
field_dict['zendesk_id'] = zendesk_id
|
||||||
|
|
||||||
return field_dict
|
return field_dict
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
d = src_dict.copy()
|
d = src_dict.copy()
|
||||||
company = d.pop("company", UNSET)
|
company = d.pop("company", UNSET)
|
||||||
|
|
||||||
_created_at = d.pop("created_at", UNSET)
|
_created_at = d.pop("created_at", UNSET)
|
||||||
created_at: Union[Unset, datetime.datetime]
|
created_at: Union[Unset, datetime.datetime]
|
||||||
if isinstance(_created_at, Unset):
|
if isinstance(_created_at, Unset):
|
||||||
created_at = UNSET
|
created_at = UNSET
|
||||||
else:
|
else:
|
||||||
created_at = isoparse(_created_at)
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
discord = d.pop("discord", UNSET)
|
discord = d.pop("discord", UNSET)
|
||||||
|
|
||||||
email = d.pop("email", UNSET)
|
email = d.pop("email", UNSET)
|
||||||
|
|
||||||
_email_verified = d.pop("email_verified", UNSET)
|
_email_verified = d.pop("email_verified", UNSET)
|
||||||
email_verified: Union[Unset, datetime.datetime]
|
email_verified: Union[Unset, datetime.datetime]
|
||||||
if isinstance(_email_verified, Unset):
|
if isinstance(_email_verified, Unset):
|
||||||
email_verified = UNSET
|
email_verified = UNSET
|
||||||
else:
|
else:
|
||||||
email_verified = isoparse(_email_verified)
|
email_verified = isoparse(_email_verified)
|
||||||
|
|
||||||
first_name = d.pop("first_name", UNSET)
|
first_name = d.pop("first_name", UNSET)
|
||||||
|
|
||||||
github = d.pop("github", UNSET)
|
github = d.pop("github", UNSET)
|
||||||
|
|
||||||
id = d.pop("id", UNSET)
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
image = d.pop("image", UNSET)
|
image = d.pop("image", UNSET)
|
||||||
|
|
||||||
last_name = d.pop("last_name", UNSET)
|
last_name = d.pop("last_name", UNSET)
|
||||||
|
|
||||||
mailchimp_id = d.pop("mailchimp_id", UNSET)
|
mailchimp_id = d.pop("mailchimp_id", UNSET)
|
||||||
|
|
||||||
name = d.pop("name", UNSET)
|
name = d.pop("name", UNSET)
|
||||||
|
|
||||||
phone = d.pop("phone", UNSET)
|
phone = d.pop("phone", UNSET)
|
||||||
|
|
||||||
stripe_id = d.pop("stripe_id", UNSET)
|
stripe_id = d.pop("stripe_id", UNSET)
|
||||||
|
|
||||||
_updated_at = d.pop("updated_at", UNSET)
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
updated_at: Union[Unset, datetime.datetime]
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
if isinstance(_updated_at, Unset):
|
if isinstance(_updated_at, Unset):
|
||||||
updated_at = UNSET
|
updated_at = UNSET
|
||||||
else:
|
else:
|
||||||
updated_at = isoparse(_updated_at)
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
zendesk_id = d.pop("zendesk_id", UNSET)
|
zendesk_id = d.pop("zendesk_id", UNSET)
|
||||||
|
|
||||||
extended_user = cls(
|
|
||||||
company=company,
|
|
||||||
created_at=created_at,
|
|
||||||
discord=discord,
|
|
||||||
email=email,
|
|
||||||
email_verified=email_verified,
|
|
||||||
first_name=first_name,
|
|
||||||
github=github,
|
|
||||||
id=id,
|
|
||||||
image=image,
|
|
||||||
last_name=last_name,
|
|
||||||
mailchimp_id=mailchimp_id,
|
|
||||||
name=name,
|
|
||||||
phone=phone,
|
|
||||||
stripe_id=stripe_id,
|
|
||||||
updated_at=updated_at,
|
|
||||||
zendesk_id=zendesk_id,
|
|
||||||
)
|
|
||||||
|
|
||||||
extended_user.additional_properties = d
|
extended_user = cls(
|
||||||
return extended_user
|
company= company,
|
||||||
|
created_at= created_at,
|
||||||
|
discord= discord,
|
||||||
|
email= email,
|
||||||
|
email_verified= email_verified,
|
||||||
|
first_name= first_name,
|
||||||
|
github= github,
|
||||||
|
id= id,
|
||||||
|
image= image,
|
||||||
|
last_name= last_name,
|
||||||
|
mailchimp_id= mailchimp_id,
|
||||||
|
name= name,
|
||||||
|
phone= phone,
|
||||||
|
stripe_id= stripe_id,
|
||||||
|
updated_at= updated_at,
|
||||||
|
zendesk_id= zendesk_id,
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
extended_user.additional_properties = d
|
||||||
def additional_keys(self) -> List[str]:
|
return extended_user
|
||||||
return list(self.additional_properties.keys())
|
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> Any:
|
@property
|
||||||
return self.additional_properties[key]
|
def additional_keys(self) -> List[str]:
|
||||||
|
return list(self.additional_properties.keys())
|
||||||
|
|
||||||
def __setitem__(self, key: str, value: Any) -> None:
|
def __getitem__(self, key: str) -> Any:
|
||||||
self.additional_properties[key] = value
|
return self.additional_properties[key]
|
||||||
|
|
||||||
def __delitem__(self, key: str) -> None:
|
def __setitem__(self, key: str, value: Any) -> None:
|
||||||
del self.additional_properties[key]
|
self.additional_properties[key] = value
|
||||||
|
|
||||||
def __contains__(self, key: str) -> bool:
|
def __delitem__(self, key: str) -> None:
|
||||||
return key in self.additional_properties
|
del self.additional_properties[key]
|
||||||
|
|
||||||
|
def __contains__(self, key: str) -> bool:
|
||||||
|
return key in self.additional_properties
|
||||||
|
@ -12,182 +12,182 @@ 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:
|
||||||
""" """
|
""" """
|
||||||
completed_at: Union[Unset, datetime.datetime] = UNSET
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
id: Union[Unset, Uuid] = UNSET
|
id: Union[Unset, Uuid] = UNSET
|
||||||
output_file_link: Union[Unset, str] = UNSET
|
output_file_link: Union[Unset, str] = UNSET
|
||||||
output_format: Union[Unset, FileConversionOutputFormat] = UNSET
|
output_format: Union[Unset, FileConversionOutputFormat] = UNSET
|
||||||
src_file_link: Union[Unset, str] = UNSET
|
src_file_link: Union[Unset, str] = UNSET
|
||||||
src_format: Union[Unset, FileConversionSourceFormat] = UNSET
|
src_format: Union[Unset, FileConversionSourceFormat] = UNSET
|
||||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
status: Union[Unset, FileConversionStatus] = UNSET
|
status: Union[Unset, FileConversionStatus] = UNSET
|
||||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
user_id: Union[Unset, str] = UNSET
|
user_id: Union[Unset, str] = UNSET
|
||||||
worker: Union[Unset, str] = UNSET
|
worker: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
completed_at: Union[Unset, str] = UNSET
|
completed_at: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.completed_at, Unset):
|
if not isinstance(self.completed_at, Unset):
|
||||||
completed_at = self.completed_at.isoformat()
|
completed_at = self.completed_at.isoformat()
|
||||||
created_at: Union[Unset, str] = UNSET
|
created_at: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.created_at, Unset):
|
if not isinstance(self.created_at, Unset):
|
||||||
created_at = self.created_at.isoformat()
|
created_at = self.created_at.isoformat()
|
||||||
id: Union[Unset, str] = UNSET
|
id: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.id, Unset):
|
if not isinstance(self.id, Unset):
|
||||||
id = self.id.value
|
id = self.id.value
|
||||||
output_file_link = self.output_file_link
|
output_file_link = self.output_file_link
|
||||||
output_format: Union[Unset, str] = UNSET
|
output_format: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.output_format, Unset):
|
if not isinstance(self.output_format, Unset):
|
||||||
output_format = self.output_format.value
|
output_format = self.output_format.value
|
||||||
src_file_link = self.src_file_link
|
src_file_link = self.src_file_link
|
||||||
src_format: Union[Unset, str] = UNSET
|
src_format: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.src_format, Unset):
|
if not isinstance(self.src_format, Unset):
|
||||||
src_format = self.src_format.value
|
src_format = self.src_format.value
|
||||||
started_at: Union[Unset, str] = UNSET
|
started_at: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.started_at, Unset):
|
if not isinstance(self.started_at, Unset):
|
||||||
started_at = self.started_at.isoformat()
|
started_at = self.started_at.isoformat()
|
||||||
status: Union[Unset, str] = UNSET
|
status: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.status, Unset):
|
if not isinstance(self.status, Unset):
|
||||||
status = self.status.value
|
status = self.status.value
|
||||||
updated_at: Union[Unset, str] = UNSET
|
updated_at: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.updated_at, Unset):
|
if not isinstance(self.updated_at, Unset):
|
||||||
updated_at = self.updated_at.isoformat()
|
updated_at = self.updated_at.isoformat()
|
||||||
user_id = self.user_id
|
user_id = self.user_id
|
||||||
worker = self.worker
|
worker = self.worker
|
||||||
|
|
||||||
field_dict: Dict[str, Any] = {}
|
field_dict: Dict[str, Any] = {}
|
||||||
field_dict.update(self.additional_properties)
|
field_dict.update(self.additional_properties)
|
||||||
field_dict.update({})
|
field_dict.update({})
|
||||||
if completed_at is not UNSET:
|
if completed_at is not UNSET:
|
||||||
field_dict['completed_at'] = completed_at
|
field_dict['completed_at'] = completed_at
|
||||||
if created_at is not UNSET:
|
if created_at is not UNSET:
|
||||||
field_dict['created_at'] = created_at
|
field_dict['created_at'] = created_at
|
||||||
if id is not UNSET:
|
if id is not UNSET:
|
||||||
field_dict['id'] = id
|
field_dict['id'] = id
|
||||||
if output_file_link is not UNSET:
|
if output_file_link is not UNSET:
|
||||||
field_dict['output_file_link'] = output_file_link
|
field_dict['output_file_link'] = output_file_link
|
||||||
if output_format is not UNSET:
|
if output_format is not UNSET:
|
||||||
field_dict['output_format'] = output_format
|
field_dict['output_format'] = output_format
|
||||||
if src_file_link is not UNSET:
|
if src_file_link is not UNSET:
|
||||||
field_dict['src_file_link'] = src_file_link
|
field_dict['src_file_link'] = src_file_link
|
||||||
if src_format is not UNSET:
|
if src_format is not UNSET:
|
||||||
field_dict['src_format'] = src_format
|
field_dict['src_format'] = src_format
|
||||||
if started_at is not UNSET:
|
if started_at is not UNSET:
|
||||||
field_dict['started_at'] = started_at
|
field_dict['started_at'] = started_at
|
||||||
if status is not UNSET:
|
if status is not UNSET:
|
||||||
field_dict['status'] = status
|
field_dict['status'] = status
|
||||||
if updated_at is not UNSET:
|
if updated_at is not UNSET:
|
||||||
field_dict['updated_at'] = updated_at
|
field_dict['updated_at'] = updated_at
|
||||||
if user_id is not UNSET:
|
if user_id is not UNSET:
|
||||||
field_dict['user_id'] = user_id
|
field_dict['user_id'] = user_id
|
||||||
if worker is not UNSET:
|
if worker is not UNSET:
|
||||||
field_dict['worker'] = worker
|
field_dict['worker'] = worker
|
||||||
|
|
||||||
return field_dict
|
return field_dict
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
d = src_dict.copy()
|
d = src_dict.copy()
|
||||||
_completed_at = d.pop("completed_at", UNSET)
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
completed_at: Union[Unset, datetime.datetime]
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
if isinstance(_completed_at, Unset):
|
if isinstance(_completed_at, Unset):
|
||||||
completed_at = UNSET
|
completed_at = UNSET
|
||||||
else:
|
else:
|
||||||
completed_at = isoparse(_completed_at)
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
_created_at = d.pop("created_at", UNSET)
|
_created_at = d.pop("created_at", UNSET)
|
||||||
created_at: Union[Unset, datetime.datetime]
|
created_at: Union[Unset, datetime.datetime]
|
||||||
if isinstance(_created_at, Unset):
|
if isinstance(_created_at, Unset):
|
||||||
created_at = UNSET
|
created_at = UNSET
|
||||||
else:
|
else:
|
||||||
created_at = isoparse(_created_at)
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
_id = d.pop("id", UNSET)
|
_id = d.pop("id", UNSET)
|
||||||
id: Union[Unset, Uuid]
|
id: Union[Unset, Uuid]
|
||||||
if isinstance(_id, Unset):
|
if isinstance(_id, Unset):
|
||||||
id = UNSET
|
id = UNSET
|
||||||
else:
|
else:
|
||||||
id = Uuid(_id)
|
id = Uuid(_id)
|
||||||
|
|
||||||
output_file_link = d.pop("output_file_link", UNSET)
|
output_file_link = d.pop("output_file_link", UNSET)
|
||||||
|
|
||||||
_output_format = d.pop("output_format", UNSET)
|
_output_format = d.pop("output_format", UNSET)
|
||||||
output_format: Union[Unset, FileConversionOutputFormat]
|
output_format: Union[Unset, FileConversionOutputFormat]
|
||||||
if isinstance(_output_format, Unset):
|
if isinstance(_output_format, Unset):
|
||||||
output_format = UNSET
|
output_format = UNSET
|
||||||
else:
|
else:
|
||||||
output_format = FileConversionOutputFormat(_output_format)
|
output_format = FileConversionOutputFormat(_output_format)
|
||||||
|
|
||||||
src_file_link = d.pop("src_file_link", UNSET)
|
src_file_link = d.pop("src_file_link", UNSET)
|
||||||
|
|
||||||
_src_format = d.pop("src_format", UNSET)
|
_src_format = d.pop("src_format", UNSET)
|
||||||
src_format: Union[Unset, FileConversionSourceFormat]
|
src_format: Union[Unset, FileConversionSourceFormat]
|
||||||
if isinstance(_src_format, Unset):
|
if isinstance(_src_format, Unset):
|
||||||
src_format = UNSET
|
src_format = UNSET
|
||||||
else:
|
else:
|
||||||
src_format = FileConversionSourceFormat(_src_format)
|
src_format = FileConversionSourceFormat(_src_format)
|
||||||
|
|
||||||
_started_at = d.pop("started_at", UNSET)
|
_started_at = d.pop("started_at", UNSET)
|
||||||
started_at: Union[Unset, datetime.datetime]
|
started_at: Union[Unset, datetime.datetime]
|
||||||
if isinstance(_started_at, Unset):
|
if isinstance(_started_at, Unset):
|
||||||
started_at = UNSET
|
started_at = UNSET
|
||||||
else:
|
else:
|
||||||
started_at = isoparse(_started_at)
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
_status = d.pop("status", UNSET)
|
_status = d.pop("status", UNSET)
|
||||||
status: Union[Unset, FileConversionStatus]
|
status: Union[Unset, FileConversionStatus]
|
||||||
if isinstance(_status, Unset):
|
if isinstance(_status, Unset):
|
||||||
status = UNSET
|
status = UNSET
|
||||||
else:
|
else:
|
||||||
status = FileConversionStatus(_status)
|
status = FileConversionStatus(_status)
|
||||||
|
|
||||||
_updated_at = d.pop("updated_at", UNSET)
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
updated_at: Union[Unset, datetime.datetime]
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
if isinstance(_updated_at, Unset):
|
if isinstance(_updated_at, Unset):
|
||||||
updated_at = UNSET
|
updated_at = UNSET
|
||||||
else:
|
else:
|
||||||
updated_at = isoparse(_updated_at)
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
user_id = d.pop("user_id", UNSET)
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
worker = d.pop("worker", UNSET)
|
worker = d.pop("worker", UNSET)
|
||||||
|
|
||||||
file_conversion = cls(
|
|
||||||
completed_at=completed_at,
|
|
||||||
created_at=created_at,
|
|
||||||
id=id,
|
|
||||||
output_file_link=output_file_link,
|
|
||||||
output_format=output_format,
|
|
||||||
src_file_link=src_file_link,
|
|
||||||
src_format=src_format,
|
|
||||||
started_at=started_at,
|
|
||||||
status=status,
|
|
||||||
updated_at=updated_at,
|
|
||||||
user_id=user_id,
|
|
||||||
worker=worker,
|
|
||||||
)
|
|
||||||
|
|
||||||
file_conversion.additional_properties = d
|
file_conversion = cls(
|
||||||
return file_conversion
|
completed_at= completed_at,
|
||||||
|
created_at= created_at,
|
||||||
|
id= id,
|
||||||
|
output_file_link= output_file_link,
|
||||||
|
output_format= output_format,
|
||||||
|
src_file_link= src_file_link,
|
||||||
|
src_format= src_format,
|
||||||
|
started_at= started_at,
|
||||||
|
status= status,
|
||||||
|
updated_at= updated_at,
|
||||||
|
user_id= user_id,
|
||||||
|
worker= worker,
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
file_conversion.additional_properties = d
|
||||||
def additional_keys(self) -> List[str]:
|
return file_conversion
|
||||||
return list(self.additional_properties.keys())
|
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> Any:
|
@property
|
||||||
return self.additional_properties[key]
|
def additional_keys(self) -> List[str]:
|
||||||
|
return list(self.additional_properties.keys())
|
||||||
|
|
||||||
def __setitem__(self, key: str, value: Any) -> None:
|
def __getitem__(self, key: str) -> Any:
|
||||||
self.additional_properties[key] = value
|
return self.additional_properties[key]
|
||||||
|
|
||||||
def __delitem__(self, key: str) -> None:
|
def __setitem__(self, key: str, value: Any) -> None:
|
||||||
del self.additional_properties[key]
|
self.additional_properties[key] = value
|
||||||
|
|
||||||
def __contains__(self, key: str) -> bool:
|
def __delitem__(self, key: str) -> None:
|
||||||
return key in self.additional_properties
|
del self.additional_properties[key]
|
||||||
|
|
||||||
|
def __contains__(self, key: str) -> bool:
|
||||||
|
return key in self.additional_properties
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
class FileConversionOutputFormat(str, Enum):
|
class FileConversionOutputFormat(str, Enum):
|
||||||
STL = 'stl'
|
STL = 'stl'
|
||||||
OBJ = 'obj'
|
OBJ = 'obj'
|
||||||
DAE = 'dae'
|
DAE = 'dae'
|
||||||
STEP = 'step'
|
STEP = 'step'
|
||||||
FBX = 'fbx'
|
FBX = 'fbx'
|
||||||
FBXB = 'fbxb'
|
FBXB = 'fbxb'
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return str(self.value)
|
return str(self.value)
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
class FileConversionSourceFormat(str, Enum):
|
class FileConversionSourceFormat(str, Enum):
|
||||||
STL = 'stl'
|
STL = 'stl'
|
||||||
OBJ = 'obj'
|
OBJ = 'obj'
|
||||||
DAE = 'dae'
|
DAE = 'dae'
|
||||||
STEP = 'step'
|
STEP = 'step'
|
||||||
FBX = 'fbx'
|
FBX = 'fbx'
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return str(self.value)
|
return str(self.value)
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
class FileConversionStatus(str, Enum):
|
class FileConversionStatus(str, Enum):
|
||||||
QUEUED = 'Queued'
|
QUEUED = 'Queued'
|
||||||
UPLOADED = 'Uploaded'
|
UPLOADED = 'Uploaded'
|
||||||
IN_PROGRESS = 'In Progress'
|
IN_PROGRESS = 'In Progress'
|
||||||
COMPLETED = 'Completed'
|
COMPLETED = 'Completed'
|
||||||
FAILED = 'Failed'
|
FAILED = 'Failed'
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return str(self.value)
|
return str(self.value)
|
||||||
|
@ -12,154 +12,154 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
T = TypeVar("T", bound="FileConversionWithOutput")
|
T = TypeVar("T", bound="FileConversionWithOutput")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class FileConversionWithOutput:
|
class FileConversionWithOutput:
|
||||||
""" """
|
""" """
|
||||||
completed_at: Union[Unset, datetime.datetime] = UNSET
|
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
id: Union[Unset, Uuid] = UNSET
|
id: Union[Unset, Uuid] = UNSET
|
||||||
output: Union[Unset, str] = UNSET
|
output: Union[Unset, str] = UNSET
|
||||||
output_format: Union[Unset, FileConversionOutputFormat] = UNSET
|
output_format: Union[Unset, FileConversionOutputFormat] = UNSET
|
||||||
src_format: Union[Unset, FileConversionSourceFormat] = UNSET
|
src_format: Union[Unset, FileConversionSourceFormat] = UNSET
|
||||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
status: Union[Unset, FileConversionStatus] = UNSET
|
status: Union[Unset, FileConversionStatus] = UNSET
|
||||||
user_id: Union[Unset, str] = UNSET
|
user_id: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
completed_at: Union[Unset, str] = UNSET
|
completed_at: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.completed_at, Unset):
|
if not isinstance(self.completed_at, Unset):
|
||||||
completed_at = self.completed_at.isoformat()
|
completed_at = self.completed_at.isoformat()
|
||||||
created_at: Union[Unset, str] = UNSET
|
created_at: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.created_at, Unset):
|
if not isinstance(self.created_at, Unset):
|
||||||
created_at = self.created_at.isoformat()
|
created_at = self.created_at.isoformat()
|
||||||
id: Union[Unset, str] = UNSET
|
id: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.id, Unset):
|
if not isinstance(self.id, Unset):
|
||||||
id = self.id.value
|
id = self.id.value
|
||||||
output = self.output
|
output = self.output
|
||||||
output_format: Union[Unset, str] = UNSET
|
output_format: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.output_format, Unset):
|
if not isinstance(self.output_format, Unset):
|
||||||
output_format = self.output_format.value
|
output_format = self.output_format.value
|
||||||
src_format: Union[Unset, str] = UNSET
|
src_format: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.src_format, Unset):
|
if not isinstance(self.src_format, Unset):
|
||||||
src_format = self.src_format.value
|
src_format = self.src_format.value
|
||||||
started_at: Union[Unset, str] = UNSET
|
started_at: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.started_at, Unset):
|
if not isinstance(self.started_at, Unset):
|
||||||
started_at = self.started_at.isoformat()
|
started_at = self.started_at.isoformat()
|
||||||
status: Union[Unset, str] = UNSET
|
status: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.status, Unset):
|
if not isinstance(self.status, Unset):
|
||||||
status = self.status.value
|
status = self.status.value
|
||||||
user_id = self.user_id
|
user_id = self.user_id
|
||||||
|
|
||||||
field_dict: Dict[str, Any] = {}
|
field_dict: Dict[str, Any] = {}
|
||||||
field_dict.update(self.additional_properties)
|
field_dict.update(self.additional_properties)
|
||||||
field_dict.update({})
|
field_dict.update({})
|
||||||
if completed_at is not UNSET:
|
if completed_at is not UNSET:
|
||||||
field_dict['completed_at'] = completed_at
|
field_dict['completed_at'] = completed_at
|
||||||
if created_at is not UNSET:
|
if created_at is not UNSET:
|
||||||
field_dict['created_at'] = created_at
|
field_dict['created_at'] = created_at
|
||||||
if id is not UNSET:
|
if id is not UNSET:
|
||||||
field_dict['id'] = id
|
field_dict['id'] = id
|
||||||
if output is not UNSET:
|
if output is not UNSET:
|
||||||
field_dict['output'] = output
|
field_dict['output'] = output
|
||||||
if output_format is not UNSET:
|
if output_format is not UNSET:
|
||||||
field_dict['output_format'] = output_format
|
field_dict['output_format'] = output_format
|
||||||
if src_format is not UNSET:
|
if src_format is not UNSET:
|
||||||
field_dict['src_format'] = src_format
|
field_dict['src_format'] = src_format
|
||||||
if started_at is not UNSET:
|
if started_at is not UNSET:
|
||||||
field_dict['started_at'] = started_at
|
field_dict['started_at'] = started_at
|
||||||
if status is not UNSET:
|
if status is not UNSET:
|
||||||
field_dict['status'] = status
|
field_dict['status'] = status
|
||||||
if user_id is not UNSET:
|
if user_id is not UNSET:
|
||||||
field_dict['user_id'] = user_id
|
field_dict['user_id'] = user_id
|
||||||
|
|
||||||
return field_dict
|
return field_dict
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
d = src_dict.copy()
|
d = src_dict.copy()
|
||||||
_completed_at = d.pop("completed_at", UNSET)
|
_completed_at = d.pop("completed_at", UNSET)
|
||||||
completed_at: Union[Unset, datetime.datetime]
|
completed_at: Union[Unset, datetime.datetime]
|
||||||
if isinstance(_completed_at, Unset):
|
if isinstance(_completed_at, Unset):
|
||||||
completed_at = UNSET
|
completed_at = UNSET
|
||||||
else:
|
else:
|
||||||
completed_at = isoparse(_completed_at)
|
completed_at = isoparse(_completed_at)
|
||||||
|
|
||||||
_created_at = d.pop("created_at", UNSET)
|
_created_at = d.pop("created_at", UNSET)
|
||||||
created_at: Union[Unset, datetime.datetime]
|
created_at: Union[Unset, datetime.datetime]
|
||||||
if isinstance(_created_at, Unset):
|
if isinstance(_created_at, Unset):
|
||||||
created_at = UNSET
|
created_at = UNSET
|
||||||
else:
|
else:
|
||||||
created_at = isoparse(_created_at)
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
_id = d.pop("id", UNSET)
|
_id = d.pop("id", UNSET)
|
||||||
id: Union[Unset, Uuid]
|
id: Union[Unset, Uuid]
|
||||||
if isinstance(_id, Unset):
|
if isinstance(_id, Unset):
|
||||||
id = UNSET
|
id = UNSET
|
||||||
else:
|
else:
|
||||||
id = Uuid(_id)
|
id = Uuid(_id)
|
||||||
|
|
||||||
output = d.pop("output", UNSET)
|
output = d.pop("output", UNSET)
|
||||||
|
|
||||||
_output_format = d.pop("output_format", UNSET)
|
_output_format = d.pop("output_format", UNSET)
|
||||||
output_format: Union[Unset, FileConversionOutputFormat]
|
output_format: Union[Unset, FileConversionOutputFormat]
|
||||||
if isinstance(_output_format, Unset):
|
if isinstance(_output_format, Unset):
|
||||||
output_format = UNSET
|
output_format = UNSET
|
||||||
else:
|
else:
|
||||||
output_format = FileConversionOutputFormat(_output_format)
|
output_format = FileConversionOutputFormat(_output_format)
|
||||||
|
|
||||||
_src_format = d.pop("src_format", UNSET)
|
_src_format = d.pop("src_format", UNSET)
|
||||||
src_format: Union[Unset, FileConversionSourceFormat]
|
src_format: Union[Unset, FileConversionSourceFormat]
|
||||||
if isinstance(_src_format, Unset):
|
if isinstance(_src_format, Unset):
|
||||||
src_format = UNSET
|
src_format = UNSET
|
||||||
else:
|
else:
|
||||||
src_format = FileConversionSourceFormat(_src_format)
|
src_format = FileConversionSourceFormat(_src_format)
|
||||||
|
|
||||||
_started_at = d.pop("started_at", UNSET)
|
_started_at = d.pop("started_at", UNSET)
|
||||||
started_at: Union[Unset, datetime.datetime]
|
started_at: Union[Unset, datetime.datetime]
|
||||||
if isinstance(_started_at, Unset):
|
if isinstance(_started_at, Unset):
|
||||||
started_at = UNSET
|
started_at = UNSET
|
||||||
else:
|
else:
|
||||||
started_at = isoparse(_started_at)
|
started_at = isoparse(_started_at)
|
||||||
|
|
||||||
_status = d.pop("status", UNSET)
|
_status = d.pop("status", UNSET)
|
||||||
status: Union[Unset, FileConversionStatus]
|
status: Union[Unset, FileConversionStatus]
|
||||||
if isinstance(_status, Unset):
|
if isinstance(_status, Unset):
|
||||||
status = UNSET
|
status = UNSET
|
||||||
else:
|
else:
|
||||||
status = FileConversionStatus(_status)
|
status = FileConversionStatus(_status)
|
||||||
|
|
||||||
user_id = d.pop("user_id", UNSET)
|
user_id = d.pop("user_id", UNSET)
|
||||||
|
|
||||||
file_conversion_with_output = cls(
|
|
||||||
completed_at=completed_at,
|
|
||||||
created_at=created_at,
|
|
||||||
id=id,
|
|
||||||
output=output,
|
|
||||||
output_format=output_format,
|
|
||||||
src_format=src_format,
|
|
||||||
started_at=started_at,
|
|
||||||
status=status,
|
|
||||||
user_id=user_id,
|
|
||||||
)
|
|
||||||
|
|
||||||
file_conversion_with_output.additional_properties = d
|
file_conversion_with_output = cls(
|
||||||
return file_conversion_with_output
|
completed_at= completed_at,
|
||||||
|
created_at= created_at,
|
||||||
|
id= id,
|
||||||
|
output= output,
|
||||||
|
output_format= output_format,
|
||||||
|
src_format= src_format,
|
||||||
|
started_at= started_at,
|
||||||
|
status= status,
|
||||||
|
user_id= user_id,
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
file_conversion_with_output.additional_properties = d
|
||||||
def additional_keys(self) -> List[str]:
|
return file_conversion_with_output
|
||||||
return list(self.additional_properties.keys())
|
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> Any:
|
@property
|
||||||
return self.additional_properties[key]
|
def additional_keys(self) -> List[str]:
|
||||||
|
return list(self.additional_properties.keys())
|
||||||
|
|
||||||
def __setitem__(self, key: str, value: Any) -> None:
|
def __getitem__(self, key: str) -> Any:
|
||||||
self.additional_properties[key] = value
|
return self.additional_properties[key]
|
||||||
|
|
||||||
def __delitem__(self, key: str) -> None:
|
def __setitem__(self, key: str, value: Any) -> None:
|
||||||
del self.additional_properties[key]
|
self.additional_properties[key] = value
|
||||||
|
|
||||||
def __contains__(self, key: str) -> bool:
|
def __delitem__(self, key: str) -> None:
|
||||||
return key in self.additional_properties
|
del self.additional_properties[key]
|
||||||
|
|
||||||
|
def __contains__(self, key: str) -> bool:
|
||||||
|
return key in self.additional_properties
|
||||||
|
@ -1,82 +0,0 @@
|
|||||||
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
|
|
@ -1,132 +0,0 @@
|
|||||||
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 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
|
|
@ -1,17 +1,16 @@
|
|||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
class Method(str, Enum):
|
class Method(str, Enum):
|
||||||
OPTIONS = 'OPTIONS'
|
OPTIONS = 'OPTIONS'
|
||||||
GET = 'GET'
|
GET = 'GET'
|
||||||
POST = 'POST'
|
POST = 'POST'
|
||||||
PUT = 'PUT'
|
PUT = 'PUT'
|
||||||
DELETE = 'DELETE'
|
DELETE = 'DELETE'
|
||||||
HEAD = 'HEAD'
|
HEAD = 'HEAD'
|
||||||
TRACE = 'TRACE'
|
TRACE = 'TRACE'
|
||||||
CONNECT = 'CONNECT'
|
CONNECT = 'CONNECT'
|
||||||
PATCH = 'PATCH'
|
PATCH = 'PATCH'
|
||||||
EXTENSION = 'EXTENSION'
|
EXTENSION = 'EXTENSION'
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return str(self.value)
|
return str(self.value)
|
||||||
|
@ -6,49 +6,49 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
T = TypeVar("T", bound="Pong")
|
T = TypeVar("T", bound="Pong")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class Pong:
|
class Pong:
|
||||||
""" """
|
""" """
|
||||||
message: Union[Unset, str] = UNSET
|
message: Union[Unset, str] = UNSET
|
||||||
|
|
||||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
message = self.message
|
message = self.message
|
||||||
|
|
||||||
field_dict: Dict[str, Any] = {}
|
field_dict: Dict[str, Any] = {}
|
||||||
field_dict.update(self.additional_properties)
|
field_dict.update(self.additional_properties)
|
||||||
field_dict.update({})
|
field_dict.update({})
|
||||||
if message is not UNSET:
|
if message is not UNSET:
|
||||||
field_dict['message'] = message
|
field_dict['message'] = message
|
||||||
|
|
||||||
return field_dict
|
return field_dict
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
d = src_dict.copy()
|
d = src_dict.copy()
|
||||||
message = d.pop("message", UNSET)
|
message = d.pop("message", UNSET)
|
||||||
|
|
||||||
pong = cls(
|
|
||||||
message=message,
|
|
||||||
)
|
|
||||||
|
|
||||||
pong.additional_properties = d
|
pong = cls(
|
||||||
return pong
|
message= message,
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
pong.additional_properties = d
|
||||||
def additional_keys(self) -> List[str]:
|
return pong
|
||||||
return list(self.additional_properties.keys())
|
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> Any:
|
@property
|
||||||
return self.additional_properties[key]
|
def additional_keys(self) -> List[str]:
|
||||||
|
return list(self.additional_properties.keys())
|
||||||
|
|
||||||
def __setitem__(self, key: str, value: Any) -> None:
|
def __getitem__(self, key: str) -> Any:
|
||||||
self.additional_properties[key] = value
|
return self.additional_properties[key]
|
||||||
|
|
||||||
def __delitem__(self, key: str) -> None:
|
def __setitem__(self, key: str, value: Any) -> None:
|
||||||
del self.additional_properties[key]
|
self.additional_properties[key] = value
|
||||||
|
|
||||||
def __contains__(self, key: str) -> bool:
|
def __delitem__(self, key: str) -> None:
|
||||||
return key in self.additional_properties
|
del self.additional_properties[key]
|
||||||
|
|
||||||
|
def __contains__(self, key: str) -> bool:
|
||||||
|
return key in self.additional_properties
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
from enum import Enum
|
|
||||||
|
|
||||||
|
|
||||||
class PongEnum(str, Enum):
|
|
||||||
PONG = 'pong'
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return str(self.value)
|
|
@ -1,62 +0,0 @@
|
|||||||
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 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
|
|
@ -1,10 +0,0 @@
|
|||||||
from enum import Enum
|
|
||||||
|
|
||||||
|
|
||||||
class ServerEnv(str, Enum):
|
|
||||||
PRODUCTION = 'production'
|
|
||||||
DEVELOPMENT = 'development'
|
|
||||||
PREVIEW = 'preview'
|
|
||||||
|
|
||||||
def __str__(self) -> str:
|
|
||||||
return str(self.value)
|
|
@ -0,0 +1,4 @@
|
|||||||
|
class StatusCode(int):
|
||||||
|
|
||||||
|
def __int__(self) -> int:
|
||||||
|
return self
|
||||||
|
@ -8,154 +8,154 @@ from ..types import UNSET, Unset
|
|||||||
|
|
||||||
T = TypeVar("T", bound="User")
|
T = TypeVar("T", bound="User")
|
||||||
|
|
||||||
|
|
||||||
@attr.s(auto_attribs=True)
|
@attr.s(auto_attribs=True)
|
||||||
class User:
|
class User:
|
||||||
""" """
|
""" """
|
||||||
company: Union[Unset, str] = UNSET
|
company: Union[Unset, str] = UNSET
|
||||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
discord: Union[Unset, str] = UNSET
|
discord: Union[Unset, str] = UNSET
|
||||||
email: Union[Unset, str] = UNSET
|
email: Union[Unset, str] = UNSET
|
||||||
email_verified: Union[Unset, datetime.datetime] = UNSET
|
email_verified: Union[Unset, datetime.datetime] = UNSET
|
||||||
first_name: Union[Unset, str] = UNSET
|
first_name: Union[Unset, str] = UNSET
|
||||||
github: Union[Unset, str] = UNSET
|
github: Union[Unset, str] = UNSET
|
||||||
id: Union[Unset, str] = UNSET
|
id: Union[Unset, str] = UNSET
|
||||||
image: Union[Unset, str] = UNSET
|
image: Union[Unset, str] = UNSET
|
||||||
last_name: Union[Unset, str] = UNSET
|
last_name: Union[Unset, str] = UNSET
|
||||||
name: Union[Unset, str] = UNSET
|
name: Union[Unset, str] = UNSET
|
||||||
phone: Union[Unset, str] = UNSET
|
phone: Union[Unset, str] = UNSET
|
||||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||||
|
|
||||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||||
|
|
||||||
def to_dict(self) -> Dict[str, Any]:
|
def to_dict(self) -> Dict[str, Any]:
|
||||||
company = self.company
|
company = self.company
|
||||||
created_at: Union[Unset, str] = UNSET
|
created_at: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.created_at, Unset):
|
if not isinstance(self.created_at, Unset):
|
||||||
created_at = self.created_at.isoformat()
|
created_at = self.created_at.isoformat()
|
||||||
discord = self.discord
|
discord = self.discord
|
||||||
email = self.email
|
email = self.email
|
||||||
email_verified: Union[Unset, str] = UNSET
|
email_verified: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.email_verified, Unset):
|
if not isinstance(self.email_verified, Unset):
|
||||||
email_verified = self.email_verified.isoformat()
|
email_verified = self.email_verified.isoformat()
|
||||||
first_name = self.first_name
|
first_name = self.first_name
|
||||||
github = self.github
|
github = self.github
|
||||||
id = self.id
|
id = self.id
|
||||||
image = self.image
|
image = self.image
|
||||||
last_name = self.last_name
|
last_name = self.last_name
|
||||||
name = self.name
|
name = self.name
|
||||||
phone = self.phone
|
phone = self.phone
|
||||||
updated_at: Union[Unset, str] = UNSET
|
updated_at: Union[Unset, str] = UNSET
|
||||||
if not isinstance(self.updated_at, Unset):
|
if not isinstance(self.updated_at, Unset):
|
||||||
updated_at = self.updated_at.isoformat()
|
updated_at = self.updated_at.isoformat()
|
||||||
|
|
||||||
field_dict: Dict[str, Any] = {}
|
field_dict: Dict[str, Any] = {}
|
||||||
field_dict.update(self.additional_properties)
|
field_dict.update(self.additional_properties)
|
||||||
field_dict.update({})
|
field_dict.update({})
|
||||||
if company is not UNSET:
|
if company is not UNSET:
|
||||||
field_dict['company'] = company
|
field_dict['company'] = company
|
||||||
if created_at is not UNSET:
|
if created_at is not UNSET:
|
||||||
field_dict['created_at'] = created_at
|
field_dict['created_at'] = created_at
|
||||||
if discord is not UNSET:
|
if discord is not UNSET:
|
||||||
field_dict['discord'] = discord
|
field_dict['discord'] = discord
|
||||||
if email is not UNSET:
|
if email is not UNSET:
|
||||||
field_dict['email'] = email
|
field_dict['email'] = email
|
||||||
if email_verified is not UNSET:
|
if email_verified is not UNSET:
|
||||||
field_dict['email_verified'] = email_verified
|
field_dict['email_verified'] = email_verified
|
||||||
if first_name is not UNSET:
|
if first_name is not UNSET:
|
||||||
field_dict['first_name'] = first_name
|
field_dict['first_name'] = first_name
|
||||||
if github is not UNSET:
|
if github is not UNSET:
|
||||||
field_dict['github'] = github
|
field_dict['github'] = github
|
||||||
if id is not UNSET:
|
if id is not UNSET:
|
||||||
field_dict['id'] = id
|
field_dict['id'] = id
|
||||||
if image is not UNSET:
|
if image is not UNSET:
|
||||||
field_dict['image'] = image
|
field_dict['image'] = image
|
||||||
if last_name is not UNSET:
|
if last_name is not UNSET:
|
||||||
field_dict['last_name'] = last_name
|
field_dict['last_name'] = last_name
|
||||||
if name is not UNSET:
|
if name is not UNSET:
|
||||||
field_dict['name'] = name
|
field_dict['name'] = name
|
||||||
if phone is not UNSET:
|
if phone is not UNSET:
|
||||||
field_dict['phone'] = phone
|
field_dict['phone'] = phone
|
||||||
if updated_at is not UNSET:
|
if updated_at is not UNSET:
|
||||||
field_dict['updated_at'] = updated_at
|
field_dict['updated_at'] = updated_at
|
||||||
|
|
||||||
return field_dict
|
return field_dict
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||||
d = src_dict.copy()
|
d = src_dict.copy()
|
||||||
company = d.pop("company", UNSET)
|
company = d.pop("company", UNSET)
|
||||||
|
|
||||||
_created_at = d.pop("created_at", UNSET)
|
_created_at = d.pop("created_at", UNSET)
|
||||||
created_at: Union[Unset, datetime.datetime]
|
created_at: Union[Unset, datetime.datetime]
|
||||||
if isinstance(_created_at, Unset):
|
if isinstance(_created_at, Unset):
|
||||||
created_at = UNSET
|
created_at = UNSET
|
||||||
else:
|
else:
|
||||||
created_at = isoparse(_created_at)
|
created_at = isoparse(_created_at)
|
||||||
|
|
||||||
discord = d.pop("discord", UNSET)
|
discord = d.pop("discord", UNSET)
|
||||||
|
|
||||||
email = d.pop("email", UNSET)
|
email = d.pop("email", UNSET)
|
||||||
|
|
||||||
_email_verified = d.pop("email_verified", UNSET)
|
_email_verified = d.pop("email_verified", UNSET)
|
||||||
email_verified: Union[Unset, datetime.datetime]
|
email_verified: Union[Unset, datetime.datetime]
|
||||||
if isinstance(_email_verified, Unset):
|
if isinstance(_email_verified, Unset):
|
||||||
email_verified = UNSET
|
email_verified = UNSET
|
||||||
else:
|
else:
|
||||||
email_verified = isoparse(_email_verified)
|
email_verified = isoparse(_email_verified)
|
||||||
|
|
||||||
first_name = d.pop("first_name", UNSET)
|
first_name = d.pop("first_name", UNSET)
|
||||||
|
|
||||||
github = d.pop("github", UNSET)
|
github = d.pop("github", UNSET)
|
||||||
|
|
||||||
id = d.pop("id", UNSET)
|
id = d.pop("id", UNSET)
|
||||||
|
|
||||||
image = d.pop("image", UNSET)
|
image = d.pop("image", UNSET)
|
||||||
|
|
||||||
last_name = d.pop("last_name", UNSET)
|
last_name = d.pop("last_name", UNSET)
|
||||||
|
|
||||||
name = d.pop("name", UNSET)
|
name = d.pop("name", UNSET)
|
||||||
|
|
||||||
phone = d.pop("phone", UNSET)
|
phone = d.pop("phone", UNSET)
|
||||||
|
|
||||||
_updated_at = d.pop("updated_at", UNSET)
|
_updated_at = d.pop("updated_at", UNSET)
|
||||||
updated_at: Union[Unset, datetime.datetime]
|
updated_at: Union[Unset, datetime.datetime]
|
||||||
if isinstance(_updated_at, Unset):
|
if isinstance(_updated_at, Unset):
|
||||||
updated_at = UNSET
|
updated_at = UNSET
|
||||||
else:
|
else:
|
||||||
updated_at = isoparse(_updated_at)
|
updated_at = isoparse(_updated_at)
|
||||||
|
|
||||||
user = cls(
|
|
||||||
company=company,
|
|
||||||
created_at=created_at,
|
|
||||||
discord=discord,
|
|
||||||
email=email,
|
|
||||||
email_verified=email_verified,
|
|
||||||
first_name=first_name,
|
|
||||||
github=github,
|
|
||||||
id=id,
|
|
||||||
image=image,
|
|
||||||
last_name=last_name,
|
|
||||||
name=name,
|
|
||||||
phone=phone,
|
|
||||||
updated_at=updated_at,
|
|
||||||
)
|
|
||||||
|
|
||||||
user.additional_properties = d
|
user = cls(
|
||||||
return user
|
company= company,
|
||||||
|
created_at= created_at,
|
||||||
|
discord= discord,
|
||||||
|
email= email,
|
||||||
|
email_verified= email_verified,
|
||||||
|
first_name= first_name,
|
||||||
|
github= github,
|
||||||
|
id= id,
|
||||||
|
image= image,
|
||||||
|
last_name= last_name,
|
||||||
|
name= name,
|
||||||
|
phone= phone,
|
||||||
|
updated_at= updated_at,
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
user.additional_properties = d
|
||||||
def additional_keys(self) -> List[str]:
|
return user
|
||||||
return list(self.additional_properties.keys())
|
|
||||||
|
|
||||||
def __getitem__(self, key: str) -> Any:
|
@property
|
||||||
return self.additional_properties[key]
|
def additional_keys(self) -> List[str]:
|
||||||
|
return list(self.additional_properties.keys())
|
||||||
|
|
||||||
def __setitem__(self, key: str, value: Any) -> None:
|
def __getitem__(self, key: str) -> Any:
|
||||||
self.additional_properties[key] = value
|
return self.additional_properties[key]
|
||||||
|
|
||||||
def __delitem__(self, key: str) -> None:
|
def __setitem__(self, key: str, value: Any) -> None:
|
||||||
del self.additional_properties[key]
|
self.additional_properties[key] = value
|
||||||
|
|
||||||
def __contains__(self, key: str) -> bool:
|
def __delitem__(self, key: str) -> None:
|
||||||
return key in self.additional_properties
|
del self.additional_properties[key]
|
||||||
|
|
||||||
|
def __contains__(self, key: str) -> bool:
|
||||||
|
return key in self.additional_properties
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
class Uuid(str):
|
||||||
|
|
||||||
|
def __str__(self) -> str:
|
||||||
|
return self
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
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)
|
|
@ -1,12 +0,0 @@
|
|||||||
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)
|
|
Reference in New Issue
Block a user