From 3c699a1642faff26e4de9cf60eb1a282dd556210 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 27 Feb 2023 23:06:39 -0800 Subject: [PATCH] chore: speakeasy SDK regeneration (#4) * ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.5.0 * ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.5.3 * ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.5.4 --------- Co-authored-by: speakeasybot --- RELEASES.md | 26 +- gen.yaml | 4 +- setup.py | 3 +- src/epilotapi/activity.py | 4 +- src/epilotapi/entities.py | 16 +- src/epilotapi/executions.py | 8 +- src/epilotapi/export.py | 8 +- src/epilotapi/flows.py | 8 +- src/epilotapi/journeys.py | 16 +- .../models/operations/addrelations.py | 1 + .../models/operations/attachactivity.py | 1 + .../models/operations/autocomplete.py | 9 +- .../models/operations/cancelexecution.py | 1 + .../models/operations/createactivity.py | 1 + .../models/operations/createentity.py | 1 + src/epilotapi/models/operations/createflow.py | 1 + .../models/operations/createjourney.py | 1 + .../operations/createnewschemaversion.py | 1 + .../models/operations/createsavedview.py | 1 + .../models/operations/deleteentity.py | 1 + src/epilotapi/models/operations/deleteflow.py | 1 + .../models/operations/deleterelation.py | 1 + .../models/operations/deletesavedview.py | 1 + .../models/operations/deleteschemabyid.py | 1 + .../models/operations/exportentities.py | 1 + .../models/operations/getactivity.py | 1 + src/epilotapi/models/operations/getentity.py | 9 +- .../operations/getentityactivityfeed.py | 9 +- .../models/operations/getexecution.py | 1 + .../models/operations/getexecutions.py | 1 + src/epilotapi/models/operations/getflow.py | 1 + src/epilotapi/models/operations/getjourney.py | 1 + .../models/operations/getjourneysbyorgid.py | 1 + .../models/operations/getrelations.py | 1 + .../models/operations/getsavedview.py | 7 +- src/epilotapi/models/operations/getschema.py | 1 + .../models/operations/getschemaversions.py | 9 +- .../models/operations/gettaxonomy.py | 1 + .../models/operations/importentities.py | 1 + .../models/operations/listsavedviews.py | 7 +- .../models/operations/listschemablueprints.py | 7 +- .../models/operations/listschemas.py | 7 +- .../models/operations/listtaxonomies.py | 7 +- .../listtaxonomyclassificationsforschema.py | 7 +- .../models/operations/patchupdatejourney.py | 1 + src/epilotapi/models/operations/putflow.py | 1 + .../models/operations/removejourney.py | 1 + .../models/operations/retriggeraction.py | 1 + .../models/operations/searchentities.py | 1 + .../models/operations/searchflows.py | 1 + .../models/operations/searchjourneys.py | 1 + .../models/operations/startexecution.py | 1 + .../taxonomiesclassificationssearch.py | 11 +- .../models/operations/taxonomyautocomplete.py | 7 +- .../updateclassificationsfortaxonomy.py | 11 +- .../models/operations/updateentity.py | 1 + .../models/operations/updatejourney.py | 1 + .../models/operations/updaterelation.py | 7 +- .../models/operations/updatesavedview.py | 1 + .../models/operations/upsertentity.py | 5 +- src/epilotapi/models/shared/activity.py | 7 +- src/epilotapi/models/shared/activityitem.py | 17 +- .../models/shared/activitytrigger.py | 11 +- .../models/shared/addressrelationattribute.py | 51 +- .../models/shared/apisubmissiontrigger.py | 9 +- .../models/shared/appendvaluemapper.py | 9 +- .../models/shared/assignuserstostep.py | 11 +- .../models/shared/automationaction.py | 31 +- .../models/shared/automationactionconfig.py | 19 +- .../models/shared/automationattribute.py | 49 +- .../models/shared/automationexecution.py | 19 +- src/epilotapi/models/shared/automationflow.py | 23 +- .../models/shared/booleanattribute.py | 49 +- .../models/shared/cartcheckoutaction.py | 31 +- .../models/shared/cartcheckoutactionconfig.py | 19 +- .../models/shared/cartcheckoutconfig.py | 19 +- .../models/shared/classificationsupdate.py | 11 +- .../models/shared/comparison_enum.py | 1 + .../models/shared/computedattribute.py | 49 +- .../models/shared/consentattribute.py | 49 +- .../models/shared/copyvaluemapper.py | 5 +- .../models/shared/countryattribute.py | 49 +- .../models/shared/createdocumentaction.py | 31 +- .../shared/createdocumentactionconfig.py | 19 +- .../models/shared/createdocumentconfig.py | 9 +- .../models/shared/currencyattribute.py | 53 +- src/epilotapi/models/shared/dateattribute.py | 49 +- .../models/shared/entitycapability.py | 19 +- .../models/shared/entitydefaultcreate.py | 17 +- .../models/shared/entitydefaultedit.py | 17 +- .../models/shared/entitydefaulttable.py | 31 +- .../models/shared/entityimportparams.py | 7 +- .../models/shared/entitymanualtrigger.py | 9 +- .../models/shared/entityoperation.py | 27 +- .../models/shared/entityoperationtrigger.py | 11 +- .../models/shared/entityparcelview.py | 9 +- src/epilotapi/models/shared/entityschema.py | 79 +-- .../models/shared/entityschemaitem.py | 95 ++-- .../models/shared/entitysearchparams.py | 17 +- .../models/shared/entitysearchresults.py | 9 +- .../models/shared/entityviewdisabled.py | 7 +- src/epilotapi/models/shared/errorcode_enum.py | 1 + src/epilotapi/models/shared/erroroutput.py | 5 +- .../models/shared/executionstatus_enum.py | 1 + src/epilotapi/models/shared/fileattribute.py | 57 +- .../models/shared/frontendsubmittrigger.py | 9 +- .../models/shared/getexecutionsresp.py | 5 +- .../models/shared/internalattribute.py | 49 +- .../models/shared/internaluserattribute.py | 49 +- .../models/shared/invitationemailattribute.py | 49 +- .../models/shared/journeysubmittrigger.py | 7 +- src/epilotapi/models/shared/linkattribute.py | 49 +- .../models/shared/mapentityaction.py | 31 +- .../models/shared/mapentityactionconfig.py | 19 +- .../models/shared/mapentityconfig.py | 17 +- .../shared/mappingattributemode_enum.py | 1 + .../models/shared/mappingattributev2.py | 7 +- .../models/shared/mappingconfigref.py | 7 +- .../models/shared/multiselectattribute.py | 61 +-- .../models/shared/numberattribute.py | 51 +- .../models/shared/orderedlistattribute.py | 49 +- .../models/shared/partnerstatusattribute.py | 49 +- .../shared/paymentmethodrelationattribute.py | 51 +- .../models/shared/purposeattribute.py | 57 +- .../models/shared/receivedemailtrigger.py | 9 +- .../models/shared/redirectentityview.py | 9 +- .../models/shared/relationattribute.py | 91 ++-- .../models/shared/relationattribute1.py | 27 +- src/epilotapi/models/shared/relationitem.py | 9 +- .../models/shared/repeatableattribute.py | 57 +- src/epilotapi/models/shared/retryreq.py | 7 +- .../models/shared/retrystrategy_enum.py | 1 + src/epilotapi/models/shared/savedview.py | 13 +- src/epilotapi/models/shared/savedviewitem.py | 19 +- .../models/shared/searchautomationsresp.py | 5 +- .../shared/searchjourneysqueryrequest.py | 13 +- .../models/shared/searchjourneysresponse.py | 41 +- src/epilotapi/models/shared/searchmappings.py | 11 +- src/epilotapi/models/shared/security.py | 1 + .../models/shared/selectattribute.py | 57 +- .../models/shared/sendemailaction.py | 31 +- .../models/shared/sendemailactionconfig.py | 19 +- .../models/shared/sendemailconfig.py | 31 +- .../models/shared/sequenceattribute.py | 53 +- src/epilotapi/models/shared/setvaluemapper.py | 5 +- .../models/shared/startexecutionrequest.py | 9 +- .../models/shared/statusattribute.py | 55 +- .../models/shared/summaryattribute.py | 15 +- src/epilotapi/models/shared/summaryfield.py | 9 +- src/epilotapi/models/shared/tagsattribute.py | 53 +- src/epilotapi/models/shared/taxonomy.py | 11 +- .../models/shared/taxonomyclassification.py | 13 +- src/epilotapi/models/shared/textattribute.py | 51 +- .../models/shared/triggercondition.py | 7 +- .../models/shared/triggerwebhookaction.py | 31 +- .../shared/triggerwebhookactionconfig.py | 19 +- .../models/shared/triggerwebhookconfig.py | 9 +- .../models/shared/triggerworkflowaction.py | 31 +- .../shared/triggerworkflowactionconfig.py | 19 +- .../models/shared/triggerworkflowcondition.py | 7 +- .../models/shared/triggerworkflowconfig.py | 13 +- .../models/shared/userrelationattribute.py | 51 +- src/epilotapi/relations.py | 8 +- src/epilotapi/saved_views.py | 8 +- src/epilotapi/schemas.py | 4 +- src/epilotapi/sdk.py | 4 +- src/epilotapi/taxonomy.py | 8 +- src/epilotapi/utils/utils.py | 501 ++++++++---------- 168 files changed, 1774 insertions(+), 1653 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index e6607b3b3..8dd757b1d 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -62,4 +62,28 @@ Based on: - OpenAPI Doc 1.0.0 ./openapi.yaml - Speakeasy CLI 1.4.8 https://github.com/speakeasy-api/speakeasy ### Releases -- [PyPI v2.4.1] https://pypi.org/project/epilotapi/2.4.1 - . \ No newline at end of file +- [PyPI v2.4.1] https://pypi.org/project/epilotapi/2.4.1 - . + +## Version 2.5.0 +### Changes +Based on: +- OpenAPI Doc 1.0.0 ./openapi.yaml +- Speakeasy CLI 1.5.0 https://github.com/speakeasy-api/speakeasy +### Releases +- [PyPI v2.5.0] https://pypi.org/project/epilotapi/2.5.0 - . + +## Version 2.5.1 +### Changes +Based on: +- OpenAPI Doc 1.0.0 ./openapi.yaml +- Speakeasy CLI 1.5.3 https://github.com/speakeasy-api/speakeasy +### Releases +- [PyPI v2.5.1] https://pypi.org/project/epilotapi/2.5.1 - . + +## Version 2.5.2 +### Changes +Based on: +- OpenAPI Doc 1.0.0 ./openapi.yaml +- Speakeasy CLI 1.5.4 https://github.com/speakeasy-api/speakeasy +### Releases +- [PyPI v2.5.2] https://pypi.org/project/epilotapi/2.5.2 - . \ No newline at end of file diff --git a/gen.yaml b/gen.yaml index adb62a181..e71aba3ae 100644 --- a/gen.yaml +++ b/gen.yaml @@ -1,9 +1,9 @@ management: openapi-checksum: e5a0a41f38f047f4f80691166ac20b34 openapi-version: 1.0.0 - speakeasy-version: 1.4.8 + speakeasy-version: 1.5.4 python: - version: 2.4.1 + version: 2.5.2 packagename: epilotapi author: epilotapi sdkclassname: EpilotAPI diff --git a/setup.py b/setup.py index f8bf45320..1afae1ea2 100755 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setuptools.setup( name="epilotapi", - version="2.4.1", + version="2.5.2", author="epilotapi", description="Python Client SDK Generated by Speakeasy", long_description=long_description, @@ -17,7 +17,6 @@ install_requires=[ "certifi==2022.12.07", "charset-normalizer==2.1.1", - "dacite==1.6.0", "dataclasses-json-speakeasy==0.5.8", "idna==3.3", "marshmallow==3.17.1", diff --git a/src/epilotapi/activity.py b/src/epilotapi/activity.py index 0f855a8bf..54a6cb0e9 100755 --- a/src/epilotapi/activity.py +++ b/src/epilotapi/activity.py @@ -60,14 +60,14 @@ def create_activity(self, request: operations.CreateActivityRequest) -> operatio url = base_url.removesuffix("/") + "/v1/entity/activity" headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type query_params = utils.get_query_params(request.query_params) client = self._security_client - r = client.request("POST", url, params=query_params, data=data, json=json, files=files, headers=headers) + r = client.request("POST", url, params=query_params, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.CreateActivityResponse(status_code=r.status_code, content_type=content_type) diff --git a/src/epilotapi/entities.py b/src/epilotapi/entities.py index 6877aca7c..c9de17ab5 100755 --- a/src/epilotapi/entities.py +++ b/src/epilotapi/entities.py @@ -82,14 +82,14 @@ def create_entity(self, request: operations.CreateEntityRequest) -> operations.C url = utils.generate_url(base_url, "/v1/entity/{slug}", request.path_params) headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type query_params = utils.get_query_params(request.query_params) client = self._security_client - r = client.request("POST", url, params=query_params, data=data, json=json, files=files, headers=headers) + r = client.request("POST", url, params=query_params, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.CreateEntityResponse(status_code=r.status_code, content_type=content_type) @@ -295,13 +295,13 @@ def search_entities(self, request: operations.SearchEntitiesRequest) -> operatio url = base_url.removesuffix("/") + "/v1/entity:search" headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type client = self._security_client - r = client.request("POST", url, data=data, json=json, files=files, headers=headers) + r = client.request("POST", url, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.SearchEntitiesResponse(status_code=r.status_code, content_type=content_type) @@ -351,14 +351,14 @@ def update_entity(self, request: operations.UpdateEntityRequest) -> operations.U url = utils.generate_url(base_url, "/v1/entity/{slug}/{id}", request.path_params) headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type query_params = utils.get_query_params(request.query_params) client = self._security_client - r = client.request("PUT", url, params=query_params, data=data, json=json, files=files, headers=headers) + r = client.request("PUT", url, params=query_params, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.UpdateEntityResponse(status_code=r.status_code, content_type=content_type) @@ -390,14 +390,14 @@ def upsert_entity(self, request: operations.UpsertEntityRequest) -> operations.U url = utils.generate_url(base_url, "/v1/entity/{slug}:upsert", request.path_params) headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type query_params = utils.get_query_params(request.query_params) client = self._security_client - r = client.request("PATCH", url, params=query_params, data=data, json=json, files=files, headers=headers) + r = client.request("PATCH", url, params=query_params, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.UpsertEntityResponse(status_code=r.status_code, content_type=content_type) diff --git a/src/epilotapi/executions.py b/src/epilotapi/executions.py index c6bf2dcbc..e0ad6bfb2 100755 --- a/src/epilotapi/executions.py +++ b/src/epilotapi/executions.py @@ -106,13 +106,13 @@ def retrigger_action(self, request: operations.RetriggerActionRequest) -> operat url = utils.generate_url(base_url, "/v1/automation/executions/{execution_id}/{action_id}/retrigger", request.path_params) headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type client = self._security_client - r = client.request("POST", url, data=data, json=json, files=files, headers=headers) + r = client.request("POST", url, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.RetriggerActionResponse(status_code=r.status_code, content_type=content_type) @@ -133,13 +133,13 @@ def start_execution(self, request: operations.StartExecutionRequest) -> operatio url = base_url.removesuffix("/") + "/v1/automation/executions" headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type client = self._security_client - r = client.request("POST", url, data=data, json=json, files=files, headers=headers) + r = client.request("POST", url, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.StartExecutionResponse(status_code=r.status_code, content_type=content_type) diff --git a/src/epilotapi/export.py b/src/epilotapi/export.py index 31535dd8b..0a24f481f 100755 --- a/src/epilotapi/export.py +++ b/src/epilotapi/export.py @@ -29,14 +29,14 @@ def export_entities(self, request: operations.ExportEntitiesRequest) -> operatio url = base_url.removesuffix("/") + "/v1/entity:export" headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type query_params = utils.get_query_params(request.query_params) client = self._security_client - r = client.request("POST", url, params=query_params, data=data, json=json, files=files, headers=headers) + r = client.request("POST", url, params=query_params, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.ExportEntitiesResponse(status_code=r.status_code, content_type=content_type) @@ -57,14 +57,14 @@ def import_entities(self, request: operations.ImportEntitiesRequest) -> operatio url = base_url.removesuffix("/") + "/v1/entity:import" headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type query_params = utils.get_query_params(request.query_params) client = self._security_client - r = client.request("POST", url, params=query_params, data=data, json=json, files=files, headers=headers) + r = client.request("POST", url, params=query_params, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.ImportEntitiesResponse(status_code=r.status_code, content_type=content_type) diff --git a/src/epilotapi/flows.py b/src/epilotapi/flows.py index 9aca371ed..4a17a2325 100755 --- a/src/epilotapi/flows.py +++ b/src/epilotapi/flows.py @@ -30,13 +30,13 @@ def create_flow(self, request: operations.CreateFlowRequest) -> operations.Creat url = base_url.removesuffix("/") + "/v1/automation/flows" headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type client = self._security_client - r = client.request("POST", url, data=data, json=json, files=files, headers=headers) + r = client.request("POST", url, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.CreateFlowResponse(status_code=r.status_code, content_type=content_type) @@ -109,13 +109,13 @@ def put_flow(self, request: operations.PutFlowRequest) -> operations.PutFlowResp url = utils.generate_url(base_url, "/v1/automation/flows/{flow_id}", request.path_params) headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type client = self._security_client - r = client.request("PUT", url, data=data, json=json, files=files, headers=headers) + r = client.request("PUT", url, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.PutFlowResponse(status_code=r.status_code, content_type=content_type) diff --git a/src/epilotapi/journeys.py b/src/epilotapi/journeys.py index 1206b70fc..88d650efa 100755 --- a/src/epilotapi/journeys.py +++ b/src/epilotapi/journeys.py @@ -30,13 +30,13 @@ def create_journey(self, request: operations.CreateJourneyRequest) -> operations url = base_url.removesuffix("/") + "/v1/journey/configuration" headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type client = self._security_client - r = client.request("POST", url, data=data, json=json, files=files, headers=headers) + r = client.request("POST", url, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.CreateJourneyResponse(status_code=r.status_code, content_type=content_type) @@ -110,13 +110,13 @@ def patch_update_journey(self, request: operations.PatchUpdateJourneyRequest) -> url = base_url.removesuffix("/") + "/v1/journey/configuration" headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type client = self._security_client - r = client.request("PATCH", url, data=data, json=json, files=files, headers=headers) + r = client.request("PATCH", url, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.PatchUpdateJourneyResponse(status_code=r.status_code, content_type=content_type) @@ -162,13 +162,13 @@ def search_journeys(self, request: operations.SearchJourneysRequest) -> operatio url = base_url.removesuffix("/") + "/v1/journey/configuration/search" headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type client = self._security_client - r = client.request("POST", url, data=data, json=json, files=files, headers=headers) + r = client.request("POST", url, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.SearchJourneysResponse(status_code=r.status_code, content_type=content_type) @@ -191,13 +191,13 @@ def update_journey(self, request: operations.UpdateJourneyRequest) -> operations url = base_url.removesuffix("/") + "/v1/journey/configuration" headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type client = self._security_client - r = client.request("PUT", url, data=data, json=json, files=files, headers=headers) + r = client.request("PUT", url, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.UpdateJourneyResponse(status_code=r.status_code, content_type=content_type) diff --git a/src/epilotapi/models/operations/addrelations.py b/src/epilotapi/models/operations/addrelations.py index 9161fa1dc..128fa9f30 100755 --- a/src/epilotapi/models/operations/addrelations.py +++ b/src/epilotapi/models/operations/addrelations.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import relationitem as shared_relationitem from typing import Optional diff --git a/src/epilotapi/models/operations/attachactivity.py b/src/epilotapi/models/operations/attachactivity.py index 33faa48c8..e248fb6c3 100755 --- a/src/epilotapi/models/operations/attachactivity.py +++ b/src/epilotapi/models/operations/attachactivity.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import activityitem as shared_activityitem from typing import Optional diff --git a/src/epilotapi/models/operations/autocomplete.py b/src/epilotapi/models/operations/autocomplete.py index ff15a85c2..dd552fe3e 100755 --- a/src/epilotapi/models/operations/autocomplete.py +++ b/src/epilotapi/models/operations/autocomplete.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional @@ -17,11 +18,11 @@ class AutocompleteRequest: query_params: AutocompleteQueryParams = dataclasses.field() -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class Autocomplete200ApplicationJSON: - hits: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hits') }}) - results: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results') }}) + hits: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hits'), 'exclude': lambda f: f is None }}) + results: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results'), 'exclude': lambda f: f is None }}) @dataclasses.dataclass diff --git a/src/epilotapi/models/operations/cancelexecution.py b/src/epilotapi/models/operations/cancelexecution.py index 5291a4315..564075856 100755 --- a/src/epilotapi/models/operations/cancelexecution.py +++ b/src/epilotapi/models/operations/cancelexecution.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import automationexecution as shared_automationexecution from typing import Optional diff --git a/src/epilotapi/models/operations/createactivity.py b/src/epilotapi/models/operations/createactivity.py index 1ca0356bd..311fe9c38 100755 --- a/src/epilotapi/models/operations/createactivity.py +++ b/src/epilotapi/models/operations/createactivity.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import activity as shared_activity from ..shared import activityitem as shared_activityitem diff --git a/src/epilotapi/models/operations/createentity.py b/src/epilotapi/models/operations/createentity.py index 4798da79f..b7d769d69 100755 --- a/src/epilotapi/models/operations/createentity.py +++ b/src/epilotapi/models/operations/createentity.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from typing import Any, Optional diff --git a/src/epilotapi/models/operations/createflow.py b/src/epilotapi/models/operations/createflow.py index 6daa35dfe..f86289dfd 100755 --- a/src/epilotapi/models/operations/createflow.py +++ b/src/epilotapi/models/operations/createflow.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import automationflow as shared_automationflow from typing import Optional diff --git a/src/epilotapi/models/operations/createjourney.py b/src/epilotapi/models/operations/createjourney.py index 696085be2..ef4b66df2 100755 --- a/src/epilotapi/models/operations/createjourney.py +++ b/src/epilotapi/models/operations/createjourney.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from typing import Any, Optional diff --git a/src/epilotapi/models/operations/createnewschemaversion.py b/src/epilotapi/models/operations/createnewschemaversion.py index 67a6c8756..10dd2ae5b 100755 --- a/src/epilotapi/models/operations/createnewschemaversion.py +++ b/src/epilotapi/models/operations/createnewschemaversion.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import entityschema as shared_entityschema from ..shared import entityschemaitem as shared_entityschemaitem diff --git a/src/epilotapi/models/operations/createsavedview.py b/src/epilotapi/models/operations/createsavedview.py index c69a79faf..fd8827fdb 100755 --- a/src/epilotapi/models/operations/createsavedview.py +++ b/src/epilotapi/models/operations/createsavedview.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import savedview as shared_savedview from ..shared import savedviewitem as shared_savedviewitem diff --git a/src/epilotapi/models/operations/deleteentity.py b/src/epilotapi/models/operations/deleteentity.py index 14fbf49e9..b7fd526b4 100755 --- a/src/epilotapi/models/operations/deleteentity.py +++ b/src/epilotapi/models/operations/deleteentity.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from typing import Optional diff --git a/src/epilotapi/models/operations/deleteflow.py b/src/epilotapi/models/operations/deleteflow.py index 06b07a04f..9d712c9da 100755 --- a/src/epilotapi/models/operations/deleteflow.py +++ b/src/epilotapi/models/operations/deleteflow.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import automationflow as shared_automationflow from typing import Optional diff --git a/src/epilotapi/models/operations/deleterelation.py b/src/epilotapi/models/operations/deleterelation.py index d45699eb4..5a6384ae3 100755 --- a/src/epilotapi/models/operations/deleterelation.py +++ b/src/epilotapi/models/operations/deleterelation.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from typing import Optional diff --git a/src/epilotapi/models/operations/deletesavedview.py b/src/epilotapi/models/operations/deletesavedview.py index f3d3e0c48..44eb23038 100755 --- a/src/epilotapi/models/operations/deletesavedview.py +++ b/src/epilotapi/models/operations/deletesavedview.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses diff --git a/src/epilotapi/models/operations/deleteschemabyid.py b/src/epilotapi/models/operations/deleteschemabyid.py index 24d124be1..e49163ed8 100755 --- a/src/epilotapi/models/operations/deleteschemabyid.py +++ b/src/epilotapi/models/operations/deleteschemabyid.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses diff --git a/src/epilotapi/models/operations/exportentities.py b/src/epilotapi/models/operations/exportentities.py index 8059fa8ec..85ce9af87 100755 --- a/src/epilotapi/models/operations/exportentities.py +++ b/src/epilotapi/models/operations/exportentities.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import entitysearchparams as shared_entitysearchparams from typing import Optional diff --git a/src/epilotapi/models/operations/getactivity.py b/src/epilotapi/models/operations/getactivity.py index 86b4275b6..45539eb32 100755 --- a/src/epilotapi/models/operations/getactivity.py +++ b/src/epilotapi/models/operations/getactivity.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import activityitem as shared_activityitem from typing import Optional diff --git a/src/epilotapi/models/operations/getentity.py b/src/epilotapi/models/operations/getentity.py index 2d0f0e244..7f7e9bf17 100755 --- a/src/epilotapi/models/operations/getentity.py +++ b/src/epilotapi/models/operations/getentity.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional @@ -21,11 +22,11 @@ class GetEntityRequest: query_params: GetEntityQueryParams = dataclasses.field() -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class GetEntity200ApplicationJSON: - entity: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity') }}) - relations: Optional[list[dict[str, Any]]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('relations') }}) + entity: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity'), 'exclude': lambda f: f is None }}) + relations: Optional[list[dict[str, Any]]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('relations'), 'exclude': lambda f: f is None }}) @dataclasses.dataclass diff --git a/src/epilotapi/models/operations/getentityactivityfeed.py b/src/epilotapi/models/operations/getentityactivityfeed.py index 4373d3c13..76aa3c6ba 100755 --- a/src/epilotapi/models/operations/getentityactivityfeed.py +++ b/src/epilotapi/models/operations/getentityactivityfeed.py @@ -1,7 +1,8 @@ +from __future__ import annotations import dataclasses import dateutil.parser from ..shared import activityitem as shared_activityitem -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from datetime import datetime from epilotapi import utils from marshmallow import fields @@ -29,11 +30,11 @@ class GetEntityActivityFeedRequest: query_params: GetEntityActivityFeedQueryParams = dataclasses.field() -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class GetEntityActivityFeed200ApplicationJSON: - results: Optional[list[shared_activityitem.ActivityItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results') }}) - total: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('total') }}) + results: Optional[list[shared_activityitem.ActivityItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results'), 'exclude': lambda f: f is None }}) + total: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('total'), 'exclude': lambda f: f is None }}) @dataclasses.dataclass diff --git a/src/epilotapi/models/operations/getexecution.py b/src/epilotapi/models/operations/getexecution.py index 585f753c4..99685bc1d 100755 --- a/src/epilotapi/models/operations/getexecution.py +++ b/src/epilotapi/models/operations/getexecution.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import automationexecution as shared_automationexecution from typing import Optional diff --git a/src/epilotapi/models/operations/getexecutions.py b/src/epilotapi/models/operations/getexecutions.py index 028935b2a..f11bdc7ab 100755 --- a/src/epilotapi/models/operations/getexecutions.py +++ b/src/epilotapi/models/operations/getexecutions.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import getexecutionsresp as shared_getexecutionsresp from typing import Optional diff --git a/src/epilotapi/models/operations/getflow.py b/src/epilotapi/models/operations/getflow.py index 7f8e0cf01..cd7830b91 100755 --- a/src/epilotapi/models/operations/getflow.py +++ b/src/epilotapi/models/operations/getflow.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import automationflow as shared_automationflow from typing import Optional diff --git a/src/epilotapi/models/operations/getjourney.py b/src/epilotapi/models/operations/getjourney.py index d3ddfea66..62443660f 100755 --- a/src/epilotapi/models/operations/getjourney.py +++ b/src/epilotapi/models/operations/getjourney.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from typing import Any, Optional diff --git a/src/epilotapi/models/operations/getjourneysbyorgid.py b/src/epilotapi/models/operations/getjourneysbyorgid.py index f8ffe25e9..f9c5eb0d6 100755 --- a/src/epilotapi/models/operations/getjourneysbyorgid.py +++ b/src/epilotapi/models/operations/getjourneysbyorgid.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from typing import Any, Optional diff --git a/src/epilotapi/models/operations/getrelations.py b/src/epilotapi/models/operations/getrelations.py index a2c3e64dc..087913d41 100755 --- a/src/epilotapi/models/operations/getrelations.py +++ b/src/epilotapi/models/operations/getrelations.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from typing import Any, Optional diff --git a/src/epilotapi/models/operations/getsavedview.py b/src/epilotapi/models/operations/getsavedview.py index 1d7ed79af..b5818240d 100755 --- a/src/epilotapi/models/operations/getsavedview.py +++ b/src/epilotapi/models/operations/getsavedview.py @@ -1,6 +1,7 @@ +from __future__ import annotations import dataclasses from ..shared import savedviewitem as shared_savedviewitem -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional @@ -15,10 +16,10 @@ class GetSavedViewRequest: path_params: GetSavedViewPathParams = dataclasses.field() -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class GetSavedView200ApplicationJSON: - view: Optional[shared_savedviewitem.SavedViewItem] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('view') }}) + view: Optional[shared_savedviewitem.SavedViewItem] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('view'), 'exclude': lambda f: f is None }}) @dataclasses.dataclass diff --git a/src/epilotapi/models/operations/getschema.py b/src/epilotapi/models/operations/getschema.py index 711346910..38ccbd1cc 100755 --- a/src/epilotapi/models/operations/getschema.py +++ b/src/epilotapi/models/operations/getschema.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import entityschemaitem as shared_entityschemaitem from typing import Optional diff --git a/src/epilotapi/models/operations/getschemaversions.py b/src/epilotapi/models/operations/getschemaversions.py index 971e23613..37739f1d9 100755 --- a/src/epilotapi/models/operations/getschemaversions.py +++ b/src/epilotapi/models/operations/getschemaversions.py @@ -1,6 +1,7 @@ +from __future__ import annotations import dataclasses from ..shared import entityschemaitem as shared_entityschemaitem -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional @@ -15,11 +16,11 @@ class GetSchemaVersionsRequest: path_params: GetSchemaVersionsPathParams = dataclasses.field() -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class GetSchemaVersions200ApplicationJSON: - drafts: Optional[list[shared_entityschemaitem.EntitySchemaItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('drafts') }}) - versions: Optional[list[shared_entityschemaitem.EntitySchemaItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('versions') }}) + drafts: Optional[list[shared_entityschemaitem.EntitySchemaItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('drafts'), 'exclude': lambda f: f is None }}) + versions: Optional[list[shared_entityschemaitem.EntitySchemaItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('versions'), 'exclude': lambda f: f is None }}) @dataclasses.dataclass diff --git a/src/epilotapi/models/operations/gettaxonomy.py b/src/epilotapi/models/operations/gettaxonomy.py index c939de187..c888f5993 100755 --- a/src/epilotapi/models/operations/gettaxonomy.py +++ b/src/epilotapi/models/operations/gettaxonomy.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import taxonomy as shared_taxonomy from typing import Optional diff --git a/src/epilotapi/models/operations/importentities.py b/src/epilotapi/models/operations/importentities.py index e641b2a7e..4965edf50 100755 --- a/src/epilotapi/models/operations/importentities.py +++ b/src/epilotapi/models/operations/importentities.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import entityimportparams as shared_entityimportparams from typing import Optional diff --git a/src/epilotapi/models/operations/listsavedviews.py b/src/epilotapi/models/operations/listsavedviews.py index 6923ad61f..a6b268516 100755 --- a/src/epilotapi/models/operations/listsavedviews.py +++ b/src/epilotapi/models/operations/listsavedviews.py @@ -1,14 +1,15 @@ +from __future__ import annotations import dataclasses from ..shared import savedviewitem as shared_savedviewitem -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class ListSavedViews200ApplicationJSON: - results: Optional[list[shared_savedviewitem.SavedViewItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results') }}) + results: Optional[list[shared_savedviewitem.SavedViewItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results'), 'exclude': lambda f: f is None }}) @dataclasses.dataclass diff --git a/src/epilotapi/models/operations/listschemablueprints.py b/src/epilotapi/models/operations/listschemablueprints.py index 30a6c232c..135fbfe7d 100755 --- a/src/epilotapi/models/operations/listschemablueprints.py +++ b/src/epilotapi/models/operations/listschemablueprints.py @@ -1,14 +1,15 @@ +from __future__ import annotations import dataclasses from ..shared import entityschemaitem as shared_entityschemaitem -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class ListSchemaBlueprints200ApplicationJSON: - results: Optional[list[shared_entityschemaitem.EntitySchemaItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results') }}) + results: Optional[list[shared_entityschemaitem.EntitySchemaItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results'), 'exclude': lambda f: f is None }}) @dataclasses.dataclass diff --git a/src/epilotapi/models/operations/listschemas.py b/src/epilotapi/models/operations/listschemas.py index e922f0235..20cdc5ab0 100755 --- a/src/epilotapi/models/operations/listschemas.py +++ b/src/epilotapi/models/operations/listschemas.py @@ -1,6 +1,7 @@ +from __future__ import annotations import dataclasses from ..shared import entityschemaitem as shared_entityschemaitem -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional @@ -15,10 +16,10 @@ class ListSchemasRequest: query_params: ListSchemasQueryParams = dataclasses.field() -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class ListSchemas200ApplicationJSON: - results: Optional[list[shared_entityschemaitem.EntitySchemaItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results') }}) + results: Optional[list[shared_entityschemaitem.EntitySchemaItem]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results'), 'exclude': lambda f: f is None }}) @dataclasses.dataclass diff --git a/src/epilotapi/models/operations/listtaxonomies.py b/src/epilotapi/models/operations/listtaxonomies.py index 4fecf8277..be8e09cf4 100755 --- a/src/epilotapi/models/operations/listtaxonomies.py +++ b/src/epilotapi/models/operations/listtaxonomies.py @@ -1,14 +1,15 @@ +from __future__ import annotations import dataclasses from ..shared import taxonomy as shared_taxonomy -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class ListTaxonomies200ApplicationJSON: - results: Optional[list[shared_taxonomy.Taxonomy]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results') }}) + results: Optional[list[shared_taxonomy.Taxonomy]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results'), 'exclude': lambda f: f is None }}) @dataclasses.dataclass diff --git a/src/epilotapi/models/operations/listtaxonomyclassificationsforschema.py b/src/epilotapi/models/operations/listtaxonomyclassificationsforschema.py index 19231a7f9..aa3598b7a 100755 --- a/src/epilotapi/models/operations/listtaxonomyclassificationsforschema.py +++ b/src/epilotapi/models/operations/listtaxonomyclassificationsforschema.py @@ -1,6 +1,7 @@ +from __future__ import annotations import dataclasses from ..shared import taxonomyclassification as shared_taxonomyclassification -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional @@ -23,10 +24,10 @@ class ListTaxonomyClassificationsForSchemaRequest: query_params: ListTaxonomyClassificationsForSchemaQueryParams = dataclasses.field() -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class ListTaxonomyClassificationsForSchema200ApplicationJSON: - results: Optional[list[shared_taxonomyclassification.TaxonomyClassification]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results') }}) + results: Optional[list[shared_taxonomyclassification.TaxonomyClassification]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results'), 'exclude': lambda f: f is None }}) @dataclasses.dataclass diff --git a/src/epilotapi/models/operations/patchupdatejourney.py b/src/epilotapi/models/operations/patchupdatejourney.py index 2a17591ea..7a3d54738 100755 --- a/src/epilotapi/models/operations/patchupdatejourney.py +++ b/src/epilotapi/models/operations/patchupdatejourney.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from typing import Any, Optional diff --git a/src/epilotapi/models/operations/putflow.py b/src/epilotapi/models/operations/putflow.py index ae43c7467..77df41c85 100755 --- a/src/epilotapi/models/operations/putflow.py +++ b/src/epilotapi/models/operations/putflow.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import automationflow as shared_automationflow from typing import Optional diff --git a/src/epilotapi/models/operations/removejourney.py b/src/epilotapi/models/operations/removejourney.py index 634f54a20..c54a535d4 100755 --- a/src/epilotapi/models/operations/removejourney.py +++ b/src/epilotapi/models/operations/removejourney.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses diff --git a/src/epilotapi/models/operations/retriggeraction.py b/src/epilotapi/models/operations/retriggeraction.py index 702707bbe..efe5397ab 100755 --- a/src/epilotapi/models/operations/retriggeraction.py +++ b/src/epilotapi/models/operations/retriggeraction.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import retryreq as shared_retryreq from typing import Optional diff --git a/src/epilotapi/models/operations/searchentities.py b/src/epilotapi/models/operations/searchentities.py index a6771cc52..6c14e0f02 100755 --- a/src/epilotapi/models/operations/searchentities.py +++ b/src/epilotapi/models/operations/searchentities.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import entitysearchparams as shared_entitysearchparams from ..shared import entitysearchresults as shared_entitysearchresults diff --git a/src/epilotapi/models/operations/searchflows.py b/src/epilotapi/models/operations/searchflows.py index 60df10e54..d9d5cd348 100755 --- a/src/epilotapi/models/operations/searchflows.py +++ b/src/epilotapi/models/operations/searchflows.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import searchautomationsresp as shared_searchautomationsresp from typing import Optional diff --git a/src/epilotapi/models/operations/searchjourneys.py b/src/epilotapi/models/operations/searchjourneys.py index f675eb7ac..8fa452fcd 100755 --- a/src/epilotapi/models/operations/searchjourneys.py +++ b/src/epilotapi/models/operations/searchjourneys.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import searchjourneysqueryrequest as shared_searchjourneysqueryrequest from ..shared import searchjourneysresponse as shared_searchjourneysresponse diff --git a/src/epilotapi/models/operations/startexecution.py b/src/epilotapi/models/operations/startexecution.py index 33025c97e..011714f9f 100755 --- a/src/epilotapi/models/operations/startexecution.py +++ b/src/epilotapi/models/operations/startexecution.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import automationexecution as shared_automationexecution from ..shared import startexecutionrequest as shared_startexecutionrequest diff --git a/src/epilotapi/models/operations/taxonomiesclassificationssearch.py b/src/epilotapi/models/operations/taxonomiesclassificationssearch.py index 6a5afcb91..07631531d 100755 --- a/src/epilotapi/models/operations/taxonomiesclassificationssearch.py +++ b/src/epilotapi/models/operations/taxonomiesclassificationssearch.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional @@ -9,10 +10,10 @@ class TaxonomiesClassificationsSearchQueryParams: taxonomy_slug: str = dataclasses.field(metadata={'query_param': { 'field_name': 'taxonomySlug', 'style': 'form', 'explode': True }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class TaxonomiesClassificationsSearchRequestBody: - classification_ids: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('classificationIds') }}) + classification_ids: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('classificationIds'), 'exclude': lambda f: f is None }}) @dataclasses.dataclass @@ -21,10 +22,10 @@ class TaxonomiesClassificationsSearchRequest: request: Optional[TaxonomiesClassificationsSearchRequestBody] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class TaxonomiesClassificationsSearch200ApplicationJSON: - results: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results') }}) + results: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results'), 'exclude': lambda f: f is None }}) @dataclasses.dataclass diff --git a/src/epilotapi/models/operations/taxonomyautocomplete.py b/src/epilotapi/models/operations/taxonomyautocomplete.py index 5fec8e39c..bb7c57787 100755 --- a/src/epilotapi/models/operations/taxonomyautocomplete.py +++ b/src/epilotapi/models/operations/taxonomyautocomplete.py @@ -1,6 +1,7 @@ +from __future__ import annotations import dataclasses from ..shared import taxonomyclassification as shared_taxonomyclassification -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional @@ -22,10 +23,10 @@ class TaxonomyAutocompleteRequest: query_params: TaxonomyAutocompleteQueryParams = dataclasses.field() -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class TaxonomyAutocomplete200ApplicationJSON: - results: Optional[list[shared_taxonomyclassification.TaxonomyClassification]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results') }}) + results: Optional[list[shared_taxonomyclassification.TaxonomyClassification]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results'), 'exclude': lambda f: f is None }}) @dataclasses.dataclass diff --git a/src/epilotapi/models/operations/updateclassificationsfortaxonomy.py b/src/epilotapi/models/operations/updateclassificationsfortaxonomy.py index f5943ed47..fd39b6194 100755 --- a/src/epilotapi/models/operations/updateclassificationsfortaxonomy.py +++ b/src/epilotapi/models/operations/updateclassificationsfortaxonomy.py @@ -1,7 +1,8 @@ +from __future__ import annotations import dataclasses from ..shared import classificationsupdate as shared_classificationsupdate from ..shared import taxonomyclassification as shared_taxonomyclassification -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional @@ -17,12 +18,12 @@ class UpdateClassificationsForTaxonomyRequest: request: Optional[shared_classificationsupdate.ClassificationsUpdate] = dataclasses.field(default=None, metadata={'request': { 'media_type': 'application/json' }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class UpdateClassificationsForTaxonomy200ApplicationJSON: - created: Optional[list[shared_taxonomyclassification.TaxonomyClassification]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created') }}) - deleted: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deleted') }}) - updated: Optional[list[shared_taxonomyclassification.TaxonomyClassification]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated') }}) + created: Optional[list[shared_taxonomyclassification.TaxonomyClassification]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created'), 'exclude': lambda f: f is None }}) + deleted: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deleted'), 'exclude': lambda f: f is None }}) + updated: Optional[list[shared_taxonomyclassification.TaxonomyClassification]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated'), 'exclude': lambda f: f is None }}) @dataclasses.dataclass diff --git a/src/epilotapi/models/operations/updateentity.py b/src/epilotapi/models/operations/updateentity.py index f69c248fc..8305ac4b7 100755 --- a/src/epilotapi/models/operations/updateentity.py +++ b/src/epilotapi/models/operations/updateentity.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from typing import Any, Optional diff --git a/src/epilotapi/models/operations/updatejourney.py b/src/epilotapi/models/operations/updatejourney.py index d717d12c4..27320c02e 100755 --- a/src/epilotapi/models/operations/updatejourney.py +++ b/src/epilotapi/models/operations/updatejourney.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from typing import Any, Optional diff --git a/src/epilotapi/models/operations/updaterelation.py b/src/epilotapi/models/operations/updaterelation.py index 016df3730..11bae3ccf 100755 --- a/src/epilotapi/models/operations/updaterelation.py +++ b/src/epilotapi/models/operations/updaterelation.py @@ -1,6 +1,7 @@ +from __future__ import annotations import dataclasses from ..shared import relationitem as shared_relationitem -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional @@ -18,10 +19,10 @@ class UpdateRelationQueryParams: async_: Optional[bool] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'async', 'style': 'form', 'explode': True }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class UpdateRelationRequestBody: - tags: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_tags') }}) + tags: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_tags'), 'exclude': lambda f: f is None }}) @dataclasses.dataclass diff --git a/src/epilotapi/models/operations/updatesavedview.py b/src/epilotapi/models/operations/updatesavedview.py index 6913e7957..09c73a0bf 100755 --- a/src/epilotapi/models/operations/updatesavedview.py +++ b/src/epilotapi/models/operations/updatesavedview.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from ..shared import savedview as shared_savedview from ..shared import savedviewitem as shared_savedviewitem diff --git a/src/epilotapi/models/operations/upsertentity.py b/src/epilotapi/models/operations/upsertentity.py index 7adb2219f..8b04b7dfb 100755 --- a/src/epilotapi/models/operations/upsertentity.py +++ b/src/epilotapi/models/operations/upsertentity.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional @@ -16,7 +17,7 @@ class UpsertEntityQueryParams: dry_run: Optional[bool] = dataclasses.field(default=None, metadata={'query_param': { 'field_name': 'dry_run', 'style': 'form', 'explode': True }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class UpsertEntityRequestBody: entity: dict[str, Any] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity') }}) diff --git a/src/epilotapi/models/shared/activity.py b/src/epilotapi/models/shared/activity.py index 7cbf35b80..105c6d449 100755 --- a/src/epilotapi/models/shared/activity.py +++ b/src/epilotapi/models/shared/activity.py @@ -1,14 +1,15 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class Activity: message: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('message') }}) title: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('title') }}) type: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - payload: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('payload') }}) + payload: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('payload'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/activityitem.py b/src/epilotapi/models/shared/activityitem.py index c01402ccc..32f9b0cbc 100755 --- a/src/epilotapi/models/shared/activityitem.py +++ b/src/epilotapi/models/shared/activityitem.py @@ -1,23 +1,24 @@ +from __future__ import annotations import dataclasses import dateutil.parser from ..shared import entityoperation as shared_entityoperation -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from datetime import datetime from epilotapi import utils from marshmallow import fields from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class ActivityItem: message: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('message') }}) title: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('title') }}) type: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_id') }}) - caller: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('caller') }}) - operations: Optional[list[shared_entityoperation.EntityOperation]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('operations') }}) - operations_total: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('operations_total') }}) - payload: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('payload') }}) - timestamp: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('timestamp'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso') }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_id'), 'exclude': lambda f: f is None }}) + caller: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('caller'), 'exclude': lambda f: f is None }}) + operations: Optional[list[shared_entityoperation.EntityOperation]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('operations'), 'exclude': lambda f: f is None }}) + operations_total: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('operations_total'), 'exclude': lambda f: f is None }}) + payload: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('payload'), 'exclude': lambda f: f is None }}) + timestamp: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('timestamp'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/activitytrigger.py b/src/epilotapi/models/shared/activitytrigger.py index 3f8f25832..6ec75d0ab 100755 --- a/src/epilotapi/models/shared/activitytrigger.py +++ b/src/epilotapi/models/shared/activitytrigger.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Optional @@ -11,17 +12,17 @@ class ActivityTriggerConfigurationTypesEnum(str, Enum): SYNC_ACTIVITY = "SyncActivity" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class ActivityTriggerConfiguration: - schema: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('schema') }}) - types: Optional[list[ActivityTriggerConfigurationTypesEnum]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('types') }}) + schema: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('schema'), 'exclude': lambda f: f is None }}) + types: Optional[list[ActivityTriggerConfigurationTypesEnum]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('types'), 'exclude': lambda f: f is None }}) class ActivityTriggerTypeEnum(str, Enum): ACTIVITY = "activity" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class ActivityTrigger: configuration: ActivityTriggerConfiguration = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('configuration') }}) diff --git a/src/epilotapi/models/shared/addressrelationattribute.py b/src/epilotapi/models/shared/addressrelationattribute.py index 374f9a98a..6b4450253 100755 --- a/src/epilotapi/models/shared/addressrelationattribute.py +++ b/src/epilotapi/models/shared/addressrelationattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -8,7 +9,7 @@ class AddressRelationAttributeTypeEnum(str, Enum): RELATION_ADDRESS = "relation_address" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class AddressRelationAttribute: r"""AddressRelationAttribute @@ -17,27 +18,27 @@ class AddressRelationAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - has_primary: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('has_primary') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[AddressRelationAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + has_primary: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('has_primary'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[AddressRelationAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/apisubmissiontrigger.py b/src/epilotapi/models/shared/apisubmissiontrigger.py index 302ea5f1d..32b8f6023 100755 --- a/src/epilotapi/models/shared/apisubmissiontrigger.py +++ b/src/epilotapi/models/shared/apisubmissiontrigger.py @@ -1,20 +1,21 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class APISubmissionTriggerConfiguration: - source_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('source_id') }}) + source_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('source_id'), 'exclude': lambda f: f is None }}) class APISubmissionTriggerTypeEnum(str, Enum): API_SUBMISSION = "api_submission" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class APISubmissionTrigger: configuration: APISubmissionTriggerConfiguration = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('configuration') }}) diff --git a/src/epilotapi/models/shared/appendvaluemapper.py b/src/epilotapi/models/shared/appendvaluemapper.py index 43136270d..d62e393ed 100755 --- a/src/epilotapi/models/shared/appendvaluemapper.py +++ b/src/epilotapi/models/shared/appendvaluemapper.py @@ -1,16 +1,17 @@ +from __future__ import annotations import dataclasses from ..shared import mappingattributemode_enum as shared_mappingattributemode_enum -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class AppendValueMapper: mode: shared_mappingattributemode_enum.MappingAttributeModeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('mode') }}) target: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('target') }}) value_json: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_json') }}) - source: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('source') }}) - target_unique: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('target_unique') }}) + source: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('source'), 'exclude': lambda f: f is None }}) + target_unique: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('target_unique'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/assignuserstostep.py b/src/epilotapi/models/shared/assignuserstostep.py index c89aa5e92..e465b2fca 100755 --- a/src/epilotapi/models/shared/assignuserstostep.py +++ b/src/epilotapi/models/shared/assignuserstostep.py @@ -1,13 +1,14 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class AssignUsersToStep: - step_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('step_id') }}) - step_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('step_name') }}) - user_ids: Optional[list[float]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('user_ids') }}) + step_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('step_id'), 'exclude': lambda f: f is None }}) + step_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('step_name'), 'exclude': lambda f: f is None }}) + user_ids: Optional[list[float]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('user_ids'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/automationaction.py b/src/epilotapi/models/shared/automationaction.py index b4595384f..ca9e415ce 100755 --- a/src/epilotapi/models/shared/automationaction.py +++ b/src/epilotapi/models/shared/automationaction.py @@ -1,26 +1,27 @@ +from __future__ import annotations import dataclasses from ..shared import erroroutput as shared_erroroutput from ..shared import executionstatus_enum as shared_executionstatus_enum from ..shared import retrystrategy_enum as shared_retrystrategy_enum -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class AutomationAction: - allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure') }}) - config: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config') }}) - created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically') }}) - error_output: Optional[shared_erroroutput.ErrorOutput] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('error_output') }}) - execution_status: Optional[shared_executionstatus_enum.ExecutionStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('execution_status') }}) - flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - outputs: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('outputs') }}) - retry_strategy: Optional[shared_retrystrategy_enum.RetryStrategyEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('retry_strategy') }}) - started_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('started_at') }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - updated_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at') }}) + allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure'), 'exclude': lambda f: f is None }}) + config: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config'), 'exclude': lambda f: f is None }}) + created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically'), 'exclude': lambda f: f is None }}) + error_output: Optional[shared_erroroutput.ErrorOutput] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('error_output'), 'exclude': lambda f: f is None }}) + execution_status: Optional[shared_executionstatus_enum.ExecutionStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('execution_status'), 'exclude': lambda f: f is None }}) + flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name'), 'exclude': lambda f: f is None }}) + outputs: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('outputs'), 'exclude': lambda f: f is None }}) + retry_strategy: Optional[shared_retrystrategy_enum.RetryStrategyEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('retry_strategy'), 'exclude': lambda f: f is None }}) + started_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('started_at'), 'exclude': lambda f: f is None }}) + type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + updated_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/automationactionconfig.py b/src/epilotapi/models/shared/automationactionconfig.py index 85e306f49..a99182499 100755 --- a/src/epilotapi/models/shared/automationactionconfig.py +++ b/src/epilotapi/models/shared/automationactionconfig.py @@ -1,17 +1,18 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class AutomationActionConfig: - allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure') }}) - config: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config') }}) - created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically') }}) - flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) + allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure'), 'exclude': lambda f: f is None }}) + config: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config'), 'exclude': lambda f: f is None }}) + created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically'), 'exclude': lambda f: f is None }}) + flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name'), 'exclude': lambda f: f is None }}) + type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/automationattribute.py b/src/epilotapi/models/shared/automationattribute.py index 72d9d55fa..1db2b583c 100755 --- a/src/epilotapi/models/shared/automationattribute.py +++ b/src/epilotapi/models/shared/automationattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -8,7 +9,7 @@ class AutomationAttributeTypeEnum(str, Enum): AUTOMATION = "automation" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class AutomationAttribute: r"""AutomationAttribute @@ -17,26 +18,26 @@ class AutomationAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[AutomationAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[AutomationAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/automationexecution.py b/src/epilotapi/models/shared/automationexecution.py index 9c4817689..411e6e5d2 100755 --- a/src/epilotapi/models/shared/automationexecution.py +++ b/src/epilotapi/models/shared/automationexecution.py @@ -1,14 +1,15 @@ +from __future__ import annotations import dataclasses import dateutil.parser from ..shared import executionstatus_enum as shared_executionstatus_enum -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from datetime import datetime from epilotapi import utils from marshmallow import fields from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class AutomationExecution: actions: list[Any] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('actions') }}) @@ -16,11 +17,11 @@ class AutomationExecution: flow_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_id') }}) id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) org_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('org_id') }}) - activity_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('activity_id') }}) - created_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso') }}) - current_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('current_action_id') }}) - entity_snapshot: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_snapshot') }}) - execution_status: Optional[shared_executionstatus_enum.ExecutionStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('execution_status') }}) - flow_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_name') }}) - updated_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso') }}) + activity_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('activity_id'), 'exclude': lambda f: f is None }}) + created_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso'), 'exclude': lambda f: f is None }}) + current_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('current_action_id'), 'exclude': lambda f: f is None }}) + entity_snapshot: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_snapshot'), 'exclude': lambda f: f is None }}) + execution_status: Optional[shared_executionstatus_enum.ExecutionStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('execution_status'), 'exclude': lambda f: f is None }}) + flow_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_name'), 'exclude': lambda f: f is None }}) + updated_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/automationflow.py b/src/epilotapi/models/shared/automationflow.py index 20d765bdd..ef9bc1473 100755 --- a/src/epilotapi/models/shared/automationflow.py +++ b/src/epilotapi/models/shared/automationflow.py @@ -1,26 +1,27 @@ +from __future__ import annotations import dataclasses import dateutil.parser from ..shared import triggercondition as shared_triggercondition -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from datetime import datetime from epilotapi import utils from marshmallow import fields from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class AutomationFlow: actions: list[Any] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('actions') }}) flow_name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_name') }}) triggers: list[Any] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('triggers') }}) - created_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso') }}) - created_by: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_by') }}) - enabled: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('enabled') }}) - entity_schema: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_schema') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - last_updated_by: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('last_updated_by') }}) - runs: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('runs') }}) - trigger_conditions: Optional[list[shared_triggercondition.TriggerCondition]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('trigger_conditions') }}) - updated_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso') }}) + created_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso'), 'exclude': lambda f: f is None }}) + created_by: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_by'), 'exclude': lambda f: f is None }}) + enabled: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('enabled'), 'exclude': lambda f: f is None }}) + entity_schema: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_schema'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + last_updated_by: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('last_updated_by'), 'exclude': lambda f: f is None }}) + runs: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('runs'), 'exclude': lambda f: f is None }}) + trigger_conditions: Optional[list[shared_triggercondition.TriggerCondition]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('trigger_conditions'), 'exclude': lambda f: f is None }}) + updated_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/booleanattribute.py b/src/epilotapi/models/shared/booleanattribute.py index 7765a67ae..359d584e6 100755 --- a/src/epilotapi/models/shared/booleanattribute.py +++ b/src/epilotapi/models/shared/booleanattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -8,7 +9,7 @@ class BooleanAttributeTypeEnum(str, Enum): BOOLEAN = "boolean" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class BooleanAttribute: r"""BooleanAttribute @@ -17,26 +18,26 @@ class BooleanAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[BooleanAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[BooleanAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/cartcheckoutaction.py b/src/epilotapi/models/shared/cartcheckoutaction.py index 5445e5520..de3d97c77 100755 --- a/src/epilotapi/models/shared/cartcheckoutaction.py +++ b/src/epilotapi/models/shared/cartcheckoutaction.py @@ -1,31 +1,32 @@ +from __future__ import annotations import dataclasses from ..shared import cartcheckoutconfig as shared_cartcheckoutconfig from ..shared import erroroutput as shared_erroroutput from ..shared import executionstatus_enum as shared_executionstatus_enum from ..shared import retrystrategy_enum as shared_retrystrategy_enum -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class CartCheckoutAction: r"""CartCheckoutAction Creates an order entity with prices from journey """ - allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure') }}) - config: Optional[shared_cartcheckoutconfig.CartCheckoutConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config') }}) - created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically') }}) - error_output: Optional[shared_erroroutput.ErrorOutput] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('error_output') }}) - execution_status: Optional[shared_executionstatus_enum.ExecutionStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('execution_status') }}) - flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - outputs: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('outputs') }}) - retry_strategy: Optional[shared_retrystrategy_enum.RetryStrategyEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('retry_strategy') }}) - started_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('started_at') }}) - type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - updated_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at') }}) + allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure'), 'exclude': lambda f: f is None }}) + config: Optional[shared_cartcheckoutconfig.CartCheckoutConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config'), 'exclude': lambda f: f is None }}) + created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically'), 'exclude': lambda f: f is None }}) + error_output: Optional[shared_erroroutput.ErrorOutput] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('error_output'), 'exclude': lambda f: f is None }}) + execution_status: Optional[shared_executionstatus_enum.ExecutionStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('execution_status'), 'exclude': lambda f: f is None }}) + flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name'), 'exclude': lambda f: f is None }}) + outputs: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('outputs'), 'exclude': lambda f: f is None }}) + retry_strategy: Optional[shared_retrystrategy_enum.RetryStrategyEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('retry_strategy'), 'exclude': lambda f: f is None }}) + started_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('started_at'), 'exclude': lambda f: f is None }}) + type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + updated_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/cartcheckoutactionconfig.py b/src/epilotapi/models/shared/cartcheckoutactionconfig.py index e7bd2aa1e..43c8a04ad 100755 --- a/src/epilotapi/models/shared/cartcheckoutactionconfig.py +++ b/src/epilotapi/models/shared/cartcheckoutactionconfig.py @@ -1,22 +1,23 @@ +from __future__ import annotations import dataclasses from ..shared import cartcheckoutconfig as shared_cartcheckoutconfig -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class CartCheckoutActionConfig: r"""CartCheckoutActionConfig Creates an order entity with prices from journey """ - allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure') }}) - config: Optional[shared_cartcheckoutconfig.CartCheckoutConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config') }}) - created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically') }}) - flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) + allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure'), 'exclude': lambda f: f is None }}) + config: Optional[shared_cartcheckoutconfig.CartCheckoutConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config'), 'exclude': lambda f: f is None }}) + created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically'), 'exclude': lambda f: f is None }}) + flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name'), 'exclude': lambda f: f is None }}) + type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/cartcheckoutconfig.py b/src/epilotapi/models/shared/cartcheckoutconfig.py index 513ff486e..c10eb4165 100755 --- a/src/epilotapi/models/shared/cartcheckoutconfig.py +++ b/src/epilotapi/models/shared/cartcheckoutconfig.py @@ -1,19 +1,20 @@ +from __future__ import annotations import dataclasses from ..shared import mappingconfigref as shared_mappingconfigref from ..shared import relationattribute1 as shared_relationattribute1 -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class CartCheckoutConfig: - linkback_relation_attribute: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('linkback_relation_attribute') }}) - linkback_relation_tags: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('linkback_relation_tags') }}) - mapping_attributes: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('mapping_attributes') }}) - mapping_config: Optional[shared_mappingconfigref.MappingConfigRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('mapping_config') }}) - relation_attributes: Optional[list[shared_relationattribute1.RelationAttribute1]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('relation_attributes') }}) - target_unique: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('target_unique') }}) - version: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('version') }}) + linkback_relation_attribute: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('linkback_relation_attribute'), 'exclude': lambda f: f is None }}) + linkback_relation_tags: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('linkback_relation_tags'), 'exclude': lambda f: f is None }}) + mapping_attributes: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('mapping_attributes'), 'exclude': lambda f: f is None }}) + mapping_config: Optional[shared_mappingconfigref.MappingConfigRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('mapping_config'), 'exclude': lambda f: f is None }}) + relation_attributes: Optional[list[shared_relationattribute1.RelationAttribute1]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('relation_attributes'), 'exclude': lambda f: f is None }}) + target_unique: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('target_unique'), 'exclude': lambda f: f is None }}) + version: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('version'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/classificationsupdate.py b/src/epilotapi/models/shared/classificationsupdate.py index 6ce7263c7..0de7b10bb 100755 --- a/src/epilotapi/models/shared/classificationsupdate.py +++ b/src/epilotapi/models/shared/classificationsupdate.py @@ -1,14 +1,15 @@ +from __future__ import annotations import dataclasses from ..shared import taxonomyclassification as shared_taxonomyclassification -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class ClassificationsUpdate: - create: Optional[list[shared_taxonomyclassification.TaxonomyClassification]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('create') }}) - delete: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('delete') }}) - update: Optional[list[shared_taxonomyclassification.TaxonomyClassification]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('update') }}) + create: Optional[list[shared_taxonomyclassification.TaxonomyClassification]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('create'), 'exclude': lambda f: f is None }}) + delete: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('delete'), 'exclude': lambda f: f is None }}) + update: Optional[list[shared_taxonomyclassification.TaxonomyClassification]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('update'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/comparison_enum.py b/src/epilotapi/models/shared/comparison_enum.py index ce2c8178f..3e70f1083 100755 --- a/src/epilotapi/models/shared/comparison_enum.py +++ b/src/epilotapi/models/shared/comparison_enum.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from enum import Enum diff --git a/src/epilotapi/models/shared/computedattribute.py b/src/epilotapi/models/shared/computedattribute.py index 8c2fff2d0..70e161090 100755 --- a/src/epilotapi/models/shared/computedattribute.py +++ b/src/epilotapi/models/shared/computedattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -8,7 +9,7 @@ class ComputedAttributeTypeEnum(str, Enum): COMPUTED = "computed" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class ComputedAttribute: r"""ComputedAttribute @@ -17,26 +18,26 @@ class ComputedAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[ComputedAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[ComputedAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/consentattribute.py b/src/epilotapi/models/shared/consentattribute.py index 8da596a4e..38ba39e56 100755 --- a/src/epilotapi/models/shared/consentattribute.py +++ b/src/epilotapi/models/shared/consentattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -8,7 +9,7 @@ class ConsentAttributeTypeEnum(str, Enum): CONSENT = "consent" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class ConsentAttribute: r"""ConsentAttribute @@ -19,26 +20,26 @@ class ConsentAttribute: name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) topic: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('topic') }}) type: ConsentAttributeTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - identifiers: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('identifiers') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + identifiers: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('identifiers'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/copyvaluemapper.py b/src/epilotapi/models/shared/copyvaluemapper.py index 8bb1d59fb..4a4e1879c 100755 --- a/src/epilotapi/models/shared/copyvaluemapper.py +++ b/src/epilotapi/models/shared/copyvaluemapper.py @@ -1,10 +1,11 @@ +from __future__ import annotations import dataclasses from ..shared import mappingattributemode_enum as shared_mappingattributemode_enum -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class CopyValueMapper: mode: shared_mappingattributemode_enum.MappingAttributeModeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('mode') }}) diff --git a/src/epilotapi/models/shared/countryattribute.py b/src/epilotapi/models/shared/countryattribute.py index 343d81987..f15a9022f 100755 --- a/src/epilotapi/models/shared/countryattribute.py +++ b/src/epilotapi/models/shared/countryattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -8,7 +9,7 @@ class CountryAttributeTypeEnum(str, Enum): COUNTRY = "country" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class CountryAttribute: r"""CountryAttribute @@ -17,26 +18,26 @@ class CountryAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[CountryAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[CountryAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/createdocumentaction.py b/src/epilotapi/models/shared/createdocumentaction.py index 4b67d03c0..d4f5885a0 100755 --- a/src/epilotapi/models/shared/createdocumentaction.py +++ b/src/epilotapi/models/shared/createdocumentaction.py @@ -1,27 +1,28 @@ +from __future__ import annotations import dataclasses from ..shared import createdocumentconfig as shared_createdocumentconfig from ..shared import erroroutput as shared_erroroutput from ..shared import executionstatus_enum as shared_executionstatus_enum from ..shared import retrystrategy_enum as shared_retrystrategy_enum -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class CreateDocumentAction: - allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure') }}) - config: Optional[shared_createdocumentconfig.CreateDocumentConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config') }}) - created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically') }}) - error_output: Optional[shared_erroroutput.ErrorOutput] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('error_output') }}) - execution_status: Optional[shared_executionstatus_enum.ExecutionStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('execution_status') }}) - flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - outputs: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('outputs') }}) - retry_strategy: Optional[shared_retrystrategy_enum.RetryStrategyEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('retry_strategy') }}) - started_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('started_at') }}) - type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - updated_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at') }}) + allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure'), 'exclude': lambda f: f is None }}) + config: Optional[shared_createdocumentconfig.CreateDocumentConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config'), 'exclude': lambda f: f is None }}) + created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically'), 'exclude': lambda f: f is None }}) + error_output: Optional[shared_erroroutput.ErrorOutput] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('error_output'), 'exclude': lambda f: f is None }}) + execution_status: Optional[shared_executionstatus_enum.ExecutionStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('execution_status'), 'exclude': lambda f: f is None }}) + flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name'), 'exclude': lambda f: f is None }}) + outputs: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('outputs'), 'exclude': lambda f: f is None }}) + retry_strategy: Optional[shared_retrystrategy_enum.RetryStrategyEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('retry_strategy'), 'exclude': lambda f: f is None }}) + started_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('started_at'), 'exclude': lambda f: f is None }}) + type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + updated_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/createdocumentactionconfig.py b/src/epilotapi/models/shared/createdocumentactionconfig.py index ecca125d4..ccae27401 100755 --- a/src/epilotapi/models/shared/createdocumentactionconfig.py +++ b/src/epilotapi/models/shared/createdocumentactionconfig.py @@ -1,18 +1,19 @@ +from __future__ import annotations import dataclasses from ..shared import createdocumentconfig as shared_createdocumentconfig -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class CreateDocumentActionConfig: - allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure') }}) - config: Optional[shared_createdocumentconfig.CreateDocumentConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config') }}) - created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically') }}) - flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) + allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure'), 'exclude': lambda f: f is None }}) + config: Optional[shared_createdocumentconfig.CreateDocumentConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config'), 'exclude': lambda f: f is None }}) + created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically'), 'exclude': lambda f: f is None }}) + flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name'), 'exclude': lambda f: f is None }}) + type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/createdocumentconfig.py b/src/epilotapi/models/shared/createdocumentconfig.py index 1d0bf3e37..bcac75bc8 100755 --- a/src/epilotapi/models/shared/createdocumentconfig.py +++ b/src/epilotapi/models/shared/createdocumentconfig.py @@ -1,12 +1,13 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class CreateDocumentConfig: - filename: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('filename') }}) - template_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('template_id') }}) + filename: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('filename'), 'exclude': lambda f: f is None }}) + template_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('template_id'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/currencyattribute.py b/src/epilotapi/models/shared/currencyattribute.py index e09f2844b..70af80f87 100755 --- a/src/epilotapi/models/shared/currencyattribute.py +++ b/src/epilotapi/models/shared/currencyattribute.py @@ -1,11 +1,12 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class CurrencyAttributeCurrency1: r"""CurrencyAttributeCurrency1 @@ -15,13 +16,13 @@ class CurrencyAttributeCurrency1: code: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('code') }}) description: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('description') }}) symbol: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('symbol') }}) - flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flag') }}) + flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flag'), 'exclude': lambda f: f is None }}) class CurrencyAttributeTypeEnum(str, Enum): CURRENCY = "currency" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class CurrencyAttribute: r"""CurrencyAttribute @@ -32,26 +33,26 @@ class CurrencyAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) type: CurrencyAttributeTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - currency_selector_only: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('currency_selector_only') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + currency_selector_only: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('currency_selector_only'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/dateattribute.py b/src/epilotapi/models/shared/dateattribute.py index 409254bc9..bb106b00a 100755 --- a/src/epilotapi/models/shared/dateattribute.py +++ b/src/epilotapi/models/shared/dateattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -9,7 +10,7 @@ class DateAttributeTypeEnum(str, Enum): DATETIME = "datetime" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class DateAttribute: r"""DateAttribute @@ -18,26 +19,26 @@ class DateAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[DateAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[DateAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/entitycapability.py b/src/epilotapi/models/shared/entitycapability.py index d3d3585c4..f697da397 100755 --- a/src/epilotapi/models/shared/entitycapability.py +++ b/src/epilotapi/models/shared/entitycapability.py @@ -1,10 +1,11 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntityCapability: r"""EntityCapability @@ -12,11 +13,11 @@ class EntityCapability: """ name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - attributes: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('attributes') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - legacy: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('legacy') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('title') }}) - ui_hooks: Optional[list[dict[str, Any]]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('ui_hooks') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + attributes: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('attributes'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + legacy: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('legacy'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('title'), 'exclude': lambda f: f is None }}) + ui_hooks: Optional[list[dict[str, Any]]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('ui_hooks'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/entitydefaultcreate.py b/src/epilotapi/models/shared/entitydefaultcreate.py index d452c2c94..a5d62719c 100755 --- a/src/epilotapi/models/shared/entitydefaultcreate.py +++ b/src/epilotapi/models/shared/entitydefaultcreate.py @@ -1,24 +1,25 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntityDefaultCreateTableMenuOptions: - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - label: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + label: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('label'), 'exclude': lambda f: f is None }}) class EntityDefaultCreateViewTypeEnum(str, Enum): DEFAULT = "default" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntityDefaultCreate: - search_params: Optional[dict[str, str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('search_params') }}) - table_menu_options: Optional[EntityDefaultCreateTableMenuOptions] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('table_menu_options') }}) - view_type: Optional[EntityDefaultCreateViewTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('view_type') }}) + search_params: Optional[dict[str, str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('search_params'), 'exclude': lambda f: f is None }}) + table_menu_options: Optional[EntityDefaultCreateTableMenuOptions] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('table_menu_options'), 'exclude': lambda f: f is None }}) + view_type: Optional[EntityDefaultCreateViewTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('view_type'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/entitydefaultedit.py b/src/epilotapi/models/shared/entitydefaultedit.py index f6711e9c8..c894d32b3 100755 --- a/src/epilotapi/models/shared/entitydefaultedit.py +++ b/src/epilotapi/models/shared/entitydefaultedit.py @@ -1,24 +1,25 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntityDefaultEditTableMenuOptions: - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - label: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + label: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('label'), 'exclude': lambda f: f is None }}) class EntityDefaultEditViewTypeEnum(str, Enum): DEFAULT = "default" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntityDefaultEdit: - search_params: Optional[dict[str, str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('search_params') }}) - table_menu_options: Optional[EntityDefaultEditTableMenuOptions] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('table_menu_options') }}) - view_type: Optional[EntityDefaultEditViewTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('view_type') }}) + search_params: Optional[dict[str, str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('search_params'), 'exclude': lambda f: f is None }}) + table_menu_options: Optional[EntityDefaultEditTableMenuOptions] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('table_menu_options'), 'exclude': lambda f: f is None }}) + view_type: Optional[EntityDefaultEditViewTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('view_type'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/entitydefaulttable.py b/src/epilotapi/models/shared/entitydefaulttable.py index 36fcd0d22..15f617f6f 100755 --- a/src/epilotapi/models/shared/entitydefaulttable.py +++ b/src/epilotapi/models/shared/entitydefaulttable.py @@ -1,41 +1,42 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntityDefaultTableDropdownItems: - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - legacy: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('legacy') }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + legacy: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('legacy'), 'exclude': lambda f: f is None }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntityDefaultTableNavbarActionsOptions: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) - params: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('params') }}) + params: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('params'), 'exclude': lambda f: f is None }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntityDefaultTableNavbarActions: type: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - options: Optional[list[EntityDefaultTableNavbarActionsOptions]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('options') }}) + options: Optional[list[EntityDefaultTableNavbarActionsOptions]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('options'), 'exclude': lambda f: f is None }}) class EntityDefaultTableViewTypeEnum(str, Enum): DEFAULT = "default" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntityDefaultTable: - classic_view: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('classic_view') }}) - dropdown_items: Optional[list[EntityDefaultTableDropdownItems]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('dropdown_items') }}) - enable_thumbnails: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('enable_thumbnails') }}) - navbar_actions: Optional[list[EntityDefaultTableNavbarActions]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('navbar_actions') }}) - row_actions: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('row_actions') }}) - view_type: Optional[EntityDefaultTableViewTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('view_type') }}) + classic_view: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('classic_view'), 'exclude': lambda f: f is None }}) + dropdown_items: Optional[list[EntityDefaultTableDropdownItems]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('dropdown_items'), 'exclude': lambda f: f is None }}) + enable_thumbnails: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('enable_thumbnails'), 'exclude': lambda f: f is None }}) + navbar_actions: Optional[list[EntityDefaultTableNavbarActions]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('navbar_actions'), 'exclude': lambda f: f is None }}) + row_actions: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('row_actions'), 'exclude': lambda f: f is None }}) + view_type: Optional[EntityDefaultTableViewTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('view_type'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/entityimportparams.py b/src/epilotapi/models/shared/entityimportparams.py index 545302c05..f0e6a444f 100755 --- a/src/epilotapi/models/shared/entityimportparams.py +++ b/src/epilotapi/models/shared/entityimportparams.py @@ -1,16 +1,17 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntityImportParamsS3Reference: bucket: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('bucket') }}) key: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('key') }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntityImportParams: s3_reference: EntityImportParamsS3Reference = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('S3Reference') }}) diff --git a/src/epilotapi/models/shared/entitymanualtrigger.py b/src/epilotapi/models/shared/entitymanualtrigger.py index 7f6093eb3..b17559271 100755 --- a/src/epilotapi/models/shared/entitymanualtrigger.py +++ b/src/epilotapi/models/shared/entitymanualtrigger.py @@ -1,20 +1,21 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntityManualTriggerConfiguration: - schema: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('schema') }}) + schema: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('schema'), 'exclude': lambda f: f is None }}) class EntityManualTriggerTypeEnum(str, Enum): ENTITY_MANUAL = "entity_manual" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntityManualTrigger: configuration: EntityManualTriggerConfiguration = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('configuration') }}) diff --git a/src/epilotapi/models/shared/entityoperation.py b/src/epilotapi/models/shared/entityoperation.py index 521c5f23b..c179c3bbc 100755 --- a/src/epilotapi/models/shared/entityoperation.py +++ b/src/epilotapi/models/shared/entityoperation.py @@ -1,16 +1,17 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntityOperationDiff: - added: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('added') }}) - deleted: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deleted') }}) - updated: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated') }}) + added: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('added'), 'exclude': lambda f: f is None }}) + deleted: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deleted'), 'exclude': lambda f: f is None }}) + updated: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated'), 'exclude': lambda f: f is None }}) class EntityOperationOperationEnum(str, Enum): CREATE_ENTITY = "createEntity" @@ -18,21 +19,21 @@ class EntityOperationOperationEnum(str, Enum): DELETE_ENTITY = "deleteEntity" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntityOperationParams: - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - slug: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('slug') }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + slug: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('slug'), 'exclude': lambda f: f is None }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntityOperation: entity: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity') }}) operation: EntityOperationOperationEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('operation') }}) org: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('org') }}) - activity_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('activity_id') }}) - diff: Optional[EntityOperationDiff] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('diff') }}) - params: Optional[EntityOperationParams] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('params') }}) - payload: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('payload') }}) + activity_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('activity_id'), 'exclude': lambda f: f is None }}) + diff: Optional[EntityOperationDiff] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('diff'), 'exclude': lambda f: f is None }}) + params: Optional[EntityOperationParams] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('params'), 'exclude': lambda f: f is None }}) + payload: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('payload'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/entityoperationtrigger.py b/src/epilotapi/models/shared/entityoperationtrigger.py index b5cf976bd..38b33ed37 100755 --- a/src/epilotapi/models/shared/entityoperationtrigger.py +++ b/src/epilotapi/models/shared/entityoperationtrigger.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Optional @@ -10,19 +11,19 @@ class EntityOperationTriggerConfigurationOperationsEnum(str, Enum): DELETE_ENTITY = "deleteEntity" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntityOperationTriggerConfiguration: operations: list[EntityOperationTriggerConfigurationOperationsEnum] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('operations') }}) schema: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('schema') }}) - exclude_activities: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('exclude_activities') }}) - include_activities: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('include_activities') }}) + exclude_activities: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('exclude_activities'), 'exclude': lambda f: f is None }}) + include_activities: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('include_activities'), 'exclude': lambda f: f is None }}) class EntityOperationTriggerTypeEnum(str, Enum): ENTITY_OPERATION = "entity_operation" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntityOperationTrigger: configuration: EntityOperationTriggerConfiguration = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('configuration') }}) diff --git a/src/epilotapi/models/shared/entityparcelview.py b/src/epilotapi/models/shared/entityparcelview.py index f3368d74d..5fd74e2cf 100755 --- a/src/epilotapi/models/shared/entityparcelview.py +++ b/src/epilotapi/models/shared/entityparcelview.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Optional @@ -8,9 +9,9 @@ class EntityParcelViewViewTypeEnum(str, Enum): PARCEL = "parcel" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntityParcelView: - import_: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('import') }}) - view_type: Optional[EntityParcelViewViewTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('view_type') }}) + import_: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('import'), 'exclude': lambda f: f is None }}) + view_type: Optional[EntityParcelViewViewTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('view_type'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/entityschema.py b/src/epilotapi/models/shared/entityschema.py index 5372c9cc2..066d7288f 100755 --- a/src/epilotapi/models/shared/entityschema.py +++ b/src/epilotapi/models/shared/entityschema.py @@ -1,56 +1,57 @@ +from __future__ import annotations import dataclasses from ..shared import entitycapability as shared_entitycapability from ..shared import searchmappings as shared_searchmappings -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntitySchemaGroupSettingsInfoTooltipTitle: - default: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default') }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('key') }}) + default: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default'), 'exclude': lambda f: f is None }}) + key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('key'), 'exclude': lambda f: f is None }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntitySchemaGroupSettings: id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - expanded: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('expanded') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - info_tooltip_title: Optional[EntitySchemaGroupSettingsInfoTooltipTitle] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('info_tooltip_title') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + expanded: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('expanded'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + info_tooltip_title: Optional[EntitySchemaGroupSettingsInfoTooltipTitle] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('info_tooltip_title'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntitySchemaUIConfigListItem: - summary_attributes: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('summary_attributes') }}) + summary_attributes: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('summary_attributes'), 'exclude': lambda f: f is None }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntitySchemaUIConfigSharing: - show_sharing_button: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_sharing_button') }}) + show_sharing_button: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_sharing_button'), 'exclude': lambda f: f is None }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntitySchemaUIConfig: - create_view: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('create_view') }}) - edit_view: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('edit_view') }}) - list_item: Optional[EntitySchemaUIConfigListItem] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('list_item') }}) - sharing: Optional[EntitySchemaUIConfigSharing] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('sharing') }}) - single_view: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('single_view') }}) - table_view: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('table_view') }}) + create_view: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('create_view'), 'exclude': lambda f: f is None }}) + edit_view: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('edit_view'), 'exclude': lambda f: f is None }}) + list_item: Optional[EntitySchemaUIConfigListItem] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('list_item'), 'exclude': lambda f: f is None }}) + sharing: Optional[EntitySchemaUIConfigSharing] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('sharing'), 'exclude': lambda f: f is None }}) + single_view: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('single_view'), 'exclude': lambda f: f is None }}) + table_view: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('table_view'), 'exclude': lambda f: f is None }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntitySchema: r"""EntitySchema @@ -60,19 +61,19 @@ class EntitySchema: name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) plural: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('plural') }}) slug: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('slug') }}) - attributes: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('attributes') }}) - blueprint: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('blueprint') }}) - capabilities: Optional[list[shared_entitycapability.EntityCapability]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('capabilities') }}) - dialog_config: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('dialog_config') }}) - draft: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('draft') }}) - enable_setting: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('enable_setting') }}) - explicit_search_mappings: Optional[dict[str, shared_searchmappings.SearchMappings]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('explicit_search_mappings') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group_settings: Optional[list[EntitySchemaGroupSettings]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group_settings') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout_settings: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout_settings') }}) - published: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('published') }}) - title_template: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('title_template') }}) - ui_config: Optional[EntitySchemaUIConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('ui_config') }}) - version: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('version') }}) + attributes: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('attributes'), 'exclude': lambda f: f is None }}) + blueprint: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('blueprint'), 'exclude': lambda f: f is None }}) + capabilities: Optional[list[shared_entitycapability.EntityCapability]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('capabilities'), 'exclude': lambda f: f is None }}) + dialog_config: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('dialog_config'), 'exclude': lambda f: f is None }}) + draft: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('draft'), 'exclude': lambda f: f is None }}) + enable_setting: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('enable_setting'), 'exclude': lambda f: f is None }}) + explicit_search_mappings: Optional[dict[str, shared_searchmappings.SearchMappings]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('explicit_search_mappings'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group_settings: Optional[list[EntitySchemaGroupSettings]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group_settings'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout_settings: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout_settings'), 'exclude': lambda f: f is None }}) + published: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('published'), 'exclude': lambda f: f is None }}) + title_template: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('title_template'), 'exclude': lambda f: f is None }}) + ui_config: Optional[EntitySchemaUIConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('ui_config'), 'exclude': lambda f: f is None }}) + version: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('version'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/entityschemaitem.py b/src/epilotapi/models/shared/entityschemaitem.py index da5617380..fdaecc1f3 100755 --- a/src/epilotapi/models/shared/entityschemaitem.py +++ b/src/epilotapi/models/shared/entityschemaitem.py @@ -1,63 +1,64 @@ +from __future__ import annotations import dataclasses from ..shared import entitycapability as shared_entitycapability from ..shared import searchmappings as shared_searchmappings -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntitySchemaItemGroupSettingsInfoTooltipTitle: - default: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default') }}) - key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('key') }}) + default: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default'), 'exclude': lambda f: f is None }}) + key: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('key'), 'exclude': lambda f: f is None }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntitySchemaItemGroupSettings: id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - expanded: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('expanded') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - info_tooltip_title: Optional[EntitySchemaItemGroupSettingsInfoTooltipTitle] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('info_tooltip_title') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + expanded: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('expanded'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + info_tooltip_title: Optional[EntitySchemaItemGroupSettingsInfoTooltipTitle] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('info_tooltip_title'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntitySchemaItemSource: - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntitySchemaItemUIConfigListItem: - summary_attributes: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('summary_attributes') }}) + summary_attributes: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('summary_attributes'), 'exclude': lambda f: f is None }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntitySchemaItemUIConfigSharing: - show_sharing_button: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_sharing_button') }}) + show_sharing_button: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_sharing_button'), 'exclude': lambda f: f is None }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntitySchemaItemUIConfig: - create_view: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('create_view') }}) - edit_view: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('edit_view') }}) - list_item: Optional[EntitySchemaItemUIConfigListItem] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('list_item') }}) - sharing: Optional[EntitySchemaItemUIConfigSharing] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('sharing') }}) - single_view: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('single_view') }}) - table_view: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('table_view') }}) + create_view: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('create_view'), 'exclude': lambda f: f is None }}) + edit_view: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('edit_view'), 'exclude': lambda f: f is None }}) + list_item: Optional[EntitySchemaItemUIConfigListItem] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('list_item'), 'exclude': lambda f: f is None }}) + sharing: Optional[EntitySchemaItemUIConfigSharing] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('sharing'), 'exclude': lambda f: f is None }}) + single_view: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('single_view'), 'exclude': lambda f: f is None }}) + table_view: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('table_view'), 'exclude': lambda f: f is None }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntitySchemaItem: r"""EntitySchemaItem @@ -67,24 +68,24 @@ class EntitySchemaItem: name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) plural: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('plural') }}) slug: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('slug') }}) - attributes: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('attributes') }}) - blueprint: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('blueprint') }}) - capabilities: Optional[list[shared_entitycapability.EntityCapability]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('capabilities') }}) - comment: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('comment') }}) - created_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_at') }}) - dialog_config: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('dialog_config') }}) - draft: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('draft') }}) - enable_setting: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('enable_setting') }}) - explicit_search_mappings: Optional[dict[str, shared_searchmappings.SearchMappings]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('explicit_search_mappings') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group_settings: Optional[list[EntitySchemaItemGroupSettings]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group_settings') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - layout_settings: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout_settings') }}) - published: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('published') }}) - source: Optional[EntitySchemaItemSource] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('source') }}) - title_template: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('title_template') }}) - ui_config: Optional[EntitySchemaItemUIConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('ui_config') }}) - updated_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at') }}) - version: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('version') }}) + attributes: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('attributes'), 'exclude': lambda f: f is None }}) + blueprint: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('blueprint'), 'exclude': lambda f: f is None }}) + capabilities: Optional[list[shared_entitycapability.EntityCapability]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('capabilities'), 'exclude': lambda f: f is None }}) + comment: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('comment'), 'exclude': lambda f: f is None }}) + created_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_at'), 'exclude': lambda f: f is None }}) + dialog_config: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('dialog_config'), 'exclude': lambda f: f is None }}) + draft: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('draft'), 'exclude': lambda f: f is None }}) + enable_setting: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('enable_setting'), 'exclude': lambda f: f is None }}) + explicit_search_mappings: Optional[dict[str, shared_searchmappings.SearchMappings]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('explicit_search_mappings'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group_settings: Optional[list[EntitySchemaItemGroupSettings]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group_settings'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + layout_settings: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout_settings'), 'exclude': lambda f: f is None }}) + published: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('published'), 'exclude': lambda f: f is None }}) + source: Optional[EntitySchemaItemSource] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('source'), 'exclude': lambda f: f is None }}) + title_template: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('title_template'), 'exclude': lambda f: f is None }}) + ui_config: Optional[EntitySchemaItemUIConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('ui_config'), 'exclude': lambda f: f is None }}) + updated_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at'), 'exclude': lambda f: f is None }}) + version: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('version'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/entitysearchparams.py b/src/epilotapi/models/shared/entitysearchparams.py index 3f3605496..21b7dbb37 100755 --- a/src/epilotapi/models/shared/entitysearchparams.py +++ b/src/epilotapi/models/shared/entitysearchparams.py @@ -1,17 +1,18 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntitySearchParams: q: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('q') }}) - fields: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('fields') }}) - from_: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('from') }}) - hydrate: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hydrate') }}) - include_scores: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('include_scores') }}) - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('size') }}) - sort: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('sort') }}) + fields: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('fields'), 'exclude': lambda f: f is None }}) + from_: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('from'), 'exclude': lambda f: f is None }}) + hydrate: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hydrate'), 'exclude': lambda f: f is None }}) + include_scores: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('include_scores'), 'exclude': lambda f: f is None }}) + size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('size'), 'exclude': lambda f: f is None }}) + sort: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('sort'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/entitysearchresults.py b/src/epilotapi/models/shared/entitysearchresults.py index 171f1cdd3..2d2939911 100755 --- a/src/epilotapi/models/shared/entitysearchresults.py +++ b/src/epilotapi/models/shared/entitysearchresults.py @@ -1,12 +1,13 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntitySearchResults: - hits: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hits') }}) - results: Optional[list[dict[str, Any]]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results') }}) + hits: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hits'), 'exclude': lambda f: f is None }}) + results: Optional[list[dict[str, Any]]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/entityviewdisabled.py b/src/epilotapi/models/shared/entityviewdisabled.py index 1841644d2..0fe09c6bf 100755 --- a/src/epilotapi/models/shared/entityviewdisabled.py +++ b/src/epilotapi/models/shared/entityviewdisabled.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Optional @@ -8,8 +9,8 @@ class EntityViewDisabledViewTypeEnum(str, Enum): DISABLED = "disabled" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class EntityViewDisabled: - view_type: Optional[EntityViewDisabledViewTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('view_type') }}) + view_type: Optional[EntityViewDisabledViewTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('view_type'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/errorcode_enum.py b/src/epilotapi/models/shared/errorcode_enum.py index cdc30d6db..82f8f89fe 100755 --- a/src/epilotapi/models/shared/errorcode_enum.py +++ b/src/epilotapi/models/shared/errorcode_enum.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from enum import Enum diff --git a/src/epilotapi/models/shared/erroroutput.py b/src/epilotapi/models/shared/erroroutput.py index 007023000..f9704ef43 100755 --- a/src/epilotapi/models/shared/erroroutput.py +++ b/src/epilotapi/models/shared/erroroutput.py @@ -1,10 +1,11 @@ +from __future__ import annotations import dataclasses from ..shared import errorcode_enum as shared_errorcode_enum -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class ErrorOutput: error_code: shared_errorcode_enum.ErrorCodeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('error_code') }}) diff --git a/src/epilotapi/models/shared/executionstatus_enum.py b/src/epilotapi/models/shared/executionstatus_enum.py index 61f919fff..433afe751 100755 --- a/src/epilotapi/models/shared/executionstatus_enum.py +++ b/src/epilotapi/models/shared/executionstatus_enum.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from enum import Enum diff --git a/src/epilotapi/models/shared/fileattribute.py b/src/epilotapi/models/shared/fileattribute.py index 264786a3a..aac9df8b0 100755 --- a/src/epilotapi/models/shared/fileattribute.py +++ b/src/epilotapi/models/shared/fileattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -13,7 +14,7 @@ class FileAttributeTypeEnum(str, Enum): FILE = "file" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class FileAttribute: r"""FileAttribute @@ -23,30 +24,30 @@ class FileAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) type: FileAttributeTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - allowed_extensions: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allowed_extensions') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_access_control: Optional[FileAttributeDefaultAccessControlEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_access_control') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - display_images_landscaped: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('display_images_landscaped') }}) - enable_description: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('enable_description') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - multiple: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('multiple') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + allowed_extensions: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allowed_extensions'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_access_control: Optional[FileAttributeDefaultAccessControlEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_access_control'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + display_images_landscaped: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('display_images_landscaped'), 'exclude': lambda f: f is None }}) + enable_description: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('enable_description'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + multiple: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('multiple'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/frontendsubmittrigger.py b/src/epilotapi/models/shared/frontendsubmittrigger.py index a221d1da8..2cdd3f5d0 100755 --- a/src/epilotapi/models/shared/frontendsubmittrigger.py +++ b/src/epilotapi/models/shared/frontendsubmittrigger.py @@ -1,20 +1,21 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class FrontendSubmitTriggerConfiguration: - source_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('source_id') }}) + source_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('source_id'), 'exclude': lambda f: f is None }}) class FrontendSubmitTriggerTypeEnum(str, Enum): FRONTEND_SUBMISSION = "frontend_submission" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class FrontendSubmitTrigger: configuration: FrontendSubmitTriggerConfiguration = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('configuration') }}) diff --git a/src/epilotapi/models/shared/getexecutionsresp.py b/src/epilotapi/models/shared/getexecutionsresp.py index 28f957298..1bf6f2bf6 100755 --- a/src/epilotapi/models/shared/getexecutionsresp.py +++ b/src/epilotapi/models/shared/getexecutionsresp.py @@ -1,10 +1,11 @@ +from __future__ import annotations import dataclasses from ..shared import automationexecution as shared_automationexecution -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class GetExecutionsResp: results: list[shared_automationexecution.AutomationExecution] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('results') }}) diff --git a/src/epilotapi/models/shared/internalattribute.py b/src/epilotapi/models/shared/internalattribute.py index 3c59692c7..ae0e4a54d 100755 --- a/src/epilotapi/models/shared/internalattribute.py +++ b/src/epilotapi/models/shared/internalattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -8,7 +9,7 @@ class InternalAttributeTypeEnum(str, Enum): INTERNAL = "internal" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class InternalAttribute: r"""InternalAttribute @@ -17,26 +18,26 @@ class InternalAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[InternalAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[InternalAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/internaluserattribute.py b/src/epilotapi/models/shared/internaluserattribute.py index b0732b548..affe47e5e 100755 --- a/src/epilotapi/models/shared/internaluserattribute.py +++ b/src/epilotapi/models/shared/internaluserattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -8,7 +9,7 @@ class InternalUserAttributeTypeEnum(str, Enum): INTERNAL_USER = "internal_user" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class InternalUserAttribute: r"""InternalUserAttribute @@ -17,26 +18,26 @@ class InternalUserAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[InternalUserAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[InternalUserAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/invitationemailattribute.py b/src/epilotapi/models/shared/invitationemailattribute.py index d00449af5..d8e8e5d81 100755 --- a/src/epilotapi/models/shared/invitationemailattribute.py +++ b/src/epilotapi/models/shared/invitationemailattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -8,7 +9,7 @@ class InvitationEmailAttributeTypeEnum(str, Enum): INVITATION_EMAIL = "invitation_email" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class InvitationEmailAttribute: r"""InvitationEmailAttribute @@ -17,26 +18,26 @@ class InvitationEmailAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[InvitationEmailAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[InvitationEmailAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/journeysubmittrigger.py b/src/epilotapi/models/shared/journeysubmittrigger.py index 14a11eb51..5097f211a 100755 --- a/src/epilotapi/models/shared/journeysubmittrigger.py +++ b/src/epilotapi/models/shared/journeysubmittrigger.py @@ -1,10 +1,11 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class JourneySubmitTriggerConfiguration: source_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('source_id') }}) @@ -13,7 +14,7 @@ class JourneySubmitTriggerTypeEnum(str, Enum): JOURNEY_SUBMISSION = "journey_submission" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class JourneySubmitTrigger: configuration: JourneySubmitTriggerConfiguration = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('configuration') }}) diff --git a/src/epilotapi/models/shared/linkattribute.py b/src/epilotapi/models/shared/linkattribute.py index d60bf60ba..5e63f5fe6 100755 --- a/src/epilotapi/models/shared/linkattribute.py +++ b/src/epilotapi/models/shared/linkattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -8,7 +9,7 @@ class LinkAttributeTypeEnum(str, Enum): LINK = "link" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class LinkAttribute: r"""LinkAttribute @@ -17,26 +18,26 @@ class LinkAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[LinkAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[LinkAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/mapentityaction.py b/src/epilotapi/models/shared/mapentityaction.py index 1d2023298..19aa01fdc 100755 --- a/src/epilotapi/models/shared/mapentityaction.py +++ b/src/epilotapi/models/shared/mapentityaction.py @@ -1,27 +1,28 @@ +from __future__ import annotations import dataclasses from ..shared import erroroutput as shared_erroroutput from ..shared import executionstatus_enum as shared_executionstatus_enum from ..shared import mapentityconfig as shared_mapentityconfig from ..shared import retrystrategy_enum as shared_retrystrategy_enum -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class MapEntityAction: - allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure') }}) - config: Optional[shared_mapentityconfig.MapEntityConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config') }}) - created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically') }}) - error_output: Optional[shared_erroroutput.ErrorOutput] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('error_output') }}) - execution_status: Optional[shared_executionstatus_enum.ExecutionStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('execution_status') }}) - flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - outputs: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('outputs') }}) - retry_strategy: Optional[shared_retrystrategy_enum.RetryStrategyEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('retry_strategy') }}) - started_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('started_at') }}) - type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - updated_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at') }}) + allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure'), 'exclude': lambda f: f is None }}) + config: Optional[shared_mapentityconfig.MapEntityConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config'), 'exclude': lambda f: f is None }}) + created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically'), 'exclude': lambda f: f is None }}) + error_output: Optional[shared_erroroutput.ErrorOutput] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('error_output'), 'exclude': lambda f: f is None }}) + execution_status: Optional[shared_executionstatus_enum.ExecutionStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('execution_status'), 'exclude': lambda f: f is None }}) + flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name'), 'exclude': lambda f: f is None }}) + outputs: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('outputs'), 'exclude': lambda f: f is None }}) + retry_strategy: Optional[shared_retrystrategy_enum.RetryStrategyEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('retry_strategy'), 'exclude': lambda f: f is None }}) + started_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('started_at'), 'exclude': lambda f: f is None }}) + type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + updated_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/mapentityactionconfig.py b/src/epilotapi/models/shared/mapentityactionconfig.py index fb992e93c..3efcd69f9 100755 --- a/src/epilotapi/models/shared/mapentityactionconfig.py +++ b/src/epilotapi/models/shared/mapentityactionconfig.py @@ -1,18 +1,19 @@ +from __future__ import annotations import dataclasses from ..shared import mapentityconfig as shared_mapentityconfig -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class MapEntityActionConfig: - allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure') }}) - config: Optional[shared_mapentityconfig.MapEntityConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config') }}) - created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically') }}) - flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) + allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure'), 'exclude': lambda f: f is None }}) + config: Optional[shared_mapentityconfig.MapEntityConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config'), 'exclude': lambda f: f is None }}) + created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically'), 'exclude': lambda f: f is None }}) + flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name'), 'exclude': lambda f: f is None }}) + type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/mapentityconfig.py b/src/epilotapi/models/shared/mapentityconfig.py index 2f26f6acf..ad8f5d713 100755 --- a/src/epilotapi/models/shared/mapentityconfig.py +++ b/src/epilotapi/models/shared/mapentityconfig.py @@ -1,19 +1,20 @@ +from __future__ import annotations import dataclasses from ..shared import mappingconfigref as shared_mappingconfigref from ..shared import relationattribute1 as shared_relationattribute1 -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class MapEntityConfig: target_schema: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('target_schema') }}) - linkback_relation_attribute: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('linkback_relation_attribute') }}) - linkback_relation_tags: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('linkback_relation_tags') }}) - mapping_attributes: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('mapping_attributes') }}) - mapping_config: Optional[shared_mappingconfigref.MappingConfigRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('mapping_config') }}) - relation_attributes: Optional[list[shared_relationattribute1.RelationAttribute1]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('relation_attributes') }}) - target_unique: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('target_unique') }}) + linkback_relation_attribute: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('linkback_relation_attribute'), 'exclude': lambda f: f is None }}) + linkback_relation_tags: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('linkback_relation_tags'), 'exclude': lambda f: f is None }}) + mapping_attributes: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('mapping_attributes'), 'exclude': lambda f: f is None }}) + mapping_config: Optional[shared_mappingconfigref.MappingConfigRef] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('mapping_config'), 'exclude': lambda f: f is None }}) + relation_attributes: Optional[list[shared_relationattribute1.RelationAttribute1]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('relation_attributes'), 'exclude': lambda f: f is None }}) + target_unique: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('target_unique'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/mappingattributemode_enum.py b/src/epilotapi/models/shared/mappingattributemode_enum.py index f54617aac..7b16edfad 100755 --- a/src/epilotapi/models/shared/mappingattributemode_enum.py +++ b/src/epilotapi/models/shared/mappingattributemode_enum.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from enum import Enum diff --git a/src/epilotapi/models/shared/mappingattributev2.py b/src/epilotapi/models/shared/mappingattributev2.py index 8b0e561a2..6db312a6f 100755 --- a/src/epilotapi/models/shared/mappingattributev2.py +++ b/src/epilotapi/models/shared/mappingattributev2.py @@ -1,12 +1,13 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class MappingAttributeV2: operation: Any = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('operation') }}) - target: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('target') }}) + target: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('target'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/mappingconfigref.py b/src/epilotapi/models/shared/mappingconfigref.py index 63c6d4ac3..90556ac58 100755 --- a/src/epilotapi/models/shared/mappingconfigref.py +++ b/src/epilotapi/models/shared/mappingconfigref.py @@ -1,13 +1,14 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class MappingConfigRef: config_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('config_id') }}) target_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('target_id') }}) - version: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('version') }}) + version: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('version'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/multiselectattribute.py b/src/epilotapi/models/shared/multiselectattribute.py index 76b7c4b8d..8959fb306 100755 --- a/src/epilotapi/models/shared/multiselectattribute.py +++ b/src/epilotapi/models/shared/multiselectattribute.py @@ -1,22 +1,23 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class MultiSelectAttributeOptions2: value: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('value') }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('title') }}) + title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('title'), 'exclude': lambda f: f is None }}) class MultiSelectAttributeTypeEnum(str, Enum): MULTISELECT = "multiselect" CHECKBOX = "checkbox" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class MultiSelectAttribute: r"""MultiSelectAttribute @@ -25,30 +26,30 @@ class MultiSelectAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - allow_any: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_any') }}) - allow_extra_options: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_extra_options') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - disable_case_sensitive: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('disable_case_sensitive') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - options: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('options') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[MultiSelectAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + allow_any: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_any'), 'exclude': lambda f: f is None }}) + allow_extra_options: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_extra_options'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + disable_case_sensitive: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('disable_case_sensitive'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + options: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('options'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[MultiSelectAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/numberattribute.py b/src/epilotapi/models/shared/numberattribute.py index 1cbe4cf1c..4338796c8 100755 --- a/src/epilotapi/models/shared/numberattribute.py +++ b/src/epilotapi/models/shared/numberattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -8,7 +9,7 @@ class NumberAttributeTypeEnum(str, Enum): NUMBER = "number" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class NumberAttribute: r"""NumberAttribute @@ -17,27 +18,27 @@ class NumberAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - format: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('format') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[NumberAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + format: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('format'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[NumberAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/orderedlistattribute.py b/src/epilotapi/models/shared/orderedlistattribute.py index 854a59c2e..8d99ccfec 100755 --- a/src/epilotapi/models/shared/orderedlistattribute.py +++ b/src/epilotapi/models/shared/orderedlistattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -8,7 +9,7 @@ class OrderedListAttributeTypeEnum(str, Enum): ORDERED_LIST = "ordered_list" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class OrderedListAttribute: r"""OrderedListAttribute @@ -17,26 +18,26 @@ class OrderedListAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[OrderedListAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[OrderedListAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/partnerstatusattribute.py b/src/epilotapi/models/shared/partnerstatusattribute.py index 3f59014df..2d51dc97f 100755 --- a/src/epilotapi/models/shared/partnerstatusattribute.py +++ b/src/epilotapi/models/shared/partnerstatusattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -8,7 +9,7 @@ class PartnerStatusAttributeTypeEnum(str, Enum): PARTNER_STATUS = "partner_status" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class PartnerStatusAttribute: r"""PartnerStatusAttribute @@ -17,26 +18,26 @@ class PartnerStatusAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[PartnerStatusAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[PartnerStatusAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/paymentmethodrelationattribute.py b/src/epilotapi/models/shared/paymentmethodrelationattribute.py index d0e6331bd..3bd5d8356 100755 --- a/src/epilotapi/models/shared/paymentmethodrelationattribute.py +++ b/src/epilotapi/models/shared/paymentmethodrelationattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -8,7 +9,7 @@ class PaymentMethodRelationAttributeTypeEnum(str, Enum): RELATION_PAYMENT_METHOD = "relation_payment_method" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class PaymentMethodRelationAttribute: r"""PaymentMethodRelationAttribute @@ -17,27 +18,27 @@ class PaymentMethodRelationAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - has_primary: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('has_primary') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[PaymentMethodRelationAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + has_primary: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('has_primary'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[PaymentMethodRelationAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/purposeattribute.py b/src/epilotapi/models/shared/purposeattribute.py index 692ffd5b7..c056d0afd 100755 --- a/src/epilotapi/models/shared/purposeattribute.py +++ b/src/epilotapi/models/shared/purposeattribute.py @@ -1,6 +1,7 @@ +from __future__ import annotations import dataclasses import dateutil.parser -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from datetime import datetime from enum import Enum from epilotapi import utils @@ -11,7 +12,7 @@ class PurposeAttributeTypeEnum(str, Enum): PURPOSE = "purpose" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class PurposeAttribute: r"""PurposeAttribute @@ -20,30 +21,30 @@ class PurposeAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - created_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - parents: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('parents') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[PurposeAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - updated_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + created_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + parents: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('parents'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[PurposeAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + updated_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/receivedemailtrigger.py b/src/epilotapi/models/shared/receivedemailtrigger.py index cbc90ba7e..fc42e35f1 100755 --- a/src/epilotapi/models/shared/receivedemailtrigger.py +++ b/src/epilotapi/models/shared/receivedemailtrigger.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Optional @@ -8,16 +9,16 @@ class ReceivedEmailTriggerConfigurationMessageTypeEnum(str, Enum): RECEIVED = "RECEIVED" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class ReceivedEmailTriggerConfiguration: - message_type: Optional[ReceivedEmailTriggerConfigurationMessageTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('message_type') }}) + message_type: Optional[ReceivedEmailTriggerConfigurationMessageTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('message_type'), 'exclude': lambda f: f is None }}) class ReceivedEmailTriggerTypeEnum(str, Enum): RECEIVED_EMAIL = "received_email" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class ReceivedEmailTrigger: configuration: ReceivedEmailTriggerConfiguration = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('configuration') }}) diff --git a/src/epilotapi/models/shared/redirectentityview.py b/src/epilotapi/models/shared/redirectentityview.py index 05336fce3..ed433d688 100755 --- a/src/epilotapi/models/shared/redirectentityview.py +++ b/src/epilotapi/models/shared/redirectentityview.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Optional @@ -8,9 +9,9 @@ class RedirectEntityViewViewTypeEnum(str, Enum): REDIRECT = "redirect" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class RedirectEntityView: - route: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('route') }}) - view_type: Optional[RedirectEntityViewViewTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('view_type') }}) + route: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('route'), 'exclude': lambda f: f is None }}) + view_type: Optional[RedirectEntityViewViewTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('view_type'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/relationattribute.py b/src/epilotapi/models/shared/relationattribute.py index fdebbb686..b353004db 100755 --- a/src/epilotapi/models/shared/relationattribute.py +++ b/src/epilotapi/models/shared/relationattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -10,15 +11,15 @@ class RelationAttributeActionsActionTypeEnum(str, Enum): CREATE_FROM_EXISTING = "create_from_existing" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class RelationAttributeActions: - action_type: Optional[RelationAttributeActionsActionTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('action_type') }}) - default: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - label: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) - new_entity_item: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('new_entity_item') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) + action_type: Optional[RelationAttributeActionsActionTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('action_type'), 'exclude': lambda f: f is None }}) + default: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + label: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('label'), 'exclude': lambda f: f is None }}) + new_entity_item: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('new_entity_item'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) class RelationAttributeDrawerSizeEnum(str, Enum): SMALL = "small" @@ -40,7 +41,7 @@ class RelationAttributeTypeEnum(str, Enum): RELATION = "relation" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class RelationAttribute: r"""RelationAttribute @@ -49,40 +50,40 @@ class RelationAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - actions: Optional[list[RelationAttributeActions]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('actions') }}) - add_button_label: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('add_button_label') }}) - allowed_schemas: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allowedSchemas') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - details_view_mode_enabled: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('details_view_mode_enabled') }}) - drawer_size: Optional[RelationAttributeDrawerSizeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('drawer_size') }}) - edit_mode: Optional[RelationAttributeEditModeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('edit_mode') }}) - enable_relation_picker: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('enable_relation_picker') }}) - enable_relation_tags: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('enable_relation_tags') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - has_primary: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('has_primary') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - relation_affinity_mode: Optional[RelationAttributeRelationAffinityModeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('relation_affinity_mode') }}) - relation_type: Optional[RelationAttributeRelationTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('relation_type') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - reverse_attributes: Optional[dict[str, str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('reverse_attributes') }}) - search_placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('search_placeholder') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - summary_fields: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('summary_fields') }}) - type: Optional[RelationAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + actions: Optional[list[RelationAttributeActions]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('actions'), 'exclude': lambda f: f is None }}) + add_button_label: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('add_button_label'), 'exclude': lambda f: f is None }}) + allowed_schemas: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allowedSchemas'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + details_view_mode_enabled: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('details_view_mode_enabled'), 'exclude': lambda f: f is None }}) + drawer_size: Optional[RelationAttributeDrawerSizeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('drawer_size'), 'exclude': lambda f: f is None }}) + edit_mode: Optional[RelationAttributeEditModeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('edit_mode'), 'exclude': lambda f: f is None }}) + enable_relation_picker: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('enable_relation_picker'), 'exclude': lambda f: f is None }}) + enable_relation_tags: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('enable_relation_tags'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + has_primary: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('has_primary'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + relation_affinity_mode: Optional[RelationAttributeRelationAffinityModeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('relation_affinity_mode'), 'exclude': lambda f: f is None }}) + relation_type: Optional[RelationAttributeRelationTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('relation_type'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + reverse_attributes: Optional[dict[str, str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('reverse_attributes'), 'exclude': lambda f: f is None }}) + search_placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('search_placeholder'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + summary_fields: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('summary_fields'), 'exclude': lambda f: f is None }}) + type: Optional[RelationAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/relationattribute1.py b/src/epilotapi/models/shared/relationattribute1.py index 6b4e7d485..a127d8563 100755 --- a/src/epilotapi/models/shared/relationattribute1.py +++ b/src/epilotapi/models/shared/relationattribute1.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -10,28 +11,28 @@ class RelationAttribute1ModeEnum(str, Enum): SET = "set" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class RelationAttribute1SourceFilter: r"""RelationAttribute1SourceFilter A filter to identify which source entities to pick as relations from main entity """ - attribute: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('attribute') }}) - limit: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('limit') }}) - relation_tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('relation_tag') }}) - schema: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('schema') }}) - self: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('self') }}) - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('tag') }}) + attribute: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('attribute'), 'exclude': lambda f: f is None }}) + limit: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('limit'), 'exclude': lambda f: f is None }}) + relation_tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('relation_tag'), 'exclude': lambda f: f is None }}) + schema: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('schema'), 'exclude': lambda f: f is None }}) + self: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('self'), 'exclude': lambda f: f is None }}) + tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('tag'), 'exclude': lambda f: f is None }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class RelationAttribute1: mode: RelationAttribute1ModeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('mode') }}) target: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('target') }}) - related_to: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('related_to') }}) - source_filter: Optional[RelationAttribute1SourceFilter] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('source_filter') }}) - target_tags: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('target_tags') }}) - target_tags_include_source: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('target_tags_include_source') }}) + related_to: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('related_to'), 'exclude': lambda f: f is None }}) + source_filter: Optional[RelationAttribute1SourceFilter] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('source_filter'), 'exclude': lambda f: f is None }}) + target_tags: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('target_tags'), 'exclude': lambda f: f is None }}) + target_tags_include_source: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('target_tags_include_source'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/relationitem.py b/src/epilotapi/models/shared/relationitem.py index 9c6f41a3c..774c39327 100755 --- a/src/epilotapi/models/shared/relationitem.py +++ b/src/epilotapi/models/shared/relationitem.py @@ -1,14 +1,15 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class RelationItem: attribute: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('attribute') }}) entity_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_id') }}) - tags: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_tags') }}) - reverse: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('reverse') }}) + tags: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_tags'), 'exclude': lambda f: f is None }}) + reverse: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('reverse'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/repeatableattribute.py b/src/epilotapi/models/shared/repeatableattribute.py index ea9ee2cf8..88ec04768 100755 --- a/src/epilotapi/models/shared/repeatableattribute.py +++ b/src/epilotapi/models/shared/repeatableattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -19,7 +20,7 @@ class RepeatableAttributeTypeEnum(str, Enum): DATE = "date" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class RepeatableAttribute: r"""RepeatableAttribute @@ -28,30 +29,30 @@ class RepeatableAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - enable_relation_picker: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('enable_relation_picker') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - has_primary: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('has_primary') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - relation_affinity_mode: Optional[RepeatableAttributeRelationAffinityModeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('relation_affinity_mode') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - repeatable: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('repeatable') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[RepeatableAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + enable_relation_picker: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('enable_relation_picker'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + has_primary: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('has_primary'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + relation_affinity_mode: Optional[RepeatableAttributeRelationAffinityModeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('relation_affinity_mode'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + repeatable: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('repeatable'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[RepeatableAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/retryreq.py b/src/epilotapi/models/shared/retryreq.py index 1c89717bc..3ecde1965 100755 --- a/src/epilotapi/models/shared/retryreq.py +++ b/src/epilotapi/models/shared/retryreq.py @@ -1,12 +1,13 @@ +from __future__ import annotations import dataclasses from ..shared import retrystrategy_enum as shared_retrystrategy_enum -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class RetryReq: - retry_strategy: Optional[shared_retrystrategy_enum.RetryStrategyEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('retry_strategy') }}) + retry_strategy: Optional[shared_retrystrategy_enum.RetryStrategyEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('retry_strategy'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/retrystrategy_enum.py b/src/epilotapi/models/shared/retrystrategy_enum.py index 726f76a2a..e494e40e2 100755 --- a/src/epilotapi/models/shared/retrystrategy_enum.py +++ b/src/epilotapi/models/shared/retrystrategy_enum.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses from enum import Enum diff --git a/src/epilotapi/models/shared/savedview.py b/src/epilotapi/models/shared/savedview.py index ee337d73c..4086966bf 100755 --- a/src/epilotapi/models/shared/savedview.py +++ b/src/epilotapi/models/shared/savedview.py @@ -1,20 +1,21 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SavedViewCreatedBy1: r"""SavedViewCreatedBy1 A user that created the view """ - user_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('user_id') }}) + user_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('user_id'), 'exclude': lambda f: f is None }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SavedView: r"""SavedView @@ -25,6 +26,6 @@ class SavedView: name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) slug: list[str] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('slug') }}) ui_config: dict[str, Any] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('ui_config') }}) - org: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('org') }}) - shared: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('shared') }}) + org: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('org'), 'exclude': lambda f: f is None }}) + shared: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('shared'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/savedviewitem.py b/src/epilotapi/models/shared/savedviewitem.py index 425a482cb..bcba4042f 100755 --- a/src/epilotapi/models/shared/savedviewitem.py +++ b/src/epilotapi/models/shared/savedviewitem.py @@ -1,20 +1,21 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SavedViewItemCreatedBy1: r"""SavedViewItemCreatedBy1 A user that created the view """ - user_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('user_id') }}) + user_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('user_id'), 'exclude': lambda f: f is None }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SavedViewItem: r"""SavedViewItem @@ -25,9 +26,9 @@ class SavedViewItem: name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) slug: list[str] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('slug') }}) ui_config: dict[str, Any] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('ui_config') }}) - created_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_at') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - org: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('org') }}) - shared: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('shared') }}) - updated_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at') }}) + created_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_at'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + org: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('org'), 'exclude': lambda f: f is None }}) + shared: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('shared'), 'exclude': lambda f: f is None }}) + updated_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/searchautomationsresp.py b/src/epilotapi/models/shared/searchautomationsresp.py index ed94466e9..76f4639fe 100755 --- a/src/epilotapi/models/shared/searchautomationsresp.py +++ b/src/epilotapi/models/shared/searchautomationsresp.py @@ -1,10 +1,11 @@ +from __future__ import annotations import dataclasses from ..shared import automationflow as shared_automationflow -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SearchAutomationsResp: results: list[shared_automationflow.AutomationFlow] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('results') }}) diff --git a/src/epilotapi/models/shared/searchjourneysqueryrequest.py b/src/epilotapi/models/shared/searchjourneysqueryrequest.py index a50085686..2c1b60dce 100755 --- a/src/epilotapi/models/shared/searchjourneysqueryrequest.py +++ b/src/epilotapi/models/shared/searchjourneysqueryrequest.py @@ -1,14 +1,15 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SearchJourneysQueryRequest: - from_: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('from') }}) - q: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('q') }}) - size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('size') }}) - sort: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('sort') }}) + from_: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('from'), 'exclude': lambda f: f is None }}) + q: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('q'), 'exclude': lambda f: f is None }}) + size: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('size'), 'exclude': lambda f: f is None }}) + sort: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('sort'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/searchjourneysresponse.py b/src/epilotapi/models/shared/searchjourneysresponse.py index dae64874b..f250830f2 100755 --- a/src/epilotapi/models/shared/searchjourneysresponse.py +++ b/src/epilotapi/models/shared/searchjourneysresponse.py @@ -1,6 +1,7 @@ +from __future__ import annotations import dataclasses import dateutil.parser -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from datetime import datetime from enum import Enum from epilotapi import utils @@ -8,37 +9,37 @@ from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SearchJourneysResponseResultsCreatedBy: - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) class SearchJourneysResponseResultsJourneyVersionEnum(str, Enum): FLEX = "Flex" WIDGET = "Widget" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SearchJourneysResponseResults: - created_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_created_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_id') }}) - org: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_org') }}) - schema: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_schema') }}) - tags: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_tags') }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_title') }}) - updated_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_updated_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso') }}) - created_by: Optional[list[SearchJourneysResponseResultsCreatedBy]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_by') }}) - design: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('design') }}) - journey_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('journey_id') }}) - journey_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('journey_name') }}) - journey_type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('journey_type') }}) - journey_version: Optional[SearchJourneysResponseResultsJourneyVersionEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('journey_version') }}) + created_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_created_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_id'), 'exclude': lambda f: f is None }}) + org: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_org'), 'exclude': lambda f: f is None }}) + schema: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_schema'), 'exclude': lambda f: f is None }}) + tags: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_tags'), 'exclude': lambda f: f is None }}) + title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_title'), 'exclude': lambda f: f is None }}) + updated_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_updated_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso'), 'exclude': lambda f: f is None }}) + created_by: Optional[list[SearchJourneysResponseResultsCreatedBy]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_by'), 'exclude': lambda f: f is None }}) + design: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('design'), 'exclude': lambda f: f is None }}) + journey_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('journey_id'), 'exclude': lambda f: f is None }}) + journey_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('journey_name'), 'exclude': lambda f: f is None }}) + journey_type: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('journey_type'), 'exclude': lambda f: f is None }}) + journey_version: Optional[SearchJourneysResponseResultsJourneyVersionEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('journey_version'), 'exclude': lambda f: f is None }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SearchJourneysResponse: - hits: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hits') }}) - results: Optional[list[SearchJourneysResponseResults]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results') }}) + hits: Optional[float] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hits'), 'exclude': lambda f: f is None }}) + results: Optional[list[SearchJourneysResponseResults]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('results'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/searchmappings.py b/src/epilotapi/models/shared/searchmappings.py index bf5e80ef9..46d407303 100755 --- a/src/epilotapi/models/shared/searchmappings.py +++ b/src/epilotapi/models/shared/searchmappings.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -16,10 +17,10 @@ class SearchMappingsTypeEnum(str, Enum): NESTED = "nested" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SearchMappings: - fields: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('fields') }}) - index: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('index') }}) - type: Optional[SearchMappingsTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) + fields: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('fields'), 'exclude': lambda f: f is None }}) + index: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('index'), 'exclude': lambda f: f is None }}) + type: Optional[SearchMappingsTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/security.py b/src/epilotapi/models/shared/security.py index 2bdb96a2a..9c43ceefd 100755 --- a/src/epilotapi/models/shared/security.py +++ b/src/epilotapi/models/shared/security.py @@ -1,3 +1,4 @@ +from __future__ import annotations import dataclasses diff --git a/src/epilotapi/models/shared/selectattribute.py b/src/epilotapi/models/shared/selectattribute.py index a6f676e33..c4713f4aa 100755 --- a/src/epilotapi/models/shared/selectattribute.py +++ b/src/epilotapi/models/shared/selectattribute.py @@ -1,22 +1,23 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SelectAttributeOptions2: value: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('value') }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('title') }}) + title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('title'), 'exclude': lambda f: f is None }}) class SelectAttributeTypeEnum(str, Enum): SELECT = "select" RADIO = "radio" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SelectAttribute: r"""SelectAttribute @@ -25,28 +26,28 @@ class SelectAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - allow_any: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_any') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - options: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('options') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[SelectAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + allow_any: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_any'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + options: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('options'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[SelectAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/sendemailaction.py b/src/epilotapi/models/shared/sendemailaction.py index 9c87000d4..e24b2f675 100755 --- a/src/epilotapi/models/shared/sendemailaction.py +++ b/src/epilotapi/models/shared/sendemailaction.py @@ -1,27 +1,28 @@ +from __future__ import annotations import dataclasses from ..shared import erroroutput as shared_erroroutput from ..shared import executionstatus_enum as shared_executionstatus_enum from ..shared import retrystrategy_enum as shared_retrystrategy_enum from ..shared import sendemailconfig as shared_sendemailconfig -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SendEmailAction: - allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure') }}) - config: Optional[shared_sendemailconfig.SendEmailConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config') }}) - created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically') }}) - error_output: Optional[shared_erroroutput.ErrorOutput] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('error_output') }}) - execution_status: Optional[shared_executionstatus_enum.ExecutionStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('execution_status') }}) - flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - outputs: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('outputs') }}) - retry_strategy: Optional[shared_retrystrategy_enum.RetryStrategyEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('retry_strategy') }}) - started_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('started_at') }}) - type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - updated_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at') }}) + allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure'), 'exclude': lambda f: f is None }}) + config: Optional[shared_sendemailconfig.SendEmailConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config'), 'exclude': lambda f: f is None }}) + created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically'), 'exclude': lambda f: f is None }}) + error_output: Optional[shared_erroroutput.ErrorOutput] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('error_output'), 'exclude': lambda f: f is None }}) + execution_status: Optional[shared_executionstatus_enum.ExecutionStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('execution_status'), 'exclude': lambda f: f is None }}) + flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name'), 'exclude': lambda f: f is None }}) + outputs: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('outputs'), 'exclude': lambda f: f is None }}) + retry_strategy: Optional[shared_retrystrategy_enum.RetryStrategyEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('retry_strategy'), 'exclude': lambda f: f is None }}) + started_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('started_at'), 'exclude': lambda f: f is None }}) + type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + updated_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/sendemailactionconfig.py b/src/epilotapi/models/shared/sendemailactionconfig.py index b47c6d7da..38266984b 100755 --- a/src/epilotapi/models/shared/sendemailactionconfig.py +++ b/src/epilotapi/models/shared/sendemailactionconfig.py @@ -1,18 +1,19 @@ +from __future__ import annotations import dataclasses from ..shared import sendemailconfig as shared_sendemailconfig -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SendEmailActionConfig: - allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure') }}) - config: Optional[shared_sendemailconfig.SendEmailConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config') }}) - created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically') }}) - flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) + allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure'), 'exclude': lambda f: f is None }}) + config: Optional[shared_sendemailconfig.SendEmailConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config'), 'exclude': lambda f: f is None }}) + created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically'), 'exclude': lambda f: f is None }}) + flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name'), 'exclude': lambda f: f is None }}) + type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/sendemailconfig.py b/src/epilotapi/models/shared/sendemailconfig.py index 3ba14ae0e..517a43614 100755 --- a/src/epilotapi/models/shared/sendemailconfig.py +++ b/src/epilotapi/models/shared/sendemailconfig.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Optional @@ -18,36 +19,36 @@ class SendEmailConfigAttachmentsSourceFilterDocumentTypeEnum(str, Enum): UNKNOWN = "unknown" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SendEmailConfigAttachmentsSourceFilter: r"""SendEmailConfigAttachmentsSourceFilter Specify filters to match file entities related to main entity """ - attribute: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('attribute') }}) - document_type: Optional[SendEmailConfigAttachmentsSourceFilterDocumentTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('document_type') }}) - filename_regex: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('filename_regex') }}) - limit: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('limit') }}) - relation_tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('relation_tag') }}) - self: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('self') }}) - tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('tag') }}) + attribute: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('attribute'), 'exclude': lambda f: f is None }}) + document_type: Optional[SendEmailConfigAttachmentsSourceFilterDocumentTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('document_type'), 'exclude': lambda f: f is None }}) + filename_regex: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('filename_regex'), 'exclude': lambda f: f is None }}) + limit: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('limit'), 'exclude': lambda f: f is None }}) + relation_tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('relation_tag'), 'exclude': lambda f: f is None }}) + self: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('self'), 'exclude': lambda f: f is None }}) + tag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('tag'), 'exclude': lambda f: f is None }}) -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SendEmailConfigAttachments: - source_filter: Optional[SendEmailConfigAttachmentsSourceFilter] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('source_filter') }}) + source_filter: Optional[SendEmailConfigAttachmentsSourceFilter] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('source_filter'), 'exclude': lambda f: f is None }}) class SendEmailConfigLanguageCodeEnum(str, Enum): DE = "de" EN = "en" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SendEmailConfig: - attachments: Optional[list[SendEmailConfigAttachments]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('attachments') }}) - email_template_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('email_template_id') }}) - language_code: Optional[SendEmailConfigLanguageCodeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('language_code') }}) + attachments: Optional[list[SendEmailConfigAttachments]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('attachments'), 'exclude': lambda f: f is None }}) + email_template_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('email_template_id'), 'exclude': lambda f: f is None }}) + language_code: Optional[SendEmailConfigLanguageCodeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('language_code'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/sequenceattribute.py b/src/epilotapi/models/shared/sequenceattribute.py index c671000a5..8ad7c608d 100755 --- a/src/epilotapi/models/shared/sequenceattribute.py +++ b/src/epilotapi/models/shared/sequenceattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -8,7 +9,7 @@ class SequenceAttributeTypeEnum(str, Enum): SEQUENCE = "sequence" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SequenceAttribute: r"""SequenceAttribute @@ -17,28 +18,28 @@ class SequenceAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - prefix: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('prefix') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - start_number: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('start_number') }}) - type: Optional[SequenceAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + prefix: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('prefix'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + start_number: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('start_number'), 'exclude': lambda f: f is None }}) + type: Optional[SequenceAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/setvaluemapper.py b/src/epilotapi/models/shared/setvaluemapper.py index 8fcc8d608..6d9d4b0c4 100755 --- a/src/epilotapi/models/shared/setvaluemapper.py +++ b/src/epilotapi/models/shared/setvaluemapper.py @@ -1,11 +1,12 @@ +from __future__ import annotations import dataclasses from ..shared import mappingattributemode_enum as shared_mappingattributemode_enum -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SetValueMapper: mode: shared_mappingattributemode_enum.MappingAttributeModeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('mode') }}) diff --git a/src/epilotapi/models/shared/startexecutionrequest.py b/src/epilotapi/models/shared/startexecutionrequest.py index e38dcfdb7..a0b1da1d8 100755 --- a/src/epilotapi/models/shared/startexecutionrequest.py +++ b/src/epilotapi/models/shared/startexecutionrequest.py @@ -1,12 +1,13 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class StartExecutionRequest: - entity_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_id') }}) - flow_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_id') }}) + entity_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_id'), 'exclude': lambda f: f is None }}) + flow_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_id'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/statusattribute.py b/src/epilotapi/models/shared/statusattribute.py index 2e209d059..531953c28 100755 --- a/src/epilotapi/models/shared/statusattribute.py +++ b/src/epilotapi/models/shared/statusattribute.py @@ -1,21 +1,22 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class StatusAttributeOptions2: value: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('value') }}) - title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('title') }}) + title: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('title'), 'exclude': lambda f: f is None }}) class StatusAttributeTypeEnum(str, Enum): STATUS = "status" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class StatusAttribute: r"""StatusAttribute @@ -24,27 +25,27 @@ class StatusAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - options: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('options') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[StatusAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + options: Optional[list[Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('options'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[StatusAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/summaryattribute.py b/src/epilotapi/models/shared/summaryattribute.py index f57eb63d7..e6236aa54 100755 --- a/src/epilotapi/models/shared/summaryattribute.py +++ b/src/epilotapi/models/shared/summaryattribute.py @@ -1,10 +1,11 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SummaryAttribute: r"""SummaryAttribute @@ -24,9 +25,9 @@ class SummaryAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) value: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('value') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_as_tag: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_as_tag') }}) - tag_color: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('tag_color') }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_as_tag: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_as_tag'), 'exclude': lambda f: f is None }}) + tag_color: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('tag_color'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/summaryfield.py b/src/epilotapi/models/shared/summaryfield.py index 61e48ce34..458b6dc56 100755 --- a/src/epilotapi/models/shared/summaryfield.py +++ b/src/epilotapi/models/shared/summaryfield.py @@ -1,16 +1,17 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class SummaryField: r"""SummaryField Summary Fields are displayed inside list view as a resume of the relation entity. """ - display_as: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('display_as') }}) - field: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('field') }}) + display_as: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('display_as'), 'exclude': lambda f: f is None }}) + field: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('field'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/tagsattribute.py b/src/epilotapi/models/shared/tagsattribute.py index 87f1094ad..8973f0e9a 100755 --- a/src/epilotapi/models/shared/tagsattribute.py +++ b/src/epilotapi/models/shared/tagsattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -8,7 +9,7 @@ class TagsAttributeTypeEnum(str, Enum): TAGS = "tags" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class TagsAttribute: r"""TagsAttribute @@ -17,28 +18,28 @@ class TagsAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - options: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('options') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - suggestions: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('suggestions') }}) - type: Optional[TagsAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + options: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('options'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + suggestions: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('suggestions'), 'exclude': lambda f: f is None }}) + type: Optional[TagsAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/taxonomy.py b/src/epilotapi/models/shared/taxonomy.py index ab64d3b02..ad2ad307a 100755 --- a/src/epilotapi/models/shared/taxonomy.py +++ b/src/epilotapi/models/shared/taxonomy.py @@ -1,18 +1,19 @@ +from __future__ import annotations import dataclasses import dateutil.parser -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from datetime import datetime from epilotapi import utils from marshmallow import fields from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class Taxonomy: name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) slug: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('slug') }}) - created_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso') }}) - plural: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('plural') }}) - updated_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso') }}) + created_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso'), 'exclude': lambda f: f is None }}) + plural: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('plural'), 'exclude': lambda f: f is None }}) + updated_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/taxonomyclassification.py b/src/epilotapi/models/shared/taxonomyclassification.py index 87983b71c..202103493 100755 --- a/src/epilotapi/models/shared/taxonomyclassification.py +++ b/src/epilotapi/models/shared/taxonomyclassification.py @@ -1,18 +1,19 @@ +from __future__ import annotations import dataclasses import dateutil.parser -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from datetime import datetime from epilotapi import utils from marshmallow import fields from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class TaxonomyClassification: name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - created_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - parents: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('parents') }}) - updated_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso') }}) + created_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + parents: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('parents'), 'exclude': lambda f: f is None }}) + updated_at: Optional[datetime] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at'), 'encoder': utils.datetimeisoformat(True), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/textattribute.py b/src/epilotapi/models/shared/textattribute.py index 6225bd81f..683ab6fde 100755 --- a/src/epilotapi/models/shared/textattribute.py +++ b/src/epilotapi/models/shared/textattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -8,7 +9,7 @@ class TextAttributeTypeEnum(str, Enum): STRING = "string" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class TextAttribute: r"""TextAttribute @@ -17,27 +18,27 @@ class TextAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - multiline: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('multiline') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[TextAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + multiline: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('multiline'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[TextAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/triggercondition.py b/src/epilotapi/models/shared/triggercondition.py index 0a9521212..86dd71c49 100755 --- a/src/epilotapi/models/shared/triggercondition.py +++ b/src/epilotapi/models/shared/triggercondition.py @@ -1,14 +1,15 @@ +from __future__ import annotations import dataclasses from ..shared import comparison_enum as shared_comparison_enum -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class TriggerCondition: comparison: shared_comparison_enum.ComparisonEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('comparison') }}) source: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('source') }}) - value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value') }}) + value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/triggerwebhookaction.py b/src/epilotapi/models/shared/triggerwebhookaction.py index a989e0a96..1e7841137 100755 --- a/src/epilotapi/models/shared/triggerwebhookaction.py +++ b/src/epilotapi/models/shared/triggerwebhookaction.py @@ -1,27 +1,28 @@ +from __future__ import annotations import dataclasses from ..shared import erroroutput as shared_erroroutput from ..shared import executionstatus_enum as shared_executionstatus_enum from ..shared import retrystrategy_enum as shared_retrystrategy_enum from ..shared import triggerwebhookconfig as shared_triggerwebhookconfig -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class TriggerWebhookAction: - allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure') }}) - config: Optional[shared_triggerwebhookconfig.TriggerWebhookConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config') }}) - created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically') }}) - error_output: Optional[shared_erroroutput.ErrorOutput] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('error_output') }}) - execution_status: Optional[shared_executionstatus_enum.ExecutionStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('execution_status') }}) - flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - outputs: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('outputs') }}) - retry_strategy: Optional[shared_retrystrategy_enum.RetryStrategyEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('retry_strategy') }}) - started_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('started_at') }}) - type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - updated_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at') }}) + allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure'), 'exclude': lambda f: f is None }}) + config: Optional[shared_triggerwebhookconfig.TriggerWebhookConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config'), 'exclude': lambda f: f is None }}) + created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically'), 'exclude': lambda f: f is None }}) + error_output: Optional[shared_erroroutput.ErrorOutput] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('error_output'), 'exclude': lambda f: f is None }}) + execution_status: Optional[shared_executionstatus_enum.ExecutionStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('execution_status'), 'exclude': lambda f: f is None }}) + flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name'), 'exclude': lambda f: f is None }}) + outputs: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('outputs'), 'exclude': lambda f: f is None }}) + retry_strategy: Optional[shared_retrystrategy_enum.RetryStrategyEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('retry_strategy'), 'exclude': lambda f: f is None }}) + started_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('started_at'), 'exclude': lambda f: f is None }}) + type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + updated_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/triggerwebhookactionconfig.py b/src/epilotapi/models/shared/triggerwebhookactionconfig.py index 28a7938a1..6aac6d3b7 100755 --- a/src/epilotapi/models/shared/triggerwebhookactionconfig.py +++ b/src/epilotapi/models/shared/triggerwebhookactionconfig.py @@ -1,18 +1,19 @@ +from __future__ import annotations import dataclasses from ..shared import triggerwebhookconfig as shared_triggerwebhookconfig -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class TriggerWebhookActionConfig: - allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure') }}) - config: Optional[shared_triggerwebhookconfig.TriggerWebhookConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config') }}) - created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically') }}) - flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) + allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure'), 'exclude': lambda f: f is None }}) + config: Optional[shared_triggerwebhookconfig.TriggerWebhookConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config'), 'exclude': lambda f: f is None }}) + created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically'), 'exclude': lambda f: f is None }}) + flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name'), 'exclude': lambda f: f is None }}) + type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/triggerwebhookconfig.py b/src/epilotapi/models/shared/triggerwebhookconfig.py index 0839643c8..c0b5e8e40 100755 --- a/src/epilotapi/models/shared/triggerwebhookconfig.py +++ b/src/epilotapi/models/shared/triggerwebhookconfig.py @@ -1,12 +1,13 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class TriggerWebhookConfig: - entity_sources: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_sources') }}) - target_webhook_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('target_webhook_id') }}) + entity_sources: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_sources'), 'exclude': lambda f: f is None }}) + target_webhook_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('target_webhook_id'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/triggerworkflowaction.py b/src/epilotapi/models/shared/triggerworkflowaction.py index 94a8caccd..84847ac29 100755 --- a/src/epilotapi/models/shared/triggerworkflowaction.py +++ b/src/epilotapi/models/shared/triggerworkflowaction.py @@ -1,27 +1,28 @@ +from __future__ import annotations import dataclasses from ..shared import erroroutput as shared_erroroutput from ..shared import executionstatus_enum as shared_executionstatus_enum from ..shared import retrystrategy_enum as shared_retrystrategy_enum from ..shared import triggerworkflowconfig as shared_triggerworkflowconfig -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class TriggerWorkflowAction: - allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure') }}) - config: Optional[shared_triggerworkflowconfig.TriggerWorkflowConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config') }}) - created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically') }}) - error_output: Optional[shared_erroroutput.ErrorOutput] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('error_output') }}) - execution_status: Optional[shared_executionstatus_enum.ExecutionStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('execution_status') }}) - flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - outputs: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('outputs') }}) - retry_strategy: Optional[shared_retrystrategy_enum.RetryStrategyEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('retry_strategy') }}) - started_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('started_at') }}) - type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - updated_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at') }}) + allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure'), 'exclude': lambda f: f is None }}) + config: Optional[shared_triggerworkflowconfig.TriggerWorkflowConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config'), 'exclude': lambda f: f is None }}) + created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically'), 'exclude': lambda f: f is None }}) + error_output: Optional[shared_erroroutput.ErrorOutput] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('error_output'), 'exclude': lambda f: f is None }}) + execution_status: Optional[shared_executionstatus_enum.ExecutionStatusEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('execution_status'), 'exclude': lambda f: f is None }}) + flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name'), 'exclude': lambda f: f is None }}) + outputs: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('outputs'), 'exclude': lambda f: f is None }}) + retry_strategy: Optional[shared_retrystrategy_enum.RetryStrategyEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('retry_strategy'), 'exclude': lambda f: f is None }}) + started_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('started_at'), 'exclude': lambda f: f is None }}) + type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + updated_at: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('updated_at'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/triggerworkflowactionconfig.py b/src/epilotapi/models/shared/triggerworkflowactionconfig.py index 6ab4124c3..27bdd74fd 100755 --- a/src/epilotapi/models/shared/triggerworkflowactionconfig.py +++ b/src/epilotapi/models/shared/triggerworkflowactionconfig.py @@ -1,18 +1,19 @@ +from __future__ import annotations import dataclasses from ..shared import triggerworkflowconfig as shared_triggerworkflowconfig -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class TriggerWorkflowActionConfig: - allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure') }}) - config: Optional[shared_triggerworkflowconfig.TriggerWorkflowConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config') }}) - created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically') }}) - flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id') }}) - id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id') }}) - name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) + allow_failure: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('allow_failure'), 'exclude': lambda f: f is None }}) + config: Optional[shared_triggerworkflowconfig.TriggerWorkflowConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('config'), 'exclude': lambda f: f is None }}) + created_automatically: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('created_automatically'), 'exclude': lambda f: f is None }}) + flow_action_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('flow_action_id'), 'exclude': lambda f: f is None }}) + id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('id'), 'exclude': lambda f: f is None }}) + name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('name'), 'exclude': lambda f: f is None }}) + type: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/triggerworkflowcondition.py b/src/epilotapi/models/shared/triggerworkflowcondition.py index d165432b8..e4f4f1895 100755 --- a/src/epilotapi/models/shared/triggerworkflowcondition.py +++ b/src/epilotapi/models/shared/triggerworkflowcondition.py @@ -1,15 +1,16 @@ +from __future__ import annotations import dataclasses from ..shared import comparison_enum as shared_comparison_enum -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Any, Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class TriggerWorkflowCondition: comparison: shared_comparison_enum.ComparisonEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('comparison') }}) schema: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('schema') }}) source: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('source') }}) - value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value') }}) + value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/triggerworkflowconfig.py b/src/epilotapi/models/shared/triggerworkflowconfig.py index 6880617e0..2de1ba1ce 100755 --- a/src/epilotapi/models/shared/triggerworkflowconfig.py +++ b/src/epilotapi/models/shared/triggerworkflowconfig.py @@ -1,16 +1,17 @@ +from __future__ import annotations import dataclasses from ..shared import assignuserstostep as shared_assignuserstostep from ..shared import triggerworkflowcondition as shared_triggerworkflowcondition -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from epilotapi import utils from typing import Optional -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class TriggerWorkflowConfig: - assign_steps: Optional[list[shared_assignuserstostep.AssignUsersToStep]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('assign_steps') }}) - assignees: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('assignees') }}) - conditions: Optional[list[shared_triggerworkflowcondition.TriggerWorkflowCondition]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('conditions') }}) - target_workflow: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('target_workflow') }}) + assign_steps: Optional[list[shared_assignuserstostep.AssignUsersToStep]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('assign_steps'), 'exclude': lambda f: f is None }}) + assignees: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('assignees'), 'exclude': lambda f: f is None }}) + conditions: Optional[list[shared_triggerworkflowcondition.TriggerWorkflowCondition]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('conditions'), 'exclude': lambda f: f is None }}) + target_workflow: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('target_workflow'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/models/shared/userrelationattribute.py b/src/epilotapi/models/shared/userrelationattribute.py index 9a33b03a6..ef1ce892b 100755 --- a/src/epilotapi/models/shared/userrelationattribute.py +++ b/src/epilotapi/models/shared/userrelationattribute.py @@ -1,5 +1,6 @@ +from __future__ import annotations import dataclasses -from dataclasses_json import dataclass_json +from dataclasses_json import Undefined, dataclass_json from enum import Enum from epilotapi import utils from typing import Any, Optional @@ -8,7 +9,7 @@ class UserRelationAttributeTypeEnum(str, Enum): RELATION_USER = "relation_user" -@dataclass_json +@dataclass_json(undefined=Undefined.EXCLUDE) @dataclasses.dataclass class UserRelationAttribute: r"""UserRelationAttribute @@ -17,27 +18,27 @@ class UserRelationAttribute: label: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('label') }}) name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.field_name('name') }}) - purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose') }}) - constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints') }}) - default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value') }}) - deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated') }}) - entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit') }}) - feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag') }}) - group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group') }}) - hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden') }}) - hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label') }}) - icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon') }}) - layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout') }}) - multiple: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('multiple') }}) - order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order') }}) - placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder') }}) - preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter') }}) - protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected') }}) - readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly') }}) - render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition') }}) - required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required') }}) - setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag') }}) - show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table') }}) - type: Optional[UserRelationAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type') }}) - value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter') }}) + purpose: Optional[list[str]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('_purpose'), 'exclude': lambda f: f is None }}) + constraints: Optional[dict[str, Any]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('constraints'), 'exclude': lambda f: f is None }}) + default_value: Optional[Any] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('default_value'), 'exclude': lambda f: f is None }}) + deprecated: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('deprecated'), 'exclude': lambda f: f is None }}) + entity_builder_disable_edit: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('entity_builder_disable_edit'), 'exclude': lambda f: f is None }}) + feature_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('feature_flag'), 'exclude': lambda f: f is None }}) + group: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('group'), 'exclude': lambda f: f is None }}) + hidden: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hidden'), 'exclude': lambda f: f is None }}) + hide_label: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('hide_label'), 'exclude': lambda f: f is None }}) + icon: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('icon'), 'exclude': lambda f: f is None }}) + layout: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('layout'), 'exclude': lambda f: f is None }}) + multiple: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('multiple'), 'exclude': lambda f: f is None }}) + order: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('order'), 'exclude': lambda f: f is None }}) + placeholder: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('placeholder'), 'exclude': lambda f: f is None }}) + preview_value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('preview_value_formatter'), 'exclude': lambda f: f is None }}) + protected: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('protected'), 'exclude': lambda f: f is None }}) + readonly: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('readonly'), 'exclude': lambda f: f is None }}) + render_condition: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('render_condition'), 'exclude': lambda f: f is None }}) + required: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('required'), 'exclude': lambda f: f is None }}) + setting_flag: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('setting_flag'), 'exclude': lambda f: f is None }}) + show_in_table: Optional[bool] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('show_in_table'), 'exclude': lambda f: f is None }}) + type: Optional[UserRelationAttributeTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('type'), 'exclude': lambda f: f is None }}) + value_formatter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.field_name('value_formatter'), 'exclude': lambda f: f is None }}) \ No newline at end of file diff --git a/src/epilotapi/relations.py b/src/epilotapi/relations.py index 6b7ccdf57..4266869ab 100755 --- a/src/epilotapi/relations.py +++ b/src/epilotapi/relations.py @@ -30,14 +30,14 @@ def add_relations(self, request: operations.AddRelationsRequest) -> operations.A url = utils.generate_url(base_url, "/v1/entity/{slug}/{id}/relations", request.path_params) headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type query_params = utils.get_query_params(request.query_params) client = self._security_client - r = client.request("POST", url, params=query_params, data=data, json=json, files=files, headers=headers) + r = client.request("POST", url, params=query_params, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.AddRelationsResponse(status_code=r.status_code, content_type=content_type) @@ -115,14 +115,14 @@ def update_relation(self, request: operations.UpdateRelationRequest) -> operatio url = utils.generate_url(base_url, "/v1/entity/{slug}/{id}/relations/{attribute}/{entity_id}", request.path_params) headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type query_params = utils.get_query_params(request.query_params) client = self._security_client - r = client.request("PUT", url, params=query_params, data=data, json=json, files=files, headers=headers) + r = client.request("PUT", url, params=query_params, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.UpdateRelationResponse(status_code=r.status_code, content_type=content_type) diff --git a/src/epilotapi/saved_views.py b/src/epilotapi/saved_views.py index 20d3c2db8..fc6bc5dc5 100755 --- a/src/epilotapi/saved_views.py +++ b/src/epilotapi/saved_views.py @@ -30,13 +30,13 @@ def create_saved_view(self, request: operations.CreateSavedViewRequest) -> opera url = base_url.removesuffix("/") + "/v1/entity/view" headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type client = self._security_client - r = client.request("POST", url, data=data, json=json, files=files, headers=headers) + r = client.request("POST", url, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.CreateSavedViewResponse(status_code=r.status_code, content_type=content_type) @@ -132,13 +132,13 @@ def update_saved_view(self, request: operations.UpdateSavedViewRequest) -> opera url = utils.generate_url(base_url, "/v1/entity/view/{id}", request.path_params) headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type client = self._security_client - r = client.request("PUT", url, data=data, json=json, files=files, headers=headers) + r = client.request("PUT", url, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.UpdateSavedViewResponse(status_code=r.status_code, content_type=content_type) diff --git a/src/epilotapi/schemas.py b/src/epilotapi/schemas.py index ae26341fa..67b08bfbd 100755 --- a/src/epilotapi/schemas.py +++ b/src/epilotapi/schemas.py @@ -30,14 +30,14 @@ def create_new_schema_version(self, request: operations.CreateNewSchemaVersionRe url = utils.generate_url(base_url, "/v1/entity/schemas/{slug}", request.path_params) headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type query_params = utils.get_query_params(request.query_params) client = self._security_client - r = client.request("PUT", url, params=query_params, data=data, json=json, files=files, headers=headers) + r = client.request("PUT", url, params=query_params, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.CreateNewSchemaVersionResponse(status_code=r.status_code, content_type=content_type) diff --git a/src/epilotapi/sdk.py b/src/epilotapi/sdk.py index 9b26d9d95..ba66c12e4 100755 --- a/src/epilotapi/sdk.py +++ b/src/epilotapi/sdk.py @@ -36,8 +36,8 @@ class EpilotAPI: _security: shared.Security _server_url: str = SERVERS[0] _language: str = "python" - _sdk_version: str = "2.4.1" - _gen_version: str = "1.4.8" + _sdk_version: str = "2.5.2" + _gen_version: str = "1.5.4" def __init__(self) -> None: self._client = requests.Session() diff --git a/src/epilotapi/taxonomy.py b/src/epilotapi/taxonomy.py index 74ea35c15..0525866e2 100755 --- a/src/epilotapi/taxonomy.py +++ b/src/epilotapi/taxonomy.py @@ -80,14 +80,14 @@ def taxonomies_classifications_search(self, request: operations.TaxonomiesClassi url = base_url.removesuffix("/") + "/v1/entity/taxonomies/classifications:search" headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type query_params = utils.get_query_params(request.query_params) client = self._security_client - r = client.request("POST", url, params=query_params, data=data, json=json, files=files, headers=headers) + r = client.request("POST", url, params=query_params, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.TaxonomiesClassificationsSearchResponse(status_code=r.status_code, content_type=content_type) @@ -136,13 +136,13 @@ def update_classifications_for_taxonomy(self, request: operations.UpdateClassifi url = utils.generate_url(base_url, "/v1/entity/taxonomies/{taxonomySlug}/classifications", request.path_params) headers = {} - req_content_type, data, json, files = utils.serialize_request_body(request) + req_content_type, data, form = utils.serialize_request_body(request) if req_content_type != "multipart/form-data" and req_content_type != "multipart/mixed": headers["content-type"] = req_content_type client = self._security_client - r = client.request("POST", url, data=data, json=json, files=files, headers=headers) + r = client.request("POST", url, data=data, files=form, headers=headers) content_type = r.headers.get("Content-Type") res = operations.UpdateClassificationsForTaxonomyResponse(status_code=r.status_code, content_type=content_type) diff --git a/src/epilotapi/utils/utils.py b/src/epilotapi/utils/utils.py index d7b94207e..5b3253e3c 100755 --- a/src/epilotapi/utils/utils.py +++ b/src/epilotapi/utils/utils.py @@ -1,14 +1,15 @@ import base64 -import cgi import json import re from dataclasses import Field, dataclass, fields, is_dataclass, make_dataclass from datetime import date, datetime +from email.message import Message +from enum import Enum from typing import Callable, Optional, Tuple, Union, get_args, get_origin from xmlrpc.client import boolean +import dateutil.parser import requests -from dacite import from_dict from dataclasses_json import DataClassJsonMixin @@ -97,7 +98,8 @@ def _parse_security_scheme(client: SecurityClient, scheme_metadata: dict, scheme def _parse_basic_auth_scheme(client: SecurityClient, scheme: dataclass): - username, password = "" + username = "" + password = "" scheme_fields: Tuple[Field, ...] = fields(scheme) for scheme_field in scheme_fields: @@ -114,69 +116,69 @@ def _parse_basic_auth_scheme(client: SecurityClient, scheme: dataclass): password = value data = f'{username}:{password}'.encode() - client.client.headers['Authorization'] = f'Basic {base64.b64encode(data)}' + client.client.headers['Authorization'] = f'Basic {base64.b64encode(data).decode()}' def generate_url(server_url: str, path: str, path_params: dataclass) -> str: - param_fields: Tuple[Field, ...] = fields(path_params) - for f in param_fields: + path_param_fields: Tuple[Field, ...] = fields(path_params) + for f in path_param_fields: param_metadata = f.metadata.get('path_param') - if not param_metadata: + if param_metadata is None: continue if param_metadata.get('style', 'simple') == 'simple': param = getattr(path_params, f.name) + if param is None: + continue + if type(param) is list: pp_vals: list[str] = [] for pp_val in param: - pp_vals.append(str(pp_val)) + if pp_val is None: + continue + pp_vals.append(val_to_string(pp_val)) path = path.replace( '{' + param_metadata.get('field_name', f.name) + '}', ",".join(pp_vals), 1) elif type(param) is dict: pp_vals: list[str] = [] for pp_key in param: + if param[pp_key] is None: + continue if param_metadata.get('explode'): - pp_vals.append(f"{pp_key}={param[pp_key]}") + pp_vals.append( + f"{pp_key}={val_to_string(param[pp_key])}") else: - pp_vals.append(f"{pp_key},{param[pp_key]}") + pp_vals.append( + f"{pp_key},{val_to_string(param[pp_key])}") path = path.replace( '{' + param_metadata.get('field_name', f.name) + '}', ",".join(pp_vals), 1) elif not isinstance(param, (str, int, float, complex, bool)): pp_vals: list[str] = [] - attrs: list[str] = [p for p in dir(param) if not p.startswith( - '__') and not callable(getattr(param, p))] - for attr in attrs: - field: Field = _get_field_from_attr(param, attr) - + param_fields: Tuple[Field, ...] = fields(param) + for field in param_fields: param_value_metadata = field.metadata.get('path_param') if not param_value_metadata: continue parm_name = param_value_metadata.get('field_name', f.name) - param_field_val = getattr(param, attr) - if field is not None and is_optional(field) and param_field_val is None: + param_field_val = getattr(param, field.name) + if param_field_val is None: continue elif param_metadata.get('explode'): - pp_vals.append(f"{parm_name}={param_field_val}") + pp_vals.append( + f"{parm_name}={val_to_string(param_field_val)}") else: - pp_vals.append(f"{parm_name},{param_field_val}") + pp_vals.append( + f"{parm_name},{val_to_string(param_field_val)}") path = path.replace( '{' + param_metadata.get('field_name', f.name) + '}', ",".join(pp_vals), 1) else: path = path.replace( - '{' + param_metadata.get('field_name', f.name) + '}', str(param), 1) + '{' + param_metadata.get('field_name', f.name) + '}', val_to_string(param), 1) return server_url.removesuffix("/") + path -def _get_field_from_attr(obj, attr: str) -> Field: - pp_fields: Tuple[Field, ...] = fields(obj) - for pp_field in pp_fields: - if pp_field.name == attr: - return pp_field - return None - - def is_optional(field): return get_origin(field) is Union and type(None) in get_args(field) @@ -254,22 +256,54 @@ def _get_serialized_query_params(metadata: dict, field_name: str, obj: any) -> d def _get_deep_object_query_params(metadata: dict, field_name: str, obj: any) -> dict[str, list[str]]: params: dict[str, list[str]] = {} + if obj is None: + return params + if is_dataclass(obj): obj_fields: Tuple[Field, ...] = fields(obj) for obj_field in obj_fields: obj_param_metadata = obj_field.metadata.get('query_param') if not obj_param_metadata: continue - params[ - f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'] = [ - getattr(obj, obj_field.name)] + + val = getattr(obj, obj_field.name) + if val is None: + continue + + if isinstance(val, list): + for v in val: + if v is None: + continue + + if params.get(f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]') is None: + params[f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'] = [ + ] + + params[ + f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'].append(val_to_string(v)) + else: + params[ + f'{metadata.get("field_name", field_name)}[{obj_param_metadata.get("field_name", obj_field.name)}]'] = [ + val_to_string(val)] elif isinstance(obj, dict): for key, value in obj.items(): + if value is None: + continue + if isinstance(value, list): - params[f'{metadata.get("field_name", field_name)}[{key}]'] = value + for val in value: + if val is None: + continue + + if params.get(f'{metadata.get("field_name", field_name)}[{key}]') is None: + params[f'{metadata.get("field_name", field_name)}[{key}]'] = [ + ] + + params[ + f'{metadata.get("field_name", field_name)}[{key}]'].append(val_to_string(val)) else: params[f'{metadata.get("field_name", field_name)}[{key}]'] = [ - value] + val_to_string(value)] return params @@ -304,7 +338,7 @@ def serialize_request_body(request: dataclass) -> Tuple[str, any, any]: if request_metadata is not None: # single request - return serialize_content_type(request_metadata, request_val) + return serialize_content_type('request', request_metadata.get('media_type', 'application/octet-stream'), request_val) request_fields: Tuple[Field, ...] = fields(request_val) for f in request_fields: @@ -317,176 +351,80 @@ def serialize_request_body(request: dataclass) -> Tuple[str, any, any]: raise Exception( f'missing request tag on request body field {f.name}') - return serialize_content_type(request_metadata, request_val) + return serialize_content_type(f.name, request_metadata.get('media_type', 'application/octet-stream'), req) -def serialize_content_type(metadata, request: dataclass) -> Tuple[str, any, list[list[any]]]: - media_type = metadata.get('media_type', 'application/octet-stream') - if re.match(r'text/plain', media_type) != None: - return media_type, serialize_text(request), None, None +def serialize_content_type(field_name: str, media_type: str, request: dataclass) -> Tuple[str, any, list[list[any]]]: if re.match(r'(application|text)\/.*?\+*json.*', media_type) != None: - return media_type, None, serialize_json(request), None + return media_type, marshal_json(request), None if re.match(r'multipart\/.*', media_type) != None: return serialize_multipart_form(media_type, request) if re.match(r'application\/x-www-form-urlencoded.*', media_type) != None: - return media_type, serialize_form(request, 'request'), None, None + return media_type, serialize_form_data(field_name, request), None if isinstance(request, (bytes, bytearray)): - return media_type, request, None, None + return media_type, request, None if isinstance(request, str): - return media_type, request, None, None + return media_type, request, None raise Exception( - f"invalid request body type {type(request)} for mediaType {metadata['media_type']}") - + f"invalid request body type {type(request)} for mediaType {media_type}") -def serialize_text(request: dataclass) -> str: - request_fields: Tuple[Field, ...] = fields(request) - for f in request_fields: - field_metadata = f.metadata.get('request') - if field_metadata is None: - continue - field_value = getattr(request, f.name) - if field_value is None or not isinstance(field_value, str): - continue - return field_value - return None - - -def serialize_json(request: dataclass) -> str: - request_fields: Tuple[Field, ...] = fields(request) - for f in request_fields: - field_metadata = f.metadata.get('request') - if field_metadata is None: - continue +def serialize_multipart_form(media_type: str, request: dataclass) -> Tuple[str, any, list[list[any]]]: + form: list[list[any]] = [] + request_fields = fields(request) - field_value = getattr(request, f.name) - if field_value is None: + for field in request_fields: + val = getattr(request, field.name) + if val is None: continue - return json.dumps(field_value) - return marshal_json(request) - - -def dict_to_dataclass(orig: dict[str, any], dataclass_type: str): - cast_type = str(dataclass_type).replace( - "typing.Optional[", "").replace("]", "") - - cast_modules = cast_type.split(".")[:-1] - if cast_modules[0] == "typing": - # This is a built-in type, not a data_class - return orig - - module = None - for m in cast_modules: - if not module: - module = __import__(m) - else: - module = getattr(module, m) - - cast_type = cast_type.split(".")[-1:][0] - cast_class = getattr(module, cast_type) - data_class = from_dict(cast_class, orig) - data_fields = fields(data_class) - for f in data_fields: - name = f.name - for meta_key, meta_value in f.metadata.items(): - try: - name = meta_value["field_name"] - break - except KeyError: - continue - - try: - original_value = orig[f.name] - except KeyError: - original_value = orig[name] - - setattr(data_class, f.name, original_value) - return data_class - - -def parse_field(field: Field, data_class: dataclass, metadata_string: str): - field_metadata = field.metadata.get(metadata_string) - if field_metadata is None: - return None - - field_value = getattr(data_class, field.name) - if field_value is None: - return None - try: - return dict_to_dataclass(field_value, field.type) - except Exception: - return field_value - - -def serialize_multipart_form(media_type: str, request: dataclass) -> Tuple[str, any, list[list[any]]]: - form: list[list[any]] = [] - request_fields: Tuple[Field, ...] = fields(request) - for f in request_fields: - field_value = parse_field(f, request, 'request') - if not field_value: + field_metadata = field.metadata.get('multipart_form') + if not field_metadata: continue - if is_dataclass(field_value): - value_request_fields = fields(field_value) + if field_metadata.get("file") is True: + file_fields = fields(val) - for field_value_f in value_request_fields: - field_metadata = field_value_f.metadata.get('multipart_form') + file_name = "" + field_name = "" + content = bytes() - if not field_metadata: + for file_field in file_fields: + file_metadata = file_field.metadata.get('multipart_form') + if file_metadata is None: continue - if field_metadata.get("file") is True: - file = getattr(field_value, field_value_f.name) - file = dict_to_dataclass(file, field_value_f.type) - file_fields = fields(file) - - file_name = "" - field_name = "" - content = bytes() - - for file_field in file_fields: - file_metadata = file_field.metadata.get( - 'multipart_form') - if file_metadata is None: - continue - if file_metadata.get("content") is True: - content = getattr(file, file_field.name) - else: - field_name = file_metadata.get( - "field_name", file_field.name) - file_name = getattr(file, file_field.name) - if field_name == "" or file_name == "" or content == bytes(): - raise Exception('invalid multipart/form-data file') - - form.append([field_name, [file_name, content]]) - elif field_metadata.get("json") is True: - to_append = [field_metadata.get("field_name", field_value_f.name), [ - None, marshal_json(getattr(field_value, field_value_f.name)), "application/json"]] - form.append(to_append) - else: - val = getattr(field_value, field_value_f.name) - field_name = field_metadata.get( - "field_name", field_value_f.name) - if isinstance(val, list): - for value in val: - form.append([field_name + "[]", [None, value]]) - else: - form.append([field_name, [None, val]]) - return media_type, None, None, form - - -def _get_form_field_name(obj_field: Field) -> str: - obj_param_metadata = obj_field.metadata.get('form') - - if not obj_param_metadata: - return "" - return obj_param_metadata.get("field_name", obj_field.name) + if file_metadata.get("content") is True: + content = getattr(val, file_field.name) + else: + field_name = file_metadata.get( + "field_name", file_field.name) + file_name = getattr(val, file_field.name) + if field_name == "" or file_name == "" or content == bytes(): + raise Exception('invalid multipart/form-data file') + + form.append([field_name, [file_name, content]]) + elif field_metadata.get("json") is True: + to_append = [field_metadata.get("field_name", field.name), [ + None, marshal_json(val), "application/json"]] + form.append(to_append) + else: + field_name = field_metadata.get( + "field_name", field.name) + if isinstance(val, list): + for value in val: + if value is None: + continue + form.append( + [field_name + "[]", [None, val_to_string(value)]]) + else: + form.append([field_name, [None, val_to_string(val)]]) + return media_type, None, form def serialize_dict(original: dict, explode: bool, field_name, existing: Optional[dict[str, list[str]]]) -> dict[ - str, list[str]]: + str, list[str]]: if existing is None: existing = [] @@ -506,110 +444,85 @@ def serialize_dict(original: dict, explode: bool, field_name, existing: Optional return existing -def serialize_form(data: dataclass, meta_string: str) -> dict[str, any]: +def serialize_form_data(field_name: str, data: dataclass) -> dict[str, any]: form: dict[str, list[str]] = {} - request_fields: Tuple[Field, ...] = fields(data) - for f in request_fields: - field_value = parse_field(f, data, meta_string) - if not field_value: - continue + if is_dataclass(data): + for field in fields(data): + val = getattr(data, field.name) + if val is None: + continue - if is_dataclass(field_value): - value_fields = fields(field_value) - for value_f in value_fields: - value = parse_field(value_f, field_value, 'form') - if not value: - continue - metadata = value_f.metadata.get('form') - if metadata is None: - continue + metadata = field.metadata.get('form') + if metadata is None: + continue - f_name = metadata["field_name"] - if is_dataclass(value): - if "style" not in metadata or ("json" in metadata and metadata["json"] is True): - if f_name not in form: - form[f_name] = [] - form[f_name].append(json.dumps( - getattr(field_value, f_name))) - else: - if "style" in metadata and metadata["style"] == "form": - form = form | serialize_form(value, "form") - - elif isinstance(value, dict): - if "json" in metadata and metadata["json"] is True: - if f_name not in form: - form[f_name] = [] - form[f_name].append(json.dumps(value)) - else: - explode = "explode" in metadata and metadata["explode"] is True - serialize_dict(value, explode, f_name, form) - elif isinstance(value, list): - if "explode" in metadata and metadata["explode"] is True: - if f_name not in form: - form[f_name] = [] - for item in value: - form[f_name].append(item) - else: - if value_f.name not in form: - form[f_name] = [] - form[f_name].append(",".join(value)) - else: - if value_f.name not in form: - form[f_name] = [] - form[f_name].append(str(value)) - elif isinstance(data, dict): - for key, value in data.items(): - if isinstance(value, list): - for v in value: - if not key in form: - form[key] = [] - form[key].append(v) - else: - if not key in form: - form[key] = [] - form[key].append(value) - elif isinstance(data, list): - for value in data: - if isinstance(value, list): - for v in value: - if not key in form: - form[meta_string] = [] - form[meta_string].append(v) + field_name = metadata.get('field_name', field.name) + + if metadata.get('json'): + form[field_name] = [marshal_json(val)] + else: + if metadata.get('style', 'form') == 'form': + form = form | _populate_form( + field_name, metadata.get('explode', True), val, _get_form_field_name) else: - if not key in form: - form[meta_string] = [] - form[meta_string].append(value) + raise Exception( + f'Invalid form style for field {field.name}') + elif isinstance(data, dict): + for key, value in data.items(): + form[key] = [val_to_string(value)] + else: + raise Exception(f'Invalid request body type for field {field_name}') + return form +def _get_form_field_name(obj_field: Field) -> str: + obj_param_metadata = obj_field.metadata.get('form') + + if not obj_param_metadata: + return "" + + return obj_param_metadata.get("field_name", obj_field.name) + + def _populate_form(field_name: str, explode: boolean, obj: any, get_field_name_func: Callable) -> dict[str, list[str]]: params: dict[str, str | list[str]] = {} + if obj is None: + return params + if is_dataclass(obj): items = [] obj_fields: Tuple[Field, ...] = fields(obj) for obj_field in obj_fields: obj_field_name = get_field_name_func(obj_field) - if obj_field_name == "": + if obj_field_name == '': + continue + + val = getattr(obj, obj_field.name) + if val is None: continue if explode: - params[obj_field_name] = [getattr(obj, obj_field.name)] + params[obj_field_name] = [val_to_string(val)] else: items.append( - f'{obj_field_name},{getattr(obj, obj_field.name)}') + f'{obj_field_name},{val_to_string(val)}') if len(items) > 0: params[field_name] = [','.join(items)] elif isinstance(obj, dict): items = [] for key, value in obj.items(): + if value is None: + continue + if explode: - _populate_simple_param(params, key, value) + params[key] = val_to_string(value) else: - items.append(f'{key},{value}') + items.append(f'{key},{val_to_string(value)}') if len(items) > 0: params[field_name] = [','.join(items)] @@ -617,31 +530,28 @@ def _populate_form(field_name: str, explode: boolean, obj: any, get_field_name_f items = [] for value in obj: + if value is None: + continue + if explode: if not field_name in params: params[field_name] = [] - params[field_name].append(value) + params[field_name].append(val_to_string(value)) else: - items.append(value) + items.append(val_to_string(value)) if len(items) > 0: params[field_name] = [','.join([str(item) for item in items])] else: - _populate_simple_param(params, field_name, obj) + params[field_name] = val_to_string(obj) return params -def _populate_simple_param(params: dict[str, str | list[str]], field_name: str, value: any): - # Python uses True and False instead of true and false for booleans; - # This json encodes the values _only_ if the value is a boolean. - if value is True or value is False: - params[field_name] = json.dumps(value) - else: - params[field_name] = value - - def _serialize_header(explode: boolean, obj: any) -> str: + if obj is None: + return '' + if is_dataclass(obj): items = [] obj_fields: Tuple[Field, ...] = fields(obj) @@ -652,40 +562,58 @@ def _serialize_header(explode: boolean, obj: any) -> str: continue obj_field_name = obj_param_metadata.get( - "field_name", obj_field.name) - if obj_field_name == "": + 'field_name', obj_field.name) + if obj_field_name == '': + continue + + val = getattr(obj, obj_field.name) + if val is None: continue if explode: items.append( - f'{obj_field_name}={getattr(obj, obj_field.name)}') + f'{obj_field_name}={val_to_string(val)}') else: items.append(obj_field_name) - items.append(getattr(obj, obj_field.name)) + items.append(val_to_string(val)) if len(items) > 0: - return [','.join(items)] + return ','.join(items) elif isinstance(obj, dict): items = [] for key, value in obj.items(): + if value is None: + continue + if explode: - items.append(f'{key}={value}') + items.append(f'{key}={val_to_string(value)}') else: items.append(key) - items.append(value) + items.append(val_to_string(value)) if len(items) > 0: return ','.join([str(item) for item in items]) elif isinstance(obj, list): - return ','.join(obj) + items = [] + + for value in obj: + if value is None: + continue + + items.append(val_to_string(value)) + + return ','.join(items) else: - return f'{obj}' + return f'{val_to_string(obj)}' def unmarshal_json(data, t): + Unmarhsal = make_dataclass('Unmarhsal', [('res', t)], + bases=(DataClassJsonMixin,)) d = json.loads(data) - return dict_to_dataclass(d, t) + out = Unmarhsal.from_dict({"res": d}) + return out.res def marshal_json(c): @@ -700,7 +628,9 @@ def match_content_type(content_type: str, pattern: str) -> boolean: if content_type == pattern or pattern == "*" or pattern == "*/*": return True - media_type, _ = cgi.parse_header(content_type) + m = Message() + m['content-type'] = content_type + media_type = m.get_content_type() if media_type == pattern: return True @@ -717,7 +647,7 @@ def datetimeisoformat(optional: bool): def isoformatoptional(v): if optional and v is None: return None - return datetime.isoformat(v) + return val_to_string(v) return isoformatoptional @@ -731,8 +661,23 @@ def isoformatoptional(v): return isoformatoptional +def datefromisoformat(date: str): + return dateutil.parser.parse(date).date() + + def field_name(name): def override(_, _field_name=name): return _field_name return override + + +def val_to_string(val): + if isinstance(val, bool): + return str(val).lower() + elif isinstance(val, datetime): + return val.isoformat().replace('+00:00', 'Z') + elif isinstance(val, Enum): + return val.value + + return str(val)