@ -81,12 +81,17 @@ def generatePaths(cwd: str, parser: dict) -> dict:
|
||||
data = parser
|
||||
paths = data['paths']
|
||||
for p in paths:
|
||||
for method in paths[p]:
|
||||
print('METHOD: ', method.upper())
|
||||
# Skip OPTIONS.
|
||||
if method.upper() != 'OPTIONS':
|
||||
endpoint = paths[p][method]
|
||||
data = generatePath(path, p, method, endpoint, data)
|
||||
# If p starts with /oauth2 we can skip it.
|
||||
# We don't care about generating methods for those.
|
||||
if p.startswith('/oauth2'):
|
||||
continue
|
||||
else:
|
||||
for method in paths[p]:
|
||||
print('METHOD: ', method.upper())
|
||||
# Skip OPTIONS.
|
||||
if method.upper() != 'OPTIONS':
|
||||
endpoint = paths[p][method]
|
||||
data = generatePath(path, p, method, endpoint, data)
|
||||
|
||||
return data
|
||||
|
||||
@ -115,7 +120,9 @@ def generatePath(
|
||||
request_body_refs = getRequestBodyRefs(endpoint)
|
||||
request_body_type = getRequestBodyType(endpoint)
|
||||
|
||||
success_type = endpoint_refs[0]
|
||||
success_type = ""
|
||||
if len(endpoint_refs) > 0:
|
||||
success_type = endpoint_refs[0]
|
||||
|
||||
if fn_name == 'get_file_conversion' or fn_name == 'create_file_conversion':
|
||||
fn_name += '_with_base64_helper'
|
||||
@ -349,8 +356,13 @@ response: Response[""" + success_type + """] = await """ + fn_name + """.asyncio
|
||||
f.write("\t\t]\n")
|
||||
else:
|
||||
raise Exception("Unknown array type")
|
||||
elif json['type'] == 'string':
|
||||
f.write(
|
||||
"\t\tresponse_" +
|
||||
response_code +
|
||||
" = response.text\n")
|
||||
else:
|
||||
raise Exception("Unknown type")
|
||||
raise Exception("Unknown type", json['type'])
|
||||
else:
|
||||
f.write(
|
||||
"\t\tresponse_" +
|
||||
@ -644,7 +656,7 @@ def generateType(path: str, name: str, schema: dict, data: dict):
|
||||
type_name = schema['type']
|
||||
if type_name == 'object':
|
||||
generateObjectType(file_path, name, schema, type_name, data)
|
||||
elif type_name == 'string' and 'enum' in schema:
|
||||
elif type_name == 'string' and 'enum' in schema and schema['enum'] != [None]:
|
||||
generateEnumType(file_path, name, schema, type_name)
|
||||
elif type_name == 'integer':
|
||||
generateIntegerType(file_path, name, schema, type_name)
|
||||
@ -719,9 +731,17 @@ def generateEnumType(path: str, name: str, schema: dict, type_name: str):
|
||||
f.write("class " + name + "(str, Enum):\n")
|
||||
# Iterate over the properties.
|
||||
for value in schema['enum']:
|
||||
enum_name = camel_to_screaming_snake(value)
|
||||
if enum_name == '':
|
||||
enum_name = 'EMPTY'
|
||||
elif enum_name == '1':
|
||||
enum_name = 'ONE'
|
||||
elif enum_name == '2':
|
||||
enum_name = 'TWO'
|
||||
|
||||
f.write(
|
||||
"\t" +
|
||||
camel_to_screaming_snake(value) +
|
||||
enum_name +
|
||||
" = '" +
|
||||
value +
|
||||
"'\n")
|
||||
@ -934,6 +954,16 @@ def renderTypeToDict(
|
||||
elif 'type' in property_schema['items']:
|
||||
if property_schema['items']['type'] == 'string':
|
||||
property_type = 'str'
|
||||
elif property_schema['items']['type'] == 'array':
|
||||
if 'items' in property_schema['items']:
|
||||
if property_schema['items']['items']['type'] == 'string':
|
||||
property_type = 'List[str]'
|
||||
else:
|
||||
print(" property: ", property_schema)
|
||||
raise Exception("Unknown property type")
|
||||
else:
|
||||
print(" property: ", property_schema)
|
||||
raise Exception("Unknown property type")
|
||||
else:
|
||||
print(" property: ", property_schema)
|
||||
raise Exception("Unknown property type")
|
||||
@ -1074,6 +1104,16 @@ def renderTypeInit(
|
||||
elif 'type' in property_schema['items']:
|
||||
if property_schema['items']['type'] == 'string':
|
||||
property_type = 'str'
|
||||
elif property_schema['items']['type'] == 'array':
|
||||
if 'items' in property_schema['items']:
|
||||
if property_schema['items']['items']['type'] == 'string':
|
||||
property_type = 'List[str]'
|
||||
else:
|
||||
print(" property: ", property_schema)
|
||||
raise Exception("Unknown property type")
|
||||
else:
|
||||
print(" property: ", property_schema)
|
||||
raise Exception("Unknown property type")
|
||||
else:
|
||||
print(" property: ", property_schema)
|
||||
raise Exception("Unknown property type")
|
||||
@ -1207,6 +1247,16 @@ def renderTypeFromDict(
|
||||
elif 'type' in property_schema['items']:
|
||||
if property_schema['items']['type'] == 'string':
|
||||
property_type = 'str'
|
||||
elif property_schema['items']['type'] == 'array':
|
||||
if 'items' in property_schema['items']:
|
||||
if property_schema['items']['items']['type'] == 'string':
|
||||
property_type = 'List[str]'
|
||||
else:
|
||||
print(" property: ", property_schema)
|
||||
raise Exception("Unknown property type")
|
||||
else:
|
||||
print(" property: ", property_schema)
|
||||
raise Exception("Unknown property type")
|
||||
else:
|
||||
raise Exception(
|
||||
" unknown array type: ",
|
||||
@ -1373,10 +1423,26 @@ def getEndpointRefs(endpoint: dict, data: dict) -> [str]:
|
||||
refs.append('[' + ref + ']')
|
||||
else:
|
||||
raise Exception("Unknown array type")
|
||||
elif json['type'] == 'string':
|
||||
refs.append('str')
|
||||
else:
|
||||
raise Exception("Unknown type ", json['type'])
|
||||
else:
|
||||
refs.append('dict')
|
||||
elif content_type == '*/*':
|
||||
s = content[content_type]['schema']
|
||||
if s == {}:
|
||||
# We don't care it's an empty body.
|
||||
continue
|
||||
else:
|
||||
# Throw an error for an unsupported content type.
|
||||
print("content: ", content)
|
||||
raise Exception(
|
||||
"Unsupported content type: ", content_type)
|
||||
else:
|
||||
# Throw an error for an unsupported content type.
|
||||
print("content: ", content)
|
||||
raise Exception("Unsupported content type: ", content_type)
|
||||
elif '$ref' in response:
|
||||
schema_name = response['$ref'].replace(
|
||||
'#/components/responses/', '')
|
||||
@ -1423,6 +1489,18 @@ def getRequestBodyRefs(endpoint: dict) -> [str]:
|
||||
if '$ref' in json:
|
||||
ref = json['$ref'].replace('#/components/schemas/', '')
|
||||
refs.append(ref)
|
||||
elif content_type == 'application/octet-stream':
|
||||
# do nothing we dont't care
|
||||
continue
|
||||
elif content_type == 'application/x-www-form-urlencoded':
|
||||
form = content[content_type]['schema']
|
||||
if '$ref' in form:
|
||||
ref = form['$ref'].replace('#/components/schemas/', '')
|
||||
refs.append(ref)
|
||||
else:
|
||||
# Throw an error for an unsupported content type.
|
||||
print("content: ", content)
|
||||
raise Exception("Unsupported content type: ", content_type)
|
||||
|
||||
return refs
|
||||
|
||||
@ -1444,6 +1522,11 @@ def getRequestBodyType(endpoint: dict) -> str:
|
||||
return 'bytes'
|
||||
elif content_type == 'application/octet-stream':
|
||||
return 'bytes'
|
||||
elif content_type == 'application/x-www-form-urlencoded':
|
||||
json = content[content_type]['schema']
|
||||
if '$ref' in json:
|
||||
ref = json['$ref'].replace('#/components/schemas/', '')
|
||||
return ref
|
||||
else:
|
||||
print(" unsupported content type: ", content_type)
|
||||
raise Exception("unsupported content type")
|
||||
@ -1470,6 +1553,8 @@ def camel_to_screaming_snake(name: str):
|
||||
' ',
|
||||
'').upper().replace(
|
||||
'-',
|
||||
'_').replace(
|
||||
':',
|
||||
'_')
|
||||
|
||||
|
||||
|
@ -6,14 +6,14 @@ from ...client import Client
|
||||
from ...models.async_api_call_results_page import AsyncApiCallResultsPage
|
||||
from ...models.error import Error
|
||||
from ...models.created_at_sort_mode import CreatedAtSortMode
|
||||
from ...models.api_call_status import APICallStatus
|
||||
from ...models.api_call_status import ApiCallStatus
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
status: APICallStatus,
|
||||
status: ApiCallStatus,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
@ -56,7 +56,7 @@ def sync_detailed(
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
status: APICallStatus,
|
||||
status: ApiCallStatus,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, AsyncApiCallResultsPage, Error]]:
|
||||
@ -80,7 +80,7 @@ def sync(
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
status: APICallStatus,
|
||||
status: ApiCallStatus,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, AsyncApiCallResultsPage, Error]]:
|
||||
@ -100,7 +100,7 @@ async def asyncio_detailed(
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
status: APICallStatus,
|
||||
status: ApiCallStatus,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, AsyncApiCallResultsPage, Error]]:
|
||||
@ -122,7 +122,7 @@ async def asyncio(
|
||||
limit: int,
|
||||
page_token: str,
|
||||
sort_by: CreatedAtSortMode,
|
||||
status: APICallStatus,
|
||||
status: ApiCallStatus,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, AsyncApiCallResultsPage, Error]]:
|
||||
|
108
kittycad/api/hidden/listen_auth_email.py
Normal file
108
kittycad/api/hidden/listen_auth_email.py
Normal file
@ -0,0 +1,108 @@
|
||||
from typing import Any, Dict, Optional, Union, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.error import Error
|
||||
from ...models.email_authentication_form import EmailAuthenticationForm
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
body: EmailAuthenticationForm,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/auth/email".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(),
|
||||
"content": body,
|
||||
}
|
||||
|
||||
|
||||
def _parse_response(*, response: httpx.Response) -> Optional[Union[Any, Error]]:
|
||||
if response.status_code == 204:
|
||||
response_204 = None
|
||||
return response_204
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
body: EmailAuthenticationForm,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.post(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
def sync(
|
||||
body: EmailAuthenticationForm,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, Error]]:
|
||||
|
||||
return sync_detailed(
|
||||
body=body,
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
body: EmailAuthenticationForm,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
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(
|
||||
body: EmailAuthenticationForm,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, Error]]:
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
125
kittycad/api/hidden/listen_auth_email_callback.py
Normal file
125
kittycad/api/hidden/listen_auth_email_callback.py
Normal file
@ -0,0 +1,125 @@
|
||||
from typing import Any, Dict, Optional, Union, cast
|
||||
|
||||
import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.empty import Empty
|
||||
from ...models.error import Error
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
callback_url: str,
|
||||
email: str,
|
||||
token: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/auth/email/callback?callback_url={callback_url}&email={email}&token={token}".format(client.base_url, callback_url=callback_url, email=email, token=token)
|
||||
|
||||
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, Empty, Error]]:
|
||||
if response.status_code == 302:
|
||||
response_302 = Empty.from_dict(response.json())
|
||||
return response_302
|
||||
if response.status_code == 400:
|
||||
response_4XX = Error.from_dict(response.json())
|
||||
return response_4XX
|
||||
if response.status_code == 500:
|
||||
response_5XX = Error.from_dict(response.json())
|
||||
return response_5XX
|
||||
return None
|
||||
|
||||
|
||||
def _build_response(*, response: httpx.Response) -> Response[Union[Any, Empty, Error]]:
|
||||
return Response(
|
||||
status_code=response.status_code,
|
||||
content=response.content,
|
||||
headers=response.headers,
|
||||
parsed=_parse_response(response=response),
|
||||
)
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
callback_url: str,
|
||||
email: str,
|
||||
token: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, Empty, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
callback_url=callback_url,
|
||||
email=email,
|
||||
token=token,
|
||||
client=client,
|
||||
)
|
||||
|
||||
response = httpx.get(
|
||||
verify=client.verify_ssl,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
return _build_response(response=response)
|
||||
|
||||
|
||||
def sync(
|
||||
callback_url: str,
|
||||
email: str,
|
||||
token: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, Empty, Error]]:
|
||||
|
||||
return sync_detailed(
|
||||
callback_url=callback_url,
|
||||
email=email,
|
||||
token=token,
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
callback_url: str,
|
||||
email: str,
|
||||
token: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, Empty, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
callback_url=callback_url,
|
||||
email=email,
|
||||
token=token,
|
||||
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(
|
||||
callback_url: str,
|
||||
email: str,
|
||||
token: str,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, Empty, Error]]:
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
callback_url=callback_url,
|
||||
email=email,
|
||||
token=token,
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
@ -4,15 +4,13 @@ import httpx
|
||||
|
||||
from ...client import Client
|
||||
from ...models.error import Error
|
||||
from ...models.login_params import LoginParams
|
||||
from ...types import Response
|
||||
|
||||
def _get_kwargs(
|
||||
body: LoginParams,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Dict[str, Any]:
|
||||
url = "{}/login".format(client.base_url)
|
||||
url = "{}/logout".format(client.base_url)
|
||||
|
||||
headers: Dict[str, Any] = client.get_headers()
|
||||
cookies: Dict[str, Any] = client.get_cookies()
|
||||
@ -22,7 +20,6 @@ def _get_kwargs(
|
||||
"headers": headers,
|
||||
"cookies": cookies,
|
||||
"timeout": client.get_timeout(),
|
||||
"content": body,
|
||||
}
|
||||
|
||||
|
||||
@ -49,12 +46,10 @@ def _build_response(*, response: httpx.Response) -> Response[Union[Any, Error]]:
|
||||
|
||||
|
||||
def sync_detailed(
|
||||
body: LoginParams,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -67,24 +62,21 @@ def sync_detailed(
|
||||
|
||||
|
||||
def sync(
|
||||
body: LoginParams,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, Error]]:
|
||||
""" This is used in logout scenarios. """
|
||||
|
||||
return sync_detailed(
|
||||
body=body,
|
||||
client=client,
|
||||
).parsed
|
||||
|
||||
|
||||
async def asyncio_detailed(
|
||||
body: LoginParams,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Response[Union[Any, Error]]:
|
||||
kwargs = _get_kwargs(
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
|
||||
@ -95,14 +87,13 @@ async def asyncio_detailed(
|
||||
|
||||
|
||||
async def asyncio(
|
||||
body: LoginParams,
|
||||
*,
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, Error]]:
|
||||
""" This is used in logout scenarios. """
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
body=body,
|
||||
client=client,
|
||||
)
|
||||
).parsed
|
1
kittycad/api/oauth2/__init__.py
Normal file
1
kittycad/api/oauth2/__init__.py
Normal file
@ -0,0 +1 @@
|
||||
""" Contains methods for accessing the oauth2 API paths: Endpoints that implement OAuth 2.0 grant flows. """
|
@ -67,7 +67,7 @@ def sync(
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, ExtendedUser, Error]]:
|
||||
""" Get the user information for the authenticated user.
|
||||
Alternatively, you can also use the `/users/me` endpoint. """
|
||||
Alternatively, you can also use the `/users-extended/me` endpoint. """
|
||||
|
||||
return sync_detailed(
|
||||
client=client,
|
||||
@ -93,7 +93,7 @@ async def asyncio(
|
||||
client: Client,
|
||||
) -> Optional[Union[Any, ExtendedUser, Error]]:
|
||||
""" Get the user information for the authenticated user.
|
||||
Alternatively, you can also use the `/users/me` endpoint. """
|
||||
Alternatively, you can also use the `/users-extended/me` endpoint. """
|
||||
|
||||
return (
|
||||
await asyncio_detailed(
|
||||
|
@ -1,30 +1,40 @@
|
||||
""" Contains all the data models used in inputs/outputs """
|
||||
|
||||
from .api_call_status import APICallStatus
|
||||
from .account_provider import AccountProvider
|
||||
from .address import Address
|
||||
from .api_call_query_group import ApiCallQueryGroup
|
||||
from .api_call_query_group_by import ApiCallQueryGroupBy
|
||||
from .api_call_status import ApiCallStatus
|
||||
from .api_call_with_price import ApiCallWithPrice
|
||||
from .api_call_with_price_results_page import ApiCallWithPriceResultsPage
|
||||
from .api_token import ApiToken
|
||||
from .api_token_results_page import ApiTokenResultsPage
|
||||
from .async_api_call_type import AsyncAPICallType
|
||||
from .async_api_call import AsyncApiCall
|
||||
from .async_api_call_results_page import AsyncApiCallResultsPage
|
||||
from .async_api_call_type import AsyncApiCallType
|
||||
from .base64_data import Base64Data
|
||||
from .billing_info import BillingInfo
|
||||
from .cache_metadata import CacheMetadata
|
||||
from .card_details import CardDetails
|
||||
from .cluster import Cluster
|
||||
from .code_language import CodeLanguage
|
||||
from .code_output import CodeOutput
|
||||
from .commit import Commit
|
||||
from .connection import Connection
|
||||
from .created_at_sort_mode import CreatedAtSortMode
|
||||
from .currency import Currency
|
||||
from .customer import Customer
|
||||
from .device_access_token_request_form import DeviceAccessTokenRequestForm
|
||||
from .device_auth_request_form import DeviceAuthRequestForm
|
||||
from .device_auth_verify_params import DeviceAuthVerifyParams
|
||||
from .docker_system_info import DockerSystemInfo
|
||||
from .duration import Duration
|
||||
from .email_authentication_form import EmailAuthenticationForm
|
||||
from .empty import Empty
|
||||
from .engine_metadata import EngineMetadata
|
||||
from .environment import Environment
|
||||
from .error import Error
|
||||
from .executor_metadata import ExecutorMetadata
|
||||
from .extended_user import ExtendedUser
|
||||
from .extended_user_results_page import ExtendedUserResultsPage
|
||||
from .file_conversion import FileConversion
|
||||
@ -35,27 +45,37 @@ from .file_source_format import FileSourceFormat
|
||||
from .file_system_metadata import FileSystemMetadata
|
||||
from .file_volume import FileVolume
|
||||
from .gateway import Gateway
|
||||
from .index_info import IndexInfo
|
||||
from .invoice import Invoice
|
||||
from .invoice_line_item import InvoiceLineItem
|
||||
from .invoice_status import InvoiceStatus
|
||||
from .ip_addr import IpAddr
|
||||
from .jetstream import Jetstream
|
||||
from .jetstream_api_stats import JetstreamApiStats
|
||||
from .jetstream_config import JetstreamConfig
|
||||
from .jetstream_stats import JetstreamStats
|
||||
from .leaf_node import LeafNode
|
||||
from .login_params import LoginParams
|
||||
from .meta_cluster_info import MetaClusterInfo
|
||||
from .metadata import Metadata
|
||||
from .method import Method
|
||||
from .o_auth2_client_info import OAuth2ClientInfo
|
||||
from .o_auth2_grant_type import OAuth2GrantType
|
||||
from .output_file import OutputFile
|
||||
from .payment_intent import PaymentIntent
|
||||
from .payment_method import PaymentMethod
|
||||
from .payment_method_card_checks import PaymentMethodCardChecks
|
||||
from .payment_method_type import PaymentMethodType
|
||||
from .phone_number import PhoneNumber
|
||||
from .plugins_info import PluginsInfo
|
||||
from .pong import Pong
|
||||
from .registry_service_config import RegistryServiceConfig
|
||||
from .runtime import Runtime
|
||||
from .session import Session
|
||||
from .status_code import StatusCode
|
||||
from .system_info_cgroup_driver_enum import SystemInfoCgroupDriverEnum
|
||||
from .system_info_cgroup_version_enum import SystemInfoCgroupVersionEnum
|
||||
from .system_info_default_address_pools import SystemInfoDefaultAddressPools
|
||||
from .system_info_isolation_enum import SystemInfoIsolationEnum
|
||||
from .unit_conversion import UnitConversion
|
||||
from .unit_metric_format import UnitMetricFormat
|
||||
from .update_user import UpdateUser
|
||||
|
9
kittycad/models/account_provider.py
Normal file
9
kittycad/models/account_provider.py
Normal file
@ -0,0 +1,9 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class AccountProvider(str, Enum):
|
||||
GOOGLE = 'google'
|
||||
GITHUB = 'github'
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
@ -1,7 +1,7 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class APICallStatus(str, Enum):
|
||||
class ApiCallStatus(str, Enum):
|
||||
QUEUED = 'Queued'
|
||||
UPLOADED = 'Uploaded'
|
||||
IN_PROGRESS = 'In Progress'
|
||||
|
@ -4,7 +4,9 @@ from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
import attr
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
from ..models.duration import Duration
|
||||
from ..models.uuid import Uuid
|
||||
from ..models.ip_addr import IpAddr
|
||||
from ..models.method import Method
|
||||
from ..models.status_code import StatusCode
|
||||
from ..types import UNSET, Unset
|
||||
@ -17,11 +19,11 @@ class ApiCallWithPrice:
|
||||
""" """
|
||||
completed_at: Union[Unset, datetime.datetime] = UNSET
|
||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||
duration: Union[Unset, int] = UNSET
|
||||
duration: Union[Unset, Duration] = UNSET
|
||||
email: Union[Unset, str] = UNSET
|
||||
endpoint: Union[Unset, str] = UNSET
|
||||
id: Union[Unset, str] = UNSET
|
||||
ip_address: Union[Unset, str] = UNSET
|
||||
ip_address: Union[Unset, IpAddr] = UNSET
|
||||
method: Union[Unset, Method] = UNSET
|
||||
minutes: Union[Unset, int] = UNSET
|
||||
origin: Union[Unset, str] = UNSET
|
||||
@ -46,11 +48,15 @@ class ApiCallWithPrice:
|
||||
created_at: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.created_at, Unset):
|
||||
created_at = self.created_at.isoformat()
|
||||
duration = self.duration
|
||||
duration: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.duration, Unset):
|
||||
duration = self.duration.value
|
||||
email = self.email
|
||||
endpoint = self.endpoint
|
||||
id = self.id
|
||||
ip_address = self.ip_address
|
||||
ip_address: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.ip_address, Unset):
|
||||
ip_address = self.ip_address.value
|
||||
method: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.method, Unset):
|
||||
method = self.method.value
|
||||
@ -139,7 +145,12 @@ class ApiCallWithPrice:
|
||||
else:
|
||||
created_at = isoparse(_created_at)
|
||||
|
||||
duration = d.pop("duration", UNSET)
|
||||
_duration = d.pop("duration", UNSET)
|
||||
duration: Union[Unset, Duration]
|
||||
if isinstance(_duration, Unset):
|
||||
duration = UNSET
|
||||
else:
|
||||
duration = Duration(_duration)
|
||||
|
||||
email = d.pop("email", UNSET)
|
||||
|
||||
@ -147,7 +158,12 @@ class ApiCallWithPrice:
|
||||
|
||||
id = d.pop("id", UNSET)
|
||||
|
||||
ip_address = d.pop("ip_address", UNSET)
|
||||
_ip_address = d.pop("ip_address", UNSET)
|
||||
ip_address: Union[Unset, IpAddr]
|
||||
if isinstance(_ip_address, Unset):
|
||||
ip_address = UNSET
|
||||
else:
|
||||
ip_address = IpAddr(_ip_address)
|
||||
|
||||
_method = d.pop("method", UNSET)
|
||||
method: Union[Unset, Method]
|
||||
|
@ -5,8 +5,8 @@ import attr
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
from ..models.uuid import Uuid
|
||||
from ..models.api_call_status import APICallStatus
|
||||
from ..models.async_api_call_type import AsyncAPICallType
|
||||
from ..models.api_call_status import ApiCallStatus
|
||||
from ..models.async_api_call_type import AsyncApiCallType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="AsyncApiCall")
|
||||
@ -22,8 +22,8 @@ class AsyncApiCall:
|
||||
input: Union[Unset, Any] = UNSET
|
||||
output: Union[Unset, Any] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, APICallStatus] = UNSET
|
||||
type: Union[Unset, AsyncAPICallType] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
type: Union[Unset, AsyncApiCallType] = UNSET
|
||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||
user_id: Union[Unset, str] = UNSET
|
||||
worker: Union[Unset, str] = UNSET
|
||||
@ -117,18 +117,18 @@ class AsyncApiCall:
|
||||
started_at = isoparse(_started_at)
|
||||
|
||||
_status = d.pop("status", UNSET)
|
||||
status: Union[Unset, APICallStatus]
|
||||
status: Union[Unset, ApiCallStatus]
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = APICallStatus(_status)
|
||||
status = ApiCallStatus(_status)
|
||||
|
||||
_type = d.pop("type", UNSET)
|
||||
type: Union[Unset, AsyncAPICallType]
|
||||
type: Union[Unset, AsyncApiCallType]
|
||||
if isinstance(_type, Unset):
|
||||
type = UNSET
|
||||
else:
|
||||
type = AsyncAPICallType(_type)
|
||||
type = AsyncApiCallType(_type)
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_at: Union[Unset, datetime.datetime]
|
||||
|
@ -1,7 +1,7 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class AsyncAPICallType(str, Enum):
|
||||
class AsyncApiCallType(str, Enum):
|
||||
FILE_CONVERSION = 'FileConversion'
|
||||
FILE_VOLUME = 'FileVolume'
|
||||
FILE_MASS = 'FileMass'
|
||||
|
4
kittycad/models/base64_data.py
Normal file
4
kittycad/models/base64_data.py
Normal file
@ -0,0 +1,4 @@
|
||||
class Base64Data(str):
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self
|
@ -3,7 +3,6 @@ from enum import Enum
|
||||
|
||||
class CodeLanguage(str, Enum):
|
||||
GO = 'go'
|
||||
RUST = 'rust'
|
||||
PYTHON = 'python'
|
||||
NODE = 'node'
|
||||
|
||||
|
61
kittycad/models/commit.py
Normal file
61
kittycad/models/commit.py
Normal file
@ -0,0 +1,61 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="Commit")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Commit:
|
||||
""" """
|
||||
expected: Union[Unset, str] = UNSET
|
||||
id: Union[Unset, str] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
expected = self.expected
|
||||
id = self.id
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if expected is not UNSET:
|
||||
field_dict['expected'] = expected
|
||||
if id is not UNSET:
|
||||
field_dict['id'] = id
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
expected = d.pop("expected", UNSET)
|
||||
|
||||
id = d.pop("id", UNSET)
|
||||
|
||||
commit = cls(
|
||||
expected=expected,
|
||||
id=id,
|
||||
)
|
||||
|
||||
commit.additional_properties = d
|
||||
return commit
|
||||
|
||||
@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,7 +8,6 @@ from ..models.cluster import Cluster
|
||||
from ..models.gateway import Gateway
|
||||
from ..models.jetstream import Jetstream
|
||||
from ..models.leaf_node import LeafNode
|
||||
from ..models.duration import Duration
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="Connection")
|
||||
@ -33,10 +32,8 @@ class Connection:
|
||||
http_port: Union[Unset, int] = UNSET
|
||||
http_req_stats: Union[Unset, Any] = UNSET
|
||||
https_port: Union[Unset, int] = UNSET
|
||||
id: Union[Unset, int] = UNSET
|
||||
in_bytes: Union[Unset, int] = UNSET
|
||||
in_msgs: Union[Unset, int] = UNSET
|
||||
ip: Union[Unset, str] = UNSET
|
||||
jetstream: Union[Unset, Jetstream] = UNSET
|
||||
leaf: Union[Unset, LeafNode] = UNSET
|
||||
leafnodes: Union[Unset, int] = UNSET
|
||||
@ -54,7 +51,6 @@ class Connection:
|
||||
proto: Union[Unset, int] = UNSET
|
||||
remotes: Union[Unset, int] = UNSET
|
||||
routes: Union[Unset, int] = UNSET
|
||||
rtt: Union[Unset, Duration] = UNSET
|
||||
server_id: Union[Unset, str] = UNSET
|
||||
server_name: Union[Unset, str] = UNSET
|
||||
slow_consumers: Union[Unset, int] = UNSET
|
||||
@ -92,10 +88,8 @@ class Connection:
|
||||
http_port = self.http_port
|
||||
http_req_stats = self.http_req_stats
|
||||
https_port = self.https_port
|
||||
id = self.id
|
||||
in_bytes = self.in_bytes
|
||||
in_msgs = self.in_msgs
|
||||
ip = self.ip
|
||||
jetstream: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.jetstream, Unset):
|
||||
jetstream = self.jetstream.value
|
||||
@ -119,9 +113,6 @@ class Connection:
|
||||
proto = self.proto
|
||||
remotes = self.remotes
|
||||
routes = self.routes
|
||||
rtt: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.rtt, Unset):
|
||||
rtt = self.rtt.value
|
||||
server_id = self.server_id
|
||||
server_name = self.server_name
|
||||
slow_consumers = self.slow_consumers
|
||||
@ -171,14 +162,10 @@ class Connection:
|
||||
field_dict['http_req_stats'] = http_req_stats
|
||||
if https_port is not UNSET:
|
||||
field_dict['https_port'] = https_port
|
||||
if id is not UNSET:
|
||||
field_dict['id'] = id
|
||||
if in_bytes is not UNSET:
|
||||
field_dict['in_bytes'] = in_bytes
|
||||
if in_msgs is not UNSET:
|
||||
field_dict['in_msgs'] = in_msgs
|
||||
if ip is not UNSET:
|
||||
field_dict['ip'] = ip
|
||||
if jetstream is not UNSET:
|
||||
field_dict['jetstream'] = jetstream
|
||||
if leaf is not UNSET:
|
||||
@ -213,8 +200,6 @@ class Connection:
|
||||
field_dict['remotes'] = remotes
|
||||
if routes is not UNSET:
|
||||
field_dict['routes'] = routes
|
||||
if rtt is not UNSET:
|
||||
field_dict['rtt'] = rtt
|
||||
if server_id is not UNSET:
|
||||
field_dict['server_id'] = server_id
|
||||
if server_name is not UNSET:
|
||||
@ -289,14 +274,10 @@ class Connection:
|
||||
http_req_stats = d.pop("http_req_stats", UNSET)
|
||||
https_port = d.pop("https_port", UNSET)
|
||||
|
||||
id = d.pop("id", UNSET)
|
||||
|
||||
in_bytes = d.pop("in_bytes", UNSET)
|
||||
|
||||
in_msgs = d.pop("in_msgs", UNSET)
|
||||
|
||||
ip = d.pop("ip", UNSET)
|
||||
|
||||
_jetstream = d.pop("jetstream", UNSET)
|
||||
jetstream: Union[Unset, Jetstream]
|
||||
if isinstance(_jetstream, Unset):
|
||||
@ -346,13 +327,6 @@ class Connection:
|
||||
|
||||
routes = d.pop("routes", UNSET)
|
||||
|
||||
_rtt = d.pop("rtt", UNSET)
|
||||
rtt: Union[Unset, Duration]
|
||||
if isinstance(_rtt, Unset):
|
||||
rtt = UNSET
|
||||
else:
|
||||
rtt = Duration(_rtt)
|
||||
|
||||
server_id = d.pop("server_id", UNSET)
|
||||
|
||||
server_name = d.pop("server_name", UNSET)
|
||||
@ -397,10 +371,8 @@ class Connection:
|
||||
http_port=http_port,
|
||||
http_req_stats=http_req_stats,
|
||||
https_port=https_port,
|
||||
id=id,
|
||||
in_bytes=in_bytes,
|
||||
in_msgs=in_msgs,
|
||||
ip=ip,
|
||||
jetstream=jetstream,
|
||||
leaf=leaf,
|
||||
leafnodes=leafnodes,
|
||||
@ -418,7 +390,6 @@ class Connection:
|
||||
proto=proto,
|
||||
remotes=remotes,
|
||||
routes=routes,
|
||||
rtt=rtt,
|
||||
server_id=server_id,
|
||||
server_name=server_name,
|
||||
slow_consumers=slow_consumers,
|
||||
|
76
kittycad/models/device_access_token_request_form.py
Normal file
76
kittycad/models/device_access_token_request_form.py
Normal file
@ -0,0 +1,76 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.o_auth2_grant_type import OAuth2GrantType
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="DeviceAccessTokenRequestForm")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class DeviceAccessTokenRequestForm:
|
||||
""" """
|
||||
client_id: Union[Unset, str] = UNSET
|
||||
device_code: Union[Unset, str] = UNSET
|
||||
grant_type: Union[Unset, OAuth2GrantType] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
client_id = self.client_id
|
||||
device_code = self.device_code
|
||||
grant_type: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.grant_type, Unset):
|
||||
grant_type = self.grant_type.value
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if client_id is not UNSET:
|
||||
field_dict['client_id'] = client_id
|
||||
if device_code is not UNSET:
|
||||
field_dict['device_code'] = device_code
|
||||
if grant_type is not UNSET:
|
||||
field_dict['grant_type'] = grant_type
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
client_id = d.pop("client_id", UNSET)
|
||||
|
||||
device_code = d.pop("device_code", UNSET)
|
||||
|
||||
_grant_type = d.pop("grant_type", UNSET)
|
||||
grant_type: Union[Unset, OAuth2GrantType]
|
||||
if isinstance(_grant_type, Unset):
|
||||
grant_type = UNSET
|
||||
else:
|
||||
grant_type = OAuth2GrantType(_grant_type)
|
||||
|
||||
device_access_token_request_form = cls(
|
||||
client_id=client_id,
|
||||
device_code=device_code,
|
||||
grant_type=grant_type,
|
||||
)
|
||||
|
||||
device_access_token_request_form.additional_properties = d
|
||||
return device_access_token_request_form
|
||||
|
||||
@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
|
@ -4,38 +4,38 @@ import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="LoginParams")
|
||||
T = TypeVar("T", bound="DeviceAuthRequestForm")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class LoginParams:
|
||||
class DeviceAuthRequestForm:
|
||||
""" """
|
||||
session: Union[Unset, str] = UNSET
|
||||
client_id: Union[Unset, str] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
session = self.session
|
||||
client_id = self.client_id
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if session is not UNSET:
|
||||
field_dict['session'] = session
|
||||
if client_id is not UNSET:
|
||||
field_dict['client_id'] = client_id
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
session = d.pop("session", UNSET)
|
||||
client_id = d.pop("client_id", UNSET)
|
||||
|
||||
login_params = cls(
|
||||
session=session,
|
||||
device_auth_request_form = cls(
|
||||
client_id=client_id,
|
||||
)
|
||||
|
||||
login_params.additional_properties = d
|
||||
return login_params
|
||||
device_auth_request_form.additional_properties = d
|
||||
return device_auth_request_form
|
||||
|
||||
@property
|
||||
def additional_keys(self) -> List[str]:
|
54
kittycad/models/device_auth_verify_params.py
Normal file
54
kittycad/models/device_auth_verify_params.py
Normal file
@ -0,0 +1,54 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="DeviceAuthVerifyParams")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class DeviceAuthVerifyParams:
|
||||
""" """
|
||||
user_code: Union[Unset, str] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
user_code = self.user_code
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if user_code is not UNSET:
|
||||
field_dict['user_code'] = user_code
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
user_code = d.pop("user_code", UNSET)
|
||||
|
||||
device_auth_verify_params = cls(
|
||||
user_code=user_code,
|
||||
)
|
||||
|
||||
device_auth_verify_params.additional_properties = d
|
||||
return device_auth_verify_params
|
||||
|
||||
@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
|
546
kittycad/models/docker_system_info.py
Normal file
546
kittycad/models/docker_system_info.py
Normal file
@ -0,0 +1,546 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.system_info_cgroup_driver_enum import SystemInfoCgroupDriverEnum
|
||||
from ..models.system_info_cgroup_version_enum import SystemInfoCgroupVersionEnum
|
||||
from ..models.commit import Commit
|
||||
from ..models.system_info_isolation_enum import SystemInfoIsolationEnum
|
||||
from ..models.plugins_info import PluginsInfo
|
||||
from ..models.registry_service_config import RegistryServiceConfig
|
||||
from ..models.runtime import Runtime
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="DockerSystemInfo")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class DockerSystemInfo:
|
||||
""" """
|
||||
architecture: Union[Unset, str] = UNSET
|
||||
bridge_nf_ip6tables: Union[Unset, bool] = False
|
||||
bridge_nf_iptables: Union[Unset, bool] = False
|
||||
cgroup_driver: Union[Unset, SystemInfoCgroupDriverEnum] = UNSET
|
||||
cgroup_version: Union[Unset, SystemInfoCgroupVersionEnum] = UNSET
|
||||
cluster_advertise: Union[Unset, str] = UNSET
|
||||
cluster_store: Union[Unset, str] = UNSET
|
||||
containerd_commit: Union[Unset, Commit] = UNSET
|
||||
containers: Union[Unset, int] = UNSET
|
||||
containers_paused: Union[Unset, int] = UNSET
|
||||
containers_running: Union[Unset, int] = UNSET
|
||||
containers_stopped: Union[Unset, int] = UNSET
|
||||
cpu_cfs_period: Union[Unset, bool] = False
|
||||
cpu_cfs_quota: Union[Unset, bool] = False
|
||||
cpu_set: Union[Unset, bool] = False
|
||||
cpu_shares: Union[Unset, bool] = False
|
||||
debug: Union[Unset, bool] = False
|
||||
from ..models.system_info_default_address_pools import SystemInfoDefaultAddressPools
|
||||
default_address_pools: Union[Unset,
|
||||
List[SystemInfoDefaultAddressPools]] = UNSET
|
||||
default_runtime: Union[Unset, str] = UNSET
|
||||
docker_root_dir: Union[Unset, str] = UNSET
|
||||
driver: Union[Unset, str] = UNSET
|
||||
driver_status: Union[Unset, List[List[str]]] = UNSET
|
||||
experimental_build: Union[Unset, bool] = False
|
||||
http_proxy: Union[Unset, str] = UNSET
|
||||
https_proxy: Union[Unset, str] = UNSET
|
||||
id: Union[Unset, str] = UNSET
|
||||
images: Union[Unset, int] = UNSET
|
||||
index_server_address: Union[Unset, str] = UNSET
|
||||
init_binary: Union[Unset, str] = UNSET
|
||||
init_commit: Union[Unset, Commit] = UNSET
|
||||
ipv4_forwarding: Union[Unset, bool] = False
|
||||
isolation: Union[Unset, SystemInfoIsolationEnum] = UNSET
|
||||
kernel_memory: Union[Unset, bool] = False
|
||||
kernel_memory_tcp: Union[Unset, bool] = False
|
||||
kernel_version: Union[Unset, str] = UNSET
|
||||
labels: Union[Unset, List[str]] = UNSET
|
||||
live_restore_enabled: Union[Unset, bool] = False
|
||||
logging_driver: Union[Unset, str] = UNSET
|
||||
mem_total: Union[Unset, int] = UNSET
|
||||
memory_limit: Union[Unset, bool] = False
|
||||
n_events_listener: Union[Unset, int] = UNSET
|
||||
n_fd: Union[Unset, int] = UNSET
|
||||
name: Union[Unset, str] = UNSET
|
||||
ncpu: Union[Unset, int] = UNSET
|
||||
no_proxy: Union[Unset, str] = UNSET
|
||||
oom_kill_disable: Union[Unset, bool] = False
|
||||
operating_system: Union[Unset, str] = UNSET
|
||||
os_type: Union[Unset, str] = UNSET
|
||||
os_version: Union[Unset, str] = UNSET
|
||||
pids_limit: Union[Unset, bool] = False
|
||||
plugins: Union[Unset, PluginsInfo] = UNSET
|
||||
product_license: Union[Unset, str] = UNSET
|
||||
registry_config: Union[Unset, RegistryServiceConfig] = UNSET
|
||||
runc_commit: Union[Unset, Commit] = UNSET
|
||||
runtimes: Union[Unset, Any] = UNSET
|
||||
security_options: Union[Unset, List[str]] = UNSET
|
||||
server_version: Union[Unset, str] = UNSET
|
||||
swap_limit: Union[Unset, bool] = False
|
||||
system_time: Union[Unset, str] = UNSET
|
||||
warnings: Union[Unset, List[str]] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
architecture = self.architecture
|
||||
bridge_nf_ip6tables = self.bridge_nf_ip6tables
|
||||
bridge_nf_iptables = self.bridge_nf_iptables
|
||||
cgroup_driver: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.cgroup_driver, Unset):
|
||||
cgroup_driver = self.cgroup_driver.value
|
||||
cgroup_version: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.cgroup_version, Unset):
|
||||
cgroup_version = self.cgroup_version.value
|
||||
cluster_advertise = self.cluster_advertise
|
||||
cluster_store = self.cluster_store
|
||||
containerd_commit: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.containerd_commit, Unset):
|
||||
containerd_commit = self.containerd_commit.value
|
||||
containers = self.containers
|
||||
containers_paused = self.containers_paused
|
||||
containers_running = self.containers_running
|
||||
containers_stopped = self.containers_stopped
|
||||
cpu_cfs_period = self.cpu_cfs_period
|
||||
cpu_cfs_quota = self.cpu_cfs_quota
|
||||
cpu_set = self.cpu_set
|
||||
cpu_shares = self.cpu_shares
|
||||
debug = self.debug
|
||||
from ..models.system_info_default_address_pools import SystemInfoDefaultAddressPools
|
||||
default_address_pools: Union[Unset,
|
||||
List[SystemInfoDefaultAddressPools]] = UNSET
|
||||
if not isinstance(self.default_address_pools, Unset):
|
||||
default_address_pools = self.default_address_pools
|
||||
default_runtime = self.default_runtime
|
||||
docker_root_dir = self.docker_root_dir
|
||||
driver = self.driver
|
||||
driver_status: Union[Unset, List[List[str]]] = UNSET
|
||||
if not isinstance(self.driver_status, Unset):
|
||||
driver_status = self.driver_status
|
||||
experimental_build = self.experimental_build
|
||||
http_proxy = self.http_proxy
|
||||
https_proxy = self.https_proxy
|
||||
id = self.id
|
||||
images = self.images
|
||||
index_server_address = self.index_server_address
|
||||
init_binary = self.init_binary
|
||||
init_commit: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.init_commit, Unset):
|
||||
init_commit = self.init_commit.value
|
||||
ipv4_forwarding = self.ipv4_forwarding
|
||||
isolation: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.isolation, Unset):
|
||||
isolation = self.isolation.value
|
||||
kernel_memory = self.kernel_memory
|
||||
kernel_memory_tcp = self.kernel_memory_tcp
|
||||
kernel_version = self.kernel_version
|
||||
labels: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.labels, Unset):
|
||||
labels = self.labels
|
||||
live_restore_enabled = self.live_restore_enabled
|
||||
logging_driver = self.logging_driver
|
||||
mem_total = self.mem_total
|
||||
memory_limit = self.memory_limit
|
||||
n_events_listener = self.n_events_listener
|
||||
n_fd = self.n_fd
|
||||
name = self.name
|
||||
ncpu = self.ncpu
|
||||
no_proxy = self.no_proxy
|
||||
oom_kill_disable = self.oom_kill_disable
|
||||
operating_system = self.operating_system
|
||||
os_type = self.os_type
|
||||
os_version = self.os_version
|
||||
pids_limit = self.pids_limit
|
||||
plugins: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.plugins, Unset):
|
||||
plugins = self.plugins.value
|
||||
product_license = self.product_license
|
||||
registry_config: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.registry_config, Unset):
|
||||
registry_config = self.registry_config.value
|
||||
runc_commit: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.runc_commit, Unset):
|
||||
runc_commit = self.runc_commit.value
|
||||
runtimes = self.runtimes
|
||||
security_options: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.security_options, Unset):
|
||||
security_options = self.security_options
|
||||
server_version = self.server_version
|
||||
swap_limit = self.swap_limit
|
||||
system_time = self.system_time
|
||||
warnings: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.warnings, Unset):
|
||||
warnings = self.warnings
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if architecture is not UNSET:
|
||||
field_dict['architecture'] = architecture
|
||||
if bridge_nf_ip6tables is not UNSET:
|
||||
field_dict['bridge_nf_ip6tables'] = bridge_nf_ip6tables
|
||||
if bridge_nf_iptables is not UNSET:
|
||||
field_dict['bridge_nf_iptables'] = bridge_nf_iptables
|
||||
if cgroup_driver is not UNSET:
|
||||
field_dict['cgroup_driver'] = cgroup_driver
|
||||
if cgroup_version is not UNSET:
|
||||
field_dict['cgroup_version'] = cgroup_version
|
||||
if cluster_advertise is not UNSET:
|
||||
field_dict['cluster_advertise'] = cluster_advertise
|
||||
if cluster_store is not UNSET:
|
||||
field_dict['cluster_store'] = cluster_store
|
||||
if containerd_commit is not UNSET:
|
||||
field_dict['containerd_commit'] = containerd_commit
|
||||
if containers is not UNSET:
|
||||
field_dict['containers'] = containers
|
||||
if containers_paused is not UNSET:
|
||||
field_dict['containers_paused'] = containers_paused
|
||||
if containers_running is not UNSET:
|
||||
field_dict['containers_running'] = containers_running
|
||||
if containers_stopped is not UNSET:
|
||||
field_dict['containers_stopped'] = containers_stopped
|
||||
if cpu_cfs_period is not UNSET:
|
||||
field_dict['cpu_cfs_period'] = cpu_cfs_period
|
||||
if cpu_cfs_quota is not UNSET:
|
||||
field_dict['cpu_cfs_quota'] = cpu_cfs_quota
|
||||
if cpu_set is not UNSET:
|
||||
field_dict['cpu_set'] = cpu_set
|
||||
if cpu_shares is not UNSET:
|
||||
field_dict['cpu_shares'] = cpu_shares
|
||||
if debug is not UNSET:
|
||||
field_dict['debug'] = debug
|
||||
if default_address_pools is not UNSET:
|
||||
field_dict['default_address_pools'] = default_address_pools
|
||||
if default_runtime is not UNSET:
|
||||
field_dict['default_runtime'] = default_runtime
|
||||
if docker_root_dir is not UNSET:
|
||||
field_dict['docker_root_dir'] = docker_root_dir
|
||||
if driver is not UNSET:
|
||||
field_dict['driver'] = driver
|
||||
if driver_status is not UNSET:
|
||||
field_dict['driver_status'] = driver_status
|
||||
if experimental_build is not UNSET:
|
||||
field_dict['experimental_build'] = experimental_build
|
||||
if http_proxy is not UNSET:
|
||||
field_dict['http_proxy'] = http_proxy
|
||||
if https_proxy is not UNSET:
|
||||
field_dict['https_proxy'] = https_proxy
|
||||
if id is not UNSET:
|
||||
field_dict['id'] = id
|
||||
if images is not UNSET:
|
||||
field_dict['images'] = images
|
||||
if index_server_address is not UNSET:
|
||||
field_dict['index_server_address'] = index_server_address
|
||||
if init_binary is not UNSET:
|
||||
field_dict['init_binary'] = init_binary
|
||||
if init_commit is not UNSET:
|
||||
field_dict['init_commit'] = init_commit
|
||||
if ipv4_forwarding is not UNSET:
|
||||
field_dict['ipv4_forwarding'] = ipv4_forwarding
|
||||
if isolation is not UNSET:
|
||||
field_dict['isolation'] = isolation
|
||||
if kernel_memory is not UNSET:
|
||||
field_dict['kernel_memory'] = kernel_memory
|
||||
if kernel_memory_tcp is not UNSET:
|
||||
field_dict['kernel_memory_tcp'] = kernel_memory_tcp
|
||||
if kernel_version is not UNSET:
|
||||
field_dict['kernel_version'] = kernel_version
|
||||
if labels is not UNSET:
|
||||
field_dict['labels'] = labels
|
||||
if live_restore_enabled is not UNSET:
|
||||
field_dict['live_restore_enabled'] = live_restore_enabled
|
||||
if logging_driver is not UNSET:
|
||||
field_dict['logging_driver'] = logging_driver
|
||||
if mem_total is not UNSET:
|
||||
field_dict['mem_total'] = mem_total
|
||||
if memory_limit is not UNSET:
|
||||
field_dict['memory_limit'] = memory_limit
|
||||
if n_events_listener is not UNSET:
|
||||
field_dict['n_events_listener'] = n_events_listener
|
||||
if n_fd is not UNSET:
|
||||
field_dict['n_fd'] = n_fd
|
||||
if name is not UNSET:
|
||||
field_dict['name'] = name
|
||||
if ncpu is not UNSET:
|
||||
field_dict['ncpu'] = ncpu
|
||||
if no_proxy is not UNSET:
|
||||
field_dict['no_proxy'] = no_proxy
|
||||
if oom_kill_disable is not UNSET:
|
||||
field_dict['oom_kill_disable'] = oom_kill_disable
|
||||
if operating_system is not UNSET:
|
||||
field_dict['operating_system'] = operating_system
|
||||
if os_type is not UNSET:
|
||||
field_dict['os_type'] = os_type
|
||||
if os_version is not UNSET:
|
||||
field_dict['os_version'] = os_version
|
||||
if pids_limit is not UNSET:
|
||||
field_dict['pids_limit'] = pids_limit
|
||||
if plugins is not UNSET:
|
||||
field_dict['plugins'] = plugins
|
||||
if product_license is not UNSET:
|
||||
field_dict['product_license'] = product_license
|
||||
if registry_config is not UNSET:
|
||||
field_dict['registry_config'] = registry_config
|
||||
if runc_commit is not UNSET:
|
||||
field_dict['runc_commit'] = runc_commit
|
||||
if runtimes is not UNSET:
|
||||
field_dict['runtimes'] = runtimes
|
||||
if security_options is not UNSET:
|
||||
field_dict['security_options'] = security_options
|
||||
if server_version is not UNSET:
|
||||
field_dict['server_version'] = server_version
|
||||
if swap_limit is not UNSET:
|
||||
field_dict['swap_limit'] = swap_limit
|
||||
if system_time is not UNSET:
|
||||
field_dict['system_time'] = system_time
|
||||
if warnings is not UNSET:
|
||||
field_dict['warnings'] = warnings
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
architecture = d.pop("architecture", UNSET)
|
||||
|
||||
bridge_nf_ip6tables = d.pop("bridge_nf_ip6tables", UNSET)
|
||||
|
||||
bridge_nf_iptables = d.pop("bridge_nf_iptables", UNSET)
|
||||
|
||||
_cgroup_driver = d.pop("cgroup_driver", UNSET)
|
||||
cgroup_driver: Union[Unset, SystemInfoCgroupDriverEnum]
|
||||
if isinstance(_cgroup_driver, Unset):
|
||||
cgroup_driver = UNSET
|
||||
else:
|
||||
cgroup_driver = SystemInfoCgroupDriverEnum(_cgroup_driver)
|
||||
|
||||
_cgroup_version = d.pop("cgroup_version", UNSET)
|
||||
cgroup_version: Union[Unset, SystemInfoCgroupVersionEnum]
|
||||
if isinstance(_cgroup_version, Unset):
|
||||
cgroup_version = UNSET
|
||||
else:
|
||||
cgroup_version = SystemInfoCgroupVersionEnum(_cgroup_version)
|
||||
|
||||
cluster_advertise = d.pop("cluster_advertise", UNSET)
|
||||
|
||||
cluster_store = d.pop("cluster_store", UNSET)
|
||||
|
||||
_containerd_commit = d.pop("containerd_commit", UNSET)
|
||||
containerd_commit: Union[Unset, Commit]
|
||||
if isinstance(_containerd_commit, Unset):
|
||||
containerd_commit = UNSET
|
||||
else:
|
||||
containerd_commit = Commit(_containerd_commit)
|
||||
|
||||
containers = d.pop("containers", UNSET)
|
||||
|
||||
containers_paused = d.pop("containers_paused", UNSET)
|
||||
|
||||
containers_running = d.pop("containers_running", UNSET)
|
||||
|
||||
containers_stopped = d.pop("containers_stopped", UNSET)
|
||||
|
||||
cpu_cfs_period = d.pop("cpu_cfs_period", UNSET)
|
||||
|
||||
cpu_cfs_quota = d.pop("cpu_cfs_quota", UNSET)
|
||||
|
||||
cpu_set = d.pop("cpu_set", UNSET)
|
||||
|
||||
cpu_shares = d.pop("cpu_shares", UNSET)
|
||||
|
||||
debug = d.pop("debug", UNSET)
|
||||
|
||||
from ..models.system_info_default_address_pools import SystemInfoDefaultAddressPools
|
||||
default_address_pools = cast(
|
||||
List[SystemInfoDefaultAddressPools], d.pop(
|
||||
"default_address_pools", UNSET))
|
||||
|
||||
default_runtime = d.pop("default_runtime", UNSET)
|
||||
|
||||
docker_root_dir = d.pop("docker_root_dir", UNSET)
|
||||
|
||||
driver = d.pop("driver", UNSET)
|
||||
|
||||
driver_status = cast(List[List[str]], d.pop("driver_status", UNSET))
|
||||
|
||||
experimental_build = d.pop("experimental_build", UNSET)
|
||||
|
||||
http_proxy = d.pop("http_proxy", UNSET)
|
||||
|
||||
https_proxy = d.pop("https_proxy", UNSET)
|
||||
|
||||
id = d.pop("id", UNSET)
|
||||
|
||||
images = d.pop("images", UNSET)
|
||||
|
||||
index_server_address = d.pop("index_server_address", UNSET)
|
||||
|
||||
init_binary = d.pop("init_binary", UNSET)
|
||||
|
||||
_init_commit = d.pop("init_commit", UNSET)
|
||||
init_commit: Union[Unset, Commit]
|
||||
if isinstance(_init_commit, Unset):
|
||||
init_commit = UNSET
|
||||
else:
|
||||
init_commit = Commit(_init_commit)
|
||||
|
||||
ipv4_forwarding = d.pop("ipv4_forwarding", UNSET)
|
||||
|
||||
_isolation = d.pop("isolation", UNSET)
|
||||
isolation: Union[Unset, SystemInfoIsolationEnum]
|
||||
if isinstance(_isolation, Unset):
|
||||
isolation = UNSET
|
||||
else:
|
||||
isolation = SystemInfoIsolationEnum(_isolation)
|
||||
|
||||
kernel_memory = d.pop("kernel_memory", UNSET)
|
||||
|
||||
kernel_memory_tcp = d.pop("kernel_memory_tcp", UNSET)
|
||||
|
||||
kernel_version = d.pop("kernel_version", UNSET)
|
||||
|
||||
labels = cast(List[str], d.pop("labels", UNSET))
|
||||
|
||||
live_restore_enabled = d.pop("live_restore_enabled", UNSET)
|
||||
|
||||
logging_driver = d.pop("logging_driver", UNSET)
|
||||
|
||||
mem_total = d.pop("mem_total", UNSET)
|
||||
|
||||
memory_limit = d.pop("memory_limit", UNSET)
|
||||
|
||||
n_events_listener = d.pop("n_events_listener", UNSET)
|
||||
|
||||
n_fd = d.pop("n_fd", UNSET)
|
||||
|
||||
name = d.pop("name", UNSET)
|
||||
|
||||
ncpu = d.pop("ncpu", UNSET)
|
||||
|
||||
no_proxy = d.pop("no_proxy", UNSET)
|
||||
|
||||
oom_kill_disable = d.pop("oom_kill_disable", UNSET)
|
||||
|
||||
operating_system = d.pop("operating_system", UNSET)
|
||||
|
||||
os_type = d.pop("os_type", UNSET)
|
||||
|
||||
os_version = d.pop("os_version", UNSET)
|
||||
|
||||
pids_limit = d.pop("pids_limit", UNSET)
|
||||
|
||||
_plugins = d.pop("plugins", UNSET)
|
||||
plugins: Union[Unset, PluginsInfo]
|
||||
if isinstance(_plugins, Unset):
|
||||
plugins = UNSET
|
||||
else:
|
||||
plugins = PluginsInfo(_plugins)
|
||||
|
||||
product_license = d.pop("product_license", UNSET)
|
||||
|
||||
_registry_config = d.pop("registry_config", UNSET)
|
||||
registry_config: Union[Unset, RegistryServiceConfig]
|
||||
if isinstance(_registry_config, Unset):
|
||||
registry_config = UNSET
|
||||
else:
|
||||
registry_config = RegistryServiceConfig(_registry_config)
|
||||
|
||||
_runc_commit = d.pop("runc_commit", UNSET)
|
||||
runc_commit: Union[Unset, Commit]
|
||||
if isinstance(_runc_commit, Unset):
|
||||
runc_commit = UNSET
|
||||
else:
|
||||
runc_commit = Commit(_runc_commit)
|
||||
|
||||
runtimes = d.pop("runtimes", UNSET)
|
||||
security_options = cast(List[str], d.pop("security_options", UNSET))
|
||||
|
||||
server_version = d.pop("server_version", UNSET)
|
||||
|
||||
swap_limit = d.pop("swap_limit", UNSET)
|
||||
|
||||
system_time = d.pop("system_time", UNSET)
|
||||
|
||||
warnings = cast(List[str], d.pop("warnings", UNSET))
|
||||
|
||||
docker_system_info = cls(
|
||||
architecture=architecture,
|
||||
bridge_nf_ip6tables=bridge_nf_ip6tables,
|
||||
bridge_nf_iptables=bridge_nf_iptables,
|
||||
cgroup_driver=cgroup_driver,
|
||||
cgroup_version=cgroup_version,
|
||||
cluster_advertise=cluster_advertise,
|
||||
cluster_store=cluster_store,
|
||||
containerd_commit=containerd_commit,
|
||||
containers=containers,
|
||||
containers_paused=containers_paused,
|
||||
containers_running=containers_running,
|
||||
containers_stopped=containers_stopped,
|
||||
cpu_cfs_period=cpu_cfs_period,
|
||||
cpu_cfs_quota=cpu_cfs_quota,
|
||||
cpu_set=cpu_set,
|
||||
cpu_shares=cpu_shares,
|
||||
debug=debug,
|
||||
default_address_pools=default_address_pools,
|
||||
default_runtime=default_runtime,
|
||||
docker_root_dir=docker_root_dir,
|
||||
driver=driver,
|
||||
driver_status=driver_status,
|
||||
experimental_build=experimental_build,
|
||||
http_proxy=http_proxy,
|
||||
https_proxy=https_proxy,
|
||||
id=id,
|
||||
images=images,
|
||||
index_server_address=index_server_address,
|
||||
init_binary=init_binary,
|
||||
init_commit=init_commit,
|
||||
ipv4_forwarding=ipv4_forwarding,
|
||||
isolation=isolation,
|
||||
kernel_memory=kernel_memory,
|
||||
kernel_memory_tcp=kernel_memory_tcp,
|
||||
kernel_version=kernel_version,
|
||||
labels=labels,
|
||||
live_restore_enabled=live_restore_enabled,
|
||||
logging_driver=logging_driver,
|
||||
mem_total=mem_total,
|
||||
memory_limit=memory_limit,
|
||||
n_events_listener=n_events_listener,
|
||||
n_fd=n_fd,
|
||||
name=name,
|
||||
ncpu=ncpu,
|
||||
no_proxy=no_proxy,
|
||||
oom_kill_disable=oom_kill_disable,
|
||||
operating_system=operating_system,
|
||||
os_type=os_type,
|
||||
os_version=os_version,
|
||||
pids_limit=pids_limit,
|
||||
plugins=plugins,
|
||||
product_license=product_license,
|
||||
registry_config=registry_config,
|
||||
runc_commit=runc_commit,
|
||||
runtimes=runtimes,
|
||||
security_options=security_options,
|
||||
server_version=server_version,
|
||||
swap_limit=swap_limit,
|
||||
system_time=system_time,
|
||||
warnings=warnings,
|
||||
)
|
||||
|
||||
docker_system_info.additional_properties = d
|
||||
return docker_system_info
|
||||
|
||||
@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
|
61
kittycad/models/email_authentication_form.py
Normal file
61
kittycad/models/email_authentication_form.py
Normal file
@ -0,0 +1,61 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="EmailAuthenticationForm")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class EmailAuthenticationForm:
|
||||
""" """
|
||||
callback_url: Union[Unset, str] = UNSET
|
||||
email: Union[Unset, str] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
callback_url = self.callback_url
|
||||
email = self.email
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if callback_url is not UNSET:
|
||||
field_dict['callback_url'] = callback_url
|
||||
if email is not UNSET:
|
||||
field_dict['email'] = email
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
callback_url = d.pop("callback_url", UNSET)
|
||||
|
||||
email = d.pop("email", UNSET)
|
||||
|
||||
email_authentication_form = cls(
|
||||
callback_url=callback_url,
|
||||
email=email,
|
||||
)
|
||||
|
||||
email_authentication_form.additional_properties = d
|
||||
return email_authentication_form
|
||||
|
||||
@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
|
4
kittycad/models/empty.py
Normal file
4
kittycad/models/empty.py
Normal file
@ -0,0 +1,4 @@
|
||||
class Empty(str):
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self
|
84
kittycad/models/executor_metadata.py
Normal file
84
kittycad/models/executor_metadata.py
Normal file
@ -0,0 +1,84 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.docker_system_info import DockerSystemInfo
|
||||
from ..models.environment import Environment
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="ExecutorMetadata")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class ExecutorMetadata:
|
||||
""" """
|
||||
docker_info: Union[Unset, DockerSystemInfo] = UNSET
|
||||
environment: Union[Unset, Environment] = UNSET
|
||||
git_hash: Union[Unset, str] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
docker_info: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.docker_info, Unset):
|
||||
docker_info = self.docker_info.value
|
||||
environment: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.environment, Unset):
|
||||
environment = self.environment.value
|
||||
git_hash = self.git_hash
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if docker_info is not UNSET:
|
||||
field_dict['docker_info'] = docker_info
|
||||
if environment is not UNSET:
|
||||
field_dict['environment'] = environment
|
||||
if git_hash is not UNSET:
|
||||
field_dict['git_hash'] = git_hash
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
_docker_info = d.pop("docker_info", UNSET)
|
||||
docker_info: Union[Unset, DockerSystemInfo]
|
||||
if isinstance(_docker_info, Unset):
|
||||
docker_info = UNSET
|
||||
else:
|
||||
docker_info = DockerSystemInfo(_docker_info)
|
||||
|
||||
_environment = d.pop("environment", UNSET)
|
||||
environment: Union[Unset, Environment]
|
||||
if isinstance(_environment, Unset):
|
||||
environment = UNSET
|
||||
else:
|
||||
environment = Environment(_environment)
|
||||
|
||||
git_hash = d.pop("git_hash", UNSET)
|
||||
|
||||
executor_metadata = cls(
|
||||
docker_info=docker_info,
|
||||
environment=environment,
|
||||
git_hash=git_hash,
|
||||
)
|
||||
|
||||
executor_metadata.additional_properties = d
|
||||
return executor_metadata
|
||||
|
||||
@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
|
@ -5,9 +5,10 @@ import attr
|
||||
from dateutil.parser import isoparse
|
||||
|
||||
from ..models.uuid import Uuid
|
||||
from ..models.base64_data import Base64Data
|
||||
from ..models.file_output_format import FileOutputFormat
|
||||
from ..models.file_source_format import FileSourceFormat
|
||||
from ..models.api_call_status import APICallStatus
|
||||
from ..models.api_call_status import ApiCallStatus
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="FileConversion")
|
||||
@ -20,11 +21,11 @@ class FileConversion:
|
||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||
error: Union[Unset, str] = UNSET
|
||||
id: Union[Unset, str] = UNSET
|
||||
output: Union[Unset, str] = UNSET
|
||||
output: Union[Unset, Base64Data] = UNSET
|
||||
output_format: Union[Unset, FileOutputFormat] = UNSET
|
||||
src_format: Union[Unset, FileSourceFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, APICallStatus] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||
user_id: Union[Unset, str] = UNSET
|
||||
|
||||
@ -39,7 +40,9 @@ class FileConversion:
|
||||
created_at = self.created_at.isoformat()
|
||||
error = self.error
|
||||
id = self.id
|
||||
output = self.output
|
||||
output: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.output, Unset):
|
||||
output = self.output.value
|
||||
output_format: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.output_format, Unset):
|
||||
output_format = self.output_format.value
|
||||
@ -106,7 +109,12 @@ class FileConversion:
|
||||
|
||||
id = d.pop("id", UNSET)
|
||||
|
||||
output = d.pop("output", UNSET)
|
||||
_output = d.pop("output", UNSET)
|
||||
output: Union[Unset, Base64Data]
|
||||
if isinstance(_output, Unset):
|
||||
output = UNSET
|
||||
else:
|
||||
output = Base64Data(_output)
|
||||
|
||||
_output_format = d.pop("output_format", UNSET)
|
||||
output_format: Union[Unset, FileOutputFormat]
|
||||
@ -130,11 +138,11 @@ class FileConversion:
|
||||
started_at = isoparse(_started_at)
|
||||
|
||||
_status = d.pop("status", UNSET)
|
||||
status: Union[Unset, APICallStatus]
|
||||
status: Union[Unset, ApiCallStatus]
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = APICallStatus(_status)
|
||||
status = ApiCallStatus(_status)
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_at: Union[Unset, datetime.datetime]
|
||||
|
@ -6,7 +6,7 @@ from dateutil.parser import isoparse
|
||||
|
||||
from ..models.uuid import Uuid
|
||||
from ..models.file_source_format import FileSourceFormat
|
||||
from ..models.api_call_status import APICallStatus
|
||||
from ..models.api_call_status import ApiCallStatus
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="FileDensity")
|
||||
@ -23,7 +23,7 @@ class FileDensity:
|
||||
material_mass: Union[Unset, float] = UNSET
|
||||
src_format: Union[Unset, FileSourceFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, APICallStatus] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||
user_id: Union[Unset, str] = UNSET
|
||||
|
||||
@ -122,11 +122,11 @@ class FileDensity:
|
||||
started_at = isoparse(_started_at)
|
||||
|
||||
_status = d.pop("status", UNSET)
|
||||
status: Union[Unset, APICallStatus]
|
||||
status: Union[Unset, ApiCallStatus]
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = APICallStatus(_status)
|
||||
status = ApiCallStatus(_status)
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_at: Union[Unset, datetime.datetime]
|
||||
|
@ -6,7 +6,7 @@ from dateutil.parser import isoparse
|
||||
|
||||
from ..models.uuid import Uuid
|
||||
from ..models.file_source_format import FileSourceFormat
|
||||
from ..models.api_call_status import APICallStatus
|
||||
from ..models.api_call_status import ApiCallStatus
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="FileMass")
|
||||
@ -23,7 +23,7 @@ class FileMass:
|
||||
material_density: Union[Unset, float] = UNSET
|
||||
src_format: Union[Unset, FileSourceFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, APICallStatus] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||
user_id: Union[Unset, str] = UNSET
|
||||
|
||||
@ -122,11 +122,11 @@ class FileMass:
|
||||
started_at = isoparse(_started_at)
|
||||
|
||||
_status = d.pop("status", UNSET)
|
||||
status: Union[Unset, APICallStatus]
|
||||
status: Union[Unset, ApiCallStatus]
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = APICallStatus(_status)
|
||||
status = ApiCallStatus(_status)
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_at: Union[Unset, datetime.datetime]
|
||||
|
@ -6,7 +6,7 @@ from dateutil.parser import isoparse
|
||||
|
||||
from ..models.uuid import Uuid
|
||||
from ..models.file_source_format import FileSourceFormat
|
||||
from ..models.api_call_status import APICallStatus
|
||||
from ..models.api_call_status import ApiCallStatus
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="FileVolume")
|
||||
@ -21,7 +21,7 @@ class FileVolume:
|
||||
id: Union[Unset, str] = UNSET
|
||||
src_format: Union[Unset, FileSourceFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, APICallStatus] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||
user_id: Union[Unset, str] = UNSET
|
||||
volume: Union[Unset, float] = UNSET
|
||||
@ -114,11 +114,11 @@ class FileVolume:
|
||||
started_at = isoparse(_started_at)
|
||||
|
||||
_status = d.pop("status", UNSET)
|
||||
status: Union[Unset, APICallStatus]
|
||||
status: Union[Unset, ApiCallStatus]
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = APICallStatus(_status)
|
||||
status = ApiCallStatus(_status)
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_at: Union[Unset, datetime.datetime]
|
||||
|
77
kittycad/models/index_info.py
Normal file
77
kittycad/models/index_info.py
Normal file
@ -0,0 +1,77 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="IndexInfo")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class IndexInfo:
|
||||
""" """
|
||||
mirrors: Union[Unset, List[str]] = UNSET
|
||||
name: Union[Unset, str] = UNSET
|
||||
official: Union[Unset, bool] = False
|
||||
secure: Union[Unset, bool] = False
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
mirrors: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.mirrors, Unset):
|
||||
mirrors = self.mirrors
|
||||
name = self.name
|
||||
official = self.official
|
||||
secure = self.secure
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if mirrors is not UNSET:
|
||||
field_dict['mirrors'] = mirrors
|
||||
if name is not UNSET:
|
||||
field_dict['name'] = name
|
||||
if official is not UNSET:
|
||||
field_dict['official'] = official
|
||||
if secure is not UNSET:
|
||||
field_dict['secure'] = secure
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
mirrors = cast(List[str], d.pop("mirrors", UNSET))
|
||||
|
||||
name = d.pop("name", UNSET)
|
||||
|
||||
official = d.pop("official", UNSET)
|
||||
|
||||
secure = d.pop("secure", UNSET)
|
||||
|
||||
index_info = cls(
|
||||
mirrors=mirrors,
|
||||
name=name,
|
||||
official=official,
|
||||
secure=secure,
|
||||
)
|
||||
|
||||
index_info.additional_properties = d
|
||||
return index_info
|
||||
|
||||
@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
|
@ -21,21 +21,24 @@ class Invoice:
|
||||
attempted: Union[Unset, bool] = False
|
||||
created_at: Union[Unset, datetime.datetime] = UNSET
|
||||
currency: Union[Unset, Currency] = UNSET
|
||||
customer_email: Union[Unset, str] = UNSET
|
||||
customer_id: Union[Unset, str] = UNSET
|
||||
default_payment_method: Union[Unset, str] = UNSET
|
||||
description: Union[Unset, str] = UNSET
|
||||
id: Union[Unset, str] = UNSET
|
||||
invoice_pdf: Union[Unset, str] = UNSET
|
||||
invoice_url: Union[Unset, str] = UNSET
|
||||
from ..models.invoice_line_item import InvoiceLineItem
|
||||
lines: Union[Unset, List[InvoiceLineItem]] = UNSET
|
||||
metadata: Union[Unset, Any] = UNSET
|
||||
number: Union[Unset, str] = UNSET
|
||||
paid: Union[Unset, bool] = False
|
||||
pdf: Union[Unset, str] = UNSET
|
||||
receipt_number: Union[Unset, str] = UNSET
|
||||
statement_descriptor: Union[Unset, str] = UNSET
|
||||
status: Union[Unset, InvoiceStatus] = UNSET
|
||||
subtotal: Union[Unset, int] = UNSET
|
||||
tax: Union[Unset, int] = UNSET
|
||||
total: Union[Unset, int] = UNSET
|
||||
url: Union[Unset, str] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
@ -51,10 +54,11 @@ class Invoice:
|
||||
currency: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.currency, Unset):
|
||||
currency = self.currency.value
|
||||
customer_email = self.customer_email
|
||||
customer_id = self.customer_id
|
||||
default_payment_method = self.default_payment_method
|
||||
description = self.description
|
||||
id = self.id
|
||||
invoice_pdf = self.invoice_pdf
|
||||
invoice_url = self.invoice_url
|
||||
from ..models.invoice_line_item import InvoiceLineItem
|
||||
lines: Union[Unset, List[InvoiceLineItem]] = UNSET
|
||||
if not isinstance(self.lines, Unset):
|
||||
@ -62,6 +66,7 @@ class Invoice:
|
||||
metadata = self.metadata
|
||||
number = self.number
|
||||
paid = self.paid
|
||||
pdf = self.pdf
|
||||
receipt_number = self.receipt_number
|
||||
statement_descriptor = self.statement_descriptor
|
||||
status: Union[Unset, str] = UNSET
|
||||
@ -70,6 +75,7 @@ class Invoice:
|
||||
subtotal = self.subtotal
|
||||
tax = self.tax
|
||||
total = self.total
|
||||
url = self.url
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
@ -88,14 +94,16 @@ class Invoice:
|
||||
field_dict['created_at'] = created_at
|
||||
if currency is not UNSET:
|
||||
field_dict['currency'] = currency
|
||||
if customer_email is not UNSET:
|
||||
field_dict['customer_email'] = customer_email
|
||||
if customer_id is not UNSET:
|
||||
field_dict['customer_id'] = customer_id
|
||||
if default_payment_method is not UNSET:
|
||||
field_dict['default_payment_method'] = default_payment_method
|
||||
if description is not UNSET:
|
||||
field_dict['description'] = description
|
||||
if id is not UNSET:
|
||||
field_dict['id'] = id
|
||||
if invoice_pdf is not UNSET:
|
||||
field_dict['invoice_pdf'] = invoice_pdf
|
||||
if invoice_url is not UNSET:
|
||||
field_dict['invoice_url'] = invoice_url
|
||||
if lines is not UNSET:
|
||||
field_dict['lines'] = lines
|
||||
if metadata is not UNSET:
|
||||
@ -104,6 +112,8 @@ class Invoice:
|
||||
field_dict['number'] = number
|
||||
if paid is not UNSET:
|
||||
field_dict['paid'] = paid
|
||||
if pdf is not UNSET:
|
||||
field_dict['pdf'] = pdf
|
||||
if receipt_number is not UNSET:
|
||||
field_dict['receipt_number'] = receipt_number
|
||||
if statement_descriptor is not UNSET:
|
||||
@ -116,6 +126,8 @@ class Invoice:
|
||||
field_dict['tax'] = tax
|
||||
if total is not UNSET:
|
||||
field_dict['total'] = total
|
||||
if url is not UNSET:
|
||||
field_dict['url'] = url
|
||||
|
||||
return field_dict
|
||||
|
||||
@ -146,14 +158,16 @@ class Invoice:
|
||||
else:
|
||||
currency = Currency(_currency)
|
||||
|
||||
customer_email = d.pop("customer_email", UNSET)
|
||||
|
||||
customer_id = d.pop("customer_id", UNSET)
|
||||
|
||||
default_payment_method = d.pop("default_payment_method", UNSET)
|
||||
|
||||
description = d.pop("description", UNSET)
|
||||
|
||||
id = d.pop("id", UNSET)
|
||||
|
||||
invoice_pdf = d.pop("invoice_pdf", UNSET)
|
||||
|
||||
invoice_url = d.pop("invoice_url", UNSET)
|
||||
|
||||
from ..models.invoice_line_item import InvoiceLineItem
|
||||
lines = cast(List[InvoiceLineItem], d.pop("lines", UNSET))
|
||||
|
||||
@ -162,6 +176,8 @@ class Invoice:
|
||||
|
||||
paid = d.pop("paid", UNSET)
|
||||
|
||||
pdf = d.pop("pdf", UNSET)
|
||||
|
||||
receipt_number = d.pop("receipt_number", UNSET)
|
||||
|
||||
statement_descriptor = d.pop("statement_descriptor", UNSET)
|
||||
@ -179,6 +195,8 @@ class Invoice:
|
||||
|
||||
total = d.pop("total", UNSET)
|
||||
|
||||
url = d.pop("url", UNSET)
|
||||
|
||||
invoice = cls(
|
||||
amount_due=amount_due,
|
||||
amount_paid=amount_paid,
|
||||
@ -187,20 +205,23 @@ class Invoice:
|
||||
attempted=attempted,
|
||||
created_at=created_at,
|
||||
currency=currency,
|
||||
customer_email=customer_email,
|
||||
customer_id=customer_id,
|
||||
default_payment_method=default_payment_method,
|
||||
description=description,
|
||||
id=id,
|
||||
invoice_pdf=invoice_pdf,
|
||||
invoice_url=invoice_url,
|
||||
lines=lines,
|
||||
metadata=metadata,
|
||||
number=number,
|
||||
paid=paid,
|
||||
pdf=pdf,
|
||||
receipt_number=receipt_number,
|
||||
statement_descriptor=statement_descriptor,
|
||||
status=status,
|
||||
subtotal=subtotal,
|
||||
tax=tax,
|
||||
total=total,
|
||||
url=url,
|
||||
)
|
||||
|
||||
invoice.additional_properties = d
|
||||
|
4
kittycad/models/ip_addr.py
Normal file
4
kittycad/models/ip_addr.py
Normal file
@ -0,0 +1,4 @@
|
||||
class IpAddr(str):
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self
|
@ -5,6 +5,7 @@ import attr
|
||||
from ..models.cache_metadata import CacheMetadata
|
||||
from ..models.engine_metadata import EngineMetadata
|
||||
from ..models.environment import Environment
|
||||
from ..models.executor_metadata import ExecutorMetadata
|
||||
from ..models.file_system_metadata import FileSystemMetadata
|
||||
from ..models.connection import Connection
|
||||
from ..types import UNSET, Unset
|
||||
@ -18,6 +19,7 @@ class Metadata:
|
||||
cache: Union[Unset, CacheMetadata] = UNSET
|
||||
engine: Union[Unset, EngineMetadata] = UNSET
|
||||
environment: Union[Unset, Environment] = UNSET
|
||||
executor: Union[Unset, ExecutorMetadata] = UNSET
|
||||
fs: Union[Unset, FileSystemMetadata] = UNSET
|
||||
git_hash: Union[Unset, str] = UNSET
|
||||
pubsub: Union[Unset, Connection] = UNSET
|
||||
@ -34,6 +36,9 @@ class Metadata:
|
||||
environment: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.environment, Unset):
|
||||
environment = self.environment.value
|
||||
executor: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.executor, Unset):
|
||||
executor = self.executor.value
|
||||
fs: Union[Unset, str] = UNSET
|
||||
if not isinstance(self.fs, Unset):
|
||||
fs = self.fs.value
|
||||
@ -51,6 +56,8 @@ class Metadata:
|
||||
field_dict['engine'] = engine
|
||||
if environment is not UNSET:
|
||||
field_dict['environment'] = environment
|
||||
if executor is not UNSET:
|
||||
field_dict['executor'] = executor
|
||||
if fs is not UNSET:
|
||||
field_dict['fs'] = fs
|
||||
if git_hash is not UNSET:
|
||||
@ -84,6 +91,13 @@ class Metadata:
|
||||
else:
|
||||
environment = Environment(_environment)
|
||||
|
||||
_executor = d.pop("executor", UNSET)
|
||||
executor: Union[Unset, ExecutorMetadata]
|
||||
if isinstance(_executor, Unset):
|
||||
executor = UNSET
|
||||
else:
|
||||
executor = ExecutorMetadata(_executor)
|
||||
|
||||
_fs = d.pop("fs", UNSET)
|
||||
fs: Union[Unset, FileSystemMetadata]
|
||||
if isinstance(_fs, Unset):
|
||||
@ -104,6 +118,7 @@ class Metadata:
|
||||
cache=cache,
|
||||
engine=engine,
|
||||
environment=environment,
|
||||
executor=executor,
|
||||
fs=fs,
|
||||
git_hash=git_hash,
|
||||
pubsub=pubsub,
|
||||
|
68
kittycad/models/o_auth2_client_info.py
Normal file
68
kittycad/models/o_auth2_client_info.py
Normal file
@ -0,0 +1,68 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="OAuth2ClientInfo")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class OAuth2ClientInfo:
|
||||
""" """
|
||||
csrf_token: Union[Unset, str] = UNSET
|
||||
pkce_code_verifier: Union[Unset, str] = UNSET
|
||||
url: Union[Unset, str] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
csrf_token = self.csrf_token
|
||||
pkce_code_verifier = self.pkce_code_verifier
|
||||
url = self.url
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if csrf_token is not UNSET:
|
||||
field_dict['csrf_token'] = csrf_token
|
||||
if pkce_code_verifier is not UNSET:
|
||||
field_dict['pkce_code_verifier'] = pkce_code_verifier
|
||||
if url is not UNSET:
|
||||
field_dict['url'] = url
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
csrf_token = d.pop("csrf_token", UNSET)
|
||||
|
||||
pkce_code_verifier = d.pop("pkce_code_verifier", UNSET)
|
||||
|
||||
url = d.pop("url", UNSET)
|
||||
|
||||
o_auth2_client_info = cls(
|
||||
csrf_token=csrf_token,
|
||||
pkce_code_verifier=pkce_code_verifier,
|
||||
url=url,
|
||||
)
|
||||
|
||||
o_auth2_client_info.additional_properties = d
|
||||
return o_auth2_client_info
|
||||
|
||||
@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
kittycad/models/o_auth2_grant_type.py
Normal file
8
kittycad/models/o_auth2_grant_type.py
Normal file
@ -0,0 +1,8 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class OAuth2GrantType(str, Enum):
|
||||
URN_IETF_PARAMS_OAUTH_GRANT_TYPE_DEVICE_CODE = 'urn:ietf:params:oauth:grant-type:device_code'
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
83
kittycad/models/plugins_info.py
Normal file
83
kittycad/models/plugins_info.py
Normal file
@ -0,0 +1,83 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="PluginsInfo")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class PluginsInfo:
|
||||
""" """
|
||||
authorization: Union[Unset, List[str]] = UNSET
|
||||
log: Union[Unset, List[str]] = UNSET
|
||||
network: Union[Unset, List[str]] = UNSET
|
||||
volume: Union[Unset, List[str]] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
authorization: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.authorization, Unset):
|
||||
authorization = self.authorization
|
||||
log: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.log, Unset):
|
||||
log = self.log
|
||||
network: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.network, Unset):
|
||||
network = self.network
|
||||
volume: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.volume, Unset):
|
||||
volume = self.volume
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if authorization is not UNSET:
|
||||
field_dict['authorization'] = authorization
|
||||
if log is not UNSET:
|
||||
field_dict['log'] = log
|
||||
if network is not UNSET:
|
||||
field_dict['network'] = network
|
||||
if volume is not UNSET:
|
||||
field_dict['volume'] = volume
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
authorization = cast(List[str], d.pop("authorization", UNSET))
|
||||
|
||||
log = cast(List[str], d.pop("log", UNSET))
|
||||
|
||||
network = cast(List[str], d.pop("network", UNSET))
|
||||
|
||||
volume = cast(List[str], d.pop("volume", UNSET))
|
||||
|
||||
plugins_info = cls(
|
||||
authorization=authorization,
|
||||
log=log,
|
||||
network=network,
|
||||
volume=volume,
|
||||
)
|
||||
|
||||
plugins_info.additional_properties = d
|
||||
return plugins_info
|
||||
|
||||
@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
|
98
kittycad/models/registry_service_config.py
Normal file
98
kittycad/models/registry_service_config.py
Normal file
@ -0,0 +1,98 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..models.index_info import IndexInfo
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="RegistryServiceConfig")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class RegistryServiceConfig:
|
||||
""" """
|
||||
allow_nondistributable_artifacts_cid_rs: Union[Unset, List[str]] = UNSET
|
||||
allow_nondistributable_artifacts_hostnames: Union[Unset, List[str]] = UNSET
|
||||
index_configs: Union[Unset, Any] = UNSET
|
||||
insecure_registry_cid_rs: Union[Unset, List[str]] = UNSET
|
||||
mirrors: Union[Unset, List[str]] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
allow_nondistributable_artifacts_cid_rs: Union[Unset,
|
||||
List[str]] = UNSET
|
||||
if not isinstance(self.allow_nondistributable_artifacts_cid_rs, Unset):
|
||||
allow_nondistributable_artifacts_cid_rs = self.allow_nondistributable_artifacts_cid_rs
|
||||
allow_nondistributable_artifacts_hostnames: Union[Unset,
|
||||
List[str]] = UNSET
|
||||
if not isinstance(
|
||||
self.allow_nondistributable_artifacts_hostnames,
|
||||
Unset):
|
||||
allow_nondistributable_artifacts_hostnames = self.allow_nondistributable_artifacts_hostnames
|
||||
index_configs = self.index_configs
|
||||
insecure_registry_cid_rs: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.insecure_registry_cid_rs, Unset):
|
||||
insecure_registry_cid_rs = self.insecure_registry_cid_rs
|
||||
mirrors: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.mirrors, Unset):
|
||||
mirrors = self.mirrors
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if allow_nondistributable_artifacts_cid_rs is not UNSET:
|
||||
field_dict['allow_nondistributable_artifacts_cid_rs'] = allow_nondistributable_artifacts_cid_rs
|
||||
if allow_nondistributable_artifacts_hostnames is not UNSET:
|
||||
field_dict['allow_nondistributable_artifacts_hostnames'] = allow_nondistributable_artifacts_hostnames
|
||||
if index_configs is not UNSET:
|
||||
field_dict['index_configs'] = index_configs
|
||||
if insecure_registry_cid_rs is not UNSET:
|
||||
field_dict['insecure_registry_cid_rs'] = insecure_registry_cid_rs
|
||||
if mirrors is not UNSET:
|
||||
field_dict['mirrors'] = mirrors
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
allow_nondistributable_artifacts_cid_rs = cast(
|
||||
List[str], d.pop("allow_nondistributable_artifacts_cid_rs", UNSET))
|
||||
|
||||
allow_nondistributable_artifacts_hostnames = cast(
|
||||
List[str], d.pop("allow_nondistributable_artifacts_hostnames", UNSET))
|
||||
|
||||
index_configs = d.pop("index_configs", UNSET)
|
||||
insecure_registry_cid_rs = cast(
|
||||
List[str], d.pop(
|
||||
"insecure_registry_cid_rs", UNSET))
|
||||
|
||||
mirrors = cast(List[str], d.pop("mirrors", UNSET))
|
||||
|
||||
registry_service_config = cls(
|
||||
allow_nondistributable_artifacts_cid_rs=allow_nondistributable_artifacts_cid_rs,
|
||||
allow_nondistributable_artifacts_hostnames=allow_nondistributable_artifacts_hostnames,
|
||||
index_configs=index_configs,
|
||||
insecure_registry_cid_rs=insecure_registry_cid_rs,
|
||||
mirrors=mirrors,
|
||||
)
|
||||
|
||||
registry_service_config.additional_properties = d
|
||||
return registry_service_config
|
||||
|
||||
@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
|
63
kittycad/models/runtime.py
Normal file
63
kittycad/models/runtime.py
Normal file
@ -0,0 +1,63 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="Runtime")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class Runtime:
|
||||
""" """
|
||||
path: Union[Unset, str] = UNSET
|
||||
runtime_args: Union[Unset, List[str]] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
path = self.path
|
||||
runtime_args: Union[Unset, List[str]] = UNSET
|
||||
if not isinstance(self.runtime_args, Unset):
|
||||
runtime_args = self.runtime_args
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if path is not UNSET:
|
||||
field_dict['path'] = path
|
||||
if runtime_args is not UNSET:
|
||||
field_dict['runtime_args'] = runtime_args
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
path = d.pop("path", UNSET)
|
||||
|
||||
runtime_args = cast(List[str], d.pop("runtime_args", UNSET))
|
||||
|
||||
runtime = cls(
|
||||
path=path,
|
||||
runtime_args=runtime_args,
|
||||
)
|
||||
|
||||
runtime.additional_properties = d
|
||||
return runtime
|
||||
|
||||
@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
|
11
kittycad/models/system_info_cgroup_driver_enum.py
Normal file
11
kittycad/models/system_info_cgroup_driver_enum.py
Normal file
@ -0,0 +1,11 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class SystemInfoCgroupDriverEnum(str, Enum):
|
||||
EMPTY = ''
|
||||
CGROUPFS = 'cgroupfs'
|
||||
SYSTEMD = 'systemd'
|
||||
NONE = 'none'
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
10
kittycad/models/system_info_cgroup_version_enum.py
Normal file
10
kittycad/models/system_info_cgroup_version_enum.py
Normal file
@ -0,0 +1,10 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class SystemInfoCgroupVersionEnum(str, Enum):
|
||||
EMPTY = ''
|
||||
ONE = '1'
|
||||
TWO = '2'
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
61
kittycad/models/system_info_default_address_pools.py
Normal file
61
kittycad/models/system_info_default_address_pools.py
Normal file
@ -0,0 +1,61 @@
|
||||
from typing import Any, Dict, List, Type, TypeVar, Union, cast
|
||||
|
||||
import attr
|
||||
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="SystemInfoDefaultAddressPools")
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
class SystemInfoDefaultAddressPools:
|
||||
""" """
|
||||
base: Union[Unset, str] = UNSET
|
||||
size: Union[Unset, int] = UNSET
|
||||
|
||||
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
||||
|
||||
def to_dict(self) -> Dict[str, Any]:
|
||||
base = self.base
|
||||
size = self.size
|
||||
|
||||
field_dict: Dict[str, Any] = {}
|
||||
field_dict.update(self.additional_properties)
|
||||
field_dict.update({})
|
||||
if base is not UNSET:
|
||||
field_dict['base'] = base
|
||||
if size is not UNSET:
|
||||
field_dict['size'] = size
|
||||
|
||||
return field_dict
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
||||
d = src_dict.copy()
|
||||
base = d.pop("base", UNSET)
|
||||
|
||||
size = d.pop("size", UNSET)
|
||||
|
||||
system_info_default_address_pools = cls(
|
||||
base=base,
|
||||
size=size,
|
||||
)
|
||||
|
||||
system_info_default_address_pools.additional_properties = d
|
||||
return system_info_default_address_pools
|
||||
|
||||
@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
|
11
kittycad/models/system_info_isolation_enum.py
Normal file
11
kittycad/models/system_info_isolation_enum.py
Normal file
@ -0,0 +1,11 @@
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class SystemInfoIsolationEnum(str, Enum):
|
||||
EMPTY = ''
|
||||
DEFAULT = 'default'
|
||||
HYPERV = 'hyperv'
|
||||
PROCESS = 'process'
|
||||
|
||||
def __str__(self) -> str:
|
||||
return str(self.value)
|
@ -6,7 +6,7 @@ from dateutil.parser import isoparse
|
||||
|
||||
from ..models.uuid import Uuid
|
||||
from ..models.unit_metric_format import UnitMetricFormat
|
||||
from ..models.api_call_status import APICallStatus
|
||||
from ..models.api_call_status import ApiCallStatus
|
||||
from ..types import UNSET, Unset
|
||||
|
||||
T = TypeVar("T", bound="UnitConversion")
|
||||
@ -24,7 +24,7 @@ class UnitConversion:
|
||||
output_format: Union[Unset, UnitMetricFormat] = UNSET
|
||||
src_format: Union[Unset, UnitMetricFormat] = UNSET
|
||||
started_at: Union[Unset, datetime.datetime] = UNSET
|
||||
status: Union[Unset, APICallStatus] = UNSET
|
||||
status: Union[Unset, ApiCallStatus] = UNSET
|
||||
updated_at: Union[Unset, datetime.datetime] = UNSET
|
||||
user_id: Union[Unset, str] = UNSET
|
||||
|
||||
@ -135,11 +135,11 @@ class UnitConversion:
|
||||
started_at = isoparse(_started_at)
|
||||
|
||||
_status = d.pop("status", UNSET)
|
||||
status: Union[Unset, APICallStatus]
|
||||
status: Union[Unset, ApiCallStatus]
|
||||
if isinstance(_status, Unset):
|
||||
status = UNSET
|
||||
else:
|
||||
status = APICallStatus(_status)
|
||||
status = ApiCallStatus(_status)
|
||||
|
||||
_updated_at = d.pop("updated_at", UNSET)
|
||||
updated_at: Union[Unset, datetime.datetime]
|
||||
|
Reference in New Issue
Block a user