diff --git a/Makefile b/Makefile index 5ba4d20..c47033d 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,20 @@ +# Copyright 2024 yu-iskw +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# The latest version in the main branch +LIGHTDASH_VERSION ?= main + # Set up an environment .PHONEY: setup setup: setup-python setup-pre-commit @@ -38,20 +55,17 @@ test-publish: generate-client: rm -fr "lightdash_client/api/" "lightdash_client/models/" - bash dev/generate_clients.sh --skip-validate-spec 1 + bash dev/generate_clients.sh prepare-schema: download-swagger-json dereference-swagger-json -download-swagger-json: check-lightdash-version - bash dev/download_swagger_json.sh --version "$(VERSION)" +update-client: download-swagger-json dereference-swagger-json generate-client lint -dereference-swagger-json: build-swagger-cli-image +download-swagger-json: + bash dev/download_swagger_json.sh --version "$(LIGHTDASH_VERSION)" + +dereference-swagger-json: build-swagger-cli-image/ bash dev/dereference_swagger_json.sh build-swagger-cli-image: docker build -t "swagger-cli:latest" -f "docker/swagger-cli/Dockerfile" . - -check-lightdash-version: -ifndef VERSION - $(error VERSION is undefined) -endif diff --git a/dev/generate_clients.sh b/dev/generate_clients.sh index a7638d4..e4fecee 100644 --- a/dev/generate_clients.sh +++ b/dev/generate_clients.sh @@ -26,7 +26,6 @@ schema_json="${PROJECT_DIR}/dev/schemas/rebuilt-swagger.json" config_yaml="${PROJECT_DIR}/dev/openapi-python-client.yml" output_dir="${PROJECT_DIR}" meta="setup" -skip_validate_spec=1 while (($# > 0)); do if [[ "$1" == "--schema-json" ]]; then schema_json="${2:?}" @@ -40,9 +39,6 @@ while (($# > 0)); do elif [[ "$1" == "--meta" ]]; then meta="${2:?}" shift 2 - elif [[ "$1" == "--skip-validate-spec" ]]; then - skip_validate_spec="${2:?}" - shift 2 else echo "ERROR: Unrecognized argument ${1}" >&2 exit 1 @@ -60,10 +56,17 @@ openapi-python-client generate \ --meta "${meta:?}" \ "${options[@]}" -ls -la "${temp_dir:?}/lightdash-client-python" +# Check the generated project +generated_project_dir="${temp_dir:?}/lightdash-client-python" +ls -la "${generated_project_dir:?}" + +# Replace the default auth method from Bearer to ApiKey +sed -i -e "s/Bearer/ApiKey/" "${generated_project_dir:?}/lightdash_client/client.py" # Copy the files -cp -apR "${temp_dir:?}/lightdash-client-python/"* "${output_dir:?}" +rsync -a -r --delete-after "${generated_project_dir:?}/lightdash_client/models/" "${output_dir:?}/lightdash_client/models/" +rsync -a -r --delete-after "${generated_project_dir:?}/lightdash_client/api/" "${output_dir:?}/lightdash_client/api/" +rsync -a -r --delete-after "${generated_project_dir:?}/lightdash_client/client.py" "${output_dir:?}/lightdash_client/client.py" # Remove the temporary directory rm -fr "${temp_dir:?}" diff --git a/dev/openapi-python-client.yml b/dev/openapi-python-client.yml index 9bf4469..22ded12 100644 --- a/dev/openapi-python-client.yml +++ b/dev/openapi-python-client.yml @@ -6,3 +6,7 @@ package_name_override: lightdash_client package_version_override: 0.2.0 http_timeout: 30 + +# Format code using the pre-commit hooks of ruff +# SEE https://github.com/openapi-generators/openapi-python-client +post_hooks: [] diff --git a/dev/schemas/split-swagger/components/schemas/ApiChartAsCodeListResponse.json b/dev/schemas/split-swagger/components/schemas/ApiChartAsCodeListResponse.json new file mode 100644 index 0000000..01783cf --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiChartAsCodeListResponse.json @@ -0,0 +1,22 @@ +{ + "properties": { + "results": { + "items": { + "$ref": "./ChartAsCode.json" + }, + "type": "array" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/ApiChartAsCodeUpsertResponse.json b/dev/schemas/split-swagger/components/schemas/ApiChartAsCodeUpsertResponse.json new file mode 100644 index 0000000..6942e7e --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiChartAsCodeUpsertResponse.json @@ -0,0 +1,19 @@ +{ + "properties": { + "results": { + "$ref": "./PromotionChanges.json" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/ApiCreateDashboardResponse.json b/dev/schemas/split-swagger/components/schemas/ApiCreateDashboardResponse.json new file mode 100644 index 0000000..e35167f --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiCreateDashboardResponse.json @@ -0,0 +1,19 @@ +{ + "properties": { + "results": { + "$ref": "./Dashboard.json" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/ApiCreateGroupResponse.json b/dev/schemas/split-swagger/components/schemas/ApiCreateGroupResponse.json new file mode 100644 index 0000000..d02544f --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiCreateGroupResponse.json @@ -0,0 +1,19 @@ +{ + "properties": { + "results": { + "$ref": "./GroupWithMembers.json" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/ApiCreateTagResponse.json b/dev/schemas/split-swagger/components/schemas/ApiCreateTagResponse.json new file mode 100644 index 0000000..19520fa --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiCreateTagResponse.json @@ -0,0 +1,27 @@ +{ + "properties": { + "results": { + "properties": { + "tagUuid": { + "type": "string" + } + }, + "required": [ + "tagUuid" + ], + "type": "object" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/ApiCreateVirtualView.json b/dev/schemas/split-swagger/components/schemas/ApiCreateVirtualView.json new file mode 100644 index 0000000..4395f5a --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiCreateVirtualView.json @@ -0,0 +1,19 @@ +{ + "properties": { + "results": { + "$ref": "./Pick_Explore.name_.json" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/ApiDashboardAsCodeListResponse.json b/dev/schemas/split-swagger/components/schemas/ApiDashboardAsCodeListResponse.json new file mode 100644 index 0000000..2807c5e --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiDashboardAsCodeListResponse.json @@ -0,0 +1,22 @@ +{ + "properties": { + "results": { + "items": { + "$ref": "./DashboardAsCode.json" + }, + "type": "array" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/ApiDashboardAsCodeUpsertResponse.json b/dev/schemas/split-swagger/components/schemas/ApiDashboardAsCodeUpsertResponse.json new file mode 100644 index 0000000..6942e7e --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiDashboardAsCodeUpsertResponse.json @@ -0,0 +1,19 @@ +{ + "properties": { + "results": { + "$ref": "./PromotionChanges.json" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/ApiGetDashboardsResponse.json b/dev/schemas/split-swagger/components/schemas/ApiGetDashboardsResponse.json new file mode 100644 index 0000000..39b6ced --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiGetDashboardsResponse.json @@ -0,0 +1,22 @@ +{ + "properties": { + "results": { + "items": { + "$ref": "./DashboardBasicDetailsWithTileTypes.json" + }, + "type": "array" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/ApiGetMetricPeek.json b/dev/schemas/split-swagger/components/schemas/ApiGetMetricPeek.json new file mode 100644 index 0000000..c85169b --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiGetMetricPeek.json @@ -0,0 +1,19 @@ +{ + "properties": { + "results": { + "$ref": "./MetricWithAssociatedTimeDimension.json" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/ApiGetMetricsTree.json b/dev/schemas/split-swagger/components/schemas/ApiGetMetricsTree.json new file mode 100644 index 0000000..218799c --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiGetMetricsTree.json @@ -0,0 +1,30 @@ +{ + "properties": { + "results": { + "properties": { + "edges": { + "items": { + "$ref": "./CatalogMetricsTreeEdge.json" + }, + "type": "array" + } + }, + "required": [ + "edges" + ], + "type": "object" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/ApiGetTagsResponse.json b/dev/schemas/split-swagger/components/schemas/ApiGetTagsResponse.json new file mode 100644 index 0000000..73eee56 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiGetTagsResponse.json @@ -0,0 +1,22 @@ +{ + "properties": { + "results": { + "items": { + "$ref": "./Tag.json" + }, + "type": "array" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/ApiGithubDbtWriteBack.json b/dev/schemas/split-swagger/components/schemas/ApiGithubDbtWriteBack.json new file mode 100644 index 0000000..ea64155 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiGithubDbtWriteBack.json @@ -0,0 +1,19 @@ +{ + "properties": { + "results": { + "$ref": "./PullRequestCreated.json" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/ApiGithubDbtWritePreview.json b/dev/schemas/split-swagger/components/schemas/ApiGithubDbtWritePreview.json new file mode 100644 index 0000000..0dca5dd --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiGithubDbtWritePreview.json @@ -0,0 +1,46 @@ +{ + "properties": { + "results": { + "properties": { + "owner": { + "type": "string" + }, + "files": { + "items": { + "type": "string" + }, + "type": "array" + }, + "path": { + "type": "string" + }, + "repo": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "owner", + "files", + "path", + "repo", + "url" + ], + "type": "object" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/ApiMetricsCatalog.json b/dev/schemas/split-swagger/components/schemas/ApiMetricsCatalog.json new file mode 100644 index 0000000..cdcad4d --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiMetricsCatalog.json @@ -0,0 +1,19 @@ +{ + "properties": { + "results": { + "$ref": "./KnexPaginatedData_ApiMetricsCatalogResults_.json" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/ApiMetricsCatalogResults.json b/dev/schemas/split-swagger/components/schemas/ApiMetricsCatalogResults.json new file mode 100644 index 0000000..6f58362 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiMetricsCatalogResults.json @@ -0,0 +1,6 @@ +{ + "items": { + "$ref": "./CatalogField.json" + }, + "type": "array" +} diff --git a/dev/schemas/split-swagger/components/schemas/ApiMetricsExplorerQueryResults.json b/dev/schemas/split-swagger/components/schemas/ApiMetricsExplorerQueryResults.json new file mode 100644 index 0000000..7fdce7e --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiMetricsExplorerQueryResults.json @@ -0,0 +1,19 @@ +{ + "properties": { + "results": { + "$ref": "./MetricsExplorerQueryResults.json" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/ApiMetricsTreeEdgePayload.json b/dev/schemas/split-swagger/components/schemas/ApiMetricsTreeEdgePayload.json new file mode 100644 index 0000000..27b427c --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiMetricsTreeEdgePayload.json @@ -0,0 +1,15 @@ +{ + "properties": { + "targetCatalogSearchUuid": { + "type": "string" + }, + "sourceCatalogSearchUuid": { + "type": "string" + } + }, + "required": [ + "targetCatalogSearchUuid", + "sourceCatalogSearchUuid" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/ApiMetricsWithAssociatedTimeDimensionResponse.json b/dev/schemas/split-swagger/components/schemas/ApiMetricsWithAssociatedTimeDimensionResponse.json new file mode 100644 index 0000000..7adb3ed --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiMetricsWithAssociatedTimeDimensionResponse.json @@ -0,0 +1,22 @@ +{ + "properties": { + "results": { + "items": { + "$ref": "./MetricWithAssociatedTimeDimension.json" + }, + "type": "array" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/ApiSortDirection.json b/dev/schemas/split-swagger/components/schemas/ApiSortDirection.json new file mode 100644 index 0000000..f6d4f56 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiSortDirection.json @@ -0,0 +1,7 @@ +{ + "type": "string", + "enum": [ + "asc", + "desc" + ] +} diff --git a/dev/schemas/split-swagger/components/schemas/ApiUpdateDashboardsResponse.json b/dev/schemas/split-swagger/components/schemas/ApiUpdateDashboardsResponse.json new file mode 100644 index 0000000..f1f21fb --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ApiUpdateDashboardsResponse.json @@ -0,0 +1,22 @@ +{ + "properties": { + "results": { + "items": { + "$ref": "./Dashboard.json" + }, + "type": "array" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/CartesianSeriesType.BAR.json b/dev/schemas/split-swagger/components/schemas/CartesianSeriesType.BAR.json new file mode 100644 index 0000000..d6b1f8d --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/CartesianSeriesType.BAR.json @@ -0,0 +1,6 @@ +{ + "enum": [ + "bar" + ], + "type": "string" +} diff --git a/dev/schemas/split-swagger/components/schemas/CartesianSeriesType.LINE.json b/dev/schemas/split-swagger/components/schemas/CartesianSeriesType.LINE.json new file mode 100644 index 0000000..e19fc2f --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/CartesianSeriesType.LINE.json @@ -0,0 +1,6 @@ +{ + "enum": [ + "line" + ], + "type": "string" +} diff --git a/dev/schemas/split-swagger/components/schemas/CatalogItemIcon.json b/dev/schemas/split-swagger/components/schemas/CatalogItemIcon.json new file mode 100644 index 0000000..c363745 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/CatalogItemIcon.json @@ -0,0 +1,10 @@ +{ + "anyOf": [ + { + "$ref": "./EmojiIcon.json" + }, + { + "$ref": "./CustomIcon.json" + } + ] +} diff --git a/dev/schemas/split-swagger/components/schemas/CatalogMetricsTreeEdge.json b/dev/schemas/split-swagger/components/schemas/CatalogMetricsTreeEdge.json new file mode 100644 index 0000000..24991da --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/CatalogMetricsTreeEdge.json @@ -0,0 +1,29 @@ +{ + "properties": { + "projectUuid": { + "type": "string" + }, + "createdByUserUuid": { + "type": "string", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "target": { + "$ref": "./CatalogMetricsTreeNode.json" + }, + "source": { + "$ref": "./CatalogMetricsTreeNode.json" + } + }, + "required": [ + "projectUuid", + "createdByUserUuid", + "createdAt", + "target", + "source" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/CatalogMetricsTreeNode.json b/dev/schemas/split-swagger/components/schemas/CatalogMetricsTreeNode.json new file mode 100644 index 0000000..49cea18 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/CatalogMetricsTreeNode.json @@ -0,0 +1,3 @@ +{ + "$ref": "./Pick_CatalogField.catalogSearchUuid-or-name-or-tableName_.json" +} diff --git a/dev/schemas/split-swagger/components/schemas/ChartAsCode.json b/dev/schemas/split-swagger/components/schemas/ChartAsCode.json new file mode 100644 index 0000000..55aaf75 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ChartAsCode.json @@ -0,0 +1,27 @@ +{ + "allOf": [ + { + "$ref": "./Pick_SavedChart.name-or-description-or-tableName-or-metricQuery-or-chartConfig-or-tableConfig-or-slug-or-dashboardUuid-or-updatedAt_.json" + }, + { + "properties": { + "downloadedAt": { + "type": "string", + "format": "date-time" + }, + "spaceSlug": { + "type": "string" + }, + "version": { + "type": "number", + "format": "double" + } + }, + "required": [ + "spaceSlug", + "version" + ], + "type": "object" + } + ] +} diff --git a/dev/schemas/split-swagger/components/schemas/CompiledDimension.json b/dev/schemas/split-swagger/components/schemas/CompiledDimension.json new file mode 100644 index 0000000..1c3299a --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/CompiledDimension.json @@ -0,0 +1,117 @@ +{ + "properties": { + "fieldType": { + "$ref": "./FieldType.DIMENSION.json" + }, + "type": { + "$ref": "./DimensionType.json" + }, + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "table": { + "type": "string" + }, + "tableLabel": { + "type": "string" + }, + "sql": { + "type": "string" + }, + "description": { + "type": "string" + }, + "source": { + "$ref": "./Source.json" + }, + "hidden": { + "type": "boolean" + }, + "compact": { + "$ref": "./CompactOrAlias.json" + }, + "round": { + "type": "number", + "format": "double" + }, + "format": { + "$ref": "./Format.json" + }, + "groupLabel": { + "type": "string", + "deprecated": true + }, + "groups": { + "items": { + "type": "string" + }, + "type": "array" + }, + "urls": { + "items": { + "$ref": "./FieldUrl.json" + }, + "type": "array" + }, + "index": { + "type": "number", + "format": "double" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "group": { + "type": "string", + "deprecated": true + }, + "requiredAttributes": { + "$ref": "./Record_string.string-or-string-Array_.json" + }, + "timeInterval": { + "$ref": "./TimeFrames.json" + }, + "timeIntervalBaseDimensionName": { + "type": "string" + }, + "isAdditionalDimension": { + "type": "boolean" + }, + "colors": { + "$ref": "./Record_string.string_.json" + }, + "isIntervalBase": { + "type": "boolean" + }, + "compiledSql": { + "type": "string" + }, + "tablesReferences": { + "items": { + "type": "string" + }, + "type": "array" + }, + "tablesRequiredAttributes": { + "$ref": "./Record_string.Record_string.string-or-string-Array__.json" + } + }, + "required": [ + "fieldType", + "type", + "name", + "label", + "table", + "tableLabel", + "sql", + "hidden", + "compiledSql" + ], + "type": "object", + "additionalProperties": true +} diff --git a/dev/schemas/split-swagger/components/schemas/CompiledMetric.json b/dev/schemas/split-swagger/components/schemas/CompiledMetric.json new file mode 100644 index 0000000..9e057df --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/CompiledMetric.json @@ -0,0 +1,127 @@ +{ + "properties": { + "fieldType": { + "$ref": "./FieldType.METRIC.json" + }, + "type": { + "$ref": "./MetricType.json" + }, + "name": { + "type": "string" + }, + "label": { + "type": "string" + }, + "table": { + "type": "string" + }, + "tableLabel": { + "type": "string" + }, + "sql": { + "type": "string" + }, + "description": { + "type": "string" + }, + "source": { + "$ref": "./Source.json" + }, + "hidden": { + "type": "boolean" + }, + "compact": { + "$ref": "./CompactOrAlias.json" + }, + "round": { + "type": "number", + "format": "double" + }, + "format": { + "$ref": "./Format.json" + }, + "groupLabel": { + "type": "string", + "deprecated": true + }, + "groups": { + "items": { + "type": "string" + }, + "type": "array" + }, + "urls": { + "items": { + "$ref": "./FieldUrl.json" + }, + "type": "array" + }, + "index": { + "type": "number", + "format": "double" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "isAutoGenerated": { + "type": "boolean" + }, + "showUnderlyingValues": { + "items": { + "type": "string" + }, + "type": "array" + }, + "filters": { + "items": { + "$ref": "./MetricFilterRule.json" + }, + "type": "array" + }, + "percentile": { + "type": "number", + "format": "double" + }, + "formatOptions": { + "$ref": "./CustomFormat.json" + }, + "dimensionReference": { + "type": "string" + }, + "requiredAttributes": { + "$ref": "./Record_string.string-or-string-Array_.json" + }, + "defaultTimeDimension": { + "$ref": "./DefaultTimeDimension.json" + }, + "compiledSql": { + "type": "string" + }, + "tablesReferences": { + "items": { + "type": "string" + }, + "type": "array" + }, + "tablesRequiredAttributes": { + "$ref": "./Record_string.Record_string.string-or-string-Array__.json" + } + }, + "required": [ + "fieldType", + "type", + "name", + "label", + "table", + "tableLabel", + "sql", + "hidden", + "isAutoGenerated", + "compiledSql" + ], + "type": "object", + "additionalProperties": true +} diff --git a/dev/schemas/split-swagger/components/schemas/CreateDashboard.json b/dev/schemas/split-swagger/components/schemas/CreateDashboard.json new file mode 100644 index 0000000..754e1ec --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/CreateDashboard.json @@ -0,0 +1,53 @@ +{ + "properties": { + "tabs": { + "items": { + "$ref": "./DashboardTab.json" + }, + "type": "array" + }, + "spaceUuid": { + "type": "string" + }, + "updatedByUser": { + "$ref": "./Pick_UpdatedByUser.userUuid_.json" + }, + "filters": { + "$ref": "./DashboardFilters.json" + }, + "tiles": { + "items": { + "anyOf": [ + { + "$ref": "./CreateDashboardChartTile.json" + }, + { + "$ref": "./CreateDashboardMarkdownTile.json" + }, + { + "$ref": "./CreateDashboardLoomTile.json" + }, + { + "$ref": "./CreateDashboardSqlChartTile.json" + }, + { + "$ref": "./CreateDashboardSemanticViewerChartTile.json" + } + ] + }, + "type": "array" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "tabs", + "tiles", + "name" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/CreateDashboardChartTile.json b/dev/schemas/split-swagger/components/schemas/CreateDashboardChartTile.json new file mode 100644 index 0000000..245d5f8 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/CreateDashboardChartTile.json @@ -0,0 +1,10 @@ +{ + "allOf": [ + { + "$ref": "./CreateDashboardTileBase.json" + }, + { + "$ref": "./DashboardChartTileProperties.json" + } + ] +} diff --git a/dev/schemas/split-swagger/components/schemas/CreateDashboardLoomTile.json b/dev/schemas/split-swagger/components/schemas/CreateDashboardLoomTile.json new file mode 100644 index 0000000..73c07e1 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/CreateDashboardLoomTile.json @@ -0,0 +1,10 @@ +{ + "allOf": [ + { + "$ref": "./CreateDashboardTileBase.json" + }, + { + "$ref": "./DashboardLoomTileProperties.json" + } + ] +} diff --git a/dev/schemas/split-swagger/components/schemas/CreateDashboardMarkdownTile.json b/dev/schemas/split-swagger/components/schemas/CreateDashboardMarkdownTile.json new file mode 100644 index 0000000..e233ce1 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/CreateDashboardMarkdownTile.json @@ -0,0 +1,10 @@ +{ + "allOf": [ + { + "$ref": "./CreateDashboardTileBase.json" + }, + { + "$ref": "./DashboardMarkdownTileProperties.json" + } + ] +} diff --git a/dev/schemas/split-swagger/components/schemas/CreateDashboardSemanticViewerChartTile.json b/dev/schemas/split-swagger/components/schemas/CreateDashboardSemanticViewerChartTile.json new file mode 100644 index 0000000..631ee0e --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/CreateDashboardSemanticViewerChartTile.json @@ -0,0 +1,10 @@ +{ + "allOf": [ + { + "$ref": "./CreateDashboardTileBase.json" + }, + { + "$ref": "./DashboardSemanticViewerChartTileProperties.json" + } + ] +} diff --git a/dev/schemas/split-swagger/components/schemas/CreateDashboardSqlChartTile.json b/dev/schemas/split-swagger/components/schemas/CreateDashboardSqlChartTile.json new file mode 100644 index 0000000..839a60b --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/CreateDashboardSqlChartTile.json @@ -0,0 +1,10 @@ +{ + "allOf": [ + { + "$ref": "./CreateDashboardTileBase.json" + }, + { + "$ref": "./DashboardSqlChartTileProperties.json" + } + ] +} diff --git a/dev/schemas/split-swagger/components/schemas/CreateDashboardTileBase.json b/dev/schemas/split-swagger/components/schemas/CreateDashboardTileBase.json new file mode 100644 index 0000000..38c0c36 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/CreateDashboardTileBase.json @@ -0,0 +1,37 @@ +{ + "properties": { + "tabUuid": { + "type": "string" + }, + "w": { + "type": "number", + "format": "double" + }, + "h": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "x": { + "type": "number", + "format": "double" + }, + "type": { + "$ref": "./DashboardTileTypes.json" + }, + "uuid": { + "type": "string" + } + }, + "required": [ + "w", + "h", + "y", + "x", + "type" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/CreateVirtualViewPayload.json b/dev/schemas/split-swagger/components/schemas/CreateVirtualViewPayload.json new file mode 100644 index 0000000..69af0ea --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/CreateVirtualViewPayload.json @@ -0,0 +1,22 @@ +{ + "properties": { + "columns": { + "items": { + "$ref": "./VizColumn.json" + }, + "type": "array" + }, + "sql": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "columns", + "sql", + "name" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/CustomIcon.json b/dev/schemas/split-swagger/components/schemas/CustomIcon.json new file mode 100644 index 0000000..e7bb8ef --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/CustomIcon.json @@ -0,0 +1,11 @@ +{ + "properties": { + "url": { + "type": "string" + } + }, + "required": [ + "url" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/Dashboard.json b/dev/schemas/split-swagger/components/schemas/Dashboard.json new file mode 100644 index 0000000..6e223e6 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Dashboard.json @@ -0,0 +1,111 @@ +{ + "properties": { + "slug": { + "type": "string" + }, + "access": { + "items": { + "$ref": "./SpaceShare.json" + }, + "type": "array", + "nullable": true + }, + "isPrivate": { + "type": "boolean", + "nullable": true + }, + "tabs": { + "items": { + "$ref": "./DashboardTab.json" + }, + "type": "array" + }, + "pinnedListOrder": { + "type": "number", + "format": "double", + "nullable": true + }, + "pinnedListUuid": { + "type": "string", + "nullable": true + }, + "firstViewedAt": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "string" + } + ], + "nullable": true + }, + "views": { + "type": "number", + "format": "double" + }, + "spaceName": { + "type": "string" + }, + "spaceUuid": { + "type": "string" + }, + "updatedByUser": { + "$ref": "./UpdatedByUser.json" + }, + "filters": { + "$ref": "./DashboardFilters.json" + }, + "tiles": { + "items": { + "$ref": "./DashboardTile.json" + }, + "type": "array" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "uuid": { + "type": "string" + }, + "dashboardVersionId": { + "type": "number", + "format": "double" + }, + "projectUuid": { + "type": "string" + }, + "organizationUuid": { + "type": "string" + } + }, + "required": [ + "slug", + "access", + "isPrivate", + "tabs", + "pinnedListOrder", + "pinnedListUuid", + "firstViewedAt", + "views", + "spaceName", + "spaceUuid", + "filters", + "tiles", + "updatedAt", + "name", + "uuid", + "dashboardVersionId", + "projectUuid", + "organizationUuid" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/DashboardAsCode.json b/dev/schemas/split-swagger/components/schemas/DashboardAsCode.json new file mode 100644 index 0000000..351e053 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/DashboardAsCode.json @@ -0,0 +1,34 @@ +{ + "allOf": [ + { + "$ref": "./Pick_Dashboard.name-or-description-or-updatedAt-or-filters-or-tabs-or-slug_.json" + }, + { + "properties": { + "downloadedAt": { + "type": "string", + "format": "date-time" + }, + "spaceSlug": { + "type": "string" + }, + "version": { + "type": "number", + "format": "double" + }, + "tiles": { + "items": { + "$ref": "./DashboardTileWithoutUuids.json" + }, + "type": "array" + } + }, + "required": [ + "spaceSlug", + "version", + "tiles" + ], + "type": "object" + } + ] +} diff --git a/dev/schemas/split-swagger/components/schemas/DashboardBasicDetailsWithTileTypes.json b/dev/schemas/split-swagger/components/schemas/DashboardBasicDetailsWithTileTypes.json new file mode 100644 index 0000000..cf15677 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/DashboardBasicDetailsWithTileTypes.json @@ -0,0 +1,21 @@ +{ + "allOf": [ + { + "$ref": "./DashboardBasicDetails.json" + }, + { + "properties": { + "tileTypes": { + "items": { + "$ref": "./DashboardTileTypes.json" + }, + "type": "array" + } + }, + "required": [ + "tileTypes" + ], + "type": "object" + } + ] +} diff --git a/dev/schemas/split-swagger/components/schemas/DashboardTileWithoutUuids.json b/dev/schemas/split-swagger/components/schemas/DashboardTileWithoutUuids.json new file mode 100644 index 0000000..ed5ca17 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/DashboardTileWithoutUuids.json @@ -0,0 +1,18 @@ +{ + "allOf": [ + { + "$ref": "./Omit_DashboardTile.properties_.json" + }, + { + "properties": { + "properties": { + "$ref": "./Omit_DashboardTile-at-properties.savedChartUuid-or-savedSqlUuid-or-savedSemanticViewerChartUuid_.json" + } + }, + "required": [ + "properties" + ], + "type": "object" + } + ] +} diff --git a/dev/schemas/split-swagger/components/schemas/DbTagUpdate.json b/dev/schemas/split-swagger/components/schemas/DbTagUpdate.json new file mode 100644 index 0000000..1b8e331 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/DbTagUpdate.json @@ -0,0 +1,3 @@ +{ + "$ref": "./Partial_Pick_DbTag.name-or-color__.json" +} diff --git a/dev/schemas/split-swagger/components/schemas/DefaultTimeDimension.json b/dev/schemas/split-swagger/components/schemas/DefaultTimeDimension.json new file mode 100644 index 0000000..fce34f2 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/DefaultTimeDimension.json @@ -0,0 +1,15 @@ +{ + "properties": { + "interval": { + "$ref": "./TimeFrames.json" + }, + "field": { + "type": "string" + } + }, + "required": [ + "interval", + "field" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/DimensionType.DATE.json b/dev/schemas/split-swagger/components/schemas/DimensionType.DATE.json new file mode 100644 index 0000000..0eddd1b --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/DimensionType.DATE.json @@ -0,0 +1,6 @@ +{ + "enum": [ + "date" + ], + "type": "string" +} diff --git a/dev/schemas/split-swagger/components/schemas/DimensionType.TIMESTAMP.json b/dev/schemas/split-swagger/components/schemas/DimensionType.TIMESTAMP.json new file mode 100644 index 0000000..011ae90 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/DimensionType.TIMESTAMP.json @@ -0,0 +1,6 @@ +{ + "enum": [ + "timestamp" + ], + "type": "string" +} diff --git a/dev/schemas/split-swagger/components/schemas/DuplicateDashboardParams.json b/dev/schemas/split-swagger/components/schemas/DuplicateDashboardParams.json new file mode 100644 index 0000000..7a30457 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/DuplicateDashboardParams.json @@ -0,0 +1,15 @@ +{ + "properties": { + "dashboardDesc": { + "type": "string" + }, + "dashboardName": { + "type": "string" + } + }, + "required": [ + "dashboardDesc", + "dashboardName" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/EmojiIcon.json b/dev/schemas/split-swagger/components/schemas/EmojiIcon.json new file mode 100644 index 0000000..f8b702c --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/EmojiIcon.json @@ -0,0 +1,11 @@ +{ + "properties": { + "unicode": { + "type": "string" + } + }, + "required": [ + "unicode" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/ExploreType.json b/dev/schemas/split-swagger/components/schemas/ExploreType.json new file mode 100644 index 0000000..b06bef7 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ExploreType.json @@ -0,0 +1,7 @@ +{ + "enum": [ + "virtual", + "default" + ], + "type": "string" +} diff --git a/dev/schemas/split-swagger/components/schemas/FieldType.DIMENSION.json b/dev/schemas/split-swagger/components/schemas/FieldType.DIMENSION.json new file mode 100644 index 0000000..5457cdc --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/FieldType.DIMENSION.json @@ -0,0 +1,6 @@ +{ + "enum": [ + "dimension" + ], + "type": "string" +} diff --git a/dev/schemas/split-swagger/components/schemas/FieldType.METRIC.json b/dev/schemas/split-swagger/components/schemas/FieldType.METRIC.json new file mode 100644 index 0000000..2f2a89e --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/FieldType.METRIC.json @@ -0,0 +1,6 @@ +{ + "enum": [ + "metric" + ], + "type": "string" +} diff --git a/dev/schemas/split-swagger/components/schemas/FieldUrl.json b/dev/schemas/split-swagger/components/schemas/FieldUrl.json new file mode 100644 index 0000000..03ab317 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/FieldUrl.json @@ -0,0 +1,15 @@ +{ + "properties": { + "label": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "label", + "url" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/ItemsMap.json b/dev/schemas/split-swagger/components/schemas/ItemsMap.json new file mode 100644 index 0000000..691cd0a --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ItemsMap.json @@ -0,0 +1,3 @@ +{ + "$ref": "./Record_string.Field-or-TableCalculation-or-CustomDimension-or-Metric_.json" +} diff --git a/dev/schemas/split-swagger/components/schemas/KnexPaginatedData_ApiMetricsCatalogResults_.json b/dev/schemas/split-swagger/components/schemas/KnexPaginatedData_ApiMetricsCatalogResults_.json new file mode 100644 index 0000000..85db074 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/KnexPaginatedData_ApiMetricsCatalogResults_.json @@ -0,0 +1,35 @@ +{ + "properties": { + "pagination": { + "allOf": [ + { + "$ref": "./KnexPaginateArgs.json" + }, + { + "properties": { + "totalResults": { + "type": "number", + "format": "double" + }, + "totalPageCount": { + "type": "number", + "format": "double" + } + }, + "required": [ + "totalResults", + "totalPageCount" + ], + "type": "object" + } + ] + }, + "data": { + "$ref": "./ApiMetricsCatalogResults.json" + } + }, + "required": [ + "data" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/KnexPaginatedData_Group-Array-or-GroupWithMembers-Array_.json b/dev/schemas/split-swagger/components/schemas/KnexPaginatedData_Group-Array-or-GroupWithMembers-Array_.json new file mode 100644 index 0000000..46f6c49 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/KnexPaginatedData_Group-Array-or-GroupWithMembers-Array_.json @@ -0,0 +1,48 @@ +{ + "properties": { + "pagination": { + "allOf": [ + { + "$ref": "./KnexPaginateArgs.json" + }, + { + "properties": { + "totalResults": { + "type": "number", + "format": "double" + }, + "totalPageCount": { + "type": "number", + "format": "double" + } + }, + "required": [ + "totalResults", + "totalPageCount" + ], + "type": "object" + } + ] + }, + "data": { + "anyOf": [ + { + "items": { + "$ref": "./Group.json" + }, + "type": "array" + }, + { + "items": { + "$ref": "./GroupWithMembers.json" + }, + "type": "array" + } + ] + } + }, + "required": [ + "data" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/MetricExplorerComparison.DIFFERENT_METRIC.json b/dev/schemas/split-swagger/components/schemas/MetricExplorerComparison.DIFFERENT_METRIC.json new file mode 100644 index 0000000..f52c3d3 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/MetricExplorerComparison.DIFFERENT_METRIC.json @@ -0,0 +1,6 @@ +{ + "enum": [ + "different_metric" + ], + "type": "string" +} diff --git a/dev/schemas/split-swagger/components/schemas/MetricExplorerComparison.NONE.json b/dev/schemas/split-swagger/components/schemas/MetricExplorerComparison.NONE.json new file mode 100644 index 0000000..d12c449 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/MetricExplorerComparison.NONE.json @@ -0,0 +1,6 @@ +{ + "enum": [ + "none" + ], + "type": "string" +} diff --git a/dev/schemas/split-swagger/components/schemas/MetricExplorerComparison.PREVIOUS_PERIOD.json b/dev/schemas/split-swagger/components/schemas/MetricExplorerComparison.PREVIOUS_PERIOD.json new file mode 100644 index 0000000..c1c98ca --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/MetricExplorerComparison.PREVIOUS_PERIOD.json @@ -0,0 +1,6 @@ +{ + "enum": [ + "previous_period" + ], + "type": "string" +} diff --git a/dev/schemas/split-swagger/components/schemas/MetricExplorerComparisonType.json b/dev/schemas/split-swagger/components/schemas/MetricExplorerComparisonType.json new file mode 100644 index 0000000..b86fe4b --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/MetricExplorerComparisonType.json @@ -0,0 +1,45 @@ +{ + "anyOf": [ + { + "properties": { + "type": { + "$ref": "./MetricExplorerComparison.NONE.json" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "properties": { + "type": { + "$ref": "./MetricExplorerComparison.PREVIOUS_PERIOD.json" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "properties": { + "metricName": { + "type": "string" + }, + "metricTable": { + "type": "string" + }, + "type": { + "$ref": "./MetricExplorerComparison.DIFFERENT_METRIC.json" + } + }, + "required": [ + "metricName", + "metricTable", + "type" + ], + "type": "object" + } + ] +} diff --git a/dev/schemas/split-swagger/components/schemas/MetricWithAssociatedTimeDimension.json b/dev/schemas/split-swagger/components/schemas/MetricWithAssociatedTimeDimension.json new file mode 100644 index 0000000..dfab840 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/MetricWithAssociatedTimeDimension.json @@ -0,0 +1,58 @@ +{ + "allOf": [ + { + "$ref": "./CompiledMetric.json" + }, + { + "properties": { + "availableTimeDimensions": { + "items": { + "allOf": [ + { + "$ref": "./CompiledDimension.json" + }, + { + "properties": { + "type": { + "anyOf": [ + { + "$ref": "./DimensionType.DATE.json" + }, + { + "$ref": "./DimensionType.TIMESTAMP.json" + } + ] + } + }, + "required": [ + "type" + ], + "type": "object" + } + ] + }, + "type": "array" + }, + "timeDimension": { + "allOf": [ + { + "$ref": "./DefaultTimeDimension.json" + }, + { + "properties": { + "table": { + "type": "string" + } + }, + "required": [ + "table" + ], + "type": "object" + } + ] + } + }, + "type": "object" + } + ] +} diff --git a/dev/schemas/split-swagger/components/schemas/MetricsExplorerQueryResults.json b/dev/schemas/split-swagger/components/schemas/MetricsExplorerQueryResults.json new file mode 100644 index 0000000..00993dd --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/MetricsExplorerQueryResults.json @@ -0,0 +1,28 @@ +{ + "properties": { + "fields": { + "$ref": "./ItemsMap.json" + }, + "comparisonRows": { + "items": { + "$ref": "./ResultRow.json" + }, + "type": "array" + }, + "rows": { + "items": { + "$ref": "./ResultRow.json" + }, + "type": "array" + }, + "metric": { + "$ref": "./MetricWithAssociatedTimeDimension.json" + } + }, + "required": [ + "fields", + "rows", + "metric" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/Omit_ChartAsCode.metricQuery-or-chartConfig_.json b/dev/schemas/split-swagger/components/schemas/Omit_ChartAsCode.metricQuery-or-chartConfig_.json new file mode 100644 index 0000000..1968777 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Omit_ChartAsCode.metricQuery-or-chartConfig_.json @@ -0,0 +1,4 @@ +{ + "$ref": "./Pick_ChartAsCode.Exclude_keyofChartAsCode.metricQuery-or-chartConfig__.json", + "description": "Construct a type with the properties of T except for those in type K." +} diff --git a/dev/schemas/split-swagger/components/schemas/Omit_DashboardAsCode.filters-or-tiles-or-description_.json b/dev/schemas/split-swagger/components/schemas/Omit_DashboardAsCode.filters-or-tiles-or-description_.json new file mode 100644 index 0000000..e25621a --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Omit_DashboardAsCode.filters-or-tiles-or-description_.json @@ -0,0 +1,4 @@ +{ + "$ref": "./Pick_DashboardAsCode.Exclude_keyofDashboardAsCode.filters-or-tiles-or-description__.json", + "description": "Construct a type with the properties of T except for those in type K." +} diff --git a/dev/schemas/split-swagger/components/schemas/Omit_DashboardTile-at-properties.savedChartUuid-or-savedSqlUuid-or-savedSemanticViewerChartUuid_.json b/dev/schemas/split-swagger/components/schemas/Omit_DashboardTile-at-properties.savedChartUuid-or-savedSqlUuid-or-savedSemanticViewerChartUuid_.json new file mode 100644 index 0000000..8eed825 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Omit_DashboardTile-at-properties.savedChartUuid-or-savedSqlUuid-or-savedSemanticViewerChartUuid_.json @@ -0,0 +1,4 @@ +{ + "$ref": "./Pick_DashboardTile-at-properties.Exclude_keyofDashboardTile-at-properties.savedChartUuid-or-savedSqlUuid-or-savedSemanticViewerChartUuid__.json", + "description": "Construct a type with the properties of T except for those in type K." +} diff --git a/dev/schemas/split-swagger/components/schemas/Omit_DashboardTile.properties_.json b/dev/schemas/split-swagger/components/schemas/Omit_DashboardTile.properties_.json new file mode 100644 index 0000000..f096e7d --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Omit_DashboardTile.properties_.json @@ -0,0 +1,4 @@ +{ + "$ref": "./Pick_DashboardTile.Exclude_keyofDashboardTile.properties__.json", + "description": "Construct a type with the properties of T except for those in type K." +} diff --git a/dev/schemas/split-swagger/components/schemas/Partial_CubeSemanticLayerConnection_.json b/dev/schemas/split-swagger/components/schemas/Partial_CubeSemanticLayerConnection_.json new file mode 100644 index 0000000..3726945 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Partial_CubeSemanticLayerConnection_.json @@ -0,0 +1,15 @@ +{ + "properties": { + "type": { + "$ref": "./SemanticLayerType.CUBE.json" + }, + "domain": { + "type": "string" + }, + "token": { + "type": "string" + } + }, + "type": "object", + "description": "Make all properties in T optional" +} diff --git a/dev/schemas/split-swagger/components/schemas/Partial_DbtSemanticLayerConnection_.json b/dev/schemas/split-swagger/components/schemas/Partial_DbtSemanticLayerConnection_.json new file mode 100644 index 0000000..a0b0884 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Partial_DbtSemanticLayerConnection_.json @@ -0,0 +1,18 @@ +{ + "properties": { + "type": { + "$ref": "./SemanticLayerType.DBT.json" + }, + "environmentId": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "token": { + "type": "string" + } + }, + "type": "object", + "description": "Make all properties in T optional" +} diff --git a/dev/schemas/split-swagger/components/schemas/Partial_Pick_DbTag.name-or-color__.json b/dev/schemas/split-swagger/components/schemas/Partial_Pick_DbTag.name-or-color__.json new file mode 100644 index 0000000..a42a996 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Partial_Pick_DbTag.name-or-color__.json @@ -0,0 +1,12 @@ +{ + "properties": { + "name": { + "type": "string" + }, + "color": { + "type": "string" + } + }, + "type": "object", + "description": "Make all properties in T optional" +} diff --git a/dev/schemas/split-swagger/components/schemas/PersonalAccessToken.json b/dev/schemas/split-swagger/components/schemas/PersonalAccessToken.json new file mode 100644 index 0000000..9a7fb04 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/PersonalAccessToken.json @@ -0,0 +1,38 @@ +{ + "properties": { + "description": { + "type": "string" + }, + "expiresAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "rotatedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "lastUsedAt": { + "type": "string", + "format": "date-time", + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "uuid": { + "type": "string" + } + }, + "required": [ + "description", + "expiresAt", + "rotatedAt", + "lastUsedAt", + "createdAt", + "uuid" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/PersonalAccessTokenWithToken.json b/dev/schemas/split-swagger/components/schemas/PersonalAccessTokenWithToken.json new file mode 100644 index 0000000..4254807 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/PersonalAccessTokenWithToken.json @@ -0,0 +1,18 @@ +{ + "allOf": [ + { + "$ref": "./PersonalAccessToken.json" + }, + { + "properties": { + "token": { + "type": "string" + } + }, + "required": [ + "token" + ], + "type": "object" + } + ] +} diff --git a/dev/schemas/split-swagger/components/schemas/Pick_CatalogField.catalogSearchUuid-or-name-or-tableName_.json b/dev/schemas/split-swagger/components/schemas/Pick_CatalogField.catalogSearchUuid-or-name-or-tableName_.json new file mode 100644 index 0000000..57a5260 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Pick_CatalogField.catalogSearchUuid-or-name-or-tableName_.json @@ -0,0 +1,20 @@ +{ + "properties": { + "name": { + "type": "string" + }, + "catalogSearchUuid": { + "type": "string" + }, + "tableName": { + "type": "string" + } + }, + "required": [ + "name", + "catalogSearchUuid", + "tableName" + ], + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" +} diff --git a/dev/schemas/split-swagger/components/schemas/Pick_ChartAsCode.Exclude_keyofChartAsCode.metricQuery-or-chartConfig__.json b/dev/schemas/split-swagger/components/schemas/Pick_ChartAsCode.Exclude_keyofChartAsCode.metricQuery-or-chartConfig__.json new file mode 100644 index 0000000..088872a --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Pick_ChartAsCode.Exclude_keyofChartAsCode.metricQuery-or-chartConfig__.json @@ -0,0 +1,61 @@ +{ + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "dashboardUuid": { + "type": "string", + "nullable": true + }, + "slug": { + "type": "string" + }, + "tableName": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "tableConfig": { + "properties": { + "columnOrder": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "columnOrder" + ], + "type": "object" + }, + "version": { + "type": "number", + "format": "double" + }, + "spaceSlug": { + "type": "string" + }, + "downloadedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "dashboardUuid", + "slug", + "tableName", + "updatedAt", + "tableConfig", + "version", + "spaceSlug" + ], + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" +} diff --git a/dev/schemas/split-swagger/components/schemas/Pick_Dashboard.name-or-description-or-updatedAt-or-filters-or-tabs-or-slug_.json b/dev/schemas/split-swagger/components/schemas/Pick_Dashboard.name-or-description-or-updatedAt-or-filters-or-tabs-or-slug_.json new file mode 100644 index 0000000..0338060 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Pick_Dashboard.name-or-description-or-updatedAt-or-filters-or-tabs-or-slug_.json @@ -0,0 +1,35 @@ +{ + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "filters": { + "$ref": "./DashboardFilters.json" + }, + "tabs": { + "items": { + "$ref": "./DashboardTab.json" + }, + "type": "array" + } + }, + "required": [ + "name", + "slug", + "updatedAt", + "filters", + "tabs" + ], + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" +} diff --git a/dev/schemas/split-swagger/components/schemas/Pick_Dashboard.uuid-or-name-or-description-or-spaceUuid_.json b/dev/schemas/split-swagger/components/schemas/Pick_Dashboard.uuid-or-name-or-description-or-spaceUuid_.json new file mode 100644 index 0000000..cb3e8bb --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Pick_Dashboard.uuid-or-name-or-description-or-spaceUuid_.json @@ -0,0 +1,23 @@ +{ + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "uuid": { + "type": "string" + }, + "spaceUuid": { + "type": "string" + } + }, + "required": [ + "name", + "uuid", + "spaceUuid" + ], + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" +} diff --git a/dev/schemas/split-swagger/components/schemas/Pick_DashboardAsCode.Exclude_keyofDashboardAsCode.filters-or-tiles-or-description__.json b/dev/schemas/split-swagger/components/schemas/Pick_DashboardAsCode.Exclude_keyofDashboardAsCode.filters-or-tiles-or-description__.json new file mode 100644 index 0000000..6d9816d --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Pick_DashboardAsCode.Exclude_keyofDashboardAsCode.filters-or-tiles-or-description__.json @@ -0,0 +1,41 @@ +{ + "properties": { + "name": { + "type": "string" + }, + "slug": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "tabs": { + "items": { + "$ref": "./DashboardTab.json" + }, + "type": "array" + }, + "version": { + "type": "number", + "format": "double" + }, + "spaceSlug": { + "type": "string" + }, + "downloadedAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "name", + "slug", + "updatedAt", + "tabs", + "version", + "spaceSlug" + ], + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" +} diff --git a/dev/schemas/split-swagger/components/schemas/Pick_DashboardTile-at-properties.Exclude_keyofDashboardTile-at-properties.savedChartUuid-or-savedSqlUuid-or-savedSemanticViewerChartUuid__.json b/dev/schemas/split-swagger/components/schemas/Pick_DashboardTile-at-properties.Exclude_keyofDashboardTile-at-properties.savedChartUuid-or-savedSqlUuid-or-savedSemanticViewerChartUuid__.json new file mode 100644 index 0000000..c9e9e8f --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Pick_DashboardTile-at-properties.Exclude_keyofDashboardTile-at-properties.savedChartUuid-or-savedSqlUuid-or-savedSemanticViewerChartUuid__.json @@ -0,0 +1,9 @@ +{ + "properties": { + "title": { + "type": "string" + } + }, + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" +} diff --git a/dev/schemas/split-swagger/components/schemas/Pick_DashboardTile.Exclude_keyofDashboardTile.properties__.json b/dev/schemas/split-swagger/components/schemas/Pick_DashboardTile.Exclude_keyofDashboardTile.properties__.json new file mode 100644 index 0000000..609f928 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Pick_DashboardTile.Exclude_keyofDashboardTile.properties__.json @@ -0,0 +1,38 @@ +{ + "properties": { + "type": { + "$ref": "./DashboardTileTypes.json" + }, + "uuid": { + "type": "string" + }, + "x": { + "type": "number", + "format": "double" + }, + "y": { + "type": "number", + "format": "double" + }, + "h": { + "type": "number", + "format": "double" + }, + "w": { + "type": "number", + "format": "double" + }, + "tabUuid": { + "type": "string" + } + }, + "required": [ + "type", + "x", + "y", + "h", + "w" + ], + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" +} diff --git a/dev/schemas/split-swagger/components/schemas/Pick_SavedChart.name-or-description-or-tableName-or-metricQuery-or-chartConfig-or-tableConfig-or-slug-or-dashboardUuid-or-updatedAt_.json b/dev/schemas/split-swagger/components/schemas/Pick_SavedChart.name-or-description-or-tableName-or-metricQuery-or-chartConfig-or-tableConfig-or-slug-or-dashboardUuid-or-updatedAt_.json new file mode 100644 index 0000000..ece7cb9 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Pick_SavedChart.name-or-description-or-tableName-or-metricQuery-or-chartConfig-or-tableConfig-or-slug-or-dashboardUuid-or-updatedAt_.json @@ -0,0 +1,56 @@ +{ + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "dashboardUuid": { + "type": "string", + "nullable": true + }, + "slug": { + "type": "string" + }, + "tableName": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time" + }, + "metricQuery": { + "$ref": "./MetricQuery.json" + }, + "chartConfig": { + "$ref": "./ChartConfig.json" + }, + "tableConfig": { + "properties": { + "columnOrder": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "columnOrder" + ], + "type": "object" + } + }, + "required": [ + "name", + "dashboardUuid", + "slug", + "tableName", + "updatedAt", + "metricQuery", + "chartConfig", + "tableConfig" + ], + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" +} diff --git a/dev/schemas/split-swagger/components/schemas/Pick_SemanticLayerField.name-or-aggType_.json b/dev/schemas/split-swagger/components/schemas/Pick_SemanticLayerField.name-or-aggType_.json new file mode 100644 index 0000000..8c60a1b --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Pick_SemanticLayerField.name-or-aggType_.json @@ -0,0 +1,15 @@ +{ + "properties": { + "name": { + "type": "string" + }, + "aggType": { + "$ref": "./VizAggregationOptions.json" + } + }, + "required": [ + "name" + ], + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" +} diff --git a/dev/schemas/split-swagger/components/schemas/Pick_Tag.name-or-color-or-tagUuid_.json b/dev/schemas/split-swagger/components/schemas/Pick_Tag.name-or-color-or-tagUuid_.json new file mode 100644 index 0000000..f280118 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Pick_Tag.name-or-color-or-tagUuid_.json @@ -0,0 +1,20 @@ +{ + "properties": { + "name": { + "type": "string" + }, + "color": { + "type": "string" + }, + "tagUuid": { + "type": "string" + } + }, + "required": [ + "name", + "color", + "tagUuid" + ], + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" +} diff --git a/dev/schemas/split-swagger/components/schemas/Pick_Tag.name-or-color_.json b/dev/schemas/split-swagger/components/schemas/Pick_Tag.name-or-color_.json new file mode 100644 index 0000000..671fac1 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Pick_Tag.name-or-color_.json @@ -0,0 +1,16 @@ +{ + "properties": { + "name": { + "type": "string" + }, + "color": { + "type": "string" + } + }, + "required": [ + "name", + "color" + ], + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" +} diff --git a/dev/schemas/split-swagger/components/schemas/Pick_UpdatedByUser.userUuid_.json b/dev/schemas/split-swagger/components/schemas/Pick_UpdatedByUser.userUuid_.json new file mode 100644 index 0000000..628c71a --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Pick_UpdatedByUser.userUuid_.json @@ -0,0 +1,12 @@ +{ + "properties": { + "userUuid": { + "type": "string" + } + }, + "required": [ + "userUuid" + ], + "type": "object", + "description": "From T, pick a set of properties whose keys are in the union K" +} diff --git a/dev/schemas/split-swagger/components/schemas/PivotChartLayout.json b/dev/schemas/split-swagger/components/schemas/PivotChartLayout.json new file mode 100644 index 0000000..772afb8 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/PivotChartLayout.json @@ -0,0 +1,61 @@ +{ + "properties": { + "sortBy": { + "items": { + "$ref": "./VizSortBy.json" + }, + "type": "array" + }, + "groupBy": { + "items": { + "properties": { + "reference": { + "type": "string" + } + }, + "required": [ + "reference" + ], + "type": "object" + }, + "type": "array" + }, + "y": { + "items": { + "properties": { + "aggregation": { + "$ref": "./VizAggregationOptions.json" + }, + "reference": { + "type": "string" + } + }, + "required": [ + "aggregation", + "reference" + ], + "type": "object" + }, + "type": "array" + }, + "x": { + "properties": { + "type": { + "$ref": "./VizIndexType.json" + }, + "reference": { + "type": "string" + } + }, + "required": [ + "type", + "reference" + ], + "type": "object" + } + }, + "required": [ + "y" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/Record_string.Field-or-TableCalculation-or-CustomDimension-or-Metric_.json b/dev/schemas/split-swagger/components/schemas/Record_string.Field-or-TableCalculation-or-CustomDimension-or-Metric_.json new file mode 100644 index 0000000..63ecfbb --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Record_string.Field-or-TableCalculation-or-CustomDimension-or-Metric_.json @@ -0,0 +1,5 @@ +{ + "properties": {}, + "type": "object", + "description": "Construct a type with a set of properties K of type T" +} diff --git a/dev/schemas/split-swagger/components/schemas/Record_string.Record_string.string-or-string-Array__.json b/dev/schemas/split-swagger/components/schemas/Record_string.Record_string.string-or-string-Array__.json new file mode 100644 index 0000000..63ecfbb --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Record_string.Record_string.string-or-string-Array__.json @@ -0,0 +1,5 @@ +{ + "properties": {}, + "type": "object", + "description": "Construct a type with a set of properties K of type T" +} diff --git a/dev/schemas/split-swagger/components/schemas/Record_string._value-ResultValue--__.json b/dev/schemas/split-swagger/components/schemas/Record_string._value-ResultValue--__.json new file mode 100644 index 0000000..63ecfbb --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Record_string._value-ResultValue--__.json @@ -0,0 +1,5 @@ +{ + "properties": {}, + "type": "object", + "description": "Construct a type with a set of properties K of type T" +} diff --git a/dev/schemas/split-swagger/components/schemas/ResultRow.json b/dev/schemas/split-swagger/components/schemas/ResultRow.json new file mode 100644 index 0000000..7b9ae50 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ResultRow.json @@ -0,0 +1,3 @@ +{ + "$ref": "./Record_string._value-ResultValue--__.json" +} diff --git a/dev/schemas/split-swagger/components/schemas/SemanticLayerConnectionUpdate.json b/dev/schemas/split-swagger/components/schemas/SemanticLayerConnectionUpdate.json new file mode 100644 index 0000000..dde135f --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/SemanticLayerConnectionUpdate.json @@ -0,0 +1,40 @@ +{ + "anyOf": [ + { + "allOf": [ + { + "$ref": "./Partial_DbtSemanticLayerConnection_.json" + }, + { + "properties": { + "type": { + "$ref": "./SemanticLayerType.DBT.json" + } + }, + "required": [ + "type" + ], + "type": "object" + } + ] + }, + { + "allOf": [ + { + "$ref": "./Partial_CubeSemanticLayerConnection_.json" + }, + { + "properties": { + "type": { + "$ref": "./SemanticLayerType.CUBE.json" + } + }, + "required": [ + "type" + ], + "type": "object" + } + ] + } + ] +} diff --git a/dev/schemas/split-swagger/components/schemas/Tag.json b/dev/schemas/split-swagger/components/schemas/Tag.json new file mode 100644 index 0000000..90d9473 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/Tag.json @@ -0,0 +1,37 @@ +{ + "properties": { + "createdBy": { + "allOf": [ + { + "$ref": "./Pick_LightdashUser.userUuid-or-firstName-or-lastName_.json" + } + ], + "nullable": true + }, + "createdAt": { + "type": "string", + "format": "date-time" + }, + "color": { + "type": "string" + }, + "name": { + "type": "string" + }, + "projectUuid": { + "type": "string" + }, + "tagUuid": { + "type": "string" + } + }, + "required": [ + "createdBy", + "createdAt", + "color", + "name", + "projectUuid", + "tagUuid" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/TimeDimensionConfig.json b/dev/schemas/split-swagger/components/schemas/TimeDimensionConfig.json new file mode 100644 index 0000000..43523f6 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/TimeDimensionConfig.json @@ -0,0 +1,18 @@ +{ + "allOf": [ + { + "$ref": "./DefaultTimeDimension.json" + }, + { + "properties": { + "table": { + "type": "string" + } + }, + "required": [ + "table" + ], + "type": "object" + } + ] +} diff --git a/dev/schemas/split-swagger/components/schemas/UpdateMultipleDashboards.json b/dev/schemas/split-swagger/components/schemas/UpdateMultipleDashboards.json new file mode 100644 index 0000000..c833962 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/UpdateMultipleDashboards.json @@ -0,0 +1,3 @@ +{ + "$ref": "./Pick_Dashboard.uuid-or-name-or-description-or-spaceUuid_.json" +} diff --git a/dev/schemas/split-swagger/components/schemas/UpdateSchedulerSettings.json b/dev/schemas/split-swagger/components/schemas/UpdateSchedulerSettings.json new file mode 100644 index 0000000..59d0fcc --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/UpdateSchedulerSettings.json @@ -0,0 +1,11 @@ +{ + "properties": { + "schedulerTimezone": { + "type": "string" + } + }, + "required": [ + "schedulerTimezone" + ], + "type": "object" +} diff --git a/dev/schemas/split-swagger/components/schemas/UpdateVirtualViewPayload.json b/dev/schemas/split-swagger/components/schemas/UpdateVirtualViewPayload.json new file mode 100644 index 0000000..f02e234 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/UpdateVirtualViewPayload.json @@ -0,0 +1,3 @@ +{ + "$ref": "./CreateVirtualViewPayload.json" +} diff --git a/dev/schemas/split-swagger/components/schemas/ValueLabelPositionOptions.json b/dev/schemas/split-swagger/components/schemas/ValueLabelPositionOptions.json new file mode 100644 index 0000000..3d17ca6 --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/ValueLabelPositionOptions.json @@ -0,0 +1,11 @@ +{ + "enum": [ + "hidden", + "top", + "bottom", + "left", + "right", + "inside" + ], + "type": "string" +} diff --git a/dev/schemas/split-swagger/components/schemas/VizTableDisplay.json b/dev/schemas/split-swagger/components/schemas/VizTableDisplay.json new file mode 100644 index 0000000..0e5c50d --- /dev/null +++ b/dev/schemas/split-swagger/components/schemas/VizTableDisplay.json @@ -0,0 +1,4 @@ +{ + "properties": {}, + "type": "object" +} diff --git a/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_charts_code.json b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_charts_code.json new file mode 100644 index 0000000..ced928c --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_charts_code.json @@ -0,0 +1,42 @@ +{ + "get": { + "operationId": "getChartsAsCode", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiChartAsCodeListResponse.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "description": "Charts as code", + "tags": [ + "Projects" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "projectUuid", + "required": true, + "schema": { + "type": "string" + } + } + ] + } +} diff --git a/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_charts_{slug}_code.json b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_charts_{slug}_code.json new file mode 100644 index 0000000..e15bcd9 --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_charts_{slug}_code.json @@ -0,0 +1,74 @@ +{ + "post": { + "operationId": "upsertChartAsCode", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiChartAsCodeUpsertResponse.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "tags": [ + "Projects" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "projectUuid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "slug", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "../components/schemas/Omit_ChartAsCode.metricQuery-or-chartConfig_.json" + }, + { + "properties": { + "metricQuery": {}, + "chartConfig": {} + }, + "required": [ + "metricQuery", + "chartConfig" + ], + "type": "object" + } + ] + } + } + } + } + } +} diff --git a/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_createPreview.json b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_createPreview.json new file mode 100644 index 0000000..7639580 --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_createPreview.json @@ -0,0 +1,79 @@ +{ + "post": { + "operationId": "createPreview", + "responses": { + "200": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "properties": { + "results": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "tags": [ + "Projects" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "projectUuid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "copyContent": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "required": [ + "copyContent", + "name" + ], + "type": "object" + } + } + } + } + } +} diff --git a/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dashboards.json b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dashboards.json new file mode 100644 index 0000000..6dc8e7a --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dashboards.json @@ -0,0 +1,157 @@ +{ + "get": { + "operationId": "getDashboards", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiGetDashboardsResponse.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "tags": [ + "Projects" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "projectUuid", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "post": { + "operationId": "createDashboard", + "responses": { + "201": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiCreateDashboardResponse.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "tags": [ + "Projects" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "projectUuid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "duplicateFrom", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "../components/schemas/DuplicateDashboardParams.json" + }, + { + "$ref": "../components/schemas/CreateDashboard.json" + } + ] + } + } + } + } + }, + "patch": { + "operationId": "updateDashboards", + "responses": { + "200": { + "description": "Updated", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiUpdateDashboardsResponse.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "tags": [ + "Projects" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "projectUuid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "../components/schemas/UpdateMultipleDashboards.json" + }, + "type": "array" + } + } + } + } + } +} diff --git a/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dashboards_code.json b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dashboards_code.json new file mode 100644 index 0000000..f3a697f --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dashboards_code.json @@ -0,0 +1,41 @@ +{ + "get": { + "operationId": "getDashboardsAsCode", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiDashboardAsCodeListResponse.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "tags": [ + "Projects" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "projectUuid", + "required": true, + "schema": { + "type": "string" + } + } + ] + } +} diff --git a/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dashboards_{slug}_code.json b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dashboards_{slug}_code.json new file mode 100644 index 0000000..01edf20 --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dashboards_{slug}_code.json @@ -0,0 +1,78 @@ +{ + "post": { + "operationId": "upsertDashboardAsCode", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiDashboardAsCodeUpsertResponse.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "tags": [ + "Projects" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "projectUuid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "slug", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "../components/schemas/Omit_DashboardAsCode.filters-or-tiles-or-description_.json" + }, + { + "properties": { + "description": { + "type": "string", + "nullable": true + }, + "tiles": {}, + "filters": {} + }, + "required": [ + "tiles", + "filters" + ], + "type": "object" + } + ] + } + } + } + } + } +} diff --git a/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_metrics-with-time-dimensions.json b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_metrics-with-time-dimensions.json new file mode 100644 index 0000000..90dabcb --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_metrics-with-time-dimensions.json @@ -0,0 +1,42 @@ +{ + "get": { + "operationId": "getMetricsWithTimeDimensions", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiMetricsWithAssociatedTimeDimensionResponse.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "description": "Get metrics with time dimensions", + "tags": [ + "Catalog" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "projectUuid", + "required": true, + "schema": { + "type": "string" + } + } + ] + } +} diff --git a/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_metrics.json b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_metrics.json new file mode 100644 index 0000000..dbb1f75 --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_metrics.json @@ -0,0 +1,95 @@ +{ + "get": { + "operationId": "getMetricsCatalog", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiMetricsCatalog.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "description": "Get metrics catalog", + "tags": [ + "Catalog" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "projectUuid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "search", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "double", + "type": "number" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "double", + "type": "number" + } + }, + { + "in": "query", + "name": "sort", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "order", + "required": false, + "schema": { + "$ref": "../components/schemas/ApiSortDirection.json" + } + }, + { + "in": "query", + "name": "categories", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ] + } +} diff --git a/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_metrics_tree.json b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_metrics_tree.json new file mode 100644 index 0000000..4c2d4ca --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_metrics_tree.json @@ -0,0 +1,52 @@ +{ + "get": { + "operationId": "getMetricsTree", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiGetMetricsTree.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "tags": [ + "Catalog" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "projectUuid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "metricUuids", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ] + } +} diff --git a/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_metrics_tree_edges.json b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_metrics_tree_edges.json new file mode 100644 index 0000000..86d28da --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_metrics_tree_edges.json @@ -0,0 +1,51 @@ +{ + "post": { + "operationId": "createMetricsTreeEdge", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiSuccessEmpty.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "tags": [ + "Catalog" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "projectUuid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiMetricsTreeEdgePayload.json" + } + } + } + } + } +} diff --git a/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_metrics_tree_edges_{sourceCatalogSearchUuid}_{targetCatalogSearchUuid}.json b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_metrics_tree_edges_{sourceCatalogSearchUuid}_{targetCatalogSearchUuid}.json new file mode 100644 index 0000000..496af1a --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_metrics_tree_edges_{sourceCatalogSearchUuid}_{targetCatalogSearchUuid}.json @@ -0,0 +1,57 @@ +{ + "delete": { + "operationId": "deleteMetricsTreeEdge", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiSuccessEmpty.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "tags": [ + "Catalog" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "projectUuid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "sourceCatalogSearchUuid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "targetCatalogSearchUuid", + "required": true, + "schema": { + "type": "string" + } + } + ] + } +} diff --git a/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_metrics_{tableName}_{metricName}.json b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_metrics_{tableName}_{metricName}.json new file mode 100644 index 0000000..66aceaf --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_metrics_{tableName}_{metricName}.json @@ -0,0 +1,58 @@ +{ + "get": { + "operationId": "getMetric", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiGetMetricPeek.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "description": "Get metric by table and metric name", + "tags": [ + "Catalog" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "projectUuid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "tableName", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "metricName", + "required": true, + "schema": { + "type": "string" + } + } + ] + } +} diff --git a/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_{catalogSearchUuid}_categories.json b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_{catalogSearchUuid}_categories.json new file mode 100644 index 0000000..b4df121 --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_{catalogSearchUuid}_categories.json @@ -0,0 +1,59 @@ +{ + "post": { + "operationId": "addCategoryToCatalogItem", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiSuccessEmpty.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "tags": [ + "Catalog" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "catalogSearchUuid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "tagUuid": { + "type": "string" + } + }, + "required": [ + "tagUuid" + ], + "type": "object" + } + } + } + } + } +} diff --git a/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_{catalogSearchUuid}_categories_{tagUuid}.json b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_{catalogSearchUuid}_categories_{tagUuid}.json new file mode 100644 index 0000000..1e0bde8 --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_{catalogSearchUuid}_categories_{tagUuid}.json @@ -0,0 +1,59 @@ +{ + "delete": { + "operationId": "removeCategoryFromCatalogItem", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "properties": { + "results": {}, + "status": { + "type": "string" + } + }, + "required": [ + "results", + "status" + ], + "type": "object" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "tags": [ + "Catalog" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "catalogSearchUuid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "tagUuid", + "required": true, + "schema": { + "type": "string" + } + } + ] + } +} diff --git a/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_{catalogSearchUuid}_icon.json b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_{catalogSearchUuid}_icon.json new file mode 100644 index 0000000..0ed0a69 --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_dataCatalog_{catalogSearchUuid}_icon.json @@ -0,0 +1,72 @@ +{ + "patch": { + "operationId": "updateCatalogItemIcon", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiSuccessEmpty.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "tags": [ + "Catalog" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "projectUuid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "catalogSearchUuid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "icon": { + "allOf": [ + { + "$ref": "../components/schemas/CatalogItemIcon.json" + } + ], + "nullable": true + } + }, + "required": [ + "icon" + ], + "type": "object" + } + } + } + } + } +} diff --git a/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_metricsExplorer_{explore}_{metric}_runMetricExplorerQuery.json b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_metricsExplorer_{explore}_{metric}_runMetricExplorerQuery.json new file mode 100644 index 0000000..04b5932 --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_metricsExplorer_{explore}_{metric}_runMetricExplorerQuery.json @@ -0,0 +1,100 @@ +{ + "post": { + "operationId": "runMetricExplorerQuery", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiMetricsExplorerQueryResults.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "description": "Run a metrics explorer query", + "tags": [ + "Metrics Explorer", + "Metrics", + "Explorer" + ], + "security": [], + "parameters": [ + { + "description": "The project UUID", + "in": "path", + "name": "projectUuid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The explore name", + "in": "path", + "name": "explore", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "The metric name", + "in": "path", + "name": "metric", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "startDate", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "endDate", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "properties": { + "comparison": { + "$ref": "../components/schemas/MetricExplorerComparisonType.json" + }, + "timeDimensionOverride": { + "$ref": "../components/schemas/TimeDimensionConfig.json" + } + }, + "required": [ + "comparison" + ], + "type": "object" + } + } + } + } + } +} diff --git a/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_schedulerSettings.json b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_schedulerSettings.json new file mode 100644 index 0000000..8ef4e06 --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_schedulerSettings.json @@ -0,0 +1,51 @@ +{ + "patch": { + "operationId": "updateSchedulerSettings", + "responses": { + "200": { + "description": "Updated", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiSuccessEmpty.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "tags": [ + "Projects" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "projectUuid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/UpdateSchedulerSettings.json" + } + } + } + } + } +} diff --git a/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_tags.json b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_tags.json new file mode 100644 index 0000000..8f094c5 --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_tags.json @@ -0,0 +1,90 @@ +{ + "post": { + "operationId": "createTag", + "responses": { + "201": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiCreateTagResponse.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "tags": [ + "Projects" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "projectUuid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/Pick_Tag.name-or-color_.json" + } + } + } + } + }, + "get": { + "operationId": "getTags", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiGetTagsResponse.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "tags": [ + "Projects" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "projectUuid", + "required": true, + "schema": { + "type": "string" + } + } + ] + } +} diff --git a/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_tags_{tagUuid}.json b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_tags_{tagUuid}.json new file mode 100644 index 0000000..3e4bd41 --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_projects_{projectUuid}_tags_{tagUuid}.json @@ -0,0 +1,90 @@ +{ + "delete": { + "operationId": "deleteTag", + "responses": { + "204": { + "description": "Deleted", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiSuccessEmpty.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "tags": [ + "Projects" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tagUuid", + "required": true, + "schema": { + "type": "string" + } + } + ] + }, + "patch": { + "operationId": "updateTag", + "responses": { + "200": { + "description": "Updated", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiSuccessEmpty.json" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "tags": [ + "Projects" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "tagUuid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/DbTagUpdate.json" + } + } + } + } + } +} diff --git a/dev/schemas/split-swagger/paths/api_v1_saved_{chartUuid}_downloadCsv.json b/dev/schemas/split-swagger/paths/api_v1_saved_{chartUuid}_downloadCsv.json new file mode 100644 index 0000000..bef67a7 --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_saved_{chartUuid}_downloadCsv.json @@ -0,0 +1,94 @@ +{ + "post": { + "operationId": "DownloadCsvFromSavedChart", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "properties": { + "results": { + "properties": { + "jobId": { + "type": "string" + } + }, + "required": [ + "jobId" + ], + "type": "object" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "description": "Download a CSV from a saved chart uuid", + "tags": [ + "Charts" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "chartUuid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "csvLimit": { + "type": "number", + "format": "double", + "nullable": true + }, + "onlyRaw": { + "type": "boolean" + }, + "tileUuid": { + "type": "string" + }, + "dashboardFilters": {} + }, + "required": [ + "onlyRaw", + "dashboardFilters" + ], + "type": "object" + } + } + } + } + } +} diff --git a/dev/schemas/split-swagger/paths/api_v1_user_me_personal-access-tokens_{personalAccessTokenUuid}_rotate.json b/dev/schemas/split-swagger/paths/api_v1_user_me_personal-access-tokens_{personalAccessTokenUuid}_rotate.json new file mode 100644 index 0000000..c76ce5d --- /dev/null +++ b/dev/schemas/split-swagger/paths/api_v1_user_me_personal-access-tokens_{personalAccessTokenUuid}_rotate.json @@ -0,0 +1,77 @@ +{ + "patch": { + "operationId": "Rotate personal access token", + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "properties": { + "results": { + "$ref": "../components/schemas/PersonalAccessTokenWithToken.json" + }, + "status": { + "type": "string", + "enum": [ + "ok" + ], + "nullable": false + } + }, + "required": [ + "results", + "status" + ], + "type": "object" + } + } + } + }, + "default": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "../components/schemas/ApiErrorPayload.json" + } + } + } + } + }, + "description": "Rotate personal access token", + "tags": [ + "My Account" + ], + "security": [], + "parameters": [ + { + "in": "path", + "name": "personalAccessTokenUuid", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "properties": { + "expiresAt": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "expiresAt" + ], + "type": "object" + } + } + } + } + } +} diff --git a/lightdash_client/__init__.py b/lightdash_client/__init__.py index e39cf53..3694258 100644 --- a/lightdash_client/__init__.py +++ b/lightdash_client/__init__.py @@ -7,4 +7,4 @@ "Client", ) -__version__ = "0.1286.0" +__version__ = "0.1398.0" diff --git a/lightdash_client/api/catalog/create_metrics_tree_edge.py b/lightdash_client/api/catalog/create_metrics_tree_edge.py new file mode 100644 index 0000000..27f907e --- /dev/null +++ b/lightdash_client/api/catalog/create_metrics_tree_edge.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_metrics_tree_edge_payload import ApiMetricsTreeEdgePayload +from ...models.api_success_empty import ApiSuccessEmpty +from ...types import UNSET, Response + + +def _get_kwargs( + project_uuid: str, + *, + body: ApiMetricsTreeEdgePayload, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/api/v1/projects/{projectUuid}/dataCatalog/metrics/tree/edges".format( + projectUuid=project_uuid, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[ApiSuccessEmpty]: + if response.status_code == HTTPStatus.OK: + response_200 = ApiSuccessEmpty.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[ApiSuccessEmpty]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: ApiMetricsTreeEdgePayload, +) -> Response[ApiSuccessEmpty]: + """ + Args: + project_uuid (str): + body (ApiMetricsTreeEdgePayload): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiSuccessEmpty] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: ApiMetricsTreeEdgePayload, +) -> Optional[ApiSuccessEmpty]: + """ + Args: + project_uuid (str): + body (ApiMetricsTreeEdgePayload): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiSuccessEmpty + """ + + return sync_detailed( + project_uuid=project_uuid, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: ApiMetricsTreeEdgePayload, +) -> Response[ApiSuccessEmpty]: + """ + Args: + project_uuid (str): + body (ApiMetricsTreeEdgePayload): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiSuccessEmpty] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: ApiMetricsTreeEdgePayload, +) -> Optional[ApiSuccessEmpty]: + """ + Args: + project_uuid (str): + body (ApiMetricsTreeEdgePayload): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiSuccessEmpty + """ + + return ( + await asyncio_detailed( + project_uuid=project_uuid, + client=client, + body=body, + ) + ).parsed diff --git a/lightdash_client/api/catalog/delete_metrics_tree_edge.py b/lightdash_client/api/catalog/delete_metrics_tree_edge.py new file mode 100644 index 0000000..0f5b572 --- /dev/null +++ b/lightdash_client/api/catalog/delete_metrics_tree_edge.py @@ -0,0 +1,176 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_success_empty import ApiSuccessEmpty +from ...types import UNSET, Response + + +def _get_kwargs( + project_uuid: str, + source_catalog_search_uuid: str, + target_catalog_search_uuid: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/api/v1/projects/{projectUuid}/dataCatalog/metrics/tree/edges/{sourceCatalogSearchUuid}/{targetCatalogSearchUuid}".format( + projectUuid=project_uuid, + sourceCatalogSearchUuid=source_catalog_search_uuid, + targetCatalogSearchUuid=target_catalog_search_uuid, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[ApiSuccessEmpty]: + if response.status_code == HTTPStatus.OK: + response_200 = ApiSuccessEmpty.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[ApiSuccessEmpty]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_uuid: str, + source_catalog_search_uuid: str, + target_catalog_search_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[ApiSuccessEmpty]: + """ + Args: + project_uuid (str): + source_catalog_search_uuid (str): + target_catalog_search_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiSuccessEmpty] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + source_catalog_search_uuid=source_catalog_search_uuid, + target_catalog_search_uuid=target_catalog_search_uuid, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_uuid: str, + source_catalog_search_uuid: str, + target_catalog_search_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Optional[ApiSuccessEmpty]: + """ + Args: + project_uuid (str): + source_catalog_search_uuid (str): + target_catalog_search_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiSuccessEmpty + """ + + return sync_detailed( + project_uuid=project_uuid, + source_catalog_search_uuid=source_catalog_search_uuid, + target_catalog_search_uuid=target_catalog_search_uuid, + client=client, + ).parsed + + +async def asyncio_detailed( + project_uuid: str, + source_catalog_search_uuid: str, + target_catalog_search_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[ApiSuccessEmpty]: + """ + Args: + project_uuid (str): + source_catalog_search_uuid (str): + target_catalog_search_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiSuccessEmpty] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + source_catalog_search_uuid=source_catalog_search_uuid, + target_catalog_search_uuid=target_catalog_search_uuid, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_uuid: str, + source_catalog_search_uuid: str, + target_catalog_search_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Optional[ApiSuccessEmpty]: + """ + Args: + project_uuid (str): + source_catalog_search_uuid (str): + target_catalog_search_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiSuccessEmpty + """ + + return ( + await asyncio_detailed( + project_uuid=project_uuid, + source_catalog_search_uuid=source_catalog_search_uuid, + target_catalog_search_uuid=target_catalog_search_uuid, + client=client, + ) + ).parsed diff --git a/lightdash_client/api/catalog/get_analytics.py b/lightdash_client/api/catalog/get_analytics.py index 32383cb..14267e2 100644 --- a/lightdash_client/api/catalog/get_analytics.py +++ b/lightdash_client/api/catalog/get_analytics.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.get_analytics_response_200 import GetAnalyticsResponse200 -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -15,7 +15,10 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/projects/{project_uuid}/dataCatalog/{table}/analytics", + "url": "/api/v1/projects/{projectUuid}/dataCatalog/{table}/analytics".format( + projectUuid=project_uuid, + table=table, + ), } return _kwargs diff --git a/lightdash_client/api/catalog/get_analytics_field.py b/lightdash_client/api/catalog/get_analytics_field.py index 716fd31..9a5d009 100644 --- a/lightdash_client/api/catalog/get_analytics_field.py +++ b/lightdash_client/api/catalog/get_analytics_field.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.get_analytics_field_response_200 import GetAnalyticsFieldResponse200 -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -16,7 +16,11 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/projects/{project_uuid}/dataCatalog/{table}/analytics/{field}", + "url": "/api/v1/projects/{projectUuid}/dataCatalog/{table}/analytics/{field}".format( + projectUuid=project_uuid, + table=table, + field=field, + ), } return _kwargs diff --git a/lightdash_client/api/catalog/get_catalog.py b/lightdash_client/api/catalog/get_catalog.py index 4591b9d..5833814 100644 --- a/lightdash_client/api/catalog/get_catalog.py +++ b/lightdash_client/api/catalog/get_catalog.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -38,7 +38,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/projects/{project_uuid}/dataCatalog", + "url": "/api/v1/projects/{projectUuid}/dataCatalog".format( + projectUuid=project_uuid, + ), "params": params, } diff --git a/lightdash_client/api/catalog/get_metadata.py b/lightdash_client/api/catalog/get_metadata.py index 1c7cf68..48d0e95 100644 --- a/lightdash_client/api/catalog/get_metadata.py +++ b/lightdash_client/api/catalog/get_metadata.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.get_metadata_response_200 import GetMetadataResponse200 -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -15,7 +15,10 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/projects/{project_uuid}/dataCatalog/{table}/metadata", + "url": "/api/v1/projects/{projectUuid}/dataCatalog/{table}/metadata".format( + projectUuid=project_uuid, + table=table, + ), } return _kwargs diff --git a/lightdash_client/api/catalog/get_metric.py b/lightdash_client/api/catalog/get_metric.py new file mode 100644 index 0000000..d20ea68 --- /dev/null +++ b/lightdash_client/api/catalog/get_metric.py @@ -0,0 +1,109 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response + + +def _get_kwargs( + project_uuid: str, + table_name: str, + metric_name: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "get", + "url": "/api/v1/projects/{projectUuid}/dataCatalog/metrics/{tableName}/{metricName}".format( + projectUuid=project_uuid, + tableName=table_name, + metricName=metric_name, + ), + } + + return _kwargs + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_uuid: str, + table_name: str, + metric_name: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Get metric by table and metric name + + Args: + project_uuid (str): + table_name (str): + metric_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + table_name=table_name, + metric_name=metric_name, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_uuid: str, + table_name: str, + metric_name: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Get metric by table and metric name + + Args: + project_uuid (str): + table_name (str): + metric_name (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + table_name=table_name, + metric_name=metric_name, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/lightdash_client/api/catalog/get_metrics_catalog.py b/lightdash_client/api/catalog/get_metrics_catalog.py new file mode 100644 index 0000000..8a5993e --- /dev/null +++ b/lightdash_client/api/catalog/get_metrics_catalog.py @@ -0,0 +1,257 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_metrics_catalog import ApiMetricsCatalog +from ...models.api_sort_direction import ApiSortDirection +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_uuid: str, + *, + search: Union[Unset, str] = UNSET, + page: Union[Unset, float] = UNSET, + page_size: Union[Unset, float] = UNSET, + sort: Union[Unset, str] = UNSET, + order: Union[Unset, ApiSortDirection] = UNSET, + categories: Union[Unset, List[str]] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + params["search"] = search + + params["page"] = page + + params["pageSize"] = page_size + + params["sort"] = sort + + json_order: Union[Unset, str] = UNSET + if not isinstance(order, Unset): + json_order = order.value + + params["order"] = json_order + + json_categories: Union[Unset, List[str]] = UNSET + if not isinstance(categories, Unset): + json_categories = categories + + params["categories"] = json_categories + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: Dict[str, Any] = { + "method": "get", + "url": "/api/v1/projects/{projectUuid}/dataCatalog/metrics".format( + projectUuid=project_uuid, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[ApiMetricsCatalog]: + if response.status_code == HTTPStatus.OK: + response_200 = ApiMetricsCatalog.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[ApiMetricsCatalog]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + search: Union[Unset, str] = UNSET, + page: Union[Unset, float] = UNSET, + page_size: Union[Unset, float] = UNSET, + sort: Union[Unset, str] = UNSET, + order: Union[Unset, ApiSortDirection] = UNSET, + categories: Union[Unset, List[str]] = UNSET, +) -> Response[ApiMetricsCatalog]: + """Get metrics catalog + + Args: + project_uuid (str): + search (Union[Unset, str]): + page (Union[Unset, float]): + page_size (Union[Unset, float]): + sort (Union[Unset, str]): + order (Union[Unset, ApiSortDirection]): + categories (Union[Unset, List[str]]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiMetricsCatalog] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + search=search, + page=page, + page_size=page_size, + sort=sort, + order=order, + categories=categories, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + search: Union[Unset, str] = UNSET, + page: Union[Unset, float] = UNSET, + page_size: Union[Unset, float] = UNSET, + sort: Union[Unset, str] = UNSET, + order: Union[Unset, ApiSortDirection] = UNSET, + categories: Union[Unset, List[str]] = UNSET, +) -> Optional[ApiMetricsCatalog]: + """Get metrics catalog + + Args: + project_uuid (str): + search (Union[Unset, str]): + page (Union[Unset, float]): + page_size (Union[Unset, float]): + sort (Union[Unset, str]): + order (Union[Unset, ApiSortDirection]): + categories (Union[Unset, List[str]]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiMetricsCatalog + """ + + return sync_detailed( + project_uuid=project_uuid, + client=client, + search=search, + page=page, + page_size=page_size, + sort=sort, + order=order, + categories=categories, + ).parsed + + +async def asyncio_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + search: Union[Unset, str] = UNSET, + page: Union[Unset, float] = UNSET, + page_size: Union[Unset, float] = UNSET, + sort: Union[Unset, str] = UNSET, + order: Union[Unset, ApiSortDirection] = UNSET, + categories: Union[Unset, List[str]] = UNSET, +) -> Response[ApiMetricsCatalog]: + """Get metrics catalog + + Args: + project_uuid (str): + search (Union[Unset, str]): + page (Union[Unset, float]): + page_size (Union[Unset, float]): + sort (Union[Unset, str]): + order (Union[Unset, ApiSortDirection]): + categories (Union[Unset, List[str]]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiMetricsCatalog] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + search=search, + page=page, + page_size=page_size, + sort=sort, + order=order, + categories=categories, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + search: Union[Unset, str] = UNSET, + page: Union[Unset, float] = UNSET, + page_size: Union[Unset, float] = UNSET, + sort: Union[Unset, str] = UNSET, + order: Union[Unset, ApiSortDirection] = UNSET, + categories: Union[Unset, List[str]] = UNSET, +) -> Optional[ApiMetricsCatalog]: + """Get metrics catalog + + Args: + project_uuid (str): + search (Union[Unset, str]): + page (Union[Unset, float]): + page_size (Union[Unset, float]): + sort (Union[Unset, str]): + order (Union[Unset, ApiSortDirection]): + categories (Union[Unset, List[str]]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiMetricsCatalog + """ + + return ( + await asyncio_detailed( + project_uuid=project_uuid, + client=client, + search=search, + page=page, + page_size=page_size, + sort=sort, + order=order, + categories=categories, + ) + ).parsed diff --git a/lightdash_client/api/catalog/get_metrics_tree.py b/lightdash_client/api/catalog/get_metrics_tree.py new file mode 100644 index 0000000..a9a9b18 --- /dev/null +++ b/lightdash_client/api/catalog/get_metrics_tree.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_get_metrics_tree import ApiGetMetricsTree +from ...types import UNSET, Response + + +def _get_kwargs( + project_uuid: str, + *, + metric_uuids: List[str], +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + json_metric_uuids = metric_uuids + + params["metricUuids"] = json_metric_uuids + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: Dict[str, Any] = { + "method": "get", + "url": "/api/v1/projects/{projectUuid}/dataCatalog/metrics/tree".format( + projectUuid=project_uuid, + ), + "params": params, + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[ApiGetMetricsTree]: + if response.status_code == HTTPStatus.OK: + response_200 = ApiGetMetricsTree.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[ApiGetMetricsTree]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + metric_uuids: List[str], +) -> Response[ApiGetMetricsTree]: + """ + Args: + project_uuid (str): + metric_uuids (List[str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiGetMetricsTree] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + metric_uuids=metric_uuids, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + metric_uuids: List[str], +) -> Optional[ApiGetMetricsTree]: + """ + Args: + project_uuid (str): + metric_uuids (List[str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiGetMetricsTree + """ + + return sync_detailed( + project_uuid=project_uuid, + client=client, + metric_uuids=metric_uuids, + ).parsed + + +async def asyncio_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + metric_uuids: List[str], +) -> Response[ApiGetMetricsTree]: + """ + Args: + project_uuid (str): + metric_uuids (List[str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiGetMetricsTree] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + metric_uuids=metric_uuids, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + metric_uuids: List[str], +) -> Optional[ApiGetMetricsTree]: + """ + Args: + project_uuid (str): + metric_uuids (List[str]): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiGetMetricsTree + """ + + return ( + await asyncio_detailed( + project_uuid=project_uuid, + client=client, + metric_uuids=metric_uuids, + ) + ).parsed diff --git a/lightdash_client/api/catalog/get_metrics_with_time_dimensions.py b/lightdash_client/api/catalog/get_metrics_with_time_dimensions.py new file mode 100644 index 0000000..eabfc4d --- /dev/null +++ b/lightdash_client/api/catalog/get_metrics_with_time_dimensions.py @@ -0,0 +1,93 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response + + +def _get_kwargs( + project_uuid: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "get", + "url": "/api/v1/projects/{projectUuid}/dataCatalog/metrics-with-time-dimensions".format( + projectUuid=project_uuid, + ), + } + + return _kwargs + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Get metrics with time dimensions + + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[Any]: + """Get metrics with time dimensions + + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/lightdash_client/api/catalog/update_catalog_item_icon.py b/lightdash_client/api/catalog/update_catalog_item_icon.py new file mode 100644 index 0000000..3d375e2 --- /dev/null +++ b/lightdash_client/api/catalog/update_catalog_item_icon.py @@ -0,0 +1,185 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_success_empty import ApiSuccessEmpty +from ...models.update_catalog_item_icon_body import UpdateCatalogItemIconBody +from ...types import UNSET, Response + + +def _get_kwargs( + project_uuid: str, + catalog_search_uuid: str, + *, + body: UpdateCatalogItemIconBody, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "patch", + "url": "/api/v1/projects/{projectUuid}/dataCatalog/{catalogSearchUuid}/icon".format( + projectUuid=project_uuid, + catalogSearchUuid=catalog_search_uuid, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[ApiSuccessEmpty]: + if response.status_code == HTTPStatus.OK: + response_200 = ApiSuccessEmpty.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[ApiSuccessEmpty]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_uuid: str, + catalog_search_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: UpdateCatalogItemIconBody, +) -> Response[ApiSuccessEmpty]: + """ + Args: + project_uuid (str): + catalog_search_uuid (str): + body (UpdateCatalogItemIconBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiSuccessEmpty] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + catalog_search_uuid=catalog_search_uuid, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_uuid: str, + catalog_search_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: UpdateCatalogItemIconBody, +) -> Optional[ApiSuccessEmpty]: + """ + Args: + project_uuid (str): + catalog_search_uuid (str): + body (UpdateCatalogItemIconBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiSuccessEmpty + """ + + return sync_detailed( + project_uuid=project_uuid, + catalog_search_uuid=catalog_search_uuid, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_uuid: str, + catalog_search_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: UpdateCatalogItemIconBody, +) -> Response[ApiSuccessEmpty]: + """ + Args: + project_uuid (str): + catalog_search_uuid (str): + body (UpdateCatalogItemIconBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiSuccessEmpty] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + catalog_search_uuid=catalog_search_uuid, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_uuid: str, + catalog_search_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: UpdateCatalogItemIconBody, +) -> Optional[ApiSuccessEmpty]: + """ + Args: + project_uuid (str): + catalog_search_uuid (str): + body (UpdateCatalogItemIconBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiSuccessEmpty + """ + + return ( + await asyncio_detailed( + project_uuid=project_uuid, + catalog_search_uuid=catalog_search_uuid, + client=client, + body=body, + ) + ).parsed diff --git a/lightdash_client/api/charts/calculate_total_from_saved_chart.py b/lightdash_client/api/charts/calculate_total_from_saved_chart.py index c3e8dea..15f2c51 100644 --- a/lightdash_client/api/charts/calculate_total_from_saved_chart.py +++ b/lightdash_client/api/charts/calculate_total_from_saved_chart.py @@ -1,15 +1,13 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_calculate_total_response import ApiCalculateTotalResponse -from ...models.calculate_total_from_saved_chart_body import ( - CalculateTotalFromSavedChartBody, -) -from ...types import Response +from ...models.calculate_total_from_saved_chart_body import CalculateTotalFromSavedChartBody +from ...types import UNSET, Response def _get_kwargs( @@ -21,7 +19,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/saved/{chart_uuid}/calculate-total", + "url": "/api/v1/saved/{chartUuid}/calculate-total".format( + chartUuid=chart_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/charts/download_csv_from_saved_chart.py b/lightdash_client/api/charts/download_csv_from_saved_chart.py new file mode 100644 index 0000000..1f053d3 --- /dev/null +++ b/lightdash_client/api/charts/download_csv_from_saved_chart.py @@ -0,0 +1,175 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.download_csv_from_saved_chart_body import DownloadCsvFromSavedChartBody +from ...models.download_csv_from_saved_chart_response_200 import DownloadCsvFromSavedChartResponse200 +from ...types import UNSET, Response + + +def _get_kwargs( + chart_uuid: str, + *, + body: DownloadCsvFromSavedChartBody, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/api/v1/saved/{chartUuid}/downloadCsv".format( + chartUuid=chart_uuid, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[DownloadCsvFromSavedChartResponse200]: + if response.status_code == HTTPStatus.OK: + response_200 = DownloadCsvFromSavedChartResponse200.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[DownloadCsvFromSavedChartResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + chart_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: DownloadCsvFromSavedChartBody, +) -> Response[DownloadCsvFromSavedChartResponse200]: + """Download a CSV from a saved chart uuid + + Args: + chart_uuid (str): + body (DownloadCsvFromSavedChartBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DownloadCsvFromSavedChartResponse200] + """ + + kwargs = _get_kwargs( + chart_uuid=chart_uuid, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + chart_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: DownloadCsvFromSavedChartBody, +) -> Optional[DownloadCsvFromSavedChartResponse200]: + """Download a CSV from a saved chart uuid + + Args: + chart_uuid (str): + body (DownloadCsvFromSavedChartBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DownloadCsvFromSavedChartResponse200 + """ + + return sync_detailed( + chart_uuid=chart_uuid, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + chart_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: DownloadCsvFromSavedChartBody, +) -> Response[DownloadCsvFromSavedChartResponse200]: + """Download a CSV from a saved chart uuid + + Args: + chart_uuid (str): + body (DownloadCsvFromSavedChartBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[DownloadCsvFromSavedChartResponse200] + """ + + kwargs = _get_kwargs( + chart_uuid=chart_uuid, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + chart_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: DownloadCsvFromSavedChartBody, +) -> Optional[DownloadCsvFromSavedChartResponse200]: + """Download a CSV from a saved chart uuid + + Args: + chart_uuid (str): + body (DownloadCsvFromSavedChartBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + DownloadCsvFromSavedChartResponse200 + """ + + return ( + await asyncio_detailed( + chart_uuid=chart_uuid, + client=client, + body=body, + ) + ).parsed diff --git a/lightdash_client/api/charts/get_chart_history.py b/lightdash_client/api/charts/get_chart_history.py index 62c828c..19bc37f 100644 --- a/lightdash_client/api/charts/get_chart_history.py +++ b/lightdash_client/api/charts/get_chart_history.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_get_chart_history_response import ApiGetChartHistoryResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/saved/{chart_uuid}/history", + "url": "/api/v1/saved/{chartUuid}/history".format( + chartUuid=chart_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/charts/get_chart_version.py b/lightdash_client/api/charts/get_chart_version.py index bae3bde..709c43d 100644 --- a/lightdash_client/api/charts/get_chart_version.py +++ b/lightdash_client/api/charts/get_chart_version.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_get_chart_version_response import ApiGetChartVersionResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -15,7 +15,10 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/saved/{chart_uuid}/version/{version_uuid}", + "url": "/api/v1/saved/{chartUuid}/version/{versionUuid}".format( + chartUuid=chart_uuid, + versionUuid=version_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/charts/get_chart_version_results.py b/lightdash_client/api/charts/get_chart_version_results.py index 69349e5..033d1eb 100644 --- a/lightdash_client/api/charts/get_chart_version_results.py +++ b/lightdash_client/api/charts/get_chart_version_results.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_run_query_response import ApiRunQueryResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -15,7 +15,10 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/saved/{chart_uuid}/version/{version_uuid}/results", + "url": "/api/v1/saved/{chartUuid}/version/{versionUuid}/results".format( + chartUuid=chart_uuid, + versionUuid=version_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/charts/post_chart_results.py b/lightdash_client/api/charts/post_chart_results.py index aae2bff..e87f2c0 100644 --- a/lightdash_client/api/charts/post_chart_results.py +++ b/lightdash_client/api/charts/post_chart_results.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_run_query_response import ApiRunQueryResponse from ...models.post_chart_results_body import PostChartResultsBody -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -19,7 +19,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/saved/{chart_uuid}/results", + "url": "/api/v1/saved/{chartUuid}/results".format( + chartUuid=chart_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/charts/post_chart_version_rollback.py b/lightdash_client/api/charts/post_chart_version_rollback.py index 8cace0e..9328295 100644 --- a/lightdash_client/api/charts/post_chart_version_rollback.py +++ b/lightdash_client/api/charts/post_chart_version_rollback.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -15,7 +15,10 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/saved/{chart_uuid}/rollback/{version_uuid}", + "url": "/api/v1/saved/{chartUuid}/rollback/{versionUuid}".format( + chartUuid=chart_uuid, + versionUuid=version_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/charts/post_dashboard_tile.py b/lightdash_client/api/charts/post_dashboard_tile.py index 0d82d85..7202929 100644 --- a/lightdash_client/api/charts/post_dashboard_tile.py +++ b/lightdash_client/api/charts/post_dashboard_tile.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_run_query_response import ApiRunQueryResponse from ...models.post_dashboard_tile_body import PostDashboardTileBody -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -19,7 +19,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/saved/{chart_uuid}/chart-and-results", + "url": "/api/v1/saved/{chartUuid}/chart-and-results".format( + chartUuid=chart_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/charts/promote_chart.py b/lightdash_client/api/charts/promote_chart.py index 46e33d6..b02e1d6 100644 --- a/lightdash_client/api/charts/promote_chart.py +++ b/lightdash_client/api/charts/promote_chart.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_promote_chart_response import ApiPromoteChartResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/saved/{chart_uuid}/promote", + "url": "/api/v1/saved/{chartUuid}/promote".format( + chartUuid=chart_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/charts/promote_chart_diff.py b/lightdash_client/api/charts/promote_chart_diff.py index 2feeb50..d89cf3e 100644 --- a/lightdash_client/api/charts/promote_chart_diff.py +++ b/lightdash_client/api/charts/promote_chart_diff.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_promotion_changes_response import ApiPromotionChangesResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/saved/{chart_uuid}/promoteDiff", + "url": "/api/v1/saved/{chartUuid}/promoteDiff".format( + chartUuid=chart_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/comments/create_comment.py b/lightdash_client/api/comments/create_comment.py index b3d79e6..8ecc2aa 100644 --- a/lightdash_client/api/comments/create_comment.py +++ b/lightdash_client/api/comments/create_comment.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -9,7 +9,7 @@ from ...models.pick_comment_text_or_reply_to_or_mentions_or_text_html import ( PickCommentTextOrReplyToOrMentionsOrTextHtml, ) -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -22,7 +22,10 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/comments/dashboards/{dashboard_uuid}/{dashboard_tile_uuid}", + "url": "/api/v1/comments/dashboards/{dashboardUuid}/{dashboardTileUuid}".format( + dashboardUuid=dashboard_uuid, + dashboardTileUuid=dashboard_tile_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/comments/delete_comment.py b/lightdash_client/api/comments/delete_comment.py index 5baf8f8..6dd88e7 100644 --- a/lightdash_client/api/comments/delete_comment.py +++ b/lightdash_client/api/comments/delete_comment.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_resolve_comment import ApiResolveComment -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -15,7 +15,10 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "delete", - "url": f"/api/v1/comments/dashboards/{dashboard_uuid}/{comment_id}", + "url": "/api/v1/comments/dashboards/{dashboardUuid}/{commentId}".format( + dashboardUuid=dashboard_uuid, + commentId=comment_id, + ), } return _kwargs diff --git a/lightdash_client/api/comments/get_comments.py b/lightdash_client/api/comments/get_comments.py index dd5cd11..5a9ce96 100644 --- a/lightdash_client/api/comments/get_comments.py +++ b/lightdash_client/api/comments/get_comments.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_get_comments import ApiGetComments -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/comments/dashboards/{dashboard_uuid}", + "url": "/api/v1/comments/dashboards/{dashboardUuid}".format( + dashboardUuid=dashboard_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/comments/resolve_comment.py b/lightdash_client/api/comments/resolve_comment.py index 0348357..6d63d4a 100644 --- a/lightdash_client/api/comments/resolve_comment.py +++ b/lightdash_client/api/comments/resolve_comment.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_resolve_comment import ApiResolveComment -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -15,7 +15,10 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "patch", - "url": f"/api/v1/comments/dashboards/{dashboard_uuid}/{comment_id}", + "url": "/api/v1/comments/dashboards/{dashboardUuid}/{commentId}".format( + dashboardUuid=dashboard_uuid, + commentId=comment_id, + ), } return _kwargs diff --git a/lightdash_client/api/content/get_pinned_items.py b/lightdash_client/api/content/get_pinned_items.py index 6aced5a..1f3b97d 100644 --- a/lightdash_client/api/content/get_pinned_items.py +++ b/lightdash_client/api/content/get_pinned_items.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_pinned_items import ApiPinnedItems -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -15,7 +15,10 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/projects/{project_uuid}/pinned-lists/{pinned_list_uuid}/items", + "url": "/api/v1/projects/{projectUuid}/pinned-lists/{pinnedListUuid}/items".format( + projectUuid=project_uuid, + pinnedListUuid=pinned_list_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/content/update_pinned_items_order.py b/lightdash_client/api/content/update_pinned_items_order.py index 4e9e3e1..759ca9d 100644 --- a/lightdash_client/api/content/update_pinned_items_order.py +++ b/lightdash_client/api/content/update_pinned_items_order.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_pinned_items import ApiPinnedItems from ...models.update_pinned_item_order import UpdatePinnedItemOrder -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -20,7 +20,10 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "patch", - "url": f"/api/v1/projects/{project_uuid}/pinned-lists/{pinned_list_uuid}/items/order", + "url": "/api/v1/projects/{projectUuid}/pinned-lists/{pinnedListUuid}/items/order".format( + projectUuid=project_uuid, + pinnedListUuid=pinned_list_uuid, + ), } _body = [] diff --git a/lightdash_client/api/dashboards/promote_dashboard.py b/lightdash_client/api/dashboards/promote_dashboard.py index 466665c..a684a97 100644 --- a/lightdash_client/api/dashboards/promote_dashboard.py +++ b/lightdash_client/api/dashboards/promote_dashboard.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_promote_dashboard_response import ApiPromoteDashboardResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/dashboards/{dashboard_uuid}/promote", + "url": "/api/v1/dashboards/{dashboardUuid}/promote".format( + dashboardUuid=dashboard_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/dashboards/promote_dashboard_diff.py b/lightdash_client/api/dashboards/promote_dashboard_diff.py index d2ab87a..76692c4 100644 --- a/lightdash_client/api/dashboards/promote_dashboard_diff.py +++ b/lightdash_client/api/dashboards/promote_dashboard_diff.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_promotion_changes_response import ApiPromotionChangesResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/dashboards/{dashboard_uuid}/promoteDiff", + "url": "/api/v1/dashboards/{dashboardUuid}/promoteDiff".format( + dashboardUuid=dashboard_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/default/get_github_list_repositories.py b/lightdash_client/api/default/get_github_list_repositories.py index 6561bd4..5f49fea 100644 --- a/lightdash_client/api/default/get_github_list_repositories.py +++ b/lightdash_client/api/default/get_github_list_repositories.py @@ -1,14 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...models.get_github_list_repositories_response_200 import ( - GetGithubListRepositoriesResponse200, -) -from ...types import Response +from ...models.get_github_list_repositories_response_200 import GetGithubListRepositoriesResponse200 +from ...types import UNSET, Response def _get_kwargs() -> Dict[str, Any]: diff --git a/lightdash_client/api/default/github_oauth_callback.py b/lightdash_client/api/default/github_oauth_callback.py index d959580..5940ac4 100644 --- a/lightdash_client/api/default/github_oauth_callback.py +++ b/lightdash_client/api/default/github_oauth_callback.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx diff --git a/lightdash_client/api/default/install_github_app_for_organization.py b/lightdash_client/api/default/install_github_app_for_organization.py index d3fa3fc..75d6a5d 100644 --- a/lightdash_client/api/default/install_github_app_for_organization.py +++ b/lightdash_client/api/default/install_github_app_for_organization.py @@ -1,11 +1,11 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...types import Response +from ...types import UNSET, Response def _get_kwargs() -> Dict[str, Any]: diff --git a/lightdash_client/api/default/uninstall_github_app_for_organization.py b/lightdash_client/api/default/uninstall_github_app_for_organization.py index 46ead80..9e0bc19 100644 --- a/lightdash_client/api/default/uninstall_github_app_for_organization.py +++ b/lightdash_client/api/default/uninstall_github_app_for_organization.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty -from ...types import Response +from ...types import UNSET, Response def _get_kwargs() -> Dict[str, Any]: diff --git a/lightdash_client/api/exploring/post_run_underlying_data_query.py b/lightdash_client/api/exploring/post_run_underlying_data_query.py index 24fc469..57b19f1 100644 --- a/lightdash_client/api/exploring/post_run_underlying_data_query.py +++ b/lightdash_client/api/exploring/post_run_underlying_data_query.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_run_query_response import ApiRunQueryResponse from ...models.metric_query_request import MetricQueryRequest -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -20,7 +20,10 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/projects/{project_uuid}/explores/{explore_id}/runUnderlyingDataQuery", + "url": "/api/v1/projects/{projectUuid}/explores/{exploreId}/runUnderlyingDataQuery".format( + projectUuid=project_uuid, + exploreId=explore_id, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/exploring/run_metric_query.py b/lightdash_client/api/exploring/run_metric_query.py index 58fecdb..00d3fea 100644 --- a/lightdash_client/api/exploring/run_metric_query.py +++ b/lightdash_client/api/exploring/run_metric_query.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_run_query_response import ApiRunQueryResponse from ...models.metric_query_request import MetricQueryRequest -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -20,7 +20,10 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/projects/{project_uuid}/explores/{explore_id}/runQuery", + "url": "/api/v1/projects/{projectUuid}/explores/{exploreId}/runQuery".format( + projectUuid=project_uuid, + exploreId=explore_id, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/exploring/run_sql_query.py b/lightdash_client/api/exploring/run_sql_query.py index 22a0c9a..29fc71c 100644 --- a/lightdash_client/api/exploring/run_sql_query.py +++ b/lightdash_client/api/exploring/run_sql_query.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.run_sql_query_body import RunSqlQueryBody from ...models.run_sql_query_response_200 import RunSqlQueryResponse200 -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -19,7 +19,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/projects/{project_uuid}/sqlQuery", + "url": "/api/v1/projects/{projectUuid}/sqlQuery".format( + projectUuid=project_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/exports/get_csv_url.py b/lightdash_client/api/exports/get_csv_url.py index b98faca..7b7e73b 100644 --- a/lightdash_client/api/exports/get_csv_url.py +++ b/lightdash_client/api/exports/get_csv_url.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_csv_url_response import ApiCsvUrlResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/csv/{job_id}", + "url": "/api/v1/csv/{jobId}".format( + jobId=job_id, + ), } return _kwargs diff --git a/lightdash_client/api/git_integration/create_pull_request_for_chart_fields.py b/lightdash_client/api/git_integration/create_pull_request_for_chart_fields.py index 9efebf0..2f9c0f0 100644 --- a/lightdash_client/api/git_integration/create_pull_request_for_chart_fields.py +++ b/lightdash_client/api/git_integration/create_pull_request_for_chart_fields.py @@ -1,14 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...models.create_pull_request_for_chart_fields_response_200 import ( - CreatePullRequestForChartFieldsResponse200, -) -from ...types import Response +from ...models.create_pull_request_for_chart_fields_response_200 import CreatePullRequestForChartFieldsResponse200 +from ...types import UNSET, Response def _get_kwargs( @@ -17,7 +15,10 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/projects/{project_uuid}/git-integration/pull-requests/chart/{chart_uuid}/fields", + "url": "/api/v1/projects/{projectUuid}/git-integration/pull-requests/chart/{chartUuid}/fields".format( + projectUuid=project_uuid, + chartUuid=chart_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/git_integration/create_pull_request_for_custom_metrics.py b/lightdash_client/api/git_integration/create_pull_request_for_custom_metrics.py index f33fa78..109ddd7 100644 --- a/lightdash_client/api/git_integration/create_pull_request_for_custom_metrics.py +++ b/lightdash_client/api/git_integration/create_pull_request_for_custom_metrics.py @@ -1,17 +1,13 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...models.create_pull_request_for_custom_metrics_body import ( - CreatePullRequestForCustomMetricsBody, -) -from ...models.create_pull_request_for_custom_metrics_response_200 import ( - CreatePullRequestForCustomMetricsResponse200, -) -from ...types import Response +from ...models.create_pull_request_for_custom_metrics_body import CreatePullRequestForCustomMetricsBody +from ...models.create_pull_request_for_custom_metrics_response_200 import CreatePullRequestForCustomMetricsResponse200 +from ...types import UNSET, Response def _get_kwargs( @@ -23,7 +19,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/projects/{project_uuid}/git-integration/pull-requests/custom-metrics", + "url": "/api/v1/projects/{projectUuid}/git-integration/pull-requests/custom-metrics".format( + projectUuid=project_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/git_integration/get_configuration.py b/lightdash_client/api/git_integration/get_configuration.py index db46759..ecefb75 100644 --- a/lightdash_client/api/git_integration/get_configuration.py +++ b/lightdash_client/api/git_integration/get_configuration.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.get_configuration_response_200 import GetConfigurationResponse200 -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/projects/{project_uuid}/git-integration", + "url": "/api/v1/projects/{projectUuid}/git-integration".format( + projectUuid=project_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/integrations/get_access_token.py b/lightdash_client/api/integrations/get_access_token.py index b8a29b8..4191707 100644 --- a/lightdash_client/api/integrations/get_access_token.py +++ b/lightdash_client/api/integrations/get_access_token.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_gdrive_access_token_response import ApiGdriveAccessTokenResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs() -> Dict[str, Any]: diff --git a/lightdash_client/api/integrations/get_slack_channels.py b/lightdash_client/api/integrations/get_slack_channels.py index 46e6088..837fb13 100644 --- a/lightdash_client/api/integrations/get_slack_channels.py +++ b/lightdash_client/api/integrations/get_slack_channels.py @@ -1,18 +1,28 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_slack_channels_response import ApiSlackChannelsResponse -from ...types import Response +from ...types import UNSET, Response, Unset -def _get_kwargs() -> Dict[str, Any]: +def _get_kwargs( + *, + search: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + params["search"] = search + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: Dict[str, Any] = { "method": "get", "url": "/api/v1/slack/channels", + "params": params, } return _kwargs @@ -45,9 +55,13 @@ def _build_response( def sync_detailed( *, client: Union[AuthenticatedClient, Client], + search: Union[Unset, str] = UNSET, ) -> Response[ApiSlackChannelsResponse]: """Get slack channels + Args: + search (Union[Unset, str]): + Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. @@ -56,7 +70,9 @@ def sync_detailed( Response[ApiSlackChannelsResponse] """ - kwargs = _get_kwargs() + kwargs = _get_kwargs( + search=search, + ) response = client.get_httpx_client().request( **kwargs, @@ -68,9 +84,13 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], + search: Union[Unset, str] = UNSET, ) -> Optional[ApiSlackChannelsResponse]: """Get slack channels + Args: + search (Union[Unset, str]): + Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. @@ -81,15 +101,20 @@ def sync( return sync_detailed( client=client, + search=search, ).parsed async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], + search: Union[Unset, str] = UNSET, ) -> Response[ApiSlackChannelsResponse]: """Get slack channels + Args: + search (Union[Unset, str]): + Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. @@ -98,7 +123,9 @@ async def asyncio_detailed( Response[ApiSlackChannelsResponse] """ - kwargs = _get_kwargs() + kwargs = _get_kwargs( + search=search, + ) response = await client.get_async_httpx_client().request(**kwargs) @@ -108,9 +135,13 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], + search: Union[Unset, str] = UNSET, ) -> Optional[ApiSlackChannelsResponse]: """Get slack channels + Args: + search (Union[Unset, str]): + Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. httpx.TimeoutException: If the request takes longer than Client.timeout. @@ -122,5 +153,6 @@ async def asyncio( return ( await asyncio_detailed( client=client, + search=search, ) ).parsed diff --git a/lightdash_client/api/integrations/update_custom_settings.py b/lightdash_client/api/integrations/update_custom_settings.py index 425c0c2..d87b24c 100644 --- a/lightdash_client/api/integrations/update_custom_settings.py +++ b/lightdash_client/api/integrations/update_custom_settings.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_slack_custom_settings_response import ApiSlackCustomSettingsResponse from ...models.slack_app_custom_settings import SlackAppCustomSettings -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( diff --git a/lightdash_client/api/integrations/upload_gsheet.py b/lightdash_client/api/integrations/upload_gsheet.py index caf1be2..c325c05 100644 --- a/lightdash_client/api/integrations/upload_gsheet.py +++ b/lightdash_client/api/integrations/upload_gsheet.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_job_scheduled_response import ApiJobScheduledResponse from ...models.upload_metric_gsheet import UploadMetricGsheet -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( diff --git a/lightdash_client/api/metrics_explorer/__init__.py b/lightdash_client/api/metrics_explorer/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/lightdash_client/api/metrics_explorer/run_metric_explorer_query.py b/lightdash_client/api/metrics_explorer/run_metric_explorer_query.py new file mode 100644 index 0000000..629f3f1 --- /dev/null +++ b/lightdash_client/api/metrics_explorer/run_metric_explorer_query.py @@ -0,0 +1,149 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.run_metric_explorer_query_body import RunMetricExplorerQueryBody +from ...types import UNSET, Response + + +def _get_kwargs( + project_uuid: str, + explore: str, + metric: str, + *, + body: RunMetricExplorerQueryBody, + start_date: str, + end_date: str, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + params: Dict[str, Any] = {} + + params["startDate"] = start_date + + params["endDate"] = end_date + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/api/v1/projects/{projectUuid}/metricsExplorer/{explore}/{metric}/runMetricExplorerQuery".format( + projectUuid=project_uuid, + explore=explore, + metric=metric, + ), + "params": params, + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Optional[Any]: + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_uuid: str, + explore: str, + metric: str, + *, + client: Union[AuthenticatedClient, Client], + body: RunMetricExplorerQueryBody, + start_date: str, + end_date: str, +) -> Response[Any]: + """Run a metrics explorer query + + Args: + project_uuid (str): + explore (str): + metric (str): + start_date (str): + end_date (str): + body (RunMetricExplorerQueryBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + explore=explore, + metric=metric, + body=body, + start_date=start_date, + end_date=end_date, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + project_uuid: str, + explore: str, + metric: str, + *, + client: Union[AuthenticatedClient, Client], + body: RunMetricExplorerQueryBody, + start_date: str, + end_date: str, +) -> Response[Any]: + """Run a metrics explorer query + + Args: + project_uuid (str): + explore (str): + metric (str): + start_date (str): + end_date (str): + body (RunMetricExplorerQueryBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[Any] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + explore=explore, + metric=metric, + body=body, + start_date=start_date, + end_date=end_date, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) diff --git a/lightdash_client/api/my_account/create_email_one_time_passcode.py b/lightdash_client/api/my_account/create_email_one_time_passcode.py index 1562c01..5d4dcaf 100644 --- a/lightdash_client/api/my_account/create_email_one_time_passcode.py +++ b/lightdash_client/api/my_account/create_email_one_time_passcode.py @@ -1,11 +1,11 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...types import Response +from ...types import UNSET, Response def _get_kwargs() -> Dict[str, Any]: diff --git a/lightdash_client/api/my_account/create_warehouse_credentials.py b/lightdash_client/api/my_account/create_warehouse_credentials.py index e9019e6..6d92e9d 100644 --- a/lightdash_client/api/my_account/create_warehouse_credentials.py +++ b/lightdash_client/api/my_account/create_warehouse_credentials.py @@ -1,15 +1,13 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...models.create_warehouse_credentials_response_200 import ( - CreateWarehouseCredentialsResponse200, -) +from ...models.create_warehouse_credentials_response_200 import CreateWarehouseCredentialsResponse200 from ...models.upsert_user_warehouse_credentials import UpsertUserWarehouseCredentials -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( diff --git a/lightdash_client/api/my_account/delete_me.py b/lightdash_client/api/my_account/delete_me.py index bd3d1ee..b8b3411 100644 --- a/lightdash_client/api/my_account/delete_me.py +++ b/lightdash_client/api/my_account/delete_me.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty -from ...types import Response +from ...types import UNSET, Response def _get_kwargs() -> Dict[str, Any]: diff --git a/lightdash_client/api/my_account/delete_warehouse_credentials.py b/lightdash_client/api/my_account/delete_warehouse_credentials.py index 9960ca3..be5daea 100644 --- a/lightdash_client/api/my_account/delete_warehouse_credentials.py +++ b/lightdash_client/api/my_account/delete_warehouse_credentials.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "delete", - "url": f"/api/v1/user/warehouseCredentials/{uuid}", + "url": "/api/v1/user/warehouseCredentials/{uuid}".format( + uuid=uuid, + ), } return _kwargs diff --git a/lightdash_client/api/my_account/get_authenticated_user.py b/lightdash_client/api/my_account/get_authenticated_user.py index b6bae91..095d67e 100644 --- a/lightdash_client/api/my_account/get_authenticated_user.py +++ b/lightdash_client/api/my_account/get_authenticated_user.py @@ -1,14 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...models.api_get_authenticated_user_response import ( - ApiGetAuthenticatedUserResponse, -) -from ...types import Response +from ...models.api_get_authenticated_user_response import ApiGetAuthenticatedUserResponse +from ...types import UNSET, Response def _get_kwargs() -> Dict[str, Any]: diff --git a/lightdash_client/api/my_account/get_email_verification_status.py b/lightdash_client/api/my_account/get_email_verification_status.py index e9a71c7..7800070 100644 --- a/lightdash_client/api/my_account/get_email_verification_status.py +++ b/lightdash_client/api/my_account/get_email_verification_status.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx diff --git a/lightdash_client/api/my_account/get_login_options.py b/lightdash_client/api/my_account/get_login_options.py index ba61efa..bc265f0 100644 --- a/lightdash_client/api/my_account/get_login_options.py +++ b/lightdash_client/api/my_account/get_login_options.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx diff --git a/lightdash_client/api/my_account/get_warehouse_credentials.py b/lightdash_client/api/my_account/get_warehouse_credentials.py index 19bd283..5da3a2d 100644 --- a/lightdash_client/api/my_account/get_warehouse_credentials.py +++ b/lightdash_client/api/my_account/get_warehouse_credentials.py @@ -1,14 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...models.get_warehouse_credentials_response_200 import ( - GetWarehouseCredentialsResponse200, -) -from ...types import Response +from ...models.get_warehouse_credentials_response_200 import GetWarehouseCredentialsResponse200 +from ...types import UNSET, Response def _get_kwargs() -> Dict[str, Any]: diff --git a/lightdash_client/api/my_account/join_organization.py b/lightdash_client/api/my_account/join_organization.py index f2db0d1..4619589 100644 --- a/lightdash_client/api/my_account/join_organization.py +++ b/lightdash_client/api/my_account/join_organization.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/user/me/joinOrganization/{organization_uuid}", + "url": "/api/v1/user/me/joinOrganization/{organizationUuid}".format( + organizationUuid=organization_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/my_account/list_my_available_organizations.py b/lightdash_client/api/my_account/list_my_available_organizations.py index 06b041e..fd4025f 100644 --- a/lightdash_client/api/my_account/list_my_available_organizations.py +++ b/lightdash_client/api/my_account/list_my_available_organizations.py @@ -1,14 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...models.api_user_allowed_organizations_response import ( - ApiUserAllowedOrganizationsResponse, -) -from ...types import Response +from ...models.api_user_allowed_organizations_response import ApiUserAllowedOrganizationsResponse +from ...types import UNSET, Response def _get_kwargs() -> Dict[str, Any]: diff --git a/lightdash_client/api/my_account/register_user.py b/lightdash_client/api/my_account/register_user.py index bae8731..ff86905 100644 --- a/lightdash_client/api/my_account/register_user.py +++ b/lightdash_client/api/my_account/register_user.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -8,7 +8,7 @@ from ...models.activate_user_with_invite_code import ActivateUserWithInviteCode from ...models.api_register_user_response import ApiRegisterUserResponse from ...models.create_user_args import CreateUserArgs -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( diff --git a/lightdash_client/api/my_account/rotate_personal_access_token.py b/lightdash_client/api/my_account/rotate_personal_access_token.py new file mode 100644 index 0000000..b5a209c --- /dev/null +++ b/lightdash_client/api/my_account/rotate_personal_access_token.py @@ -0,0 +1,175 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.rotate_personal_access_token_body import RotatePersonalAccessTokenBody +from ...models.rotate_personal_access_token_response_200 import RotatePersonalAccessTokenResponse200 +from ...types import UNSET, Response + + +def _get_kwargs( + personal_access_token_uuid: str, + *, + body: RotatePersonalAccessTokenBody, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "patch", + "url": "/api/v1/user/me/personal-access-tokens/{personalAccessTokenUuid}/rotate".format( + personalAccessTokenUuid=personal_access_token_uuid, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[RotatePersonalAccessTokenResponse200]: + if response.status_code == HTTPStatus.OK: + response_200 = RotatePersonalAccessTokenResponse200.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[RotatePersonalAccessTokenResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + personal_access_token_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: RotatePersonalAccessTokenBody, +) -> Response[RotatePersonalAccessTokenResponse200]: + """Rotate personal access token + + Args: + personal_access_token_uuid (str): + body (RotatePersonalAccessTokenBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[RotatePersonalAccessTokenResponse200] + """ + + kwargs = _get_kwargs( + personal_access_token_uuid=personal_access_token_uuid, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + personal_access_token_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: RotatePersonalAccessTokenBody, +) -> Optional[RotatePersonalAccessTokenResponse200]: + """Rotate personal access token + + Args: + personal_access_token_uuid (str): + body (RotatePersonalAccessTokenBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + RotatePersonalAccessTokenResponse200 + """ + + return sync_detailed( + personal_access_token_uuid=personal_access_token_uuid, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + personal_access_token_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: RotatePersonalAccessTokenBody, +) -> Response[RotatePersonalAccessTokenResponse200]: + """Rotate personal access token + + Args: + personal_access_token_uuid (str): + body (RotatePersonalAccessTokenBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[RotatePersonalAccessTokenResponse200] + """ + + kwargs = _get_kwargs( + personal_access_token_uuid=personal_access_token_uuid, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + personal_access_token_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: RotatePersonalAccessTokenBody, +) -> Optional[RotatePersonalAccessTokenResponse200]: + """Rotate personal access token + + Args: + personal_access_token_uuid (str): + body (RotatePersonalAccessTokenBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + RotatePersonalAccessTokenResponse200 + """ + + return ( + await asyncio_detailed( + personal_access_token_uuid=personal_access_token_uuid, + client=client, + body=body, + ) + ).parsed diff --git a/lightdash_client/api/my_account/update_warehouse_credentials.py b/lightdash_client/api/my_account/update_warehouse_credentials.py index 89a317b..f96b654 100644 --- a/lightdash_client/api/my_account/update_warehouse_credentials.py +++ b/lightdash_client/api/my_account/update_warehouse_credentials.py @@ -1,15 +1,13 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...models.update_warehouse_credentials_response_200 import ( - UpdateWarehouseCredentialsResponse200, -) +from ...models.update_warehouse_credentials_response_200 import UpdateWarehouseCredentialsResponse200 from ...models.upsert_user_warehouse_credentials import UpsertUserWarehouseCredentials -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -21,7 +19,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "patch", - "url": f"/api/v1/user/warehouseCredentials/{uuid}", + "url": "/api/v1/user/warehouseCredentials/{uuid}".format( + uuid=uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/notifications/get_notifications.py b/lightdash_client/api/notifications/get_notifications.py index cb54cfb..f70c14d 100644 --- a/lightdash_client/api/notifications/get_notifications.py +++ b/lightdash_client/api/notifications/get_notifications.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx diff --git a/lightdash_client/api/notifications/update_notification.py b/lightdash_client/api/notifications/update_notification.py index 1baf2f1..ef16f3e 100644 --- a/lightdash_client/api/notifications/update_notification.py +++ b/lightdash_client/api/notifications/update_notification.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty from ...models.pick_notification_viewed import PickNotificationViewed -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -19,7 +19,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "patch", - "url": f"/api/v1/notifications/{notification_id}", + "url": "/api/v1/notifications/{notificationId}".format( + notificationId=notification_id, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/organizations/create_group_in_organization.py b/lightdash_client/api/organizations/create_group_in_organization.py index 40960ae..a8f5515 100644 --- a/lightdash_client/api/organizations/create_group_in_organization.py +++ b/lightdash_client/api/organizations/create_group_in_organization.py @@ -1,13 +1,13 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...models.api_group_response import ApiGroupResponse +from ...models.api_create_group_response import ApiCreateGroupResponse from ...models.create_group import CreateGroup -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -32,9 +32,9 @@ def _get_kwargs( def _parse_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Optional[ApiGroupResponse]: +) -> Optional[ApiCreateGroupResponse]: if response.status_code == HTTPStatus.OK: - response_200 = ApiGroupResponse.from_dict(response.json()) + response_200 = ApiCreateGroupResponse.from_dict(response.json()) return response_200 if client.raise_on_unexpected_status: @@ -45,7 +45,7 @@ def _parse_response( def _build_response( *, client: Union[AuthenticatedClient, Client], response: httpx.Response -) -> Response[ApiGroupResponse]: +) -> Response[ApiCreateGroupResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -58,7 +58,7 @@ def sync_detailed( *, client: Union[AuthenticatedClient, Client], body: CreateGroup, -) -> Response[ApiGroupResponse]: +) -> Response[ApiCreateGroupResponse]: """Creates a new group in the current user's organization Args: @@ -69,7 +69,7 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[ApiGroupResponse] + Response[ApiCreateGroupResponse] """ kwargs = _get_kwargs( @@ -87,7 +87,7 @@ def sync( *, client: Union[AuthenticatedClient, Client], body: CreateGroup, -) -> Optional[ApiGroupResponse]: +) -> Optional[ApiCreateGroupResponse]: """Creates a new group in the current user's organization Args: @@ -98,7 +98,7 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - ApiGroupResponse + ApiCreateGroupResponse """ return sync_detailed( @@ -111,7 +111,7 @@ async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], body: CreateGroup, -) -> Response[ApiGroupResponse]: +) -> Response[ApiCreateGroupResponse]: """Creates a new group in the current user's organization Args: @@ -122,7 +122,7 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[ApiGroupResponse] + Response[ApiCreateGroupResponse] """ kwargs = _get_kwargs( @@ -138,7 +138,7 @@ async def asyncio( *, client: Union[AuthenticatedClient, Client], body: CreateGroup, -) -> Optional[ApiGroupResponse]: +) -> Optional[ApiCreateGroupResponse]: """Creates a new group in the current user's organization Args: @@ -149,7 +149,7 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - ApiGroupResponse + ApiCreateGroupResponse """ return ( diff --git a/lightdash_client/api/organizations/create_organization.py b/lightdash_client/api/organizations/create_organization.py index 93a522a..9edd0cd 100644 --- a/lightdash_client/api/organizations/create_organization.py +++ b/lightdash_client/api/organizations/create_organization.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty from ...models.pick_organization_name import PickOrganizationName -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( diff --git a/lightdash_client/api/organizations/delete_my_organization.py b/lightdash_client/api/organizations/delete_my_organization.py index 481bd65..e5abee3 100644 --- a/lightdash_client/api/organizations/delete_my_organization.py +++ b/lightdash_client/api/organizations/delete_my_organization.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "delete", - "url": f"/api/v1/org/{organization_uuid}", + "url": "/api/v1/org/{organizationUuid}".format( + organizationUuid=organization_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/organizations/delete_organization_member.py b/lightdash_client/api/organizations/delete_organization_member.py index 18beadd..9f09aba 100644 --- a/lightdash_client/api/organizations/delete_organization_member.py +++ b/lightdash_client/api/organizations/delete_organization_member.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "delete", - "url": f"/api/v1/org/user/{user_uuid}", + "url": "/api/v1/org/user/{userUuid}".format( + userUuid=user_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/organizations/get_my_organization.py b/lightdash_client/api/organizations/get_my_organization.py index 39192bc..87d2377 100644 --- a/lightdash_client/api/organizations/get_my_organization.py +++ b/lightdash_client/api/organizations/get_my_organization.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_organization import ApiOrganization -from ...types import Response +from ...types import UNSET, Response def _get_kwargs() -> Dict[str, Any]: diff --git a/lightdash_client/api/organizations/get_organization_member_by_uuid.py b/lightdash_client/api/organizations/get_organization_member_by_uuid.py index c956109..30a618f 100644 --- a/lightdash_client/api/organizations/get_organization_member_by_uuid.py +++ b/lightdash_client/api/organizations/get_organization_member_by_uuid.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_organization_member_profile import ApiOrganizationMemberProfile -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/org/users/{user_uuid}", + "url": "/api/v1/org/users/{userUuid}".format( + userUuid=user_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/organizations/list_groups_in_organization.py b/lightdash_client/api/organizations/list_groups_in_organization.py index 7e19236..1d76be0 100644 --- a/lightdash_client/api/organizations/list_groups_in_organization.py +++ b/lightdash_client/api/organizations/list_groups_in_organization.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -11,12 +11,21 @@ def _get_kwargs( *, + page: Union[Unset, float] = UNSET, + page_size: Union[Unset, float] = UNSET, include_members: Union[Unset, float] = UNSET, + search_query: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: params: Dict[str, Any] = {} + params["page"] = page + + params["pageSize"] = page_size + params["includeMembers"] = include_members + params["searchQuery"] = search_query + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: Dict[str, Any] = { @@ -55,12 +64,18 @@ def _build_response( def sync_detailed( *, client: Union[AuthenticatedClient, Client], + page: Union[Unset, float] = UNSET, + page_size: Union[Unset, float] = UNSET, include_members: Union[Unset, float] = UNSET, + search_query: Union[Unset, str] = UNSET, ) -> Response[ApiGroupListResponse]: """Gets all the groups in the current user's organization Args: + page (Union[Unset, float]): + page_size (Union[Unset, float]): include_members (Union[Unset, float]): + search_query (Union[Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -71,7 +86,10 @@ def sync_detailed( """ kwargs = _get_kwargs( + page=page, + page_size=page_size, include_members=include_members, + search_query=search_query, ) response = client.get_httpx_client().request( @@ -84,12 +102,18 @@ def sync_detailed( def sync( *, client: Union[AuthenticatedClient, Client], + page: Union[Unset, float] = UNSET, + page_size: Union[Unset, float] = UNSET, include_members: Union[Unset, float] = UNSET, + search_query: Union[Unset, str] = UNSET, ) -> Optional[ApiGroupListResponse]: """Gets all the groups in the current user's organization Args: + page (Union[Unset, float]): + page_size (Union[Unset, float]): include_members (Union[Unset, float]): + search_query (Union[Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -101,19 +125,28 @@ def sync( return sync_detailed( client=client, + page=page, + page_size=page_size, include_members=include_members, + search_query=search_query, ).parsed async def asyncio_detailed( *, client: Union[AuthenticatedClient, Client], + page: Union[Unset, float] = UNSET, + page_size: Union[Unset, float] = UNSET, include_members: Union[Unset, float] = UNSET, + search_query: Union[Unset, str] = UNSET, ) -> Response[ApiGroupListResponse]: """Gets all the groups in the current user's organization Args: + page (Union[Unset, float]): + page_size (Union[Unset, float]): include_members (Union[Unset, float]): + search_query (Union[Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -124,7 +157,10 @@ async def asyncio_detailed( """ kwargs = _get_kwargs( + page=page, + page_size=page_size, include_members=include_members, + search_query=search_query, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -135,12 +171,18 @@ async def asyncio_detailed( async def asyncio( *, client: Union[AuthenticatedClient, Client], + page: Union[Unset, float] = UNSET, + page_size: Union[Unset, float] = UNSET, include_members: Union[Unset, float] = UNSET, + search_query: Union[Unset, str] = UNSET, ) -> Optional[ApiGroupListResponse]: """Gets all the groups in the current user's organization Args: + page (Union[Unset, float]): + page_size (Union[Unset, float]): include_members (Union[Unset, float]): + search_query (Union[Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -153,6 +195,9 @@ async def asyncio( return ( await asyncio_detailed( client=client, + page=page, + page_size=page_size, include_members=include_members, + search_query=search_query, ) ).parsed diff --git a/lightdash_client/api/organizations/list_organization_email_domains.py b/lightdash_client/api/organizations/list_organization_email_domains.py index 1d2d001..d4cfdfa 100644 --- a/lightdash_client/api/organizations/list_organization_email_domains.py +++ b/lightdash_client/api/organizations/list_organization_email_domains.py @@ -1,14 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...models.api_organization_allowed_email_domains import ( - ApiOrganizationAllowedEmailDomains, -) -from ...types import Response +from ...models.api_organization_allowed_email_domains import ApiOrganizationAllowedEmailDomains +from ...types import UNSET, Response def _get_kwargs() -> Dict[str, Any]: diff --git a/lightdash_client/api/organizations/list_organization_members.py b/lightdash_client/api/organizations/list_organization_members.py index de5f44b..ce02dbd 100644 --- a/lightdash_client/api/organizations/list_organization_members.py +++ b/lightdash_client/api/organizations/list_organization_members.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -15,6 +15,7 @@ def _get_kwargs( page_size: Union[Unset, float] = UNSET, page: Union[Unset, float] = UNSET, search_query: Union[Unset, str] = UNSET, + project_uuid: Union[Unset, str] = UNSET, ) -> Dict[str, Any]: params: Dict[str, Any] = {} @@ -26,6 +27,8 @@ def _get_kwargs( params["searchQuery"] = search_query + params["projectUuid"] = project_uuid + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} _kwargs: Dict[str, Any] = { @@ -68,6 +71,7 @@ def sync_detailed( page_size: Union[Unset, float] = UNSET, page: Union[Unset, float] = UNSET, search_query: Union[Unset, str] = UNSET, + project_uuid: Union[Unset, str] = UNSET, ) -> Response[ApiOrganizationMemberProfiles]: """Gets all the members of the current user's organization @@ -76,6 +80,7 @@ def sync_detailed( page_size (Union[Unset, float]): page (Union[Unset, float]): search_query (Union[Unset, str]): + project_uuid (Union[Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -90,6 +95,7 @@ def sync_detailed( page_size=page_size, page=page, search_query=search_query, + project_uuid=project_uuid, ) response = client.get_httpx_client().request( @@ -106,6 +112,7 @@ def sync( page_size: Union[Unset, float] = UNSET, page: Union[Unset, float] = UNSET, search_query: Union[Unset, str] = UNSET, + project_uuid: Union[Unset, str] = UNSET, ) -> Optional[ApiOrganizationMemberProfiles]: """Gets all the members of the current user's organization @@ -114,6 +121,7 @@ def sync( page_size (Union[Unset, float]): page (Union[Unset, float]): search_query (Union[Unset, str]): + project_uuid (Union[Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -129,6 +137,7 @@ def sync( page_size=page_size, page=page, search_query=search_query, + project_uuid=project_uuid, ).parsed @@ -139,6 +148,7 @@ async def asyncio_detailed( page_size: Union[Unset, float] = UNSET, page: Union[Unset, float] = UNSET, search_query: Union[Unset, str] = UNSET, + project_uuid: Union[Unset, str] = UNSET, ) -> Response[ApiOrganizationMemberProfiles]: """Gets all the members of the current user's organization @@ -147,6 +157,7 @@ async def asyncio_detailed( page_size (Union[Unset, float]): page (Union[Unset, float]): search_query (Union[Unset, str]): + project_uuid (Union[Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -161,6 +172,7 @@ async def asyncio_detailed( page_size=page_size, page=page, search_query=search_query, + project_uuid=project_uuid, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -175,6 +187,7 @@ async def asyncio( page_size: Union[Unset, float] = UNSET, page: Union[Unset, float] = UNSET, search_query: Union[Unset, str] = UNSET, + project_uuid: Union[Unset, str] = UNSET, ) -> Optional[ApiOrganizationMemberProfiles]: """Gets all the members of the current user's organization @@ -183,6 +196,7 @@ async def asyncio( page_size (Union[Unset, float]): page (Union[Unset, float]): search_query (Union[Unset, str]): + project_uuid (Union[Unset, str]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -199,5 +213,6 @@ async def asyncio( page_size=page_size, page=page, search_query=search_query, + project_uuid=project_uuid, ) ).parsed diff --git a/lightdash_client/api/organizations/list_organization_projects.py b/lightdash_client/api/organizations/list_organization_projects.py index 4bbf2b9..843bf18 100644 --- a/lightdash_client/api/organizations/list_organization_projects.py +++ b/lightdash_client/api/organizations/list_organization_projects.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_organization_projects import ApiOrganizationProjects -from ...types import Response +from ...types import UNSET, Response def _get_kwargs() -> Dict[str, Any]: diff --git a/lightdash_client/api/organizations/update_my_organization.py b/lightdash_client/api/organizations/update_my_organization.py index 0c27e02..5682b49 100644 --- a/lightdash_client/api/organizations/update_my_organization.py +++ b/lightdash_client/api/organizations/update_my_organization.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -9,7 +9,7 @@ from ...models.partial_omit_organization_organization_uuid_or_needs_project import ( PartialOmitOrganizationOrganizationUuidOrNeedsProject, ) -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( diff --git a/lightdash_client/api/organizations/update_organization_email_domains.py b/lightdash_client/api/organizations/update_organization_email_domains.py index 8ef3f5d..d0aa939 100644 --- a/lightdash_client/api/organizations/update_organization_email_domains.py +++ b/lightdash_client/api/organizations/update_organization_email_domains.py @@ -1,17 +1,15 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...models.api_organization_allowed_email_domains import ( - ApiOrganizationAllowedEmailDomains, -) +from ...models.api_organization_allowed_email_domains import ApiOrganizationAllowedEmailDomains from ...models.pick_allowed_email_domains_exclude_keyof_allowed_email_domains_organization_uuid import ( PickAllowedEmailDomainsExcludeKeyofAllowedEmailDomainsOrganizationUuid, ) -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( diff --git a/lightdash_client/api/projects/calculate_total_from_query.py b/lightdash_client/api/projects/calculate_total_from_query.py index 6960640..a09d03d 100644 --- a/lightdash_client/api/projects/calculate_total_from_query.py +++ b/lightdash_client/api/projects/calculate_total_from_query.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_calculate_total_response import ApiCalculateTotalResponse from ...models.calculate_total_from_query import CalculateTotalFromQuery -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -19,7 +19,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/projects/{project_uuid}/calculate-total", + "url": "/api/v1/projects/{projectUuid}/calculate-total".format( + projectUuid=project_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/projects/compile_query.py b/lightdash_client/api/projects/compile_query.py index 9b3047f..3ae4afa 100644 --- a/lightdash_client/api/projects/compile_query.py +++ b/lightdash_client/api/projects/compile_query.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.compile_query_response_200 import CompileQueryResponse200 from ...models.metric_query import MetricQuery -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -20,7 +20,10 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/projects/{project_uuid}/explores/{explore_id}/compileQuery", + "url": "/api/v1/projects/{projectUuid}/explores/{exploreId}/compileQuery".format( + projectUuid=project_uuid, + exploreId=explore_id, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/projects/create_dashboard.py b/lightdash_client/api/projects/create_dashboard.py new file mode 100644 index 0000000..79b1260 --- /dev/null +++ b/lightdash_client/api/projects/create_dashboard.py @@ -0,0 +1,196 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_create_dashboard_response import ApiCreateDashboardResponse +from ...models.create_dashboard import CreateDashboard +from ...models.duplicate_dashboard_params import DuplicateDashboardParams +from ...types import UNSET, Response, Unset + + +def _get_kwargs( + project_uuid: str, + *, + body: Union["CreateDashboard", "DuplicateDashboardParams"], + duplicate_from: Union[Unset, str] = UNSET, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + params: Dict[str, Any] = {} + + params["duplicateFrom"] = duplicate_from + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/api/v1/projects/{projectUuid}/dashboards".format( + projectUuid=project_uuid, + ), + "params": params, + } + + _body: Dict[str, Any] + if isinstance(body, DuplicateDashboardParams): + _body = body.to_dict() + else: + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[ApiCreateDashboardResponse]: + if response.status_code == HTTPStatus.CREATED: + response_201 = ApiCreateDashboardResponse.from_dict(response.json()) + + return response_201 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[ApiCreateDashboardResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: Union["CreateDashboard", "DuplicateDashboardParams"], + duplicate_from: Union[Unset, str] = UNSET, +) -> Response[ApiCreateDashboardResponse]: + """ + Args: + project_uuid (str): + duplicate_from (Union[Unset, str]): + body (Union['CreateDashboard', 'DuplicateDashboardParams']): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiCreateDashboardResponse] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + body=body, + duplicate_from=duplicate_from, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: Union["CreateDashboard", "DuplicateDashboardParams"], + duplicate_from: Union[Unset, str] = UNSET, +) -> Optional[ApiCreateDashboardResponse]: + """ + Args: + project_uuid (str): + duplicate_from (Union[Unset, str]): + body (Union['CreateDashboard', 'DuplicateDashboardParams']): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiCreateDashboardResponse + """ + + return sync_detailed( + project_uuid=project_uuid, + client=client, + body=body, + duplicate_from=duplicate_from, + ).parsed + + +async def asyncio_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: Union["CreateDashboard", "DuplicateDashboardParams"], + duplicate_from: Union[Unset, str] = UNSET, +) -> Response[ApiCreateDashboardResponse]: + """ + Args: + project_uuid (str): + duplicate_from (Union[Unset, str]): + body (Union['CreateDashboard', 'DuplicateDashboardParams']): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiCreateDashboardResponse] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + body=body, + duplicate_from=duplicate_from, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: Union["CreateDashboard", "DuplicateDashboardParams"], + duplicate_from: Union[Unset, str] = UNSET, +) -> Optional[ApiCreateDashboardResponse]: + """ + Args: + project_uuid (str): + duplicate_from (Union[Unset, str]): + body (Union['CreateDashboard', 'DuplicateDashboardParams']): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiCreateDashboardResponse + """ + + return ( + await asyncio_detailed( + project_uuid=project_uuid, + client=client, + body=body, + duplicate_from=duplicate_from, + ) + ).parsed diff --git a/lightdash_client/api/projects/create_preview.py b/lightdash_client/api/projects/create_preview.py new file mode 100644 index 0000000..bb1942e --- /dev/null +++ b/lightdash_client/api/projects/create_preview.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.create_preview_body import CreatePreviewBody +from ...models.create_preview_response_200 import CreatePreviewResponse200 +from ...types import UNSET, Response + + +def _get_kwargs( + project_uuid: str, + *, + body: CreatePreviewBody, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/api/v1/projects/{projectUuid}/createPreview".format( + projectUuid=project_uuid, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[CreatePreviewResponse200]: + if response.status_code == HTTPStatus.OK: + response_200 = CreatePreviewResponse200.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[CreatePreviewResponse200]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: CreatePreviewBody, +) -> Response[CreatePreviewResponse200]: + """ + Args: + project_uuid (str): + body (CreatePreviewBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CreatePreviewResponse200] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: CreatePreviewBody, +) -> Optional[CreatePreviewResponse200]: + """ + Args: + project_uuid (str): + body (CreatePreviewBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CreatePreviewResponse200 + """ + + return sync_detailed( + project_uuid=project_uuid, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: CreatePreviewBody, +) -> Response[CreatePreviewResponse200]: + """ + Args: + project_uuid (str): + body (CreatePreviewBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[CreatePreviewResponse200] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: CreatePreviewBody, +) -> Optional[CreatePreviewResponse200]: + """ + Args: + project_uuid (str): + body (CreatePreviewBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + CreatePreviewResponse200 + """ + + return ( + await asyncio_detailed( + project_uuid=project_uuid, + client=client, + body=body, + ) + ).parsed diff --git a/lightdash_client/api/projects/create_tag.py b/lightdash_client/api/projects/create_tag.py new file mode 100644 index 0000000..3eb9809 --- /dev/null +++ b/lightdash_client/api/projects/create_tag.py @@ -0,0 +1,171 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_create_tag_response import ApiCreateTagResponse +from ...models.pick_tag_name_or_color import PickTagNameOrColor +from ...types import UNSET, Response + + +def _get_kwargs( + project_uuid: str, + *, + body: PickTagNameOrColor, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/api/v1/projects/{projectUuid}/tags".format( + projectUuid=project_uuid, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[ApiCreateTagResponse]: + if response.status_code == HTTPStatus.CREATED: + response_201 = ApiCreateTagResponse.from_dict(response.json()) + + return response_201 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[ApiCreateTagResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: PickTagNameOrColor, +) -> Response[ApiCreateTagResponse]: + """ + Args: + project_uuid (str): + body (PickTagNameOrColor): From T, pick a set of properties whose keys are in the union K + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiCreateTagResponse] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: PickTagNameOrColor, +) -> Optional[ApiCreateTagResponse]: + """ + Args: + project_uuid (str): + body (PickTagNameOrColor): From T, pick a set of properties whose keys are in the union K + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiCreateTagResponse + """ + + return sync_detailed( + project_uuid=project_uuid, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: PickTagNameOrColor, +) -> Response[ApiCreateTagResponse]: + """ + Args: + project_uuid (str): + body (PickTagNameOrColor): From T, pick a set of properties whose keys are in the union K + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiCreateTagResponse] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: PickTagNameOrColor, +) -> Optional[ApiCreateTagResponse]: + """ + Args: + project_uuid (str): + body (PickTagNameOrColor): From T, pick a set of properties whose keys are in the union K + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiCreateTagResponse + """ + + return ( + await asyncio_detailed( + project_uuid=project_uuid, + client=client, + body=body, + ) + ).parsed diff --git a/lightdash_client/api/projects/delete_project_semantic_layer_connection.py b/lightdash_client/api/projects/delete_project_semantic_layer_connection.py new file mode 100644 index 0000000..9e62729 --- /dev/null +++ b/lightdash_client/api/projects/delete_project_semantic_layer_connection.py @@ -0,0 +1,148 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_success_empty import ApiSuccessEmpty +from ...types import UNSET, Response + + +def _get_kwargs( + project_uuid: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "delete", + "url": "/api/v1/projects/{projectUuid}/semantic-layer-connection".format( + projectUuid=project_uuid, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[ApiSuccessEmpty]: + if response.status_code == HTTPStatus.OK: + response_200 = ApiSuccessEmpty.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[ApiSuccessEmpty]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[ApiSuccessEmpty]: + """ + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiSuccessEmpty] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Optional[ApiSuccessEmpty]: + """ + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiSuccessEmpty + """ + + return sync_detailed( + project_uuid=project_uuid, + client=client, + ).parsed + + +async def asyncio_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[ApiSuccessEmpty]: + """ + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiSuccessEmpty] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Optional[ApiSuccessEmpty]: + """ + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiSuccessEmpty + """ + + return ( + await asyncio_detailed( + project_uuid=project_uuid, + client=client, + ) + ).parsed diff --git a/lightdash_client/api/projects/delete_validation_dismiss.py b/lightdash_client/api/projects/delete_validation_dismiss.py index 8790c3a..67dc09f 100644 --- a/lightdash_client/api/projects/delete_validation_dismiss.py +++ b/lightdash_client/api/projects/delete_validation_dismiss.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_validation_dismiss_response import ApiValidationDismissResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -15,7 +15,10 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "delete", - "url": f"/api/v1/projects/{project_uuid}/validate/{validation_id}", + "url": "/api/v1/projects/{projectUuid}/validate/{validationId}".format( + projectUuid=project_uuid, + validationId=validation_id, + ), } return _kwargs diff --git a/lightdash_client/api/projects/download_csv_from_explore.py b/lightdash_client/api/projects/download_csv_from_explore.py index 05cfbe9..1a97148 100644 --- a/lightdash_client/api/projects/download_csv_from_explore.py +++ b/lightdash_client/api/projects/download_csv_from_explore.py @@ -1,15 +1,13 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.download_csv_from_explore_body import DownloadCsvFromExploreBody -from ...models.download_csv_from_explore_response_200 import ( - DownloadCsvFromExploreResponse200, -) -from ...types import Response +from ...models.download_csv_from_explore_response_200 import DownloadCsvFromExploreResponse200 +from ...types import UNSET, Response def _get_kwargs( @@ -22,7 +20,10 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/projects/{project_uuid}/explores/{explore_id}/downloadCsv", + "url": "/api/v1/projects/{projectUuid}/explores/{exploreId}/downloadCsv".format( + projectUuid=project_uuid, + exploreId=explore_id, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/projects/get_charts_as_code.py b/lightdash_client/api/projects/get_charts_as_code.py new file mode 100644 index 0000000..9f01e8b --- /dev/null +++ b/lightdash_client/api/projects/get_charts_as_code.py @@ -0,0 +1,152 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_chart_as_code_list_response import ApiChartAsCodeListResponse +from ...types import UNSET, Response + + +def _get_kwargs( + project_uuid: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "get", + "url": "/api/v1/projects/{projectUuid}/charts/code".format( + projectUuid=project_uuid, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[ApiChartAsCodeListResponse]: + if response.status_code == HTTPStatus.OK: + response_200 = ApiChartAsCodeListResponse.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[ApiChartAsCodeListResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[ApiChartAsCodeListResponse]: + """Charts as code + + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiChartAsCodeListResponse] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Optional[ApiChartAsCodeListResponse]: + """Charts as code + + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiChartAsCodeListResponse + """ + + return sync_detailed( + project_uuid=project_uuid, + client=client, + ).parsed + + +async def asyncio_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[ApiChartAsCodeListResponse]: + """Charts as code + + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiChartAsCodeListResponse] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Optional[ApiChartAsCodeListResponse]: + """Charts as code + + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiChartAsCodeListResponse + """ + + return ( + await asyncio_detailed( + project_uuid=project_uuid, + client=client, + ) + ).parsed diff --git a/lightdash_client/api/projects/get_custom_metrics.py b/lightdash_client/api/projects/get_custom_metrics.py index 3dd8483..89cb5fc 100644 --- a/lightdash_client/api/projects/get_custom_metrics.py +++ b/lightdash_client/api/projects/get_custom_metrics.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.get_custom_metrics_response_200 import GetCustomMetricsResponse200 -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/projects/{project_uuid}/custom-metrics", + "url": "/api/v1/projects/{projectUuid}/custom-metrics".format( + projectUuid=project_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/projects/get_dashboards.py b/lightdash_client/api/projects/get_dashboards.py new file mode 100644 index 0000000..885314b --- /dev/null +++ b/lightdash_client/api/projects/get_dashboards.py @@ -0,0 +1,148 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_get_dashboards_response import ApiGetDashboardsResponse +from ...types import UNSET, Response + + +def _get_kwargs( + project_uuid: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "get", + "url": "/api/v1/projects/{projectUuid}/dashboards".format( + projectUuid=project_uuid, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[ApiGetDashboardsResponse]: + if response.status_code == HTTPStatus.OK: + response_200 = ApiGetDashboardsResponse.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[ApiGetDashboardsResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[ApiGetDashboardsResponse]: + """ + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiGetDashboardsResponse] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Optional[ApiGetDashboardsResponse]: + """ + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiGetDashboardsResponse + """ + + return sync_detailed( + project_uuid=project_uuid, + client=client, + ).parsed + + +async def asyncio_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[ApiGetDashboardsResponse]: + """ + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiGetDashboardsResponse] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Optional[ApiGetDashboardsResponse]: + """ + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiGetDashboardsResponse + """ + + return ( + await asyncio_detailed( + project_uuid=project_uuid, + client=client, + ) + ).parsed diff --git a/lightdash_client/api/projects/get_dashboards_as_code.py b/lightdash_client/api/projects/get_dashboards_as_code.py new file mode 100644 index 0000000..d7c082b --- /dev/null +++ b/lightdash_client/api/projects/get_dashboards_as_code.py @@ -0,0 +1,148 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_dashboard_as_code_list_response import ApiDashboardAsCodeListResponse +from ...types import UNSET, Response + + +def _get_kwargs( + project_uuid: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "get", + "url": "/api/v1/projects/{projectUuid}/dashboards/code".format( + projectUuid=project_uuid, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[ApiDashboardAsCodeListResponse]: + if response.status_code == HTTPStatus.OK: + response_200 = ApiDashboardAsCodeListResponse.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[ApiDashboardAsCodeListResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[ApiDashboardAsCodeListResponse]: + """ + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiDashboardAsCodeListResponse] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Optional[ApiDashboardAsCodeListResponse]: + """ + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiDashboardAsCodeListResponse + """ + + return sync_detailed( + project_uuid=project_uuid, + client=client, + ).parsed + + +async def asyncio_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[ApiDashboardAsCodeListResponse]: + """ + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiDashboardAsCodeListResponse] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Optional[ApiDashboardAsCodeListResponse]: + """ + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiDashboardAsCodeListResponse + """ + + return ( + await asyncio_detailed( + project_uuid=project_uuid, + client=client, + ) + ).parsed diff --git a/lightdash_client/api/projects/get_explore.py b/lightdash_client/api/projects/get_explore.py index d5830e5..b088526 100644 --- a/lightdash_client/api/projects/get_explore.py +++ b/lightdash_client/api/projects/get_explore.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.get_explore_response_200 import GetExploreResponse200 -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -15,7 +15,10 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/projects/{project_uuid}/explores/{explore_id}", + "url": "/api/v1/projects/{projectUuid}/explores/{exploreId}".format( + projectUuid=project_uuid, + exploreId=explore_id, + ), } return _kwargs diff --git a/lightdash_client/api/projects/get_explores.py b/lightdash_client/api/projects/get_explores.py index 3d76be1..9c47b4a 100644 --- a/lightdash_client/api/projects/get_explores.py +++ b/lightdash_client/api/projects/get_explores.py @@ -1,11 +1,11 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -13,7 +13,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/projects/{project_uuid}/explores", + "url": "/api/v1/projects/{projectUuid}/explores".format( + projectUuid=project_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/projects/get_latest_validation_results.py b/lightdash_client/api/projects/get_latest_validation_results.py index dc91f22..a880558 100644 --- a/lightdash_client/api/projects/get_latest_validation_results.py +++ b/lightdash_client/api/projects/get_latest_validation_results.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -25,7 +25,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/projects/{project_uuid}/validate", + "url": "/api/v1/projects/{projectUuid}/validate".format( + projectUuid=project_uuid, + ), "params": params, } diff --git a/lightdash_client/api/projects/get_project.py b/lightdash_client/api/projects/get_project.py index edb8d89..ed54c17 100644 --- a/lightdash_client/api/projects/get_project.py +++ b/lightdash_client/api/projects/get_project.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_project_response import ApiProjectResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/projects/{project_uuid}", + "url": "/api/v1/projects/{projectUuid}".format( + projectUuid=project_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/projects/get_project_group_accesses.py b/lightdash_client/api/projects/get_project_group_accesses.py index d8ce65e..8bd8643 100644 --- a/lightdash_client/api/projects/get_project_group_accesses.py +++ b/lightdash_client/api/projects/get_project_group_accesses.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_get_project_group_accesses import ApiGetProjectGroupAccesses -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/projects/{project_uuid}/groupAccesses", + "url": "/api/v1/projects/{projectUuid}/groupAccesses".format( + projectUuid=project_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/projects/get_tags.py b/lightdash_client/api/projects/get_tags.py new file mode 100644 index 0000000..eba05b3 --- /dev/null +++ b/lightdash_client/api/projects/get_tags.py @@ -0,0 +1,148 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_get_tags_response import ApiGetTagsResponse +from ...types import UNSET, Response + + +def _get_kwargs( + project_uuid: str, +) -> Dict[str, Any]: + _kwargs: Dict[str, Any] = { + "method": "get", + "url": "/api/v1/projects/{projectUuid}/tags".format( + projectUuid=project_uuid, + ), + } + + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[ApiGetTagsResponse]: + if response.status_code == HTTPStatus.OK: + response_200 = ApiGetTagsResponse.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[ApiGetTagsResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[ApiGetTagsResponse]: + """ + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiGetTagsResponse] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Optional[ApiGetTagsResponse]: + """ + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiGetTagsResponse + """ + + return sync_detailed( + project_uuid=project_uuid, + client=client, + ).parsed + + +async def asyncio_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Response[ApiGetTagsResponse]: + """ + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiGetTagsResponse] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], +) -> Optional[ApiGetTagsResponse]: + """ + Args: + project_uuid (str): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiGetTagsResponse + """ + + return ( + await asyncio_detailed( + project_uuid=project_uuid, + client=client, + ) + ).parsed diff --git a/lightdash_client/api/projects/get_user_warehouse_credentials_preference.py b/lightdash_client/api/projects/get_user_warehouse_credentials_preference.py index e89a436..c244dae 100644 --- a/lightdash_client/api/projects/get_user_warehouse_credentials_preference.py +++ b/lightdash_client/api/projects/get_user_warehouse_credentials_preference.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -8,7 +8,7 @@ from ...models.get_user_warehouse_credentials_preference_response_200 import ( GetUserWarehouseCredentialsPreferenceResponse200, ) -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -16,7 +16,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/projects/{project_uuid}/user-credentials", + "url": "/api/v1/projects/{projectUuid}/user-credentials".format( + projectUuid=project_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/projects/list_chart_summaries_in_project.py b/lightdash_client/api/projects/list_chart_summaries_in_project.py index 3295a53..36de5a9 100644 --- a/lightdash_client/api/projects/list_chart_summaries_in_project.py +++ b/lightdash_client/api/projects/list_chart_summaries_in_project.py @@ -1,20 +1,31 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_chart_summary_list_response import ApiChartSummaryListResponse -from ...types import Response +from ...types import UNSET, Response, Unset def _get_kwargs( project_uuid: str, + *, + exclude_charts_saved_in_dashboard: Union[Unset, bool] = UNSET, ) -> Dict[str, Any]: + params: Dict[str, Any] = {} + + params["excludeChartsSavedInDashboard"] = exclude_charts_saved_in_dashboard + + params = {k: v for k, v in params.items() if v is not UNSET and v is not None} + _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/projects/{project_uuid}/chart-summaries", + "url": "/api/v1/projects/{projectUuid}/chart-summaries".format( + projectUuid=project_uuid, + ), + "params": params, } return _kwargs @@ -48,11 +59,13 @@ def sync_detailed( project_uuid: str, *, client: Union[AuthenticatedClient, Client], + exclude_charts_saved_in_dashboard: Union[Unset, bool] = UNSET, ) -> Response[ApiChartSummaryListResponse]: """List all charts summaries in a project Args: project_uuid (str): + exclude_charts_saved_in_dashboard (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -64,6 +77,7 @@ def sync_detailed( kwargs = _get_kwargs( project_uuid=project_uuid, + exclude_charts_saved_in_dashboard=exclude_charts_saved_in_dashboard, ) response = client.get_httpx_client().request( @@ -77,11 +91,13 @@ def sync( project_uuid: str, *, client: Union[AuthenticatedClient, Client], + exclude_charts_saved_in_dashboard: Union[Unset, bool] = UNSET, ) -> Optional[ApiChartSummaryListResponse]: """List all charts summaries in a project Args: project_uuid (str): + exclude_charts_saved_in_dashboard (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -94,6 +110,7 @@ def sync( return sync_detailed( project_uuid=project_uuid, client=client, + exclude_charts_saved_in_dashboard=exclude_charts_saved_in_dashboard, ).parsed @@ -101,11 +118,13 @@ async def asyncio_detailed( project_uuid: str, *, client: Union[AuthenticatedClient, Client], + exclude_charts_saved_in_dashboard: Union[Unset, bool] = UNSET, ) -> Response[ApiChartSummaryListResponse]: """List all charts summaries in a project Args: project_uuid (str): + exclude_charts_saved_in_dashboard (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -117,6 +136,7 @@ async def asyncio_detailed( kwargs = _get_kwargs( project_uuid=project_uuid, + exclude_charts_saved_in_dashboard=exclude_charts_saved_in_dashboard, ) response = await client.get_async_httpx_client().request(**kwargs) @@ -128,11 +148,13 @@ async def asyncio( project_uuid: str, *, client: Union[AuthenticatedClient, Client], + exclude_charts_saved_in_dashboard: Union[Unset, bool] = UNSET, ) -> Optional[ApiChartSummaryListResponse]: """List all charts summaries in a project Args: project_uuid (str): + exclude_charts_saved_in_dashboard (Union[Unset, bool]): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -146,5 +168,6 @@ async def asyncio( await asyncio_detailed( project_uuid=project_uuid, client=client, + exclude_charts_saved_in_dashboard=exclude_charts_saved_in_dashboard, ) ).parsed diff --git a/lightdash_client/api/projects/list_charts_in_project.py b/lightdash_client/api/projects/list_charts_in_project.py index c7aae30..191f648 100644 --- a/lightdash_client/api/projects/list_charts_in_project.py +++ b/lightdash_client/api/projects/list_charts_in_project.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_chart_list_response import ApiChartListResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/projects/{project_uuid}/charts", + "url": "/api/v1/projects/{projectUuid}/charts".format( + projectUuid=project_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/projects/list_spaces_in_project.py b/lightdash_client/api/projects/list_spaces_in_project.py index 8b13d92..cb462b2 100644 --- a/lightdash_client/api/projects/list_spaces_in_project.py +++ b/lightdash_client/api/projects/list_spaces_in_project.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_space_summary_list_response import ApiSpaceSummaryListResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/projects/{project_uuid}/spaces", + "url": "/api/v1/projects/{projectUuid}/spaces".format( + projectUuid=project_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/projects/set_explores.py b/lightdash_client/api/projects/set_explores.py index b8b5a1b..4c69e65 100644 --- a/lightdash_client/api/projects/set_explores.py +++ b/lightdash_client/api/projects/set_explores.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -18,7 +18,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "put", - "url": f"/api/v1/projects/{project_uuid}/explores", + "url": "/api/v1/projects/{projectUuid}/explores".format( + projectUuid=project_uuid, + ), } _body = body diff --git a/lightdash_client/api/projects/update_dashboards.py b/lightdash_client/api/projects/update_dashboards.py new file mode 100644 index 0000000..a815b2c --- /dev/null +++ b/lightdash_client/api/projects/update_dashboards.py @@ -0,0 +1,176 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_update_dashboards_response import ApiUpdateDashboardsResponse +from ...models.pick_dashboard_uuid_or_name_or_description_or_space_uuid import ( + PickDashboardUuidOrNameOrDescriptionOrSpaceUuid, +) +from ...types import UNSET, Response + + +def _get_kwargs( + project_uuid: str, + *, + body: List["PickDashboardUuidOrNameOrDescriptionOrSpaceUuid"], +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "patch", + "url": "/api/v1/projects/{projectUuid}/dashboards".format( + projectUuid=project_uuid, + ), + } + + _body = [] + for body_item_data in body: + body_item = body_item_data.to_dict() + _body.append(body_item) + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[ApiUpdateDashboardsResponse]: + if response.status_code == HTTPStatus.OK: + response_200 = ApiUpdateDashboardsResponse.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[ApiUpdateDashboardsResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: List["PickDashboardUuidOrNameOrDescriptionOrSpaceUuid"], +) -> Response[ApiUpdateDashboardsResponse]: + """ + Args: + project_uuid (str): + body (List['PickDashboardUuidOrNameOrDescriptionOrSpaceUuid']): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiUpdateDashboardsResponse] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: List["PickDashboardUuidOrNameOrDescriptionOrSpaceUuid"], +) -> Optional[ApiUpdateDashboardsResponse]: + """ + Args: + project_uuid (str): + body (List['PickDashboardUuidOrNameOrDescriptionOrSpaceUuid']): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiUpdateDashboardsResponse + """ + + return sync_detailed( + project_uuid=project_uuid, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: List["PickDashboardUuidOrNameOrDescriptionOrSpaceUuid"], +) -> Response[ApiUpdateDashboardsResponse]: + """ + Args: + project_uuid (str): + body (List['PickDashboardUuidOrNameOrDescriptionOrSpaceUuid']): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiUpdateDashboardsResponse] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_uuid: str, + *, + client: Union[AuthenticatedClient, Client], + body: List["PickDashboardUuidOrNameOrDescriptionOrSpaceUuid"], +) -> Optional[ApiUpdateDashboardsResponse]: + """ + Args: + project_uuid (str): + body (List['PickDashboardUuidOrNameOrDescriptionOrSpaceUuid']): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiUpdateDashboardsResponse + """ + + return ( + await asyncio_detailed( + project_uuid=project_uuid, + client=client, + body=body, + ) + ).parsed diff --git a/lightdash_client/api/projects/update_project_metadata.py b/lightdash_client/api/projects/update_project_metadata.py index 4edbd14..61c4e1a 100644 --- a/lightdash_client/api/projects/update_project_metadata.py +++ b/lightdash_client/api/projects/update_project_metadata.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty from ...models.update_metadata import UpdateMetadata -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -19,7 +19,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "patch", - "url": f"/api/v1/projects/{project_uuid}/metadata", + "url": "/api/v1/projects/{projectUuid}/metadata".format( + projectUuid=project_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/projects/update_project_semantic_layer_connection.py b/lightdash_client/api/projects/update_scheduler_settings.py similarity index 76% rename from lightdash_client/api/projects/update_project_semantic_layer_connection.py rename to lightdash_client/api/projects/update_scheduler_settings.py index 245350b..20d3956 100644 --- a/lightdash_client/api/projects/update_project_semantic_layer_connection.py +++ b/lightdash_client/api/projects/update_scheduler_settings.py @@ -1,33 +1,30 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty -from ...models.cube_semantic_layer_connection import CubeSemanticLayerConnection -from ...models.dbt_semantic_layer_connection import DbtSemanticLayerConnection -from ...types import Response +from ...models.update_scheduler_settings import UpdateSchedulerSettings +from ...types import UNSET, Response def _get_kwargs( project_uuid: str, *, - body: Union["CubeSemanticLayerConnection", "DbtSemanticLayerConnection"], + body: UpdateSchedulerSettings, ) -> Dict[str, Any]: headers: Dict[str, Any] = {} _kwargs: Dict[str, Any] = { "method": "patch", - "url": f"/api/v1/projects/{project_uuid}/semantic-layer-connection", + "url": "/api/v1/projects/{projectUuid}/schedulerSettings".format( + projectUuid=project_uuid, + ), } - _body: Dict[str, Any] - if isinstance(body, DbtSemanticLayerConnection): - _body = body.to_dict() - else: - _body = body.to_dict() + _body = body.to_dict() _kwargs["json"] = _body headers["Content-Type"] = "application/json" @@ -64,12 +61,12 @@ def sync_detailed( project_uuid: str, *, client: Union[AuthenticatedClient, Client], - body: Union["CubeSemanticLayerConnection", "DbtSemanticLayerConnection"], + body: UpdateSchedulerSettings, ) -> Response[ApiSuccessEmpty]: """ Args: project_uuid (str): - body (Union['CubeSemanticLayerConnection', 'DbtSemanticLayerConnection']): + body (UpdateSchedulerSettings): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -95,12 +92,12 @@ def sync( project_uuid: str, *, client: Union[AuthenticatedClient, Client], - body: Union["CubeSemanticLayerConnection", "DbtSemanticLayerConnection"], + body: UpdateSchedulerSettings, ) -> Optional[ApiSuccessEmpty]: """ Args: project_uuid (str): - body (Union['CubeSemanticLayerConnection', 'DbtSemanticLayerConnection']): + body (UpdateSchedulerSettings): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -121,12 +118,12 @@ async def asyncio_detailed( project_uuid: str, *, client: Union[AuthenticatedClient, Client], - body: Union["CubeSemanticLayerConnection", "DbtSemanticLayerConnection"], + body: UpdateSchedulerSettings, ) -> Response[ApiSuccessEmpty]: """ Args: project_uuid (str): - body (Union['CubeSemanticLayerConnection', 'DbtSemanticLayerConnection']): + body (UpdateSchedulerSettings): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -150,12 +147,12 @@ async def asyncio( project_uuid: str, *, client: Union[AuthenticatedClient, Client], - body: Union["CubeSemanticLayerConnection", "DbtSemanticLayerConnection"], + body: UpdateSchedulerSettings, ) -> Optional[ApiSuccessEmpty]: """ Args: project_uuid (str): - body (Union['CubeSemanticLayerConnection', 'DbtSemanticLayerConnection']): + body (UpdateSchedulerSettings): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. diff --git a/lightdash_client/api/projects/update_user_warehouse_credentials_preference.py b/lightdash_client/api/projects/update_user_warehouse_credentials_preference.py index 32c4ce1..56abe25 100644 --- a/lightdash_client/api/projects/update_user_warehouse_credentials_preference.py +++ b/lightdash_client/api/projects/update_user_warehouse_credentials_preference.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -15,7 +15,10 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "patch", - "url": f"/api/v1/projects/{project_uuid}/user-credentials/{user_warehouse_credentials_uuid}", + "url": "/api/v1/projects/{projectUuid}/user-credentials/{userWarehouseCredentialsUuid}".format( + projectUuid=project_uuid, + userWarehouseCredentialsUuid=user_warehouse_credentials_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/projects/upsert_chart_as_code.py b/lightdash_client/api/projects/upsert_chart_as_code.py new file mode 100644 index 0000000..a194241 --- /dev/null +++ b/lightdash_client/api/projects/upsert_chart_as_code.py @@ -0,0 +1,185 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_chart_as_code_upsert_response import ApiChartAsCodeUpsertResponse +from ...models.upsert_chart_as_code_body import UpsertChartAsCodeBody +from ...types import UNSET, Response + + +def _get_kwargs( + project_uuid: str, + slug: str, + *, + body: UpsertChartAsCodeBody, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/api/v1/projects/{projectUuid}/charts/{slug}/code".format( + projectUuid=project_uuid, + slug=slug, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[ApiChartAsCodeUpsertResponse]: + if response.status_code == HTTPStatus.OK: + response_200 = ApiChartAsCodeUpsertResponse.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[ApiChartAsCodeUpsertResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_uuid: str, + slug: str, + *, + client: Union[AuthenticatedClient, Client], + body: UpsertChartAsCodeBody, +) -> Response[ApiChartAsCodeUpsertResponse]: + """ + Args: + project_uuid (str): + slug (str): + body (UpsertChartAsCodeBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiChartAsCodeUpsertResponse] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + slug=slug, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_uuid: str, + slug: str, + *, + client: Union[AuthenticatedClient, Client], + body: UpsertChartAsCodeBody, +) -> Optional[ApiChartAsCodeUpsertResponse]: + """ + Args: + project_uuid (str): + slug (str): + body (UpsertChartAsCodeBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiChartAsCodeUpsertResponse + """ + + return sync_detailed( + project_uuid=project_uuid, + slug=slug, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_uuid: str, + slug: str, + *, + client: Union[AuthenticatedClient, Client], + body: UpsertChartAsCodeBody, +) -> Response[ApiChartAsCodeUpsertResponse]: + """ + Args: + project_uuid (str): + slug (str): + body (UpsertChartAsCodeBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiChartAsCodeUpsertResponse] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + slug=slug, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_uuid: str, + slug: str, + *, + client: Union[AuthenticatedClient, Client], + body: UpsertChartAsCodeBody, +) -> Optional[ApiChartAsCodeUpsertResponse]: + """ + Args: + project_uuid (str): + slug (str): + body (UpsertChartAsCodeBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiChartAsCodeUpsertResponse + """ + + return ( + await asyncio_detailed( + project_uuid=project_uuid, + slug=slug, + client=client, + body=body, + ) + ).parsed diff --git a/lightdash_client/api/projects/upsert_dashboard_as_code.py b/lightdash_client/api/projects/upsert_dashboard_as_code.py new file mode 100644 index 0000000..2aeb2e8 --- /dev/null +++ b/lightdash_client/api/projects/upsert_dashboard_as_code.py @@ -0,0 +1,185 @@ +from http import HTTPStatus +from typing import Any, Dict, List, Optional, Union, cast + +import httpx + +from ... import errors +from ...client import AuthenticatedClient, Client +from ...models.api_dashboard_as_code_upsert_response import ApiDashboardAsCodeUpsertResponse +from ...models.upsert_dashboard_as_code_body import UpsertDashboardAsCodeBody +from ...types import UNSET, Response + + +def _get_kwargs( + project_uuid: str, + slug: str, + *, + body: UpsertDashboardAsCodeBody, +) -> Dict[str, Any]: + headers: Dict[str, Any] = {} + + _kwargs: Dict[str, Any] = { + "method": "post", + "url": "/api/v1/projects/{projectUuid}/dashboards/{slug}/code".format( + projectUuid=project_uuid, + slug=slug, + ), + } + + _body = body.to_dict() + + _kwargs["json"] = _body + headers["Content-Type"] = "application/json" + + _kwargs["headers"] = headers + return _kwargs + + +def _parse_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Optional[ApiDashboardAsCodeUpsertResponse]: + if response.status_code == HTTPStatus.OK: + response_200 = ApiDashboardAsCodeUpsertResponse.from_dict(response.json()) + + return response_200 + if client.raise_on_unexpected_status: + raise errors.UnexpectedStatus(response.status_code, response.content) + else: + return None + + +def _build_response( + *, client: Union[AuthenticatedClient, Client], response: httpx.Response +) -> Response[ApiDashboardAsCodeUpsertResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + project_uuid: str, + slug: str, + *, + client: Union[AuthenticatedClient, Client], + body: UpsertDashboardAsCodeBody, +) -> Response[ApiDashboardAsCodeUpsertResponse]: + """ + Args: + project_uuid (str): + slug (str): + body (UpsertDashboardAsCodeBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiDashboardAsCodeUpsertResponse] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + slug=slug, + body=body, + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +def sync( + project_uuid: str, + slug: str, + *, + client: Union[AuthenticatedClient, Client], + body: UpsertDashboardAsCodeBody, +) -> Optional[ApiDashboardAsCodeUpsertResponse]: + """ + Args: + project_uuid (str): + slug (str): + body (UpsertDashboardAsCodeBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiDashboardAsCodeUpsertResponse + """ + + return sync_detailed( + project_uuid=project_uuid, + slug=slug, + client=client, + body=body, + ).parsed + + +async def asyncio_detailed( + project_uuid: str, + slug: str, + *, + client: Union[AuthenticatedClient, Client], + body: UpsertDashboardAsCodeBody, +) -> Response[ApiDashboardAsCodeUpsertResponse]: + """ + Args: + project_uuid (str): + slug (str): + body (UpsertDashboardAsCodeBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[ApiDashboardAsCodeUpsertResponse] + """ + + kwargs = _get_kwargs( + project_uuid=project_uuid, + slug=slug, + body=body, + ) + + response = await client.get_async_httpx_client().request(**kwargs) + + return _build_response(client=client, response=response) + + +async def asyncio( + project_uuid: str, + slug: str, + *, + client: Union[AuthenticatedClient, Client], + body: UpsertDashboardAsCodeBody, +) -> Optional[ApiDashboardAsCodeUpsertResponse]: + """ + Args: + project_uuid (str): + slug (str): + body (UpsertDashboardAsCodeBody): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + ApiDashboardAsCodeUpsertResponse + """ + + return ( + await asyncio_detailed( + project_uuid=project_uuid, + slug=slug, + client=client, + body=body, + ) + ).parsed diff --git a/lightdash_client/api/projects/validate_project.py b/lightdash_client/api/projects/validate_project.py index 763320c..1ae1b54 100644 --- a/lightdash_client/api/projects/validate_project.py +++ b/lightdash_client/api/projects/validate_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_job_scheduled_response import ApiJobScheduledResponse from ...models.validate_project_body import ValidateProjectBody -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -19,7 +19,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/projects/{project_uuid}/validate", + "url": "/api/v1/projects/{projectUuid}/validate".format( + projectUuid=project_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/roles_permissions/add_space_group_access.py b/lightdash_client/api/roles_permissions/add_space_group_access.py index b2469d9..9e6a8f5 100644 --- a/lightdash_client/api/roles_permissions/add_space_group_access.py +++ b/lightdash_client/api/roles_permissions/add_space_group_access.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.add_space_group_access import AddSpaceGroupAccess from ...models.api_success_empty import ApiSuccessEmpty -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -20,7 +20,10 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/projects/{project_uuid}/spaces/{space_uuid}/group/share", + "url": "/api/v1/projects/{projectUuid}/spaces/{spaceUuid}/group/share".format( + projectUuid=project_uuid, + spaceUuid=space_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/roles_permissions/add_space_user_access.py b/lightdash_client/api/roles_permissions/add_space_user_access.py index 856c76f..c0637ba 100644 --- a/lightdash_client/api/roles_permissions/add_space_user_access.py +++ b/lightdash_client/api/roles_permissions/add_space_user_access.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.add_space_user_access import AddSpaceUserAccess from ...models.api_success_empty import ApiSuccessEmpty -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -20,7 +20,10 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/projects/{project_uuid}/spaces/{space_uuid}/share", + "url": "/api/v1/projects/{projectUuid}/spaces/{spaceUuid}/share".format( + projectUuid=project_uuid, + spaceUuid=space_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/roles_permissions/create_space_in_project.py b/lightdash_client/api/roles_permissions/create_space_in_project.py index 732c7f4..bc2e8d8 100644 --- a/lightdash_client/api/roles_permissions/create_space_in_project.py +++ b/lightdash_client/api/roles_permissions/create_space_in_project.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_space_response import ApiSpaceResponse from ...models.create_space import CreateSpace -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -19,7 +19,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/projects/{project_uuid}/spaces", + "url": "/api/v1/projects/{projectUuid}/spaces".format( + projectUuid=project_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/roles_permissions/get_project_access_list.py b/lightdash_client/api/roles_permissions/get_project_access_list.py index 391e016..f00dfd0 100644 --- a/lightdash_client/api/roles_permissions/get_project_access_list.py +++ b/lightdash_client/api/roles_permissions/get_project_access_list.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_project_access_list_response import ApiProjectAccessListResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/projects/{project_uuid}/access", + "url": "/api/v1/projects/{projectUuid}/access".format( + projectUuid=project_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/roles_permissions/get_project_member_access.py b/lightdash_client/api/roles_permissions/get_project_member_access.py index 798aabe..61d5481 100644 --- a/lightdash_client/api/roles_permissions/get_project_member_access.py +++ b/lightdash_client/api/roles_permissions/get_project_member_access.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_get_project_member_response import ApiGetProjectMemberResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -15,7 +15,10 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/projects/{project_uuid}/user/{user_uuid}", + "url": "/api/v1/projects/{projectUuid}/user/{userUuid}".format( + projectUuid=project_uuid, + userUuid=user_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/roles_permissions/grant_project_access_to_user.py b/lightdash_client/api/roles_permissions/grant_project_access_to_user.py index 28d8d9c..1298572 100644 --- a/lightdash_client/api/roles_permissions/grant_project_access_to_user.py +++ b/lightdash_client/api/roles_permissions/grant_project_access_to_user.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty from ...models.create_project_member import CreateProjectMember -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -19,7 +19,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/projects/{project_uuid}/access", + "url": "/api/v1/projects/{projectUuid}/access".format( + projectUuid=project_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/roles_permissions/revoke_group_space_access.py b/lightdash_client/api/roles_permissions/revoke_group_space_access.py index f8f13be..09927f2 100644 --- a/lightdash_client/api/roles_permissions/revoke_group_space_access.py +++ b/lightdash_client/api/roles_permissions/revoke_group_space_access.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -16,7 +16,11 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "delete", - "url": f"/api/v1/projects/{project_uuid}/spaces/{space_uuid}/group/share/{group_uuid}", + "url": "/api/v1/projects/{projectUuid}/spaces/{spaceUuid}/group/share/{groupUuid}".format( + projectUuid=project_uuid, + spaceUuid=space_uuid, + groupUuid=group_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/roles_permissions/revoke_project_access_for_user.py b/lightdash_client/api/roles_permissions/revoke_project_access_for_user.py index 2e69985..9fc52a1 100644 --- a/lightdash_client/api/roles_permissions/revoke_project_access_for_user.py +++ b/lightdash_client/api/roles_permissions/revoke_project_access_for_user.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -15,7 +15,10 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "delete", - "url": f"/api/v1/projects/{project_uuid}/access/{user_uuid}", + "url": "/api/v1/projects/{projectUuid}/access/{userUuid}".format( + projectUuid=project_uuid, + userUuid=user_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/roles_permissions/revoke_space_access_for_user.py b/lightdash_client/api/roles_permissions/revoke_space_access_for_user.py index 5ba28a2..dbaf656 100644 --- a/lightdash_client/api/roles_permissions/revoke_space_access_for_user.py +++ b/lightdash_client/api/roles_permissions/revoke_space_access_for_user.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -16,7 +16,11 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "delete", - "url": f"/api/v1/projects/{project_uuid}/spaces/{space_uuid}/share/{user_uuid}", + "url": "/api/v1/projects/{projectUuid}/spaces/{spaceUuid}/share/{userUuid}".format( + projectUuid=project_uuid, + spaceUuid=space_uuid, + userUuid=user_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/roles_permissions/update_organization_member.py b/lightdash_client/api/roles_permissions/update_organization_member.py index 1e899e8..91278e5 100644 --- a/lightdash_client/api/roles_permissions/update_organization_member.py +++ b/lightdash_client/api/roles_permissions/update_organization_member.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_organization_member_profile import ApiOrganizationMemberProfile from ...models.organization_member_profile_update import OrganizationMemberProfileUpdate -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -19,7 +19,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "patch", - "url": f"/api/v1/org/users/{user_uuid}", + "url": "/api/v1/org/users/{userUuid}".format( + userUuid=user_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/roles_permissions/update_project_access_for_user.py b/lightdash_client/api/roles_permissions/update_project_access_for_user.py index e50fc01..59c5cfa 100644 --- a/lightdash_client/api/roles_permissions/update_project_access_for_user.py +++ b/lightdash_client/api/roles_permissions/update_project_access_for_user.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty from ...models.update_project_member import UpdateProjectMember -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -20,7 +20,10 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "patch", - "url": f"/api/v1/projects/{project_uuid}/access/{user_uuid}", + "url": "/api/v1/projects/{projectUuid}/access/{userUuid}".format( + projectUuid=project_uuid, + userUuid=user_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/roles_permissions/update_space.py b/lightdash_client/api/roles_permissions/update_space.py index 54530d5..704a68f 100644 --- a/lightdash_client/api/roles_permissions/update_space.py +++ b/lightdash_client/api/roles_permissions/update_space.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_space_response import ApiSpaceResponse from ...models.update_space import UpdateSpace -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -20,7 +20,10 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "patch", - "url": f"/api/v1/projects/{project_uuid}/spaces/{space_uuid}", + "url": "/api/v1/projects/{projectUuid}/spaces/{spaceUuid}".format( + projectUuid=project_uuid, + spaceUuid=space_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/schedulers/delete_scheduler.py b/lightdash_client/api/schedulers/delete_scheduler.py index 7b781ba..618e105 100644 --- a/lightdash_client/api/schedulers/delete_scheduler.py +++ b/lightdash_client/api/schedulers/delete_scheduler.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.delete_scheduler_response_201 import DeleteSchedulerResponse201 -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "delete", - "url": f"/api/v1/schedulers/{scheduler_uuid}", + "url": "/api/v1/schedulers/{schedulerUuid}".format( + schedulerUuid=scheduler_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/schedulers/get_scheduled_jobs.py b/lightdash_client/api/schedulers/get_scheduled_jobs.py index 3720163..ca1f579 100644 --- a/lightdash_client/api/schedulers/get_scheduled_jobs.py +++ b/lightdash_client/api/schedulers/get_scheduled_jobs.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_scheduled_jobs_response import ApiScheduledJobsResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/schedulers/{scheduler_uuid}/jobs", + "url": "/api/v1/schedulers/{schedulerUuid}/jobs".format( + schedulerUuid=scheduler_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/schedulers/get_scheduler.py b/lightdash_client/api/schedulers/get_scheduler.py index b61ab57..5bc1a89 100644 --- a/lightdash_client/api/schedulers/get_scheduler.py +++ b/lightdash_client/api/schedulers/get_scheduler.py @@ -1,11 +1,11 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -13,7 +13,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/schedulers/{scheduler_uuid}", + "url": "/api/v1/schedulers/{schedulerUuid}".format( + schedulerUuid=scheduler_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/schedulers/get_scheduler_job_status.py b/lightdash_client/api/schedulers/get_scheduler_job_status.py index 74cc4fd..6bf5bfb 100644 --- a/lightdash_client/api/schedulers/get_scheduler_job_status.py +++ b/lightdash_client/api/schedulers/get_scheduler_job_status.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_job_status_response import ApiJobStatusResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/schedulers/job/{job_id}/status", + "url": "/api/v1/schedulers/job/{jobId}/status".format( + jobId=job_id, + ), } return _kwargs diff --git a/lightdash_client/api/schedulers/get_scheduler_logs.py b/lightdash_client/api/schedulers/get_scheduler_logs.py index 80e84e9..0e6071e 100644 --- a/lightdash_client/api/schedulers/get_scheduler_logs.py +++ b/lightdash_client/api/schedulers/get_scheduler_logs.py @@ -1,11 +1,11 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -13,7 +13,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/schedulers/{project_uuid}/logs", + "url": "/api/v1/schedulers/{projectUuid}/logs".format( + projectUuid=project_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/schedulers/send_scheduler.py b/lightdash_client/api/schedulers/send_scheduler.py index 01bd4bb..6e4f1ed 100644 --- a/lightdash_client/api/schedulers/send_scheduler.py +++ b/lightdash_client/api/schedulers/send_scheduler.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_test_scheduler_response import ApiTestSchedulerResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( diff --git a/lightdash_client/api/schedulers/update_scheduler.py b/lightdash_client/api/schedulers/update_scheduler.py index 9c1d428..8b542b9 100644 --- a/lightdash_client/api/schedulers/update_scheduler.py +++ b/lightdash_client/api/schedulers/update_scheduler.py @@ -1,11 +1,11 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -17,7 +17,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "patch", - "url": f"/api/v1/schedulers/{scheduler_uuid}", + "url": "/api/v1/schedulers/{schedulerUuid}".format( + schedulerUuid=scheduler_uuid, + ), } _body = body diff --git a/lightdash_client/api/schedulers/update_scheduler_enabled.py b/lightdash_client/api/schedulers/update_scheduler_enabled.py index 29c9874..7f49476 100644 --- a/lightdash_client/api/schedulers/update_scheduler_enabled.py +++ b/lightdash_client/api/schedulers/update_scheduler_enabled.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.update_scheduler_enabled_body import UpdateSchedulerEnabledBody -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -18,7 +18,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "patch", - "url": f"/api/v1/schedulers/{scheduler_uuid}/enabled", + "url": "/api/v1/schedulers/{schedulerUuid}/enabled".format( + schedulerUuid=scheduler_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/share_links/create_share_url.py b/lightdash_client/api/share_links/create_share_url.py index 2000254..ba438e2 100644 --- a/lightdash_client/api/share_links/create_share_url.py +++ b/lightdash_client/api/share_links/create_share_url.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_share_response import ApiShareResponse from ...models.pick_share_url_path_or_params import PickShareUrlPathOrParams -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( diff --git a/lightdash_client/api/share_links/get_share_url.py b/lightdash_client/api/share_links/get_share_url.py index b35ebeb..ef2e0bb 100644 --- a/lightdash_client/api/share_links/get_share_url.py +++ b/lightdash_client/api/share_links/get_share_url.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_share_response import ApiShareResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/share/{nano_id}", + "url": "/api/v1/share/{nanoId}".format( + nanoId=nano_id, + ), } return _kwargs diff --git a/lightdash_client/api/spaces/delete_space.py b/lightdash_client/api/spaces/delete_space.py index 6f9c914..54bfa0a 100644 --- a/lightdash_client/api/spaces/delete_space.py +++ b/lightdash_client/api/spaces/delete_space.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -15,7 +15,10 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "delete", - "url": f"/api/v1/projects/{project_uuid}/spaces/{space_uuid}", + "url": "/api/v1/projects/{projectUuid}/spaces/{spaceUuid}".format( + projectUuid=project_uuid, + spaceUuid=space_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/spaces/get_space.py b/lightdash_client/api/spaces/get_space.py index 7cafd70..e407df5 100644 --- a/lightdash_client/api/spaces/get_space.py +++ b/lightdash_client/api/spaces/get_space.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_space_response import ApiSpaceResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -15,7 +15,10 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/projects/{project_uuid}/spaces/{space_uuid}", + "url": "/api/v1/projects/{projectUuid}/spaces/{spaceUuid}".format( + projectUuid=project_uuid, + spaceUuid=space_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/ssh_keypairs/create_ssh_key_pair.py b/lightdash_client/api/ssh_keypairs/create_ssh_key_pair.py index bae2339..fea6e85 100644 --- a/lightdash_client/api/ssh_keypairs/create_ssh_key_pair.py +++ b/lightdash_client/api/ssh_keypairs/create_ssh_key_pair.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_ssh_key_pair_response import ApiSshKeyPairResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs() -> Dict[str, Any]: diff --git a/lightdash_client/api/user_attributes/create_user_attribute.py b/lightdash_client/api/user_attributes/create_user_attribute.py index 95cec6f..56e9b15 100644 --- a/lightdash_client/api/user_attributes/create_user_attribute.py +++ b/lightdash_client/api/user_attributes/create_user_attribute.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_create_user_attribute_response import ApiCreateUserAttributeResponse from ...models.create_user_attribute import CreateUserAttribute -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( diff --git a/lightdash_client/api/user_attributes/get_user_attributes.py b/lightdash_client/api/user_attributes/get_user_attributes.py index fe606a5..2d39f14 100644 --- a/lightdash_client/api/user_attributes/get_user_attributes.py +++ b/lightdash_client/api/user_attributes/get_user_attributes.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_user_attributes_response import ApiUserAttributesResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs() -> Dict[str, Any]: diff --git a/lightdash_client/api/user_attributes/remove_user_attribute.py b/lightdash_client/api/user_attributes/remove_user_attribute.py index 2643b27..ff641d5 100644 --- a/lightdash_client/api/user_attributes/remove_user_attribute.py +++ b/lightdash_client/api/user_attributes/remove_user_attribute.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "delete", - "url": f"/api/v1/org/attributes/{user_attribute_uuid}", + "url": "/api/v1/org/attributes/{userAttributeUuid}".format( + userAttributeUuid=user_attribute_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/user_attributes/update_user_attribute.py b/lightdash_client/api/user_attributes/update_user_attribute.py index ac16b7f..8f3833b 100644 --- a/lightdash_client/api/user_attributes/update_user_attribute.py +++ b/lightdash_client/api/user_attributes/update_user_attribute.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_create_user_attribute_response import ApiCreateUserAttributeResponse from ...models.create_user_attribute import CreateUserAttribute -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -19,7 +19,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "put", - "url": f"/api/v1/org/attributes/{user_attribute_uuid}", + "url": "/api/v1/org/attributes/{userAttributeUuid}".format( + userAttributeUuid=user_attribute_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/user_groups/add_project_access_to_group.py b/lightdash_client/api/user_groups/add_project_access_to_group.py index 085fd08..c9608f3 100644 --- a/lightdash_client/api/user_groups/add_project_access_to_group.py +++ b/lightdash_client/api/user_groups/add_project_access_to_group.py @@ -1,15 +1,13 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_create_project_group_access import ApiCreateProjectGroupAccess -from ...models.pick_create_db_project_group_access_role import ( - PickCreateDBProjectGroupAccessRole, -) -from ...types import Response +from ...models.pick_create_db_project_group_access_role import PickCreateDBProjectGroupAccessRole +from ...types import UNSET, Response def _get_kwargs( @@ -22,7 +20,10 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "post", - "url": f"/api/v1/groups/{group_uuid}/projects/{project_uuid}", + "url": "/api/v1/groups/{groupUuid}/projects/{projectUuid}".format( + groupUuid=group_uuid, + projectUuid=project_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/user_groups/add_user_to_group.py b/lightdash_client/api/user_groups/add_user_to_group.py index fdedef3..4c2ac59 100644 --- a/lightdash_client/api/user_groups/add_user_to_group.py +++ b/lightdash_client/api/user_groups/add_user_to_group.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -15,7 +15,10 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "put", - "url": f"/api/v1/groups/{group_uuid}/members/{user_uuid}", + "url": "/api/v1/groups/{groupUuid}/members/{userUuid}".format( + groupUuid=group_uuid, + userUuid=user_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/user_groups/delete_group.py b/lightdash_client/api/user_groups/delete_group.py index 20e83a6..8c11262 100644 --- a/lightdash_client/api/user_groups/delete_group.py +++ b/lightdash_client/api/user_groups/delete_group.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "delete", - "url": f"/api/v1/groups/{group_uuid}", + "url": "/api/v1/groups/{groupUuid}".format( + groupUuid=group_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/user_groups/get_group.py b/lightdash_client/api/user_groups/get_group.py index 1b1d970..057fd4f 100644 --- a/lightdash_client/api/user_groups/get_group.py +++ b/lightdash_client/api/user_groups/get_group.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -25,7 +25,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/groups/{group_uuid}", + "url": "/api/v1/groups/{groupUuid}".format( + groupUuid=group_uuid, + ), "params": params, } diff --git a/lightdash_client/api/user_groups/get_group_members.py b/lightdash_client/api/user_groups/get_group_members.py index 379b41e..a0acccc 100644 --- a/lightdash_client/api/user_groups/get_group_members.py +++ b/lightdash_client/api/user_groups/get_group_members.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_group_members_response import ApiGroupMembersResponse -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -14,7 +14,9 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "get", - "url": f"/api/v1/groups/{group_uuid}/members", + "url": "/api/v1/groups/{groupUuid}/members".format( + groupUuid=group_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/user_groups/remove_project_access_from_group.py b/lightdash_client/api/user_groups/remove_project_access_from_group.py index 704e6d0..806e41a 100644 --- a/lightdash_client/api/user_groups/remove_project_access_from_group.py +++ b/lightdash_client/api/user_groups/remove_project_access_from_group.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -15,7 +15,10 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "delete", - "url": f"/api/v1/groups/{group_uuid}/projects/{project_uuid}", + "url": "/api/v1/groups/{groupUuid}/projects/{projectUuid}".format( + groupUuid=group_uuid, + projectUuid=project_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/user_groups/remove_user_from_group.py b/lightdash_client/api/user_groups/remove_user_from_group.py index 14dee73..268ba73 100644 --- a/lightdash_client/api/user_groups/remove_user_from_group.py +++ b/lightdash_client/api/user_groups/remove_user_from_group.py @@ -1,12 +1,12 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx from ... import errors from ...client import AuthenticatedClient, Client from ...models.api_success_empty import ApiSuccessEmpty -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -15,7 +15,10 @@ def _get_kwargs( ) -> Dict[str, Any]: _kwargs: Dict[str, Any] = { "method": "delete", - "url": f"/api/v1/groups/{group_uuid}/members/{user_uuid}", + "url": "/api/v1/groups/{groupUuid}/members/{userUuid}".format( + groupUuid=group_uuid, + userUuid=user_uuid, + ), } return _kwargs diff --git a/lightdash_client/api/user_groups/update_group.py b/lightdash_client/api/user_groups/update_group.py index 7f36c0a..2b85ad1 100644 --- a/lightdash_client/api/user_groups/update_group.py +++ b/lightdash_client/api/user_groups/update_group.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_group_response import ApiGroupResponse from ...models.update_group_with_members import UpdateGroupWithMembers -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -19,7 +19,9 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "patch", - "url": f"/api/v1/groups/{group_uuid}", + "url": "/api/v1/groups/{groupUuid}".format( + groupUuid=group_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/api/user_groups/update_project_access_for_group.py b/lightdash_client/api/user_groups/update_project_access_for_group.py index b8b3383..0e55866 100644 --- a/lightdash_client/api/user_groups/update_project_access_for_group.py +++ b/lightdash_client/api/user_groups/update_project_access_for_group.py @@ -1,5 +1,5 @@ from http import HTTPStatus -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, List, Optional, Union, cast import httpx @@ -7,7 +7,7 @@ from ...client import AuthenticatedClient, Client from ...models.api_update_project_group_access import ApiUpdateProjectGroupAccess from ...models.pick_db_project_group_access_role import PickDBProjectGroupAccessRole -from ...types import Response +from ...types import UNSET, Response def _get_kwargs( @@ -20,7 +20,10 @@ def _get_kwargs( _kwargs: Dict[str, Any] = { "method": "patch", - "url": f"/api/v1/groups/{group_uuid}/projects/{project_uuid}", + "url": "/api/v1/groups/{groupUuid}/projects/{projectUuid}".format( + groupUuid=group_uuid, + projectUuid=project_uuid, + ), } _body = body.to_dict() diff --git a/lightdash_client/client.py b/lightdash_client/client.py index ab54ed7..53be51a 100644 --- a/lightdash_client/client.py +++ b/lightdash_client/client.py @@ -35,13 +35,13 @@ class Client: """ raise_on_unexpected_status: bool = field(default=False, kw_only=True) - _base_url: str = field(alias="base_url") - _cookies: Dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") - _headers: Dict[str, str] = field(factory=dict, kw_only=True, alias="headers") - _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout") - _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl") - _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") - _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") + _base_url: str + _cookies: Dict[str, str] = field(factory=dict, kw_only=True) + _headers: Dict[str, str] = field(factory=dict, kw_only=True) + _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True) + _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True) + _follow_redirects: bool = field(default=False, kw_only=True) + _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True) _client: Optional[httpx.Client] = field(default=None, init=False) _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) @@ -165,13 +165,13 @@ class AuthenticatedClient: """ raise_on_unexpected_status: bool = field(default=False, kw_only=True) - _base_url: str = field(alias="base_url") - _cookies: Dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") - _headers: Dict[str, str] = field(factory=dict, kw_only=True, alias="headers") - _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout") - _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl") - _follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects") - _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args") + _base_url: str + _cookies: Dict[str, str] = field(factory=dict, kw_only=True) + _headers: Dict[str, str] = field(factory=dict, kw_only=True) + _timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True) + _verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True) + _follow_redirects: bool = field(default=False, kw_only=True) + _httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True) _client: Optional[httpx.Client] = field(default=None, init=False) _async_client: Optional[httpx.AsyncClient] = field(default=None, init=False) diff --git a/lightdash_client/models/__init__.py b/lightdash_client/models/__init__.py index 2b7399e..5dbecdf 100644 --- a/lightdash_client/models/__init__.py +++ b/lightdash_client/models/__init__.py @@ -2,6 +2,7 @@ from .activate_user import ActivateUser from .activate_user_with_invite_code import ActivateUserWithInviteCode +from .add_category_to_catalog_item_body import AddCategoryToCatalogItemBody from .add_space_group_access import AddSpaceGroupAccess from .add_space_user_access import AddSpaceUserAccess from .additional_metric import AdditionalMetric @@ -10,21 +11,34 @@ from .and_filter_group import AndFilterGroup from .api_calculate_total_response import ApiCalculateTotalResponse from .api_calculate_total_response_status import ApiCalculateTotalResponseStatus +from .api_chart_as_code_list_response import ApiChartAsCodeListResponse +from .api_chart_as_code_list_response_status import ApiChartAsCodeListResponseStatus +from .api_chart_as_code_upsert_response import ApiChartAsCodeUpsertResponse +from .api_chart_as_code_upsert_response_status import ApiChartAsCodeUpsertResponseStatus from .api_chart_list_response import ApiChartListResponse from .api_chart_list_response_status import ApiChartListResponseStatus from .api_chart_summary_list_response import ApiChartSummaryListResponse from .api_chart_summary_list_response_status import ApiChartSummaryListResponseStatus from .api_create_comment import ApiCreateComment from .api_create_comment_status import ApiCreateCommentStatus +from .api_create_dashboard_response import ApiCreateDashboardResponse +from .api_create_dashboard_response_status import ApiCreateDashboardResponseStatus +from .api_create_group_response import ApiCreateGroupResponse +from .api_create_group_response_status import ApiCreateGroupResponseStatus from .api_create_project_group_access import ApiCreateProjectGroupAccess from .api_create_project_group_access_status import ApiCreateProjectGroupAccessStatus +from .api_create_tag_response import ApiCreateTagResponse +from .api_create_tag_response_results import ApiCreateTagResponseResults +from .api_create_tag_response_status import ApiCreateTagResponseStatus from .api_create_user_attribute_response import ApiCreateUserAttributeResponse -from .api_create_user_attribute_response_status import ( - ApiCreateUserAttributeResponseStatus, -) +from .api_create_user_attribute_response_status import ApiCreateUserAttributeResponseStatus from .api_csv_url_response import ApiCsvUrlResponse from .api_csv_url_response_results import ApiCsvUrlResponseResults from .api_csv_url_response_status import ApiCsvUrlResponseStatus +from .api_dashboard_as_code_list_response import ApiDashboardAsCodeListResponse +from .api_dashboard_as_code_list_response_status import ApiDashboardAsCodeListResponseStatus +from .api_dashboard_as_code_upsert_response import ApiDashboardAsCodeUpsertResponse +from .api_dashboard_as_code_upsert_response_status import ApiDashboardAsCodeUpsertResponseStatus from .api_email_status_response_status import ApiEmailStatusResponseStatus from .api_error_payload import ApiErrorPayload from .api_error_payload_error import ApiErrorPayloadError @@ -32,9 +46,7 @@ from .api_gdrive_access_token_response import ApiGdriveAccessTokenResponse from .api_gdrive_access_token_response_status import ApiGdriveAccessTokenResponseStatus from .api_get_authenticated_user_response import ApiGetAuthenticatedUserResponse -from .api_get_authenticated_user_response_status import ( - ApiGetAuthenticatedUserResponseStatus, -) +from .api_get_authenticated_user_response_status import ApiGetAuthenticatedUserResponseStatus from .api_get_chart_history_response import ApiGetChartHistoryResponse from .api_get_chart_history_response_status import ApiGetChartHistoryResponseStatus from .api_get_chart_version_response import ApiGetChartVersionResponse @@ -42,14 +54,22 @@ from .api_get_comments import ApiGetComments from .api_get_comments_results import ApiGetCommentsResults from .api_get_comments_status import ApiGetCommentsStatus +from .api_get_dashboards_response import ApiGetDashboardsResponse +from .api_get_dashboards_response_status import ApiGetDashboardsResponseStatus from .api_get_login_options_response import ApiGetLoginOptionsResponse from .api_get_login_options_response_status import ApiGetLoginOptionsResponseStatus +from .api_get_metric_peek_status import ApiGetMetricPeekStatus +from .api_get_metrics_tree import ApiGetMetricsTree +from .api_get_metrics_tree_results import ApiGetMetricsTreeResults +from .api_get_metrics_tree_status import ApiGetMetricsTreeStatus from .api_get_notifications import ApiGetNotifications from .api_get_notifications_status import ApiGetNotificationsStatus from .api_get_project_group_accesses import ApiGetProjectGroupAccesses from .api_get_project_group_accesses_status import ApiGetProjectGroupAccessesStatus from .api_get_project_member_response import ApiGetProjectMemberResponse from .api_get_project_member_response_status import ApiGetProjectMemberResponseStatus +from .api_get_tags_response import ApiGetTagsResponse +from .api_get_tags_response_status import ApiGetTagsResponseStatus from .api_group_list_response import ApiGroupListResponse from .api_group_list_response_status import ApiGroupListResponseStatus from .api_group_members_response import ApiGroupMembersResponse @@ -62,15 +82,18 @@ from .api_job_status_response import ApiJobStatusResponse from .api_job_status_response_results import ApiJobStatusResponseResults from .api_job_status_response_status import ApiJobStatusResponseStatus -from .api_notification_resource_type import ApiNotificationResourceType -from .api_notification_resource_type_dashboard_comments import ( - ApiNotificationResourceTypeDashboardComments, +from .api_metrics_catalog import ApiMetricsCatalog +from .api_metrics_catalog_status import ApiMetricsCatalogStatus +from .api_metrics_explorer_query_results_status import ApiMetricsExplorerQueryResultsStatus +from .api_metrics_tree_edge_payload import ApiMetricsTreeEdgePayload +from .api_metrics_with_associated_time_dimension_response_status import ( + ApiMetricsWithAssociatedTimeDimensionResponseStatus, ) +from .api_notification_resource_type import ApiNotificationResourceType +from .api_notification_resource_type_dashboard_comments import ApiNotificationResourceTypeDashboardComments from .api_organization import ApiOrganization from .api_organization_allowed_email_domains import ApiOrganizationAllowedEmailDomains -from .api_organization_allowed_email_domains_status import ( - ApiOrganizationAllowedEmailDomainsStatus, -) +from .api_organization_allowed_email_domains_status import ApiOrganizationAllowedEmailDomainsStatus from .api_organization_member_profile import ApiOrganizationMemberProfile from .api_organization_member_profile_status import ApiOrganizationMemberProfileStatus from .api_organization_member_profiles import ApiOrganizationMemberProfiles @@ -99,18 +122,15 @@ from .api_run_query_response_status import ApiRunQueryResponseStatus from .api_scheduled_jobs_response import ApiScheduledJobsResponse from .api_scheduled_jobs_response_status import ApiScheduledJobsResponseStatus -from .api_scheduler_and_targets_response_status import ( - ApiSchedulerAndTargetsResponseStatus, -) +from .api_scheduler_and_targets_response_status import ApiSchedulerAndTargetsResponseStatus from .api_scheduler_logs_response_status import ApiSchedulerLogsResponseStatus from .api_share_response import ApiShareResponse from .api_share_response_status import ApiShareResponseStatus from .api_slack_channels_response import ApiSlackChannelsResponse from .api_slack_channels_response_status import ApiSlackChannelsResponseStatus from .api_slack_custom_settings_response import ApiSlackCustomSettingsResponse -from .api_slack_custom_settings_response_status import ( - ApiSlackCustomSettingsResponseStatus, -) +from .api_slack_custom_settings_response_status import ApiSlackCustomSettingsResponseStatus +from .api_sort_direction import ApiSortDirection from .api_space_response import ApiSpaceResponse from .api_space_response_status import ApiSpaceResponseStatus from .api_space_summary_list_response import ApiSpaceSummaryListResponse @@ -123,12 +143,12 @@ from .api_test_scheduler_response import ApiTestSchedulerResponse from .api_test_scheduler_response_results import ApiTestSchedulerResponseResults from .api_test_scheduler_response_status import ApiTestSchedulerResponseStatus +from .api_update_dashboards_response import ApiUpdateDashboardsResponse +from .api_update_dashboards_response_status import ApiUpdateDashboardsResponseStatus from .api_update_project_group_access import ApiUpdateProjectGroupAccess from .api_update_project_group_access_status import ApiUpdateProjectGroupAccessStatus from .api_user_allowed_organizations_response import ApiUserAllowedOrganizationsResponse -from .api_user_allowed_organizations_response_status import ( - ApiUserAllowedOrganizationsResponseStatus, -) +from .api_user_allowed_organizations_response_status import ApiUserAllowedOrganizationsResponseStatus from .api_user_attributes_response import ApiUserAttributesResponse from .api_user_attributes_response_status import ApiUserAttributesResponseStatus from .api_validate_response import ApiValidateResponse @@ -150,10 +170,12 @@ from .catalog_field import CatalogField from .catalog_filter import CatalogFilter from .catalog_metadata import CatalogMetadata +from .catalog_metrics_tree_edge import CatalogMetricsTreeEdge from .catalog_table import CatalogTable from .catalog_type import CatalogType from .catalog_type_field import CatalogTypeField from .catalog_type_table import CatalogTypeTable +from .chart_as_code import ChartAsCode from .chart_history import ChartHistory from .chart_kind import ChartKind from .chart_source_type import ChartSourceType @@ -173,108 +195,89 @@ from .comparison_format_types import ComparisonFormatTypes from .compile_query_response_200 import CompileQueryResponse200 from .compile_query_response_200_status import CompileQueryResponse200Status +from .compiled_dimension import CompiledDimension from .compiled_explore_join import CompiledExploreJoin +from .compiled_metric import CompiledMetric from .compiled_table import CompiledTable -from .conditional_formatting_config_with_color_range import ( - ConditionalFormattingConfigWithColorRange, -) -from .conditional_formatting_config_with_color_range_color import ( - ConditionalFormattingConfigWithColorRangeColor, -) +from .conditional_formatting_config_with_color_range import ConditionalFormattingConfigWithColorRange +from .conditional_formatting_config_with_color_range_color import ConditionalFormattingConfigWithColorRangeColor from .conditional_formatting_config_with_color_range_color_steps import ( ConditionalFormattingConfigWithColorRangeColorSteps, ) -from .conditional_formatting_config_with_single_color import ( - ConditionalFormattingConfigWithSingleColor, -) -from .conditional_formatting_with_conditional_operator import ( - ConditionalFormattingWithConditionalOperator, -) +from .conditional_formatting_config_with_single_color import ConditionalFormattingConfigWithSingleColor +from .conditional_formatting_with_conditional_operator import ConditionalFormattingWithConditionalOperator from .conditional_formatting_with_range import ConditionalFormattingWithRange from .conditional_operator import ConditionalOperator -from .conditional_rule_conditional_operator_number import ( - ConditionalRuleConditionalOperatorNumber, -) +from .conditional_rule_conditional_operator_number import ConditionalRuleConditionalOperatorNumber +from .create_dashboard import CreateDashboard +from .create_dashboard_chart_tile import CreateDashboardChartTile +from .create_dashboard_loom_tile import CreateDashboardLoomTile +from .create_dashboard_markdown_tile import CreateDashboardMarkdownTile +from .create_dashboard_semantic_viewer_chart_tile import CreateDashboardSemanticViewerChartTile +from .create_dashboard_sql_chart_tile import CreateDashboardSqlChartTile +from .create_dashboard_tile_base import CreateDashboardTileBase from .create_group import CreateGroup +from .create_preview_body import CreatePreviewBody +from .create_preview_response_200 import CreatePreviewResponse200 +from .create_preview_response_200_status import CreatePreviewResponse200Status from .create_project_member import CreateProjectMember -from .create_pull_request_for_chart_fields_response_200 import ( - CreatePullRequestForChartFieldsResponse200, -) -from .create_pull_request_for_chart_fields_response_200_status import ( - CreatePullRequestForChartFieldsResponse200Status, -) -from .create_pull_request_for_custom_metrics_body import ( - CreatePullRequestForCustomMetricsBody, -) -from .create_pull_request_for_custom_metrics_body_quote_char import ( - CreatePullRequestForCustomMetricsBodyQuoteChar, -) -from .create_pull_request_for_custom_metrics_response_200 import ( - CreatePullRequestForCustomMetricsResponse200, -) +from .create_pull_request_for_chart_fields_response_200 import CreatePullRequestForChartFieldsResponse200 +from .create_pull_request_for_chart_fields_response_200_status import CreatePullRequestForChartFieldsResponse200Status +from .create_pull_request_for_custom_metrics_body import CreatePullRequestForCustomMetricsBody +from .create_pull_request_for_custom_metrics_body_quote_char import CreatePullRequestForCustomMetricsBodyQuoteChar +from .create_pull_request_for_custom_metrics_response_200 import CreatePullRequestForCustomMetricsResponse200 from .create_pull_request_for_custom_metrics_response_200_status import ( CreatePullRequestForCustomMetricsResponse200Status, ) from .create_space import CreateSpace from .create_user_args import CreateUserArgs from .create_user_attribute import CreateUserAttribute -from .create_warehouse_credentials_response_200 import ( - CreateWarehouseCredentialsResponse200, -) -from .create_warehouse_credentials_response_200_status import ( - CreateWarehouseCredentialsResponse200Status, -) +from .create_warehouse_credentials_response_200 import CreateWarehouseCredentialsResponse200 +from .create_warehouse_credentials_response_200_status import CreateWarehouseCredentialsResponse200Status from .cube_semantic_layer_connection import CubeSemanticLayerConnection from .custom_bin_dimension import CustomBinDimension from .custom_dimension_type_bin import CustomDimensionTypeBIN from .custom_dimension_type_sql import CustomDimensionTypeSQL from .custom_format import CustomFormat from .custom_format_type import CustomFormatType +from .custom_icon import CustomIcon from .custom_label import CustomLabel from .custom_sql_dimension import CustomSqlDimension from .custom_vis import CustomVis from .custom_vis_config import CustomVisConfig from .custom_vis_spec import CustomVisSpec +from .dashboard import Dashboard +from .dashboard_as_code import DashboardAsCode from .dashboard_basic_details import DashboardBasicDetails +from .dashboard_basic_details_with_tile_types import DashboardBasicDetailsWithTileTypes from .dashboard_chart_tile import DashboardChartTile from .dashboard_chart_tile_properties import DashboardChartTileProperties -from .dashboard_chart_tile_properties_properties import ( - DashboardChartTilePropertiesProperties, -) +from .dashboard_chart_tile_properties_properties import DashboardChartTilePropertiesProperties from .dashboard_field_target import DashboardFieldTarget from .dashboard_filter_rule import DashboardFilterRule from .dashboard_filters import DashboardFilters from .dashboard_loom_tile import DashboardLoomTile from .dashboard_loom_tile_properties import DashboardLoomTileProperties -from .dashboard_loom_tile_properties_properties import ( - DashboardLoomTilePropertiesProperties, -) +from .dashboard_loom_tile_properties_properties import DashboardLoomTilePropertiesProperties from .dashboard_markdown_tile import DashboardMarkdownTile from .dashboard_markdown_tile_properties import DashboardMarkdownTileProperties -from .dashboard_markdown_tile_properties_properties import ( - DashboardMarkdownTilePropertiesProperties, -) +from .dashboard_markdown_tile_properties_properties import DashboardMarkdownTilePropertiesProperties from .dashboard_semantic_viewer_chart_tile import DashboardSemanticViewerChartTile -from .dashboard_semantic_viewer_chart_tile_properties import ( - DashboardSemanticViewerChartTileProperties, -) +from .dashboard_semantic_viewer_chart_tile_properties import DashboardSemanticViewerChartTileProperties from .dashboard_semantic_viewer_chart_tile_properties_properties import ( DashboardSemanticViewerChartTilePropertiesProperties, ) from .dashboard_sql_chart_tile import DashboardSqlChartTile from .dashboard_sql_chart_tile_properties import DashboardSqlChartTileProperties -from .dashboard_sql_chart_tile_properties_properties import ( - DashboardSqlChartTilePropertiesProperties, -) +from .dashboard_sql_chart_tile_properties_properties import DashboardSqlChartTilePropertiesProperties from .dashboard_tab import DashboardTab from .dashboard_tile_types import DashboardTileTypes from .dashboard_tile_types_loom import DashboardTileTypesLOOM from .dashboard_tile_types_markdown import DashboardTileTypesMARKDOWN from .dashboard_tile_types_savedchart import DashboardTileTypesSAVEDCHART -from .dashboard_tile_types_semanticviewerchart import ( - DashboardTileTypesSEMANTICVIEWERCHART, -) +from .dashboard_tile_types_semanticviewerchart import DashboardTileTypesSEMANTICVIEWERCHART from .dashboard_tile_types_sqlchart import DashboardTileTypesSQLCHART +from .dashboard_tile_without_uuids import DashboardTileWithoutUuids from .date_granularity import DateGranularity from .dbt_azure_dev_ops_project_config import DbtAzureDevOpsProjectConfig from .dbt_bit_bucket_project_config import DbtBitBucketProjectConfig @@ -293,20 +296,22 @@ from .dbt_project_type_gitlab import DbtProjectTypeGITLAB from .dbt_project_type_none import DbtProjectTypeNONE from .dbt_semantic_layer_connection import DbtSemanticLayerConnection +from .default_time_dimension import DefaultTimeDimension from .delete_scheduler_response_201 import DeleteSchedulerResponse201 from .delete_scheduler_response_201_status import DeleteSchedulerResponse201Status from .dimension_type import DimensionType +from .dimension_type_date import DimensionTypeDATE +from .dimension_type_timestamp import DimensionTypeTIMESTAMP from .download_csv_from_explore_body import DownloadCsvFromExploreBody -from .download_csv_from_explore_body_custom_labels import ( - DownloadCsvFromExploreBodyCustomLabels, -) +from .download_csv_from_explore_body_custom_labels import DownloadCsvFromExploreBodyCustomLabels from .download_csv_from_explore_response_200 import DownloadCsvFromExploreResponse200 -from .download_csv_from_explore_response_200_results import ( - DownloadCsvFromExploreResponse200Results, -) -from .download_csv_from_explore_response_200_status import ( - DownloadCsvFromExploreResponse200Status, -) +from .download_csv_from_explore_response_200_results import DownloadCsvFromExploreResponse200Results +from .download_csv_from_explore_response_200_status import DownloadCsvFromExploreResponse200Status +from .download_csv_from_saved_chart_body import DownloadCsvFromSavedChartBody +from .download_csv_from_saved_chart_response_200 import DownloadCsvFromSavedChartResponse200 +from .download_csv_from_saved_chart_response_200_results import DownloadCsvFromSavedChartResponse200Results +from .download_csv_from_saved_chart_response_200_status import DownloadCsvFromSavedChartResponse200Status +from .duplicate_dashboard_params import DuplicateDashboardParams from .echarts_grid import EchartsGrid from .echarts_legend import EchartsLegend from .echarts_legend_align import EchartsLegendAlign @@ -316,10 +321,15 @@ from .email_one_time_password import EmailOneTimePassword from .email_one_time_password_expiring import EmailOneTimePasswordExpiring from .email_status import EmailStatus +from .emoji_icon import EmojiIcon from .explore import Explore from .explore_tables import ExploreTables +from .explore_type import ExploreType from .field_target import FieldTarget from .field_type import FieldType +from .field_type_dimension import FieldTypeDIMENSION +from .field_type_metric import FieldTypeMETRIC +from .field_url import FieldUrl from .filter_group_response_type_0 import FilterGroupResponseType0 from .filter_group_response_type_1 import FilterGroupResponseType1 from .filter_rule import FilterRule @@ -342,30 +352,20 @@ from .get_configuration_response_200 import GetConfigurationResponse200 from .get_configuration_response_200_status import GetConfigurationResponse200Status from .get_custom_metrics_response_200 import GetCustomMetricsResponse200 -from .get_custom_metrics_response_200_results_item import ( - GetCustomMetricsResponse200ResultsItem, -) +from .get_custom_metrics_response_200_results_item import GetCustomMetricsResponse200ResultsItem from .get_custom_metrics_response_200_status import GetCustomMetricsResponse200Status from .get_explore_response_200 import GetExploreResponse200 from .get_explore_response_200_status import GetExploreResponse200Status -from .get_github_list_repositories_response_200 import ( - GetGithubListRepositoriesResponse200, -) -from .get_github_list_repositories_response_200_status import ( - GetGithubListRepositoriesResponse200Status, -) +from .get_github_list_repositories_response_200 import GetGithubListRepositoriesResponse200 +from .get_github_list_repositories_response_200_status import GetGithubListRepositoriesResponse200Status from .get_metadata_response_200 import GetMetadataResponse200 from .get_metadata_response_200_status import GetMetadataResponse200Status -from .get_user_warehouse_credentials_preference_response_200 import ( - GetUserWarehouseCredentialsPreferenceResponse200, -) +from .get_user_warehouse_credentials_preference_response_200 import GetUserWarehouseCredentialsPreferenceResponse200 from .get_user_warehouse_credentials_preference_response_200_status import ( GetUserWarehouseCredentialsPreferenceResponse200Status, ) from .get_warehouse_credentials_response_200 import GetWarehouseCredentialsResponse200 -from .get_warehouse_credentials_response_200_status import ( - GetWarehouseCredentialsResponse200Status, -) +from .get_warehouse_credentials_response_200_status import GetWarehouseCredentialsResponse200Status from .git_integration_configuration import GitIntegrationConfiguration from .git_repo import GitRepo from .group import Group @@ -375,9 +375,17 @@ from .inline_error import InlineError from .inline_error_type import InlineErrorType from .knex_paginate_args import KnexPaginateArgs -from .knex_paginated_data_organization_member_profile_array import ( - KnexPaginatedDataOrganizationMemberProfileArray, +from .knex_paginated_data_api_metrics_catalog_results import KnexPaginatedDataApiMetricsCatalogResults +from .knex_paginated_data_api_metrics_catalog_results_pagination import ( + KnexPaginatedDataApiMetricsCatalogResultsPagination, +) +from .knex_paginated_data_group_array_or_group_with_members_array import ( + KnexPaginatedDataGroupArrayOrGroupWithMembersArray, +) +from .knex_paginated_data_group_array_or_group_with_members_array_pagination import ( + KnexPaginatedDataGroupArrayOrGroupWithMembersArrayPagination, ) +from .knex_paginated_data_organization_member_profile_array import KnexPaginatedDataOrganizationMemberProfileArray from .knex_paginated_data_organization_member_profile_array_pagination import ( KnexPaginatedDataOrganizationMemberProfileArrayPagination, ) @@ -392,6 +400,12 @@ from .mark_line_data_line_style import MarkLineDataLineStyle from .mark_line_label import MarkLineLabel from .mark_line_line_style import MarkLineLineStyle +from .metric_explorer_comparison_differentmetric import MetricExplorerComparisonDIFFERENTMETRIC +from .metric_explorer_comparison_none import MetricExplorerComparisonNONE +from .metric_explorer_comparison_previousperiod import MetricExplorerComparisonPREVIOUSPERIOD +from .metric_explorer_comparison_type_type_0 import MetricExplorerComparisonTypeType0 +from .metric_explorer_comparison_type_type_1 import MetricExplorerComparisonTypeType1 +from .metric_explorer_comparison_type_type_2 import MetricExplorerComparisonTypeType2 from .metric_filter_rule import MetricFilterRule from .metric_filter_rule_target import MetricFilterRuleTarget from .metric_query import MetricQuery @@ -404,9 +418,7 @@ from .metric_type import MetricType from .notification_base import NotificationBase from .notification_dashboard_comment import NotificationDashboardComment -from .notification_dashboard_tile_comment_metadata import ( - NotificationDashboardTileCommentMetadata, -) +from .notification_dashboard_tile_comment_metadata import NotificationDashboardTileCommentMetadata from .notification_frequency import NotificationFrequency from .number_separator import NumberSeparator from .open_id_identity_issuer_type import OpenIdIdentityIssuerType @@ -417,33 +429,43 @@ from .organization_member_profile_update import OrganizationMemberProfileUpdate from .organization_member_role import OrganizationMemberRole from .organization_member_role_editor import OrganizationMemberRoleEDITOR -from .organization_member_role_interactiveviewer import ( - OrganizationMemberRoleINTERACTIVEVIEWER, -) +from .organization_member_role_interactiveviewer import OrganizationMemberRoleINTERACTIVEVIEWER from .organization_member_role_member import OrganizationMemberRoleMEMBER from .organization_member_role_viewer import OrganizationMemberRoleVIEWER from .organization_project import OrganizationProject from .partial_complete_cartesian_chart_layout import PartialCompleteCartesianChartLayout from .partial_complete_e_charts_config import PartialCompleteEChartsConfig +from .partial_cube_semantic_layer_connection import PartialCubeSemanticLayerConnection +from .partial_dbt_semantic_layer_connection import PartialDbtSemanticLayerConnection from .partial_omit_organization_organization_uuid_or_needs_project import ( PartialOmitOrganizationOrganizationUuidOrNeedsProject, ) +from .partial_pick_db_tag_name_or_color import PartialPickDbTagNameOrColor from .partial_summary_extra_fields import PartialSummaryExtraFields +from .personal_access_token import PersonalAccessToken +from .personal_access_token_with_token import PersonalAccessTokenWithToken from .pick_allowed_email_domains_exclude_keyof_allowed_email_domains_organization_uuid import ( PickAllowedEmailDomainsExcludeKeyofAllowedEmailDomainsOrganizationUuid, ) from .pick_allowed_email_domains_exclude_keyof_allowed_email_domains_organization_uuid_projects_item import ( PickAllowedEmailDomainsExcludeKeyofAllowedEmailDomainsOrganizationUuidProjectsItem, ) +from .pick_catalog_field_catalog_search_uuid_or_name_or_table_name import ( + PickCatalogFieldCatalogSearchUuidOrNameOrTableName, +) +from .pick_chart_as_code_exclude_keyof_chart_as_code_metric_query_or_chart_config import ( + PickChartAsCodeExcludeKeyofChartAsCodeMetricQueryOrChartConfig, +) +from .pick_chart_as_code_exclude_keyof_chart_as_code_metric_query_or_chart_config_table_config import ( + PickChartAsCodeExcludeKeyofChartAsCodeMetricQueryOrChartConfigTableConfig, +) from .pick_chart_summary_uuid_or_name_or_space_uuid_or_space_name_or_dashboard_name_or_dashboard_uuid_or_chart_kind import ( PickChartSummaryUuidOrNameOrSpaceUuidOrSpaceNameOrDashboardNameOrDashboardUuidOrChartKind, ) from .pick_chart_version_chart_uuid_or_version_uuid_or_created_at_or_created_by import ( PickChartVersionChartUuidOrVersionUuidOrCreatedAtOrCreatedBy, ) -from .pick_comment_text_or_reply_to_or_mentions_or_text_html import ( - PickCommentTextOrReplyToOrMentionsOrTextHtml, -) +from .pick_comment_text_or_reply_to_or_mentions_or_text_html import PickCommentTextOrReplyToOrMentionsOrTextHtml from .pick_compiled_dimension_label_or_name import PickCompiledDimensionLabelOrName from .pick_create_bigquery_credentials_exclude_keyof_create_bigquery_credentials_sensitive_credentials_field_names import ( PickCreateBigqueryCredentialsExcludeKeyofCreateBigqueryCredentialsSensitiveCredentialsFieldNames, @@ -466,18 +488,14 @@ from .pick_create_postgres_credentials_exclude_keyof_create_postgres_credentials_sensitive_credentials_field_names import ( PickCreatePostgresCredentialsExcludeKeyofCreatePostgresCredentialsSensitiveCredentialsFieldNames, ) -from .pick_create_postgres_credentials_type_or_user_or_password import ( - PickCreatePostgresCredentialsTypeOrUserOrPassword, -) +from .pick_create_postgres_credentials_type_or_user_or_password import PickCreatePostgresCredentialsTypeOrUserOrPassword from .pick_create_redshift_credentials_exclude_keyof_create_redshift_credentials_sensitive_credentials_field_names import ( PickCreateRedshiftCredentialsExcludeKeyofCreateRedshiftCredentialsSensitiveCredentialsFieldNames, ) from .pick_create_redshift_credentials_or_create_postgres_credentials_or_create_snowflake_credentials_or_create_trino_credentials_type_or_user import ( PickCreateRedshiftCredentialsOrCreatePostgresCredentialsOrCreateSnowflakeCredentialsOrCreateTrinoCredentialsTypeOrUser, ) -from .pick_create_redshift_credentials_type_or_user_or_password import ( - PickCreateRedshiftCredentialsTypeOrUserOrPassword, -) +from .pick_create_redshift_credentials_type_or_user_or_password import PickCreateRedshiftCredentialsTypeOrUserOrPassword from .pick_create_snowflake_credentials_exclude_keyof_create_snowflake_credentials_sensitive_credentials_field_names import ( PickCreateSnowflakeCredentialsExcludeKeyofCreateSnowflakeCredentialsSensitiveCredentialsFieldNames, ) @@ -487,8 +505,9 @@ from .pick_create_trino_credentials_exclude_keyof_create_trino_credentials_sensitive_credentials_field_names import ( PickCreateTrinoCredentialsExcludeKeyofCreateTrinoCredentialsSensitiveCredentialsFieldNames, ) -from .pick_create_trino_credentials_type_or_user_or_password import ( - PickCreateTrinoCredentialsTypeOrUserOrPassword, +from .pick_create_trino_credentials_type_or_user_or_password import PickCreateTrinoCredentialsTypeOrUserOrPassword +from .pick_dashboard_as_code_exclude_keyof_dashboard_as_code_filters_or_tiles_or_description import ( + PickDashboardAsCodeExcludeKeyofDashboardAsCodeFiltersOrTilesOrDescription, ) from .pick_dashboard_basic_details_uuid_or_space_uuid_or_description_or_name_or_views_or_first_viewed_at_or_pinned_list_uuid_or_pinned_list_order_or_updated_at_or_updated_by_user_or_validation_errors import ( PickDashboardBasicDetailsUuidOrSpaceUuidOrDescriptionOrNameOrViewsOrFirstViewedAtOrPinnedListUuidOrPinnedListOrderOrUpdatedAtOrUpdatedByUserOrValidationErrors, @@ -496,14 +515,22 @@ from .pick_dashboard_exclude_keyof_dashboard_is_private_or_access import ( PickDashboardExcludeKeyofDashboardIsPrivateOrAccess, ) +from .pick_dashboard_name_or_description_or_updated_at_or_filters_or_tabs_or_slug import ( + PickDashboardNameOrDescriptionOrUpdatedAtOrFiltersOrTabsOrSlug, +) +from .pick_dashboard_tile_at_properties_exclude_keyof_dashboard_tile_at_properties_saved_chart_uuid_or_saved_sql_uuid_or_saved_semantic_viewer_chart_uuid import ( + PickDashboardTileAtPropertiesExcludeKeyofDashboardTileAtPropertiesSavedChartUuidOrSavedSqlUuidOrSavedSemanticViewerChartUuid, +) +from .pick_dashboard_tile_exclude_keyof_dashboard_tile_properties import ( + PickDashboardTileExcludeKeyofDashboardTileProperties, +) +from .pick_dashboard_uuid_or_name_or_description_or_space_uuid import PickDashboardUuidOrNameOrDescriptionOrSpaceUuid from .pick_dashboard_uuid_or_name_or_description_or_updated_at_or_project_uuid_or_updated_by_user_or_organization_uuid_or_space_uuid_or_views_or_first_viewed_at_or_pinned_list_uuid_or_pinned_list_order import ( PickDashboardUuidOrNameOrDescriptionOrUpdatedAtOrProjectUuidOrUpdatedByUserOrOrganizationUuidOrSpaceUuidOrViewsOrFirstViewedAtOrPinnedListUuidOrPinnedListOrder, ) from .pick_db_project_group_access_role import PickDBProjectGroupAccessRole from .pick_dimension_required_attributes import PickDimensionRequiredAttributes -from .pick_explore_error_summary_explore_error_fields import ( - PickExploreErrorSummaryExploreErrorFields, -) +from .pick_explore_error_summary_explore_error_fields import PickExploreErrorSummaryExploreErrorFields from .pick_explore_join_table_or_sql_on_or_type_or_hidden_or_always import ( PickExploreJoinTableOrSqlOnOrTypeOrHiddenOrAlways, ) @@ -513,14 +540,10 @@ ) from .pick_group_member_user_uuid import PickGroupMemberUserUuid from .pick_group_name import PickGroupName -from .pick_lightdash_user_user_uuid_or_first_name_or_last_name import ( - PickLightdashUserUserUuidOrFirstNameOrLastName, -) +from .pick_lightdash_user_user_uuid_or_first_name_or_last_name import PickLightdashUserUserUuidOrFirstNameOrLastName from .pick_notification_viewed import PickNotificationViewed from .pick_organization_name import PickOrganizationName -from .pick_resource_view_item_at_data_uuid_or_pinned_list_order import ( - PickResourceViewItemAtDataUuidOrPinnedListOrder, -) +from .pick_resource_view_item_at_data_uuid_or_pinned_list_order import PickResourceViewItemAtDataUuidOrPinnedListOrder from .pick_saved_chart_exclude_keyof_saved_chart_is_private_or_access import ( PickSavedChartExcludeKeyofSavedChartIsPrivateOrAccess, ) @@ -530,6 +553,12 @@ from .pick_saved_chart_exclude_keyof_saved_chart_is_private_or_access_table_config import ( PickSavedChartExcludeKeyofSavedChartIsPrivateOrAccessTableConfig, ) +from .pick_saved_chart_name_or_description_or_table_name_or_metric_query_or_chart_config_or_table_config_or_slug_or_dashboard_uuid_or_updated_at import ( + PickSavedChartNameOrDescriptionOrTableNameOrMetricQueryOrChartConfigOrTableConfigOrSlugOrDashboardUuidOrUpdatedAt, +) +from .pick_saved_chart_name_or_description_or_table_name_or_metric_query_or_chart_config_or_table_config_or_slug_or_dashboard_uuid_or_updated_at_table_config import ( + PickSavedChartNameOrDescriptionOrTableNameOrMetricQueryOrChartConfigOrTableConfigOrSlugOrDashboardUuidOrUpdatedAtTableConfig, +) from .pick_saved_chart_updated_at_or_updated_by_user_or_pinned_list_order import ( PickSavedChartUpdatedAtOrUpdatedByUserOrPinnedListOrder, ) @@ -554,6 +583,9 @@ from .pick_table_base_name_or_label_or_group_label_or_description_or_required_attributes import ( PickTableBaseNameOrLabelOrGroupLabelOrDescriptionOrRequiredAttributes, ) +from .pick_tag_name_or_color import PickTagNameOrColor +from .pick_tag_name_or_color_or_tag_uuid import PickTagNameOrColorOrTagUuid +from .pick_updated_by_user_user_uuid import PickUpdatedByUserUserUuid from .pick_user_attribute_name_or_description_or_attribute_default import ( PickUserAttributeNameOrDescriptionOrAttributeDefault, ) @@ -595,20 +627,22 @@ from .record_string_compiled_dimension import RecordStringCompiledDimension from .record_string_compiled_metric import RecordStringCompiledMetric from .record_string_dashboard_tile_target import RecordStringDashboardTileTarget +from .record_string_field_or_table_calculation_or_custom_dimension_or_metric import ( + RecordStringFieldOrTableCalculationOrCustomDimensionOrMetric, +) from .record_string_group_type import RecordStringGroupType from .record_string_item_or_additional_metric import RecordStringItemOrAdditionalMetric -from .record_string_lineage_node_dependency_array import ( - RecordStringLineageNodeDependencyArray, -) +from .record_string_lineage_node_dependency_array import RecordStringLineageNodeDependencyArray from .record_string_number import RecordStringNumber -from .record_string_partial_pie_chart_value_options import ( - RecordStringPartialPieChartValueOptions, -) +from .record_string_partial_pie_chart_value_options import RecordStringPartialPieChartValueOptions +from .record_string_record_string_string_or_string_array import RecordStringRecordStringStringOrStringArray from .record_string_series_metadata import RecordStringSeriesMetadata from .record_string_string import RecordStringString from .record_string_string_or_string_array import RecordStringStringOrStringArray from .record_string_type_dimension_type import RecordStringTypeDimensionType from .record_string_unknown import RecordStringUnknown +from .record_string_value_result_value import RecordStringValueResultValue +from .remove_category_from_catalog_item_response_200 import RemoveCategoryFromCatalogItemResponse200 from .required_create_dashboard_tile_base import RequiredCreateDashboardTileBase from .resource_item_category import ResourceItemCategory from .resource_view_chart_item import ResourceViewChartItem @@ -620,6 +654,10 @@ from .resource_view_item_type_space import ResourceViewItemTypeSPACE from .resource_view_space_item import ResourceViewSpaceItem from .resource_view_space_item_data import ResourceViewSpaceItemData +from .rotate_personal_access_token_body import RotatePersonalAccessTokenBody +from .rotate_personal_access_token_response_200 import RotatePersonalAccessTokenResponse200 +from .rotate_personal_access_token_response_200_status import RotatePersonalAccessTokenResponse200Status +from .run_metric_explorer_query_body import RunMetricExplorerQueryBody from .run_sql_query_body import RunSqlQueryBody from .run_sql_query_response_200 import RunSqlQueryResponse200 from .run_sql_query_response_200_status import RunSqlQueryResponse200Status @@ -671,23 +709,25 @@ from .table_calculation_type import TableCalculationType from .table_chart import TableChart from .table_chart_config import TableChartConfig +from .tag import Tag from .threshold_operator import ThresholdOperator from .threshold_options import ThresholdOptions +from .time_dimension_config import TimeDimensionConfig from .time_frames import TimeFrames +from .update_catalog_item_icon_body import UpdateCatalogItemIconBody from .update_group_with_members import UpdateGroupWithMembers from .update_metadata import UpdateMetadata from .update_pinned_item_order import UpdatePinnedItemOrder from .update_project_member import UpdateProjectMember from .update_scheduler_enabled_body import UpdateSchedulerEnabledBody +from .update_scheduler_settings import UpdateSchedulerSettings from .update_space import UpdateSpace -from .update_warehouse_credentials_response_200 import ( - UpdateWarehouseCredentialsResponse200, -) -from .update_warehouse_credentials_response_200_status import ( - UpdateWarehouseCredentialsResponse200Status, -) +from .update_warehouse_credentials_response_200 import UpdateWarehouseCredentialsResponse200 +from .update_warehouse_credentials_response_200_status import UpdateWarehouseCredentialsResponse200Status from .updated_by_user import UpdatedByUser from .upload_metric_gsheet import UploadMetricGsheet +from .upsert_chart_as_code_body import UpsertChartAsCodeBody +from .upsert_dashboard_as_code_body import UpsertDashboardAsCodeBody from .upsert_user_warehouse_credentials import UpsertUserWarehouseCredentials from .user_allowed_organization import UserAllowedOrganization from .user_attribute import UserAttribute @@ -714,6 +754,7 @@ __all__ = ( "ActivateUser", "ActivateUserWithInviteCode", + "AddCategoryToCatalogItemBody", "AdditionalMetric", "AddSpaceGroupAccess", "AddSpaceUserAccess", @@ -722,19 +763,34 @@ "AndFilterGroup", "ApiCalculateTotalResponse", "ApiCalculateTotalResponseStatus", + "ApiChartAsCodeListResponse", + "ApiChartAsCodeListResponseStatus", + "ApiChartAsCodeUpsertResponse", + "ApiChartAsCodeUpsertResponseStatus", "ApiChartListResponse", "ApiChartListResponseStatus", "ApiChartSummaryListResponse", "ApiChartSummaryListResponseStatus", "ApiCreateComment", "ApiCreateCommentStatus", + "ApiCreateDashboardResponse", + "ApiCreateDashboardResponseStatus", + "ApiCreateGroupResponse", + "ApiCreateGroupResponseStatus", "ApiCreateProjectGroupAccess", "ApiCreateProjectGroupAccessStatus", + "ApiCreateTagResponse", + "ApiCreateTagResponseResults", + "ApiCreateTagResponseStatus", "ApiCreateUserAttributeResponse", "ApiCreateUserAttributeResponseStatus", "ApiCsvUrlResponse", "ApiCsvUrlResponseResults", "ApiCsvUrlResponseStatus", + "ApiDashboardAsCodeListResponse", + "ApiDashboardAsCodeListResponseStatus", + "ApiDashboardAsCodeUpsertResponse", + "ApiDashboardAsCodeUpsertResponseStatus", "ApiEmailStatusResponseStatus", "ApiErrorPayload", "ApiErrorPayloadError", @@ -750,14 +806,22 @@ "ApiGetComments", "ApiGetCommentsResults", "ApiGetCommentsStatus", + "ApiGetDashboardsResponse", + "ApiGetDashboardsResponseStatus", "ApiGetLoginOptionsResponse", "ApiGetLoginOptionsResponseStatus", + "ApiGetMetricPeekStatus", + "ApiGetMetricsTree", + "ApiGetMetricsTreeResults", + "ApiGetMetricsTreeStatus", "ApiGetNotifications", "ApiGetNotificationsStatus", "ApiGetProjectGroupAccesses", "ApiGetProjectGroupAccessesStatus", "ApiGetProjectMemberResponse", "ApiGetProjectMemberResponseStatus", + "ApiGetTagsResponse", + "ApiGetTagsResponseStatus", "ApiGroupListResponse", "ApiGroupListResponseStatus", "ApiGroupMembersResponse", @@ -770,6 +834,11 @@ "ApiJobStatusResponse", "ApiJobStatusResponseResults", "ApiJobStatusResponseStatus", + "ApiMetricsCatalog", + "ApiMetricsCatalogStatus", + "ApiMetricsExplorerQueryResultsStatus", + "ApiMetricsTreeEdgePayload", + "ApiMetricsWithAssociatedTimeDimensionResponseStatus", "ApiNotificationResourceType", "ApiNotificationResourceTypeDashboardComments", "ApiOrganization", @@ -811,6 +880,7 @@ "ApiSlackChannelsResponseStatus", "ApiSlackCustomSettingsResponse", "ApiSlackCustomSettingsResponseStatus", + "ApiSortDirection", "ApiSpaceResponse", "ApiSpaceResponseStatus", "ApiSpaceSummaryListResponse", @@ -823,6 +893,8 @@ "ApiTestSchedulerResponse", "ApiTestSchedulerResponseResults", "ApiTestSchedulerResponseStatus", + "ApiUpdateDashboardsResponse", + "ApiUpdateDashboardsResponseStatus", "ApiUpdateProjectGroupAccess", "ApiUpdateProjectGroupAccessStatus", "ApiUserAllowedOrganizationsResponse", @@ -848,10 +920,12 @@ "CatalogField", "CatalogFilter", "CatalogMetadata", + "CatalogMetricsTreeEdge", "CatalogTable", "CatalogType", "CatalogTypeField", "CatalogTypeTable", + "ChartAsCode", "ChartHistory", "ChartKind", "ChartSourceType", @@ -869,7 +943,9 @@ "Compact", "CompactOrAliasType1", "ComparisonFormatTypes", + "CompiledDimension", "CompiledExploreJoin", + "CompiledMetric", "CompiledTable", "CompileQueryResponse200", "CompileQueryResponse200Status", @@ -881,7 +957,17 @@ "ConditionalFormattingWithRange", "ConditionalOperator", "ConditionalRuleConditionalOperatorNumber", + "CreateDashboard", + "CreateDashboardChartTile", + "CreateDashboardLoomTile", + "CreateDashboardMarkdownTile", + "CreateDashboardSemanticViewerChartTile", + "CreateDashboardSqlChartTile", + "CreateDashboardTileBase", "CreateGroup", + "CreatePreviewBody", + "CreatePreviewResponse200", + "CreatePreviewResponse200Status", "CreateProjectMember", "CreatePullRequestForChartFieldsResponse200", "CreatePullRequestForChartFieldsResponse200Status", @@ -900,12 +986,16 @@ "CustomDimensionTypeSQL", "CustomFormat", "CustomFormatType", + "CustomIcon", "CustomLabel", "CustomSqlDimension", "CustomVis", "CustomVisConfig", "CustomVisSpec", + "Dashboard", + "DashboardAsCode", "DashboardBasicDetails", + "DashboardBasicDetailsWithTileTypes", "DashboardChartTile", "DashboardChartTileProperties", "DashboardChartTilePropertiesProperties", @@ -931,6 +1021,7 @@ "DashboardTileTypesSAVEDCHART", "DashboardTileTypesSEMANTICVIEWERCHART", "DashboardTileTypesSQLCHART", + "DashboardTileWithoutUuids", "DateGranularity", "DbtAzureDevOpsProjectConfig", "DbtBitBucketProjectConfig", @@ -949,14 +1040,22 @@ "DbtProjectTypeGITLAB", "DbtProjectTypeNONE", "DbtSemanticLayerConnection", + "DefaultTimeDimension", "DeleteSchedulerResponse201", "DeleteSchedulerResponse201Status", "DimensionType", + "DimensionTypeDATE", + "DimensionTypeTIMESTAMP", "DownloadCsvFromExploreBody", "DownloadCsvFromExploreBodyCustomLabels", "DownloadCsvFromExploreResponse200", "DownloadCsvFromExploreResponse200Results", "DownloadCsvFromExploreResponse200Status", + "DownloadCsvFromSavedChartBody", + "DownloadCsvFromSavedChartResponse200", + "DownloadCsvFromSavedChartResponse200Results", + "DownloadCsvFromSavedChartResponse200Status", + "DuplicateDashboardParams", "EchartsGrid", "EchartsLegend", "EchartsLegendAlign", @@ -966,10 +1065,15 @@ "EmailOneTimePassword", "EmailOneTimePasswordExpiring", "EmailStatus", + "EmojiIcon", "Explore", "ExploreTables", + "ExploreType", "FieldTarget", "FieldType", + "FieldTypeDIMENSION", + "FieldTypeMETRIC", + "FieldUrl", "FilterGroupResponseType0", "FilterGroupResponseType1", "FilterRule", @@ -1013,6 +1117,10 @@ "InlineError", "InlineErrorType", "KnexPaginateArgs", + "KnexPaginatedDataApiMetricsCatalogResults", + "KnexPaginatedDataApiMetricsCatalogResultsPagination", + "KnexPaginatedDataGroupArrayOrGroupWithMembersArray", + "KnexPaginatedDataGroupArrayOrGroupWithMembersArrayPagination", "KnexPaginatedDataOrganizationMemberProfileArray", "KnexPaginatedDataOrganizationMemberProfileArrayPagination", "LightdashUser", @@ -1026,6 +1134,12 @@ "MarkLineDataLineStyle", "MarkLineLabel", "MarkLineLineStyle", + "MetricExplorerComparisonDIFFERENTMETRIC", + "MetricExplorerComparisonNONE", + "MetricExplorerComparisonPREVIOUSPERIOD", + "MetricExplorerComparisonTypeType0", + "MetricExplorerComparisonTypeType1", + "MetricExplorerComparisonTypeType2", "MetricFilterRule", "MetricFilterRuleTarget", "MetricQuery", @@ -1055,10 +1169,18 @@ "OrganizationProject", "PartialCompleteCartesianChartLayout", "PartialCompleteEChartsConfig", + "PartialCubeSemanticLayerConnection", + "PartialDbtSemanticLayerConnection", "PartialOmitOrganizationOrganizationUuidOrNeedsProject", + "PartialPickDbTagNameOrColor", "PartialSummaryExtraFields", + "PersonalAccessToken", + "PersonalAccessTokenWithToken", "PickAllowedEmailDomainsExcludeKeyofAllowedEmailDomainsOrganizationUuid", "PickAllowedEmailDomainsExcludeKeyofAllowedEmailDomainsOrganizationUuidProjectsItem", + "PickCatalogFieldCatalogSearchUuidOrNameOrTableName", + "PickChartAsCodeExcludeKeyofChartAsCodeMetricQueryOrChartConfig", + "PickChartAsCodeExcludeKeyofChartAsCodeMetricQueryOrChartConfigTableConfig", "PickChartSummaryUuidOrNameOrSpaceUuidOrSpaceNameOrDashboardNameOrDashboardUuidOrChartKind", "PickChartVersionChartUuidOrVersionUuidOrCreatedAtOrCreatedBy", "PickCommentTextOrReplyToOrMentionsOrTextHtml", @@ -1080,8 +1202,13 @@ "PickCreateSnowflakeCredentialsTypeOrUserOrPassword", "PickCreateTrinoCredentialsExcludeKeyofCreateTrinoCredentialsSensitiveCredentialsFieldNames", "PickCreateTrinoCredentialsTypeOrUserOrPassword", + "PickDashboardAsCodeExcludeKeyofDashboardAsCodeFiltersOrTilesOrDescription", "PickDashboardBasicDetailsUuidOrSpaceUuidOrDescriptionOrNameOrViewsOrFirstViewedAtOrPinnedListUuidOrPinnedListOrderOrUpdatedAtOrUpdatedByUserOrValidationErrors", "PickDashboardExcludeKeyofDashboardIsPrivateOrAccess", + "PickDashboardNameOrDescriptionOrUpdatedAtOrFiltersOrTabsOrSlug", + "PickDashboardTileAtPropertiesExcludeKeyofDashboardTileAtPropertiesSavedChartUuidOrSavedSqlUuidOrSavedSemanticViewerChartUuid", + "PickDashboardTileExcludeKeyofDashboardTileProperties", + "PickDashboardUuidOrNameOrDescriptionOrSpaceUuid", "PickDashboardUuidOrNameOrDescriptionOrUpdatedAtOrProjectUuidOrUpdatedByUserOrOrganizationUuidOrSpaceUuidOrViewsOrFirstViewedAtOrPinnedListUuidOrPinnedListOrder", "PickDBProjectGroupAccessRole", "PickDimensionRequiredAttributes", @@ -1098,6 +1225,8 @@ "PickSavedChartExcludeKeyofSavedChartIsPrivateOrAccess", "PickSavedChartExcludeKeyofSavedChartIsPrivateOrAccessPivotConfig", "PickSavedChartExcludeKeyofSavedChartIsPrivateOrAccessTableConfig", + "PickSavedChartNameOrDescriptionOrTableNameOrMetricQueryOrChartConfigOrTableConfigOrSlugOrDashboardUuidOrUpdatedAt", + "PickSavedChartNameOrDescriptionOrTableNameOrMetricQueryOrChartConfigOrTableConfigOrSlugOrDashboardUuidOrUpdatedAtTableConfig", "PickSavedChartUpdatedAtOrUpdatedByUserOrPinnedListOrder", "PickSavedChartUuidOrNameOrDescriptionOrSpaceNameOrSpaceUuidOrProjectUuidOrOrganizationUuidOrPinnedListUuidOrDashboardUuidOrDashboardNameOrSlug", "PickShareUrlPathOrParams", @@ -1108,6 +1237,9 @@ "PickSpaceSummaryExcludeKeyofSpaceSummaryUserAccess", "PickSshKeyPairPublicKey", "PickTableBaseNameOrLabelOrGroupLabelOrDescriptionOrRequiredAttributes", + "PickTagNameOrColor", + "PickTagNameOrColorOrTagUuid", + "PickUpdatedByUserUserUuid", "PickUserAttributeNameOrDescriptionOrAttributeDefault", "PickUserAttributeValueExcludeKeyofUserAttributeValueEmail", "PickValidationResponseBaseExcludeKeyofValidationResponseBaseName", @@ -1141,16 +1273,20 @@ "RecordStringCompiledDimension", "RecordStringCompiledMetric", "RecordStringDashboardTileTarget", + "RecordStringFieldOrTableCalculationOrCustomDimensionOrMetric", "RecordStringGroupType", "RecordStringItemOrAdditionalMetric", "RecordStringLineageNodeDependencyArray", "RecordStringNumber", "RecordStringPartialPieChartValueOptions", + "RecordStringRecordStringStringOrStringArray", "RecordStringSeriesMetadata", "RecordStringString", "RecordStringStringOrStringArray", "RecordStringTypeDimensionType", "RecordStringUnknown", + "RecordStringValueResultValue", + "RemoveCategoryFromCatalogItemResponse200", "RequiredCreateDashboardTileBase", "ResourceItemCategory", "ResourceViewChartItem", @@ -1162,6 +1298,10 @@ "ResourceViewItemTypeSPACE", "ResourceViewSpaceItem", "ResourceViewSpaceItemData", + "RotatePersonalAccessTokenBody", + "RotatePersonalAccessTokenResponse200", + "RotatePersonalAccessTokenResponse200Status", + "RunMetricExplorerQueryBody", "RunSqlQueryBody", "RunSqlQueryResponse200", "RunSqlQueryResponse200Status", @@ -1213,19 +1353,25 @@ "TableCalculationType", "TableChart", "TableChartConfig", + "Tag", "ThresholdOperator", "ThresholdOptions", + "TimeDimensionConfig", "TimeFrames", + "UpdateCatalogItemIconBody", "UpdatedByUser", "UpdateGroupWithMembers", "UpdateMetadata", "UpdatePinnedItemOrder", "UpdateProjectMember", "UpdateSchedulerEnabledBody", + "UpdateSchedulerSettings", "UpdateSpace", "UpdateWarehouseCredentialsResponse200", "UpdateWarehouseCredentialsResponse200Status", "UploadMetricGsheet", + "UpsertChartAsCodeBody", + "UpsertDashboardAsCodeBody", "UpsertUserWarehouseCredentials", "UserAllowedOrganization", "UserAttribute", diff --git a/lightdash_client/models/activate_user.py b/lightdash_client/models/activate_user.py index 1dbd420..1416ae9 100644 --- a/lightdash_client/models/activate_user.py +++ b/lightdash_client/models/activate_user.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="ActivateUser") diff --git a/lightdash_client/models/activate_user_with_invite_code.py b/lightdash_client/models/activate_user_with_invite_code.py index 132cf40..f5043ab 100644 --- a/lightdash_client/models/activate_user_with_invite_code.py +++ b/lightdash_client/models/activate_user_with_invite_code.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="ActivateUserWithInviteCode") diff --git a/lightdash_client/models/add_category_to_catalog_item_body.py b/lightdash_client/models/add_category_to_catalog_item_body.py new file mode 100644 index 0000000..ac1a22d --- /dev/null +++ b/lightdash_client/models/add_category_to_catalog_item_body.py @@ -0,0 +1,60 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="AddCategoryToCatalogItemBody") + + +@_attrs_define +class AddCategoryToCatalogItemBody: + """ + Attributes: + tag_uuid (str): + """ + + tag_uuid: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + tag_uuid = self.tag_uuid + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "tagUuid": tag_uuid, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + tag_uuid = d.pop("tagUuid") + + add_category_to_catalog_item_body = cls( + tag_uuid=tag_uuid, + ) + + add_category_to_catalog_item_body.additional_properties = d + return add_category_to_catalog_item_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/add_space_group_access.py b/lightdash_client/models/add_space_group_access.py index a44bd8c..8c4ce6a 100644 --- a/lightdash_client/models/add_space_group_access.py +++ b/lightdash_client/models/add_space_group_access.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.space_member_role import SpaceMemberRole +from ..types import UNSET, Unset T = TypeVar("T", bound="AddSpaceGroupAccess") diff --git a/lightdash_client/models/add_space_user_access.py b/lightdash_client/models/add_space_user_access.py index 658fdec..420fe6b 100644 --- a/lightdash_client/models/add_space_user_access.py +++ b/lightdash_client/models/add_space_user_access.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.space_member_role import SpaceMemberRole +from ..types import UNSET, Unset T = TypeVar("T", bound="AddSpaceUserAccess") diff --git a/lightdash_client/models/additional_metric.py b/lightdash_client/models/additional_metric.py index fecef4b..f458166 100644 --- a/lightdash_client/models/additional_metric.py +++ b/lightdash_client/models/additional_metric.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -58,6 +58,9 @@ class AdditionalMetric: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.custom_format import CustomFormat + from ..models.metric_filter_rule import MetricFilterRule + type = self.type.value sql = self.sql diff --git a/lightdash_client/models/allowed_email_domains.py b/lightdash_client/models/allowed_email_domains.py index 9038aec..0e96994 100644 --- a/lightdash_client/models/allowed_email_domains.py +++ b/lightdash_client/models/allowed_email_domains.py @@ -1,19 +1,16 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.organization_member_role_editor import OrganizationMemberRoleEDITOR -from ..models.organization_member_role_interactiveviewer import ( - OrganizationMemberRoleINTERACTIVEVIEWER, -) +from ..models.organization_member_role_interactiveviewer import OrganizationMemberRoleINTERACTIVEVIEWER from ..models.organization_member_role_member import OrganizationMemberRoleMEMBER from ..models.organization_member_role_viewer import OrganizationMemberRoleVIEWER +from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.allowed_email_domains_projects_item import ( - AllowedEmailDomainsProjectsItem, - ) + from ..models.allowed_email_domains_projects_item import AllowedEmailDomainsProjectsItem T = TypeVar("T", bound="AllowedEmailDomains") @@ -42,6 +39,8 @@ class AllowedEmailDomains: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.allowed_email_domains_projects_item import AllowedEmailDomainsProjectsItem + projects = [] for projects_item_data in self.projects: projects_item = projects_item_data.to_dict() @@ -76,9 +75,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.allowed_email_domains_projects_item import ( - AllowedEmailDomainsProjectsItem, - ) + from ..models.allowed_email_domains_projects_item import AllowedEmailDomainsProjectsItem d = src_dict.copy() projects = [] diff --git a/lightdash_client/models/allowed_email_domains_projects_item.py b/lightdash_client/models/allowed_email_domains_projects_item.py index 72b79f7..b58bb67 100644 --- a/lightdash_client/models/allowed_email_domains_projects_item.py +++ b/lightdash_client/models/allowed_email_domains_projects_item.py @@ -1,13 +1,12 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.project_member_role_editor import ProjectMemberRoleEDITOR -from ..models.project_member_role_interactiveviewer import ( - ProjectMemberRoleINTERACTIVEVIEWER, -) +from ..models.project_member_role_interactiveviewer import ProjectMemberRoleINTERACTIVEVIEWER from ..models.project_member_role_viewer import ProjectMemberRoleVIEWER +from ..types import UNSET, Unset T = TypeVar("T", bound="AllowedEmailDomainsProjectsItem") diff --git a/lightdash_client/models/and_filter_group.py b/lightdash_client/models/and_filter_group.py index 0206547..eb2a109 100644 --- a/lightdash_client/models/and_filter_group.py +++ b/lightdash_client/models/and_filter_group.py @@ -1,8 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.filter_rule import FilterRule from ..models.or_filter_group import OrFilterGroup @@ -24,6 +26,7 @@ class AndFilterGroup: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.filter_rule import FilterRule from ..models.or_filter_group import OrFilterGroup and_ = [] diff --git a/lightdash_client/models/api_calculate_total_response.py b/lightdash_client/models/api_calculate_total_response.py index ce3d660..8d42ea8 100644 --- a/lightdash_client/models/api_calculate_total_response.py +++ b/lightdash_client/models/api_calculate_total_response.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_calculate_total_response_status import ApiCalculateTotalResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.record_string_number import RecordStringNumber @@ -25,6 +26,8 @@ class ApiCalculateTotalResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.record_string_number import RecordStringNumber + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_chart_as_code_list_response.py b/lightdash_client/models/api_chart_as_code_list_response.py new file mode 100644 index 0000000..c7e1798 --- /dev/null +++ b/lightdash_client/models/api_chart_as_code_list_response.py @@ -0,0 +1,85 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_chart_as_code_list_response_status import ApiChartAsCodeListResponseStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.chart_as_code import ChartAsCode + + +T = TypeVar("T", bound="ApiChartAsCodeListResponse") + + +@_attrs_define +class ApiChartAsCodeListResponse: + """ + Attributes: + results (List['ChartAsCode']): + status (ApiChartAsCodeListResponseStatus): + """ + + results: List["ChartAsCode"] + status: ApiChartAsCodeListResponseStatus + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.chart_as_code import ChartAsCode + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + status = self.status.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "results": results, + "status": status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.chart_as_code import ChartAsCode + + d = src_dict.copy() + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = ChartAsCode.from_dict(results_item_data) + + results.append(results_item) + + status = ApiChartAsCodeListResponseStatus(d.pop("status")) + + api_chart_as_code_list_response = cls( + results=results, + status=status, + ) + + api_chart_as_code_list_response.additional_properties = d + return api_chart_as_code_list_response + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/api_chart_as_code_list_response_status.py b/lightdash_client/models/api_chart_as_code_list_response_status.py new file mode 100644 index 0000000..ebeb20b --- /dev/null +++ b/lightdash_client/models/api_chart_as_code_list_response_status.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ApiChartAsCodeListResponseStatus(str, Enum): + OK = "ok" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/api_chart_as_code_upsert_response.py b/lightdash_client/models/api_chart_as_code_upsert_response.py new file mode 100644 index 0000000..08be4c0 --- /dev/null +++ b/lightdash_client/models/api_chart_as_code_upsert_response.py @@ -0,0 +1,77 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_chart_as_code_upsert_response_status import ApiChartAsCodeUpsertResponseStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.promotion_changes import PromotionChanges + + +T = TypeVar("T", bound="ApiChartAsCodeUpsertResponse") + + +@_attrs_define +class ApiChartAsCodeUpsertResponse: + """ + Attributes: + results (PromotionChanges): + status (ApiChartAsCodeUpsertResponseStatus): + """ + + results: "PromotionChanges" + status: ApiChartAsCodeUpsertResponseStatus + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.promotion_changes import PromotionChanges + + results = self.results.to_dict() + + status = self.status.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "results": results, + "status": status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.promotion_changes import PromotionChanges + + d = src_dict.copy() + results = PromotionChanges.from_dict(d.pop("results")) + + status = ApiChartAsCodeUpsertResponseStatus(d.pop("status")) + + api_chart_as_code_upsert_response = cls( + results=results, + status=status, + ) + + api_chart_as_code_upsert_response.additional_properties = d + return api_chart_as_code_upsert_response + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/api_chart_as_code_upsert_response_status.py b/lightdash_client/models/api_chart_as_code_upsert_response_status.py new file mode 100644 index 0000000..afe2612 --- /dev/null +++ b/lightdash_client/models/api_chart_as_code_upsert_response_status.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ApiChartAsCodeUpsertResponseStatus(str, Enum): + OK = "ok" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/api_chart_list_response.py b/lightdash_client/models/api_chart_list_response.py index 6496ea0..b02da97 100644 --- a/lightdash_client/models/api_chart_list_response.py +++ b/lightdash_client/models/api_chart_list_response.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_chart_list_response_status import ApiChartListResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.space_query import SpaceQuery @@ -25,6 +26,8 @@ class ApiChartListResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.space_query import SpaceQuery + results = [] for results_item_data in self.results: results_item = results_item_data.to_dict() diff --git a/lightdash_client/models/api_chart_summary_list_response.py b/lightdash_client/models/api_chart_summary_list_response.py index bef362b..6b601e3 100644 --- a/lightdash_client/models/api_chart_summary_list_response.py +++ b/lightdash_client/models/api_chart_summary_list_response.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_chart_summary_list_response_status import ( - ApiChartSummaryListResponseStatus, -) +from ..models.api_chart_summary_list_response_status import ApiChartSummaryListResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.chart_summary import ChartSummary @@ -27,6 +26,8 @@ class ApiChartSummaryListResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.chart_summary import ChartSummary + results = [] for results_item_data in self.results: results_item = results_item_data.to_dict() diff --git a/lightdash_client/models/api_create_comment.py b/lightdash_client/models/api_create_comment.py index 1f1ad1f..7e229fe 100644 --- a/lightdash_client/models/api_create_comment.py +++ b/lightdash_client/models/api_create_comment.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_create_comment_status import ApiCreateCommentStatus +from ..types import UNSET, Unset T = TypeVar("T", bound="ApiCreateComment") diff --git a/lightdash_client/models/api_create_dashboard_response.py b/lightdash_client/models/api_create_dashboard_response.py new file mode 100644 index 0000000..1abe466 --- /dev/null +++ b/lightdash_client/models/api_create_dashboard_response.py @@ -0,0 +1,77 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_create_dashboard_response_status import ApiCreateDashboardResponseStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dashboard import Dashboard + + +T = TypeVar("T", bound="ApiCreateDashboardResponse") + + +@_attrs_define +class ApiCreateDashboardResponse: + """ + Attributes: + results (Dashboard): + status (ApiCreateDashboardResponseStatus): + """ + + results: "Dashboard" + status: ApiCreateDashboardResponseStatus + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard import Dashboard + + results = self.results.to_dict() + + status = self.status.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "results": results, + "status": status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.dashboard import Dashboard + + d = src_dict.copy() + results = Dashboard.from_dict(d.pop("results")) + + status = ApiCreateDashboardResponseStatus(d.pop("status")) + + api_create_dashboard_response = cls( + results=results, + status=status, + ) + + api_create_dashboard_response.additional_properties = d + return api_create_dashboard_response + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/api_create_dashboard_response_status.py b/lightdash_client/models/api_create_dashboard_response_status.py new file mode 100644 index 0000000..95d9d4b --- /dev/null +++ b/lightdash_client/models/api_create_dashboard_response_status.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ApiCreateDashboardResponseStatus(str, Enum): + OK = "ok" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/api_create_group_response.py b/lightdash_client/models/api_create_group_response.py new file mode 100644 index 0000000..848b1c3 --- /dev/null +++ b/lightdash_client/models/api_create_group_response.py @@ -0,0 +1,77 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_create_group_response_status import ApiCreateGroupResponseStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.group_with_members import GroupWithMembers + + +T = TypeVar("T", bound="ApiCreateGroupResponse") + + +@_attrs_define +class ApiCreateGroupResponse: + """ + Attributes: + results (GroupWithMembers): Details for a group including a list of the group's members. + status (ApiCreateGroupResponseStatus): + """ + + results: "GroupWithMembers" + status: ApiCreateGroupResponseStatus + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.group_with_members import GroupWithMembers + + results = self.results.to_dict() + + status = self.status.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "results": results, + "status": status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.group_with_members import GroupWithMembers + + d = src_dict.copy() + results = GroupWithMembers.from_dict(d.pop("results")) + + status = ApiCreateGroupResponseStatus(d.pop("status")) + + api_create_group_response = cls( + results=results, + status=status, + ) + + api_create_group_response.additional_properties = d + return api_create_group_response + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/api_create_group_response_status.py b/lightdash_client/models/api_create_group_response_status.py new file mode 100644 index 0000000..e809dc1 --- /dev/null +++ b/lightdash_client/models/api_create_group_response_status.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ApiCreateGroupResponseStatus(str, Enum): + OK = "ok" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/api_create_project_group_access.py b/lightdash_client/models/api_create_project_group_access.py index 8a88831..d3df091 100644 --- a/lightdash_client/models/api_create_project_group_access.py +++ b/lightdash_client/models/api_create_project_group_access.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_create_project_group_access_status import ( - ApiCreateProjectGroupAccessStatus, -) +from ..models.api_create_project_group_access_status import ApiCreateProjectGroupAccessStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.project_group_access import ProjectGroupAccess @@ -27,6 +26,8 @@ class ApiCreateProjectGroupAccess: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.project_group_access import ProjectGroupAccess + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_create_tag_response.py b/lightdash_client/models/api_create_tag_response.py new file mode 100644 index 0000000..ff3c628 --- /dev/null +++ b/lightdash_client/models/api_create_tag_response.py @@ -0,0 +1,77 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_create_tag_response_status import ApiCreateTagResponseStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.api_create_tag_response_results import ApiCreateTagResponseResults + + +T = TypeVar("T", bound="ApiCreateTagResponse") + + +@_attrs_define +class ApiCreateTagResponse: + """ + Attributes: + results (ApiCreateTagResponseResults): + status (ApiCreateTagResponseStatus): + """ + + results: "ApiCreateTagResponseResults" + status: ApiCreateTagResponseStatus + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.api_create_tag_response_results import ApiCreateTagResponseResults + + results = self.results.to_dict() + + status = self.status.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "results": results, + "status": status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.api_create_tag_response_results import ApiCreateTagResponseResults + + d = src_dict.copy() + results = ApiCreateTagResponseResults.from_dict(d.pop("results")) + + status = ApiCreateTagResponseStatus(d.pop("status")) + + api_create_tag_response = cls( + results=results, + status=status, + ) + + api_create_tag_response.additional_properties = d + return api_create_tag_response + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/api_create_tag_response_results.py b/lightdash_client/models/api_create_tag_response_results.py new file mode 100644 index 0000000..a3b317c --- /dev/null +++ b/lightdash_client/models/api_create_tag_response_results.py @@ -0,0 +1,60 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ApiCreateTagResponseResults") + + +@_attrs_define +class ApiCreateTagResponseResults: + """ + Attributes: + tag_uuid (str): + """ + + tag_uuid: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + tag_uuid = self.tag_uuid + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "tagUuid": tag_uuid, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + tag_uuid = d.pop("tagUuid") + + api_create_tag_response_results = cls( + tag_uuid=tag_uuid, + ) + + api_create_tag_response_results.additional_properties = d + return api_create_tag_response_results + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/api_create_tag_response_status.py b/lightdash_client/models/api_create_tag_response_status.py new file mode 100644 index 0000000..ae478b7 --- /dev/null +++ b/lightdash_client/models/api_create_tag_response_status.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ApiCreateTagResponseStatus(str, Enum): + OK = "ok" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/api_create_user_attribute_response.py b/lightdash_client/models/api_create_user_attribute_response.py index d4e8dca..5d1ff53 100644 --- a/lightdash_client/models/api_create_user_attribute_response.py +++ b/lightdash_client/models/api_create_user_attribute_response.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_create_user_attribute_response_status import ( - ApiCreateUserAttributeResponseStatus, -) +from ..models.api_create_user_attribute_response_status import ApiCreateUserAttributeResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.user_attribute import UserAttribute @@ -27,6 +26,8 @@ class ApiCreateUserAttributeResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.user_attribute import UserAttribute + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_csv_url_response.py b/lightdash_client/models/api_csv_url_response.py index ea77874..dd19d0d 100644 --- a/lightdash_client/models/api_csv_url_response.py +++ b/lightdash_client/models/api_csv_url_response.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_csv_url_response_status import ApiCsvUrlResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.api_csv_url_response_results import ApiCsvUrlResponseResults @@ -25,6 +26,8 @@ class ApiCsvUrlResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.api_csv_url_response_results import ApiCsvUrlResponseResults + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_csv_url_response_results.py b/lightdash_client/models/api_csv_url_response_results.py index 32221ce..f40e346 100644 --- a/lightdash_client/models/api_csv_url_response_results.py +++ b/lightdash_client/models/api_csv_url_response_results.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="ApiCsvUrlResponseResults") diff --git a/lightdash_client/models/api_dashboard_as_code_list_response.py b/lightdash_client/models/api_dashboard_as_code_list_response.py new file mode 100644 index 0000000..56c7772 --- /dev/null +++ b/lightdash_client/models/api_dashboard_as_code_list_response.py @@ -0,0 +1,85 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_dashboard_as_code_list_response_status import ApiDashboardAsCodeListResponseStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dashboard_as_code import DashboardAsCode + + +T = TypeVar("T", bound="ApiDashboardAsCodeListResponse") + + +@_attrs_define +class ApiDashboardAsCodeListResponse: + """ + Attributes: + results (List['DashboardAsCode']): + status (ApiDashboardAsCodeListResponseStatus): + """ + + results: List["DashboardAsCode"] + status: ApiDashboardAsCodeListResponseStatus + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_as_code import DashboardAsCode + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + status = self.status.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "results": results, + "status": status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.dashboard_as_code import DashboardAsCode + + d = src_dict.copy() + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = DashboardAsCode.from_dict(results_item_data) + + results.append(results_item) + + status = ApiDashboardAsCodeListResponseStatus(d.pop("status")) + + api_dashboard_as_code_list_response = cls( + results=results, + status=status, + ) + + api_dashboard_as_code_list_response.additional_properties = d + return api_dashboard_as_code_list_response + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/api_dashboard_as_code_list_response_status.py b/lightdash_client/models/api_dashboard_as_code_list_response_status.py new file mode 100644 index 0000000..4bcb048 --- /dev/null +++ b/lightdash_client/models/api_dashboard_as_code_list_response_status.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ApiDashboardAsCodeListResponseStatus(str, Enum): + OK = "ok" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/api_dashboard_as_code_upsert_response.py b/lightdash_client/models/api_dashboard_as_code_upsert_response.py new file mode 100644 index 0000000..c90cab2 --- /dev/null +++ b/lightdash_client/models/api_dashboard_as_code_upsert_response.py @@ -0,0 +1,77 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_dashboard_as_code_upsert_response_status import ApiDashboardAsCodeUpsertResponseStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.promotion_changes import PromotionChanges + + +T = TypeVar("T", bound="ApiDashboardAsCodeUpsertResponse") + + +@_attrs_define +class ApiDashboardAsCodeUpsertResponse: + """ + Attributes: + results (PromotionChanges): + status (ApiDashboardAsCodeUpsertResponseStatus): + """ + + results: "PromotionChanges" + status: ApiDashboardAsCodeUpsertResponseStatus + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.promotion_changes import PromotionChanges + + results = self.results.to_dict() + + status = self.status.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "results": results, + "status": status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.promotion_changes import PromotionChanges + + d = src_dict.copy() + results = PromotionChanges.from_dict(d.pop("results")) + + status = ApiDashboardAsCodeUpsertResponseStatus(d.pop("status")) + + api_dashboard_as_code_upsert_response = cls( + results=results, + status=status, + ) + + api_dashboard_as_code_upsert_response.additional_properties = d + return api_dashboard_as_code_upsert_response + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/api_dashboard_as_code_upsert_response_status.py b/lightdash_client/models/api_dashboard_as_code_upsert_response_status.py new file mode 100644 index 0000000..64d949c --- /dev/null +++ b/lightdash_client/models/api_dashboard_as_code_upsert_response_status.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ApiDashboardAsCodeUpsertResponseStatus(str, Enum): + OK = "ok" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/api_error_payload.py b/lightdash_client/models/api_error_payload.py index f73e2e2..6d021eb 100644 --- a/lightdash_client/models/api_error_payload.py +++ b/lightdash_client/models/api_error_payload.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_error_payload_status import ApiErrorPayloadStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.api_error_payload_error import ApiErrorPayloadError @@ -27,6 +28,8 @@ class ApiErrorPayload: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.api_error_payload_error import ApiErrorPayloadError + error = self.error.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_error_payload_error.py b/lightdash_client/models/api_error_payload_error.py index c0ce935..9c71637 100644 --- a/lightdash_client/models/api_error_payload_error.py +++ b/lightdash_client/models/api_error_payload_error.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/api_gdrive_access_token_response.py b/lightdash_client/models/api_gdrive_access_token_response.py index 98a905c..0ec8082 100644 --- a/lightdash_client/models/api_gdrive_access_token_response.py +++ b/lightdash_client/models/api_gdrive_access_token_response.py @@ -1,11 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_gdrive_access_token_response_status import ( - ApiGdriveAccessTokenResponseStatus, -) +from ..models.api_gdrive_access_token_response_status import ApiGdriveAccessTokenResponseStatus +from ..types import UNSET, Unset T = TypeVar("T", bound="ApiGdriveAccessTokenResponse") diff --git a/lightdash_client/models/api_get_authenticated_user_response.py b/lightdash_client/models/api_get_authenticated_user_response.py index a51dc40..ffae4ff 100644 --- a/lightdash_client/models/api_get_authenticated_user_response.py +++ b/lightdash_client/models/api_get_authenticated_user_response.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_get_authenticated_user_response_status import ( - ApiGetAuthenticatedUserResponseStatus, -) +from ..models.api_get_authenticated_user_response_status import ApiGetAuthenticatedUserResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.lightdash_user import LightdashUser @@ -28,6 +27,8 @@ class ApiGetAuthenticatedUserResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.lightdash_user import LightdashUser + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_get_chart_history_response.py b/lightdash_client/models/api_get_chart_history_response.py index 4e00d1a..37200c9 100644 --- a/lightdash_client/models/api_get_chart_history_response.py +++ b/lightdash_client/models/api_get_chart_history_response.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_get_chart_history_response_status import ( - ApiGetChartHistoryResponseStatus, -) +from ..models.api_get_chart_history_response_status import ApiGetChartHistoryResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.chart_history import ChartHistory @@ -27,6 +26,8 @@ class ApiGetChartHistoryResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.chart_history import ChartHistory + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_get_chart_version_response.py b/lightdash_client/models/api_get_chart_version_response.py index b0989b0..f5877c0 100644 --- a/lightdash_client/models/api_get_chart_version_response.py +++ b/lightdash_client/models/api_get_chart_version_response.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_get_chart_version_response_status import ( - ApiGetChartVersionResponseStatus, -) +from ..models.api_get_chart_version_response_status import ApiGetChartVersionResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.chart_version import ChartVersion @@ -27,6 +26,8 @@ class ApiGetChartVersionResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.chart_version import ChartVersion + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_get_comments.py b/lightdash_client/models/api_get_comments.py index 21919dc..b4d117e 100644 --- a/lightdash_client/models/api_get_comments.py +++ b/lightdash_client/models/api_get_comments.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_get_comments_status import ApiGetCommentsStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.api_get_comments_results import ApiGetCommentsResults @@ -25,6 +26,8 @@ class ApiGetComments: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.api_get_comments_results import ApiGetCommentsResults + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_get_comments_results.py b/lightdash_client/models/api_get_comments_results.py index 124a487..36b3907 100644 --- a/lightdash_client/models/api_get_comments_results.py +++ b/lightdash_client/models/api_get_comments_results.py @@ -1,8 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.comment import Comment @@ -17,6 +19,8 @@ class ApiGetCommentsResults: additional_properties: Dict[str, List["Comment"]] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.comment import Comment + field_dict: Dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = [] diff --git a/lightdash_client/models/api_get_dashboards_response.py b/lightdash_client/models/api_get_dashboards_response.py new file mode 100644 index 0000000..2889339 --- /dev/null +++ b/lightdash_client/models/api_get_dashboards_response.py @@ -0,0 +1,85 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_get_dashboards_response_status import ApiGetDashboardsResponseStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dashboard_basic_details_with_tile_types import DashboardBasicDetailsWithTileTypes + + +T = TypeVar("T", bound="ApiGetDashboardsResponse") + + +@_attrs_define +class ApiGetDashboardsResponse: + """ + Attributes: + results (List['DashboardBasicDetailsWithTileTypes']): + status (ApiGetDashboardsResponseStatus): + """ + + results: List["DashboardBasicDetailsWithTileTypes"] + status: ApiGetDashboardsResponseStatus + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_basic_details_with_tile_types import DashboardBasicDetailsWithTileTypes + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + status = self.status.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "results": results, + "status": status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.dashboard_basic_details_with_tile_types import DashboardBasicDetailsWithTileTypes + + d = src_dict.copy() + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = DashboardBasicDetailsWithTileTypes.from_dict(results_item_data) + + results.append(results_item) + + status = ApiGetDashboardsResponseStatus(d.pop("status")) + + api_get_dashboards_response = cls( + results=results, + status=status, + ) + + api_get_dashboards_response.additional_properties = d + return api_get_dashboards_response + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/api_get_dashboards_response_status.py b/lightdash_client/models/api_get_dashboards_response_status.py new file mode 100644 index 0000000..3b1833c --- /dev/null +++ b/lightdash_client/models/api_get_dashboards_response_status.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ApiGetDashboardsResponseStatus(str, Enum): + OK = "ok" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/api_get_login_options_response.py b/lightdash_client/models/api_get_login_options_response.py index 259978f..0db3bf4 100644 --- a/lightdash_client/models/api_get_login_options_response.py +++ b/lightdash_client/models/api_get_login_options_response.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_get_login_options_response_status import ( - ApiGetLoginOptionsResponseStatus, -) +from ..models.api_get_login_options_response_status import ApiGetLoginOptionsResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.login_options import LoginOptions @@ -27,6 +26,8 @@ class ApiGetLoginOptionsResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.login_options import LoginOptions + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_get_metric_peek_status.py b/lightdash_client/models/api_get_metric_peek_status.py new file mode 100644 index 0000000..3c28ceb --- /dev/null +++ b/lightdash_client/models/api_get_metric_peek_status.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ApiGetMetricPeekStatus(str, Enum): + OK = "ok" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/api_get_metrics_tree.py b/lightdash_client/models/api_get_metrics_tree.py new file mode 100644 index 0000000..f3de670 --- /dev/null +++ b/lightdash_client/models/api_get_metrics_tree.py @@ -0,0 +1,77 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_get_metrics_tree_status import ApiGetMetricsTreeStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.api_get_metrics_tree_results import ApiGetMetricsTreeResults + + +T = TypeVar("T", bound="ApiGetMetricsTree") + + +@_attrs_define +class ApiGetMetricsTree: + """ + Attributes: + results (ApiGetMetricsTreeResults): + status (ApiGetMetricsTreeStatus): + """ + + results: "ApiGetMetricsTreeResults" + status: ApiGetMetricsTreeStatus + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.api_get_metrics_tree_results import ApiGetMetricsTreeResults + + results = self.results.to_dict() + + status = self.status.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "results": results, + "status": status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.api_get_metrics_tree_results import ApiGetMetricsTreeResults + + d = src_dict.copy() + results = ApiGetMetricsTreeResults.from_dict(d.pop("results")) + + status = ApiGetMetricsTreeStatus(d.pop("status")) + + api_get_metrics_tree = cls( + results=results, + status=status, + ) + + api_get_metrics_tree.additional_properties = d + return api_get_metrics_tree + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/api_get_metrics_tree_results.py b/lightdash_client/models/api_get_metrics_tree_results.py new file mode 100644 index 0000000..68d7ef5 --- /dev/null +++ b/lightdash_client/models/api_get_metrics_tree_results.py @@ -0,0 +1,76 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.catalog_metrics_tree_edge import CatalogMetricsTreeEdge + + +T = TypeVar("T", bound="ApiGetMetricsTreeResults") + + +@_attrs_define +class ApiGetMetricsTreeResults: + """ + Attributes: + edges (List['CatalogMetricsTreeEdge']): + """ + + edges: List["CatalogMetricsTreeEdge"] + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.catalog_metrics_tree_edge import CatalogMetricsTreeEdge + + edges = [] + for edges_item_data in self.edges: + edges_item = edges_item_data.to_dict() + edges.append(edges_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "edges": edges, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.catalog_metrics_tree_edge import CatalogMetricsTreeEdge + + d = src_dict.copy() + edges = [] + _edges = d.pop("edges") + for edges_item_data in _edges: + edges_item = CatalogMetricsTreeEdge.from_dict(edges_item_data) + + edges.append(edges_item) + + api_get_metrics_tree_results = cls( + edges=edges, + ) + + api_get_metrics_tree_results.additional_properties = d + return api_get_metrics_tree_results + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/api_get_metrics_tree_status.py b/lightdash_client/models/api_get_metrics_tree_status.py new file mode 100644 index 0000000..a18dcd4 --- /dev/null +++ b/lightdash_client/models/api_get_metrics_tree_status.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ApiGetMetricsTreeStatus(str, Enum): + OK = "ok" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/api_get_notifications.py b/lightdash_client/models/api_get_notifications.py index afdf7ba..21ab8d7 100644 --- a/lightdash_client/models/api_get_notifications.py +++ b/lightdash_client/models/api_get_notifications.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_get_notifications_status import ApiGetNotificationsStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.notification_dashboard_comment import NotificationDashboardComment @@ -25,6 +26,8 @@ class ApiGetNotifications: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.notification_dashboard_comment import NotificationDashboardComment + results = [] for componentsschemas_api_notifications_results_item_data in self.results: componentsschemas_api_notifications_results_item = ( diff --git a/lightdash_client/models/api_get_project_group_accesses.py b/lightdash_client/models/api_get_project_group_accesses.py index af7eca7..da3660c 100644 --- a/lightdash_client/models/api_get_project_group_accesses.py +++ b/lightdash_client/models/api_get_project_group_accesses.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_get_project_group_accesses_status import ( - ApiGetProjectGroupAccessesStatus, -) +from ..models.api_get_project_group_accesses_status import ApiGetProjectGroupAccessesStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.project_group_access import ProjectGroupAccess @@ -27,6 +26,8 @@ class ApiGetProjectGroupAccesses: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.project_group_access import ProjectGroupAccess + results = [] for results_item_data in self.results: results_item = results_item_data.to_dict() diff --git a/lightdash_client/models/api_get_project_member_response.py b/lightdash_client/models/api_get_project_member_response.py index 0710458..b9ecf58 100644 --- a/lightdash_client/models/api_get_project_member_response.py +++ b/lightdash_client/models/api_get_project_member_response.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_get_project_member_response_status import ( - ApiGetProjectMemberResponseStatus, -) +from ..models.api_get_project_member_response_status import ApiGetProjectMemberResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.project_member_profile import ProjectMemberProfile @@ -27,6 +26,8 @@ class ApiGetProjectMemberResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.project_member_profile import ProjectMemberProfile + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_get_tags_response.py b/lightdash_client/models/api_get_tags_response.py new file mode 100644 index 0000000..edcb262 --- /dev/null +++ b/lightdash_client/models/api_get_tags_response.py @@ -0,0 +1,85 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_get_tags_response_status import ApiGetTagsResponseStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.tag import Tag + + +T = TypeVar("T", bound="ApiGetTagsResponse") + + +@_attrs_define +class ApiGetTagsResponse: + """ + Attributes: + results (List['Tag']): + status (ApiGetTagsResponseStatus): + """ + + results: List["Tag"] + status: ApiGetTagsResponseStatus + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.tag import Tag + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + status = self.status.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "results": results, + "status": status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.tag import Tag + + d = src_dict.copy() + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = Tag.from_dict(results_item_data) + + results.append(results_item) + + status = ApiGetTagsResponseStatus(d.pop("status")) + + api_get_tags_response = cls( + results=results, + status=status, + ) + + api_get_tags_response.additional_properties = d + return api_get_tags_response + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/api_get_tags_response_status.py b/lightdash_client/models/api_get_tags_response_status.py new file mode 100644 index 0000000..74ce7ac --- /dev/null +++ b/lightdash_client/models/api_get_tags_response_status.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ApiGetTagsResponseStatus(str, Enum): + OK = "ok" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/api_group_list_response.py b/lightdash_client/models/api_group_list_response.py index 9d4bef7..52568cb 100644 --- a/lightdash_client/models/api_group_list_response.py +++ b/lightdash_client/models/api_group_list_response.py @@ -1,13 +1,15 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_group_list_response_status import ApiGroupListResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.group import Group - from ..models.group_with_members import GroupWithMembers + from ..models.knex_paginated_data_group_array_or_group_with_members_array import ( + KnexPaginatedDataGroupArrayOrGroupWithMembersArray, + ) T = TypeVar("T", bound="ApiGroupListResponse") @@ -17,27 +19,20 @@ class ApiGroupListResponse: """ Attributes: - results (Union[List['Group'], List['GroupWithMembers']]): + results (KnexPaginatedDataGroupArrayOrGroupWithMembersArray): status (ApiGroupListResponseStatus): """ - results: Union[List["Group"], List["GroupWithMembers"]] + results: "KnexPaginatedDataGroupArrayOrGroupWithMembersArray" status: ApiGroupListResponseStatus additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - results: List[Dict[str, Any]] - if isinstance(self.results, list): - results = [] - for results_type_0_item_data in self.results: - results_type_0_item = results_type_0_item_data.to_dict() - results.append(results_type_0_item) - - else: - results = [] - for results_type_1_item_data in self.results: - results_type_1_item = results_type_1_item_data.to_dict() - results.append(results_type_1_item) + from ..models.knex_paginated_data_group_array_or_group_with_members_array import ( + KnexPaginatedDataGroupArrayOrGroupWithMembersArray, + ) + + results = self.results.to_dict() status = self.status.value @@ -54,37 +49,12 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.group import Group - from ..models.group_with_members import GroupWithMembers + from ..models.knex_paginated_data_group_array_or_group_with_members_array import ( + KnexPaginatedDataGroupArrayOrGroupWithMembersArray, + ) d = src_dict.copy() - - def _parse_results(data: object) -> Union[List["Group"], List["GroupWithMembers"]]: - try: - if not isinstance(data, list): - raise TypeError() - results_type_0 = [] - _results_type_0 = data - for results_type_0_item_data in _results_type_0: - results_type_0_item = Group.from_dict(results_type_0_item_data) - - results_type_0.append(results_type_0_item) - - return results_type_0 - except: # noqa: E722 - pass - if not isinstance(data, list): - raise TypeError() - results_type_1 = [] - _results_type_1 = data - for results_type_1_item_data in _results_type_1: - results_type_1_item = GroupWithMembers.from_dict(results_type_1_item_data) - - results_type_1.append(results_type_1_item) - - return results_type_1 - - results = _parse_results(d.pop("results")) + results = KnexPaginatedDataGroupArrayOrGroupWithMembersArray.from_dict(d.pop("results")) status = ApiGroupListResponseStatus(d.pop("status")) diff --git a/lightdash_client/models/api_group_members_response.py b/lightdash_client/models/api_group_members_response.py index 28e98af..a14cf6c 100644 --- a/lightdash_client/models/api_group_members_response.py +++ b/lightdash_client/models/api_group_members_response.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_group_members_response_status import ApiGroupMembersResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.group_member import GroupMember @@ -25,6 +26,8 @@ class ApiGroupMembersResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.group_member import GroupMember + results = [] for results_item_data in self.results: results_item = results_item_data.to_dict() diff --git a/lightdash_client/models/api_group_response.py b/lightdash_client/models/api_group_response.py index 0c2f4bd..fb80eeb 100644 --- a/lightdash_client/models/api_group_response.py +++ b/lightdash_client/models/api_group_response.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_group_response_status import ApiGroupResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.group import Group @@ -27,6 +28,7 @@ class ApiGroupResponse: def to_dict(self) -> Dict[str, Any]: from ..models.group import Group + from ..models.group_with_members import GroupWithMembers results: Dict[str, Any] if isinstance(self.results, Group): diff --git a/lightdash_client/models/api_job_scheduled_response.py b/lightdash_client/models/api_job_scheduled_response.py index 69d5f8e..1d9848d 100644 --- a/lightdash_client/models/api_job_scheduled_response.py +++ b/lightdash_client/models/api_job_scheduled_response.py @@ -1,14 +1,13 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_job_scheduled_response_status import ApiJobScheduledResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.api_job_scheduled_response_results import ( - ApiJobScheduledResponseResults, - ) + from ..models.api_job_scheduled_response_results import ApiJobScheduledResponseResults T = TypeVar("T", bound="ApiJobScheduledResponse") @@ -27,6 +26,8 @@ class ApiJobScheduledResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.api_job_scheduled_response_results import ApiJobScheduledResponseResults + results = self.results.to_dict() status = self.status.value @@ -44,9 +45,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.api_job_scheduled_response_results import ( - ApiJobScheduledResponseResults, - ) + from ..models.api_job_scheduled_response_results import ApiJobScheduledResponseResults d = src_dict.copy() results = ApiJobScheduledResponseResults.from_dict(d.pop("results")) diff --git a/lightdash_client/models/api_job_scheduled_response_results.py b/lightdash_client/models/api_job_scheduled_response_results.py index c53ad14..f8f2083 100644 --- a/lightdash_client/models/api_job_scheduled_response_results.py +++ b/lightdash_client/models/api_job_scheduled_response_results.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="ApiJobScheduledResponseResults") diff --git a/lightdash_client/models/api_job_status_response.py b/lightdash_client/models/api_job_status_response.py index 6b4cea7..b91b788 100644 --- a/lightdash_client/models/api_job_status_response.py +++ b/lightdash_client/models/api_job_status_response.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_job_status_response_status import ApiJobStatusResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.api_job_status_response_results import ApiJobStatusResponseResults @@ -25,6 +26,8 @@ class ApiJobStatusResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.api_job_status_response_results import ApiJobStatusResponseResults + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_job_status_response_results.py b/lightdash_client/models/api_job_status_response_results.py index 008794f..4d4f759 100644 --- a/lightdash_client/models/api_job_status_response_results.py +++ b/lightdash_client/models/api_job_status_response_results.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.scheduler_job_status import SchedulerJobStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.record_string_any import RecordStringAny diff --git a/lightdash_client/models/api_metrics_catalog.py b/lightdash_client/models/api_metrics_catalog.py new file mode 100644 index 0000000..9f505ae --- /dev/null +++ b/lightdash_client/models/api_metrics_catalog.py @@ -0,0 +1,77 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_metrics_catalog_status import ApiMetricsCatalogStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.knex_paginated_data_api_metrics_catalog_results import KnexPaginatedDataApiMetricsCatalogResults + + +T = TypeVar("T", bound="ApiMetricsCatalog") + + +@_attrs_define +class ApiMetricsCatalog: + """ + Attributes: + results (KnexPaginatedDataApiMetricsCatalogResults): + status (ApiMetricsCatalogStatus): + """ + + results: "KnexPaginatedDataApiMetricsCatalogResults" + status: ApiMetricsCatalogStatus + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.knex_paginated_data_api_metrics_catalog_results import KnexPaginatedDataApiMetricsCatalogResults + + results = self.results.to_dict() + + status = self.status.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "results": results, + "status": status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.knex_paginated_data_api_metrics_catalog_results import KnexPaginatedDataApiMetricsCatalogResults + + d = src_dict.copy() + results = KnexPaginatedDataApiMetricsCatalogResults.from_dict(d.pop("results")) + + status = ApiMetricsCatalogStatus(d.pop("status")) + + api_metrics_catalog = cls( + results=results, + status=status, + ) + + api_metrics_catalog.additional_properties = d + return api_metrics_catalog + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/api_metrics_catalog_status.py b/lightdash_client/models/api_metrics_catalog_status.py new file mode 100644 index 0000000..5f15b67 --- /dev/null +++ b/lightdash_client/models/api_metrics_catalog_status.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ApiMetricsCatalogStatus(str, Enum): + OK = "ok" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/api_metrics_explorer_query_results_status.py b/lightdash_client/models/api_metrics_explorer_query_results_status.py new file mode 100644 index 0000000..d21d187 --- /dev/null +++ b/lightdash_client/models/api_metrics_explorer_query_results_status.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ApiMetricsExplorerQueryResultsStatus(str, Enum): + OK = "ok" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/api_metrics_tree_edge_payload.py b/lightdash_client/models/api_metrics_tree_edge_payload.py new file mode 100644 index 0000000..da6d36e --- /dev/null +++ b/lightdash_client/models/api_metrics_tree_edge_payload.py @@ -0,0 +1,68 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="ApiMetricsTreeEdgePayload") + + +@_attrs_define +class ApiMetricsTreeEdgePayload: + """ + Attributes: + target_catalog_search_uuid (str): + source_catalog_search_uuid (str): + """ + + target_catalog_search_uuid: str + source_catalog_search_uuid: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + target_catalog_search_uuid = self.target_catalog_search_uuid + + source_catalog_search_uuid = self.source_catalog_search_uuid + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "targetCatalogSearchUuid": target_catalog_search_uuid, + "sourceCatalogSearchUuid": source_catalog_search_uuid, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + target_catalog_search_uuid = d.pop("targetCatalogSearchUuid") + + source_catalog_search_uuid = d.pop("sourceCatalogSearchUuid") + + api_metrics_tree_edge_payload = cls( + target_catalog_search_uuid=target_catalog_search_uuid, + source_catalog_search_uuid=source_catalog_search_uuid, + ) + + api_metrics_tree_edge_payload.additional_properties = d + return api_metrics_tree_edge_payload + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/api_metrics_with_associated_time_dimension_response_status.py b/lightdash_client/models/api_metrics_with_associated_time_dimension_response_status.py new file mode 100644 index 0000000..dd722ef --- /dev/null +++ b/lightdash_client/models/api_metrics_with_associated_time_dimension_response_status.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ApiMetricsWithAssociatedTimeDimensionResponseStatus(str, Enum): + OK = "ok" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/api_organization.py b/lightdash_client/models/api_organization.py index e52b1ef..ecbc727 100644 --- a/lightdash_client/models/api_organization.py +++ b/lightdash_client/models/api_organization.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_organization_status import ApiOrganizationStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.organization import Organization @@ -25,6 +26,8 @@ class ApiOrganization: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.organization import Organization + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_organization_allowed_email_domains.py b/lightdash_client/models/api_organization_allowed_email_domains.py index b029f35..7d58144 100644 --- a/lightdash_client/models/api_organization_allowed_email_domains.py +++ b/lightdash_client/models/api_organization_allowed_email_domains.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_organization_allowed_email_domains_status import ( - ApiOrganizationAllowedEmailDomainsStatus, -) +from ..models.api_organization_allowed_email_domains_status import ApiOrganizationAllowedEmailDomainsStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.allowed_email_domains import AllowedEmailDomains @@ -27,6 +26,8 @@ class ApiOrganizationAllowedEmailDomains: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.allowed_email_domains import AllowedEmailDomains + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_organization_member_profile.py b/lightdash_client/models/api_organization_member_profile.py index 83ed288..5170ab2 100644 --- a/lightdash_client/models/api_organization_member_profile.py +++ b/lightdash_client/models/api_organization_member_profile.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_organization_member_profile_status import ( - ApiOrganizationMemberProfileStatus, -) +from ..models.api_organization_member_profile_status import ApiOrganizationMemberProfileStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.organization_member_profile import OrganizationMemberProfile @@ -27,6 +26,8 @@ class ApiOrganizationMemberProfile: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.organization_member_profile import OrganizationMemberProfile + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_organization_member_profiles.py b/lightdash_client/models/api_organization_member_profiles.py index 354e09e..7f59024 100644 --- a/lightdash_client/models/api_organization_member_profiles.py +++ b/lightdash_client/models/api_organization_member_profiles.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_organization_member_profiles_status import ( - ApiOrganizationMemberProfilesStatus, -) +from ..models.api_organization_member_profiles_status import ApiOrganizationMemberProfilesStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.knex_paginated_data_organization_member_profile_array import ( @@ -29,6 +28,10 @@ class ApiOrganizationMemberProfiles: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.knex_paginated_data_organization_member_profile_array import ( + KnexPaginatedDataOrganizationMemberProfileArray, + ) + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_organization_projects.py b/lightdash_client/models/api_organization_projects.py index 7ffbed6..c27effb 100644 --- a/lightdash_client/models/api_organization_projects.py +++ b/lightdash_client/models/api_organization_projects.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_organization_projects_status import ApiOrganizationProjectsStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.organization_project import OrganizationProject @@ -26,6 +27,8 @@ class ApiOrganizationProjects: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.organization_project import OrganizationProject + results = [] for results_item_data in self.results: results_item = results_item_data.to_dict() diff --git a/lightdash_client/models/api_pinned_items.py b/lightdash_client/models/api_pinned_items.py index 5fceb5e..9329b3c 100644 --- a/lightdash_client/models/api_pinned_items.py +++ b/lightdash_client/models/api_pinned_items.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_pinned_items_status import ApiPinnedItemsStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.resource_view_chart_item import ResourceViewChartItem @@ -29,6 +30,7 @@ class ApiPinnedItems: def to_dict(self) -> Dict[str, Any]: from ..models.resource_view_chart_item import ResourceViewChartItem from ..models.resource_view_dashboard_item import ResourceViewDashboardItem + from ..models.resource_view_space_item import ResourceViewSpaceItem results = [] for componentsschemas_pinned_items_item_data in self.results: diff --git a/lightdash_client/models/api_project_access_list_response.py b/lightdash_client/models/api_project_access_list_response.py index 29ae10d..6bb0113 100644 --- a/lightdash_client/models/api_project_access_list_response.py +++ b/lightdash_client/models/api_project_access_list_response.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_project_access_list_response_status import ( - ApiProjectAccessListResponseStatus, -) +from ..models.api_project_access_list_response_status import ApiProjectAccessListResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.project_member_profile import ProjectMemberProfile @@ -27,6 +26,8 @@ class ApiProjectAccessListResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.project_member_profile import ProjectMemberProfile + results = [] for results_item_data in self.results: results_item = results_item_data.to_dict() diff --git a/lightdash_client/models/api_project_response.py b/lightdash_client/models/api_project_response.py index 39ad898..107a800 100644 --- a/lightdash_client/models/api_project_response.py +++ b/lightdash_client/models/api_project_response.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_project_response_status import ApiProjectResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.project import Project @@ -25,6 +26,8 @@ class ApiProjectResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.project import Project + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_promote_chart_response.py b/lightdash_client/models/api_promote_chart_response.py index c3b2e84..678b17f 100644 --- a/lightdash_client/models/api_promote_chart_response.py +++ b/lightdash_client/models/api_promote_chart_response.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_promote_chart_response_status import ApiPromoteChartResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.pick_saved_chart_exclude_keyof_saved_chart_is_private_or_access import ( @@ -28,6 +29,10 @@ class ApiPromoteChartResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pick_saved_chart_exclude_keyof_saved_chart_is_private_or_access import ( + PickSavedChartExcludeKeyofSavedChartIsPrivateOrAccess, + ) + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_promote_dashboard_response.py b/lightdash_client/models/api_promote_dashboard_response.py index af3eb98..ebb440c 100644 --- a/lightdash_client/models/api_promote_dashboard_response.py +++ b/lightdash_client/models/api_promote_dashboard_response.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_promote_dashboard_response_status import ( - ApiPromoteDashboardResponseStatus, -) +from ..models.api_promote_dashboard_response_status import ApiPromoteDashboardResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.pick_dashboard_exclude_keyof_dashboard_is_private_or_access import ( @@ -30,6 +29,10 @@ class ApiPromoteDashboardResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pick_dashboard_exclude_keyof_dashboard_is_private_or_access import ( + PickDashboardExcludeKeyofDashboardIsPrivateOrAccess, + ) + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_promotion_changes_response.py b/lightdash_client/models/api_promotion_changes_response.py index a6e64f4..e83d4f2 100644 --- a/lightdash_client/models/api_promotion_changes_response.py +++ b/lightdash_client/models/api_promotion_changes_response.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_promotion_changes_response_status import ( - ApiPromotionChangesResponseStatus, -) +from ..models.api_promotion_changes_response_status import ApiPromotionChangesResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.promotion_changes import PromotionChanges @@ -27,6 +26,8 @@ class ApiPromotionChangesResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.promotion_changes import PromotionChanges + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_register_user_response.py b/lightdash_client/models/api_register_user_response.py index 881f50c..35b0e98 100644 --- a/lightdash_client/models/api_register_user_response.py +++ b/lightdash_client/models/api_register_user_response.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_register_user_response_status import ApiRegisterUserResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.lightdash_user import LightdashUser @@ -25,6 +26,8 @@ class ApiRegisterUserResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.lightdash_user import LightdashUser + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_resolve_comment.py b/lightdash_client/models/api_resolve_comment.py index b02f591..62873b8 100644 --- a/lightdash_client/models/api_resolve_comment.py +++ b/lightdash_client/models/api_resolve_comment.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_resolve_comment_status import ApiResolveCommentStatus +from ..types import UNSET, Unset T = TypeVar("T", bound="ApiResolveComment") diff --git a/lightdash_client/models/api_run_query_response.py b/lightdash_client/models/api_run_query_response.py index e642741..b048581 100644 --- a/lightdash_client/models/api_run_query_response.py +++ b/lightdash_client/models/api_run_query_response.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_run_query_response_status import ApiRunQueryResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.api_run_query_response_results import ApiRunQueryResponseResults @@ -25,6 +26,8 @@ class ApiRunQueryResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.api_run_query_response_results import ApiRunQueryResponseResults + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_run_query_response_results.py b/lightdash_client/models/api_run_query_response_results.py index 60c498e..2c8d115 100644 --- a/lightdash_client/models/api_run_query_response_results.py +++ b/lightdash_client/models/api_run_query_response_results.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -8,9 +8,7 @@ if TYPE_CHECKING: from ..models.cache_metadata import CacheMetadata from ..models.metric_query_response import MetricQueryResponse - from ..models.record_string_item_or_additional_metric import ( - RecordStringItemOrAdditionalMetric, - ) + from ..models.record_string_item_or_additional_metric import RecordStringItemOrAdditionalMetric T = TypeVar("T", bound="ApiRunQueryResponseResults") @@ -33,6 +31,10 @@ class ApiRunQueryResponseResults: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.cache_metadata import CacheMetadata + from ..models.metric_query_response import MetricQueryResponse + from ..models.record_string_item_or_additional_metric import RecordStringItemOrAdditionalMetric + rows = self.rows cache_metadata = self.cache_metadata.to_dict() @@ -61,9 +63,7 @@ def to_dict(self) -> Dict[str, Any]: def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.cache_metadata import CacheMetadata from ..models.metric_query_response import MetricQueryResponse - from ..models.record_string_item_or_additional_metric import ( - RecordStringItemOrAdditionalMetric, - ) + from ..models.record_string_item_or_additional_metric import RecordStringItemOrAdditionalMetric d = src_dict.copy() rows = cast(List[Any], d.pop("rows")) diff --git a/lightdash_client/models/api_scheduled_jobs_response.py b/lightdash_client/models/api_scheduled_jobs_response.py index 4e044e7..ee9164a 100644 --- a/lightdash_client/models/api_scheduled_jobs_response.py +++ b/lightdash_client/models/api_scheduled_jobs_response.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_scheduled_jobs_response_status import ApiScheduledJobsResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.scheduled_jobs import ScheduledJobs @@ -25,6 +26,8 @@ class ApiScheduledJobsResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.scheduled_jobs import ScheduledJobs + results = [] for results_item_data in self.results: results_item = results_item_data.to_dict() diff --git a/lightdash_client/models/api_share_response.py b/lightdash_client/models/api_share_response.py index 5493c31..6a8fccc 100644 --- a/lightdash_client/models/api_share_response.py +++ b/lightdash_client/models/api_share_response.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_share_response_status import ApiShareResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.share_url import ShareUrl @@ -27,6 +28,8 @@ class ApiShareResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.share_url import ShareUrl + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_slack_channels_response.py b/lightdash_client/models/api_slack_channels_response.py index ccf7109..85a91d6 100644 --- a/lightdash_client/models/api_slack_channels_response.py +++ b/lightdash_client/models/api_slack_channels_response.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,6 +26,8 @@ class ApiSlackChannelsResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.slack_channel import SlackChannel + status = self.status.value results: Union[Unset, List[Dict[str, Any]]] = UNSET diff --git a/lightdash_client/models/api_slack_custom_settings_response.py b/lightdash_client/models/api_slack_custom_settings_response.py index 335d79e..76713cc 100644 --- a/lightdash_client/models/api_slack_custom_settings_response.py +++ b/lightdash_client/models/api_slack_custom_settings_response.py @@ -1,11 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_slack_custom_settings_response_status import ( - ApiSlackCustomSettingsResponseStatus, -) +from ..models.api_slack_custom_settings_response_status import ApiSlackCustomSettingsResponseStatus +from ..types import UNSET, Unset T = TypeVar("T", bound="ApiSlackCustomSettingsResponse") diff --git a/lightdash_client/models/api_sort_direction.py b/lightdash_client/models/api_sort_direction.py new file mode 100644 index 0000000..307ec53 --- /dev/null +++ b/lightdash_client/models/api_sort_direction.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ApiSortDirection(str, Enum): + ASC = "asc" + DESC = "desc" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/api_space_response.py b/lightdash_client/models/api_space_response.py index c9dcd46..0f09df0 100644 --- a/lightdash_client/models/api_space_response.py +++ b/lightdash_client/models/api_space_response.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_space_response_status import ApiSpaceResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.space import Space @@ -25,6 +26,8 @@ class ApiSpaceResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.space import Space + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_space_summary_list_response.py b/lightdash_client/models/api_space_summary_list_response.py index a7bc982..9fcea3b 100644 --- a/lightdash_client/models/api_space_summary_list_response.py +++ b/lightdash_client/models/api_space_summary_list_response.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_space_summary_list_response_status import ( - ApiSpaceSummaryListResponseStatus, -) +from ..models.api_space_summary_list_response_status import ApiSpaceSummaryListResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.space_summary import SpaceSummary @@ -27,6 +26,8 @@ class ApiSpaceSummaryListResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.space_summary import SpaceSummary + results = [] for results_item_data in self.results: results_item = results_item_data.to_dict() diff --git a/lightdash_client/models/api_sql_query_results.py b/lightdash_client/models/api_sql_query_results.py index 6b1eca5..12cbe14 100644 --- a/lightdash_client/models/api_sql_query_results.py +++ b/lightdash_client/models/api_sql_query_results.py @@ -1,8 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.record_string_type_dimension_type import RecordStringTypeDimensionType from ..models.record_string_unknown import RecordStringUnknown @@ -24,6 +26,9 @@ class ApiSqlQueryResults: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.record_string_type_dimension_type import RecordStringTypeDimensionType + from ..models.record_string_unknown import RecordStringUnknown + rows = [] for rows_item_data in self.rows: rows_item = rows_item_data.to_dict() @@ -44,9 +49,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.record_string_type_dimension_type import ( - RecordStringTypeDimensionType, - ) + from ..models.record_string_type_dimension_type import RecordStringTypeDimensionType from ..models.record_string_unknown import RecordStringUnknown d = src_dict.copy() diff --git a/lightdash_client/models/api_ssh_key_pair_response.py b/lightdash_client/models/api_ssh_key_pair_response.py index 9a99a1d..e50473b 100644 --- a/lightdash_client/models/api_ssh_key_pair_response.py +++ b/lightdash_client/models/api_ssh_key_pair_response.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_ssh_key_pair_response_status import ApiSshKeyPairResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.pick_ssh_key_pair_public_key import PickSshKeyPairPublicKey @@ -25,6 +26,8 @@ class ApiSshKeyPairResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pick_ssh_key_pair_public_key import PickSshKeyPairPublicKey + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_success_empty.py b/lightdash_client/models/api_success_empty.py index 9624df4..011a507 100644 --- a/lightdash_client/models/api_success_empty.py +++ b/lightdash_client/models/api_success_empty.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/api_test_scheduler_response.py b/lightdash_client/models/api_test_scheduler_response.py index f172f2b..db1e53b 100644 --- a/lightdash_client/models/api_test_scheduler_response.py +++ b/lightdash_client/models/api_test_scheduler_response.py @@ -1,14 +1,13 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_test_scheduler_response_status import ApiTestSchedulerResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.api_test_scheduler_response_results import ( - ApiTestSchedulerResponseResults, - ) + from ..models.api_test_scheduler_response_results import ApiTestSchedulerResponseResults T = TypeVar("T", bound="ApiTestSchedulerResponse") @@ -27,6 +26,8 @@ class ApiTestSchedulerResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.api_test_scheduler_response_results import ApiTestSchedulerResponseResults + results = self.results.to_dict() status = self.status.value @@ -44,9 +45,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.api_test_scheduler_response_results import ( - ApiTestSchedulerResponseResults, - ) + from ..models.api_test_scheduler_response_results import ApiTestSchedulerResponseResults d = src_dict.copy() results = ApiTestSchedulerResponseResults.from_dict(d.pop("results")) diff --git a/lightdash_client/models/api_test_scheduler_response_results.py b/lightdash_client/models/api_test_scheduler_response_results.py index f7c8f77..1b22706 100644 --- a/lightdash_client/models/api_test_scheduler_response_results.py +++ b/lightdash_client/models/api_test_scheduler_response_results.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="ApiTestSchedulerResponseResults") diff --git a/lightdash_client/models/api_update_dashboards_response.py b/lightdash_client/models/api_update_dashboards_response.py new file mode 100644 index 0000000..cadf116 --- /dev/null +++ b/lightdash_client/models/api_update_dashboards_response.py @@ -0,0 +1,85 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.api_update_dashboards_response_status import ApiUpdateDashboardsResponseStatus +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dashboard import Dashboard + + +T = TypeVar("T", bound="ApiUpdateDashboardsResponse") + + +@_attrs_define +class ApiUpdateDashboardsResponse: + """ + Attributes: + results (List['Dashboard']): + status (ApiUpdateDashboardsResponseStatus): + """ + + results: List["Dashboard"] + status: ApiUpdateDashboardsResponseStatus + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard import Dashboard + + results = [] + for results_item_data in self.results: + results_item = results_item_data.to_dict() + results.append(results_item) + + status = self.status.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "results": results, + "status": status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.dashboard import Dashboard + + d = src_dict.copy() + results = [] + _results = d.pop("results") + for results_item_data in _results: + results_item = Dashboard.from_dict(results_item_data) + + results.append(results_item) + + status = ApiUpdateDashboardsResponseStatus(d.pop("status")) + + api_update_dashboards_response = cls( + results=results, + status=status, + ) + + api_update_dashboards_response.additional_properties = d + return api_update_dashboards_response + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/api_update_dashboards_response_status.py b/lightdash_client/models/api_update_dashboards_response_status.py new file mode 100644 index 0000000..aecb51f --- /dev/null +++ b/lightdash_client/models/api_update_dashboards_response_status.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class ApiUpdateDashboardsResponseStatus(str, Enum): + OK = "ok" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/api_update_project_group_access.py b/lightdash_client/models/api_update_project_group_access.py index dca81c3..cb2bf55 100644 --- a/lightdash_client/models/api_update_project_group_access.py +++ b/lightdash_client/models/api_update_project_group_access.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_update_project_group_access_status import ( - ApiUpdateProjectGroupAccessStatus, -) +from ..models.api_update_project_group_access_status import ApiUpdateProjectGroupAccessStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.project_group_access import ProjectGroupAccess @@ -27,6 +26,8 @@ class ApiUpdateProjectGroupAccess: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.project_group_access import ProjectGroupAccess + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/api_user_allowed_organizations_response.py b/lightdash_client/models/api_user_allowed_organizations_response.py index 4775db8..799e1ce 100644 --- a/lightdash_client/models/api_user_allowed_organizations_response.py +++ b/lightdash_client/models/api_user_allowed_organizations_response.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_user_allowed_organizations_response_status import ( - ApiUserAllowedOrganizationsResponseStatus, -) +from ..models.api_user_allowed_organizations_response_status import ApiUserAllowedOrganizationsResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.user_allowed_organization import UserAllowedOrganization @@ -27,6 +26,8 @@ class ApiUserAllowedOrganizationsResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.user_allowed_organization import UserAllowedOrganization + results = [] for results_item_data in self.results: results_item = results_item_data.to_dict() diff --git a/lightdash_client/models/api_user_attributes_response.py b/lightdash_client/models/api_user_attributes_response.py index 3b24b5c..994a638 100644 --- a/lightdash_client/models/api_user_attributes_response.py +++ b/lightdash_client/models/api_user_attributes_response.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_user_attributes_response_status import ApiUserAttributesResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.user_attribute import UserAttribute @@ -25,6 +26,8 @@ class ApiUserAttributesResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.user_attribute import UserAttribute + results = [] for results_item_data in self.results: results_item = results_item_data.to_dict() diff --git a/lightdash_client/models/api_validate_response.py b/lightdash_client/models/api_validate_response.py index a872abd..00c3a19 100644 --- a/lightdash_client/models/api_validate_response.py +++ b/lightdash_client/models/api_validate_response.py @@ -1,15 +1,14 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.api_validate_response_status import ApiValidateResponseStatus +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.validation_error_chart_response import ValidationErrorChartResponse - from ..models.validation_error_dashboard_response import ( - ValidationErrorDashboardResponse, - ) + from ..models.validation_error_dashboard_response import ValidationErrorDashboardResponse from ..models.validation_error_table_response import ValidationErrorTableResponse @@ -32,12 +31,9 @@ class ApiValidateResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - from ..models.validation_error_chart_response import ( - ValidationErrorChartResponse, - ) - from ..models.validation_error_dashboard_response import ( - ValidationErrorDashboardResponse, - ) + from ..models.validation_error_chart_response import ValidationErrorChartResponse + from ..models.validation_error_dashboard_response import ValidationErrorDashboardResponse + from ..models.validation_error_table_response import ValidationErrorTableResponse results = [] for results_item_data in self.results: @@ -66,15 +62,9 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.validation_error_chart_response import ( - ValidationErrorChartResponse, - ) - from ..models.validation_error_dashboard_response import ( - ValidationErrorDashboardResponse, - ) - from ..models.validation_error_table_response import ( - ValidationErrorTableResponse, - ) + from ..models.validation_error_chart_response import ValidationErrorChartResponse + from ..models.validation_error_dashboard_response import ValidationErrorDashboardResponse + from ..models.validation_error_table_response import ValidationErrorTableResponse d = src_dict.copy() results = [] diff --git a/lightdash_client/models/api_validation_dismiss_response.py b/lightdash_client/models/api_validation_dismiss_response.py index 902a9ff..8cbe1e4 100644 --- a/lightdash_client/models/api_validation_dismiss_response.py +++ b/lightdash_client/models/api_validation_dismiss_response.py @@ -1,11 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.api_validation_dismiss_response_status import ( - ApiValidationDismissResponseStatus, -) +from ..models.api_validation_dismiss_response_status import ApiValidationDismissResponseStatus +from ..types import UNSET, Unset T = TypeVar("T", bound="ApiValidationDismissResponse") diff --git a/lightdash_client/models/axis.py b/lightdash_client/models/axis.py index 51a0f20..eafc28a 100644 --- a/lightdash_client/models/axis.py +++ b/lightdash_client/models/axis.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/big_number.py b/lightdash_client/models/big_number.py index d2e0c92..8f8aec7 100644 --- a/lightdash_client/models/big_number.py +++ b/lightdash_client/models/big_number.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/big_number_config.py b/lightdash_client/models/big_number_config.py index 9cb8bfc..240bee0 100644 --- a/lightdash_client/models/big_number_config.py +++ b/lightdash_client/models/big_number_config.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,6 +26,8 @@ class BigNumberConfig: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.big_number import BigNumber + type = self.type.value config: Union[Unset, Dict[str, Any]] = UNSET diff --git a/lightdash_client/models/bin_range.py b/lightdash_client/models/bin_range.py index 71218b0..d649697 100644 --- a/lightdash_client/models/bin_range.py +++ b/lightdash_client/models/bin_range.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/cache_metadata.py b/lightdash_client/models/cache_metadata.py index 9580ff1..f711063 100644 --- a/lightdash_client/models/cache_metadata.py +++ b/lightdash_client/models/cache_metadata.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/calculate_total_from_query.py b/lightdash_client/models/calculate_total_from_query.py index f098798..fe9aaa5 100644 --- a/lightdash_client/models/calculate_total_from_query.py +++ b/lightdash_client/models/calculate_total_from_query.py @@ -1,8 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.metric_query_request import MetricQueryRequest @@ -23,6 +25,8 @@ class CalculateTotalFromQuery: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.metric_query_request import MetricQueryRequest + explore = self.explore metric_query = self.metric_query.to_dict() diff --git a/lightdash_client/models/calculate_total_from_saved_chart_body.py b/lightdash_client/models/calculate_total_from_saved_chart_body.py index cd8647f..8a2faa3 100644 --- a/lightdash_client/models/calculate_total_from_saved_chart_body.py +++ b/lightdash_client/models/calculate_total_from_saved_chart_body.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/cartesian_chart.py b/lightdash_client/models/cartesian_chart.py index ed60583..c802547 100644 --- a/lightdash_client/models/cartesian_chart.py +++ b/lightdash_client/models/cartesian_chart.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -6,9 +6,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.partial_complete_cartesian_chart_layout import ( - PartialCompleteCartesianChartLayout, - ) + from ..models.partial_complete_cartesian_chart_layout import PartialCompleteCartesianChartLayout from ..models.partial_complete_e_charts_config import PartialCompleteEChartsConfig from ..models.record_string_series_metadata import RecordStringSeriesMetadata @@ -31,6 +29,10 @@ class CartesianChart: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.partial_complete_cartesian_chart_layout import PartialCompleteCartesianChartLayout + from ..models.partial_complete_e_charts_config import PartialCompleteEChartsConfig + from ..models.record_string_series_metadata import RecordStringSeriesMetadata + e_charts_config = self.e_charts_config.to_dict() layout = self.layout.to_dict() @@ -54,12 +56,8 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.partial_complete_cartesian_chart_layout import ( - PartialCompleteCartesianChartLayout, - ) - from ..models.partial_complete_e_charts_config import ( - PartialCompleteEChartsConfig, - ) + from ..models.partial_complete_cartesian_chart_layout import PartialCompleteCartesianChartLayout + from ..models.partial_complete_e_charts_config import PartialCompleteEChartsConfig from ..models.record_string_series_metadata import RecordStringSeriesMetadata d = src_dict.copy() diff --git a/lightdash_client/models/cartesian_chart_config.py b/lightdash_client/models/cartesian_chart_config.py index 77dbca2..fc04759 100644 --- a/lightdash_client/models/cartesian_chart_config.py +++ b/lightdash_client/models/cartesian_chart_config.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,6 +26,8 @@ class CartesianChartConfig: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.cartesian_chart import CartesianChart + type = self.type.value config: Union[Unset, Dict[str, Any]] = UNSET diff --git a/lightdash_client/models/catalog_analytics.py b/lightdash_client/models/catalog_analytics.py index 3f30958..9e55ef2 100644 --- a/lightdash_client/models/catalog_analytics.py +++ b/lightdash_client/models/catalog_analytics.py @@ -1,8 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.pick_chart_summary_uuid_or_name_or_space_uuid_or_space_name_or_dashboard_name_or_dashboard_uuid_or_chart_kind import ( PickChartSummaryUuidOrNameOrSpaceUuidOrSpaceNameOrDashboardNameOrDashboardUuidOrChartKind, @@ -23,6 +25,10 @@ class CatalogAnalytics: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pick_chart_summary_uuid_or_name_or_space_uuid_or_space_name_or_dashboard_name_or_dashboard_uuid_or_chart_kind import ( + PickChartSummaryUuidOrNameOrSpaceUuidOrSpaceNameOrDashboardNameOrDashboardUuidOrChartKind, + ) + charts = [] for charts_item_data in self.charts: charts_item = charts_item_data.to_dict() diff --git a/lightdash_client/models/catalog_field.py b/lightdash_client/models/catalog_field.py index 7dd0c86..89f9825 100644 --- a/lightdash_client/models/catalog_field.py +++ b/lightdash_client/models/catalog_field.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -8,9 +8,10 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.record_string_string_or_string_array import ( - RecordStringStringOrStringArray, - ) + from ..models.custom_icon import CustomIcon + from ..models.emoji_icon import EmojiIcon + from ..models.pick_tag_name_or_color_or_tag_uuid import PickTagNameOrColorOrTagUuid + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray T = TypeVar("T", bound="CatalogField") @@ -24,11 +25,15 @@ class CatalogField: label (str): field_type (FieldType): table_label (str): + icon (Union['CustomIcon', 'EmojiIcon', None]): + categories (List['PickTagNameOrColorOrTagUuid']): table_name (str): type (CatalogTypeField): + catalog_search_uuid (str): description (Union[Unset, str]): required_attributes (Union[Unset, RecordStringStringOrStringArray]): Construct a type with a set of properties K of type T + chart_usage (Union[Unset, float]): tags (Union[Unset, List[str]]): table_group_label (Union[Unset, str]): basic_type (Union[Unset, str]): @@ -38,16 +43,25 @@ class CatalogField: label: str field_type: FieldType table_label: str + icon: Union["CustomIcon", "EmojiIcon", None] + categories: List["PickTagNameOrColorOrTagUuid"] table_name: str type: CatalogTypeField + catalog_search_uuid: str description: Union[Unset, str] = UNSET required_attributes: Union[Unset, "RecordStringStringOrStringArray"] = UNSET + chart_usage: Union[Unset, float] = UNSET tags: Union[Unset, List[str]] = UNSET table_group_label: Union[Unset, str] = UNSET basic_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.custom_icon import CustomIcon + from ..models.emoji_icon import EmojiIcon + from ..models.pick_tag_name_or_color_or_tag_uuid import PickTagNameOrColorOrTagUuid + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray + name = self.name label = self.label @@ -56,16 +70,33 @@ def to_dict(self) -> Dict[str, Any]: table_label = self.table_label + icon: Union[Dict[str, Any], None] + if isinstance(self.icon, EmojiIcon): + icon = self.icon.to_dict() + elif isinstance(self.icon, CustomIcon): + icon = self.icon.to_dict() + else: + icon = self.icon + + categories = [] + for categories_item_data in self.categories: + categories_item = categories_item_data.to_dict() + categories.append(categories_item) + table_name = self.table_name type = self.type.value + catalog_search_uuid = self.catalog_search_uuid + description = self.description required_attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.required_attributes, Unset): required_attributes = self.required_attributes.to_dict() + chart_usage = self.chart_usage + tags: Union[Unset, List[str]] = UNSET if not isinstance(self.tags, Unset): tags = self.tags @@ -82,14 +113,19 @@ def to_dict(self) -> Dict[str, Any]: "label": label, "fieldType": field_type, "tableLabel": table_label, + "icon": icon, + "categories": categories, "tableName": table_name, "type": type, + "catalogSearchUuid": catalog_search_uuid, } ) if description is not UNSET: field_dict["description"] = description if required_attributes is not UNSET: field_dict["requiredAttributes"] = required_attributes + if chart_usage is not UNSET: + field_dict["chartUsage"] = chart_usage if tags is not UNSET: field_dict["tags"] = tags if table_group_label is not UNSET: @@ -101,9 +137,10 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.record_string_string_or_string_array import ( - RecordStringStringOrStringArray, - ) + from ..models.custom_icon import CustomIcon + from ..models.emoji_icon import EmojiIcon + from ..models.pick_tag_name_or_color_or_tag_uuid import PickTagNameOrColorOrTagUuid + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray d = src_dict.copy() name = d.pop("name") @@ -114,10 +151,42 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: table_label = d.pop("tableLabel") + def _parse_icon(data: object) -> Union["CustomIcon", "EmojiIcon", None]: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_catalog_item_icon_type_0 = EmojiIcon.from_dict(data) + + return componentsschemas_catalog_item_icon_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_catalog_item_icon_type_1 = CustomIcon.from_dict(data) + + return componentsschemas_catalog_item_icon_type_1 + except: # noqa: E722 + pass + return cast(Union["CustomIcon", "EmojiIcon", None], data) + + icon = _parse_icon(d.pop("icon")) + + categories = [] + _categories = d.pop("categories") + for categories_item_data in _categories: + categories_item = PickTagNameOrColorOrTagUuid.from_dict(categories_item_data) + + categories.append(categories_item) + table_name = d.pop("tableName") type = CatalogTypeField(d.pop("type")) + catalog_search_uuid = d.pop("catalogSearchUuid") + description = d.pop("description", UNSET) _required_attributes = d.pop("requiredAttributes", UNSET) @@ -127,6 +196,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: required_attributes = RecordStringStringOrStringArray.from_dict(_required_attributes) + chart_usage = d.pop("chartUsage", UNSET) + tags = cast(List[str], d.pop("tags", UNSET)) table_group_label = d.pop("tableGroupLabel", UNSET) @@ -138,10 +209,14 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: label=label, field_type=field_type, table_label=table_label, + icon=icon, + categories=categories, table_name=table_name, type=type, + catalog_search_uuid=catalog_search_uuid, description=description, required_attributes=required_attributes, + chart_usage=chart_usage, tags=tags, table_group_label=table_group_label, basic_type=basic_type, diff --git a/lightdash_client/models/catalog_metadata.py b/lightdash_client/models/catalog_metadata.py index 522d0f7..f387190 100644 --- a/lightdash_client/models/catalog_metadata.py +++ b/lightdash_client/models/catalog_metadata.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -40,6 +40,8 @@ class CatalogMetadata: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.catalog_field import CatalogField + joined_tables = self.joined_tables fields = [] diff --git a/lightdash_client/models/catalog_metrics_tree_edge.py b/lightdash_client/models/catalog_metrics_tree_edge.py new file mode 100644 index 0000000..28a63e4 --- /dev/null +++ b/lightdash_client/models/catalog_metrics_tree_edge.py @@ -0,0 +1,116 @@ +import datetime +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.pick_catalog_field_catalog_search_uuid_or_name_or_table_name import ( + PickCatalogFieldCatalogSearchUuidOrNameOrTableName, + ) + + +T = TypeVar("T", bound="CatalogMetricsTreeEdge") + + +@_attrs_define +class CatalogMetricsTreeEdge: + """ + Attributes: + project_uuid (str): + created_by_user_uuid (Union[None, str]): + created_at (datetime.datetime): + target (PickCatalogFieldCatalogSearchUuidOrNameOrTableName): From T, pick a set of properties whose keys are in + the union K + source (PickCatalogFieldCatalogSearchUuidOrNameOrTableName): From T, pick a set of properties whose keys are in + the union K + """ + + project_uuid: str + created_by_user_uuid: Union[None, str] + created_at: datetime.datetime + target: "PickCatalogFieldCatalogSearchUuidOrNameOrTableName" + source: "PickCatalogFieldCatalogSearchUuidOrNameOrTableName" + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.pick_catalog_field_catalog_search_uuid_or_name_or_table_name import ( + PickCatalogFieldCatalogSearchUuidOrNameOrTableName, + ) + + project_uuid = self.project_uuid + + created_by_user_uuid: Union[None, str] + created_by_user_uuid = self.created_by_user_uuid + + created_at = self.created_at.isoformat() + + target = self.target.to_dict() + + source = self.source.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "projectUuid": project_uuid, + "createdByUserUuid": created_by_user_uuid, + "createdAt": created_at, + "target": target, + "source": source, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.pick_catalog_field_catalog_search_uuid_or_name_or_table_name import ( + PickCatalogFieldCatalogSearchUuidOrNameOrTableName, + ) + + d = src_dict.copy() + project_uuid = d.pop("projectUuid") + + def _parse_created_by_user_uuid(data: object) -> Union[None, str]: + if data is None: + return data + return cast(Union[None, str], data) + + created_by_user_uuid = _parse_created_by_user_uuid(d.pop("createdByUserUuid")) + + created_at = isoparse(d.pop("createdAt")) + + target = PickCatalogFieldCatalogSearchUuidOrNameOrTableName.from_dict(d.pop("target")) + + source = PickCatalogFieldCatalogSearchUuidOrNameOrTableName.from_dict(d.pop("source")) + + catalog_metrics_tree_edge = cls( + project_uuid=project_uuid, + created_by_user_uuid=created_by_user_uuid, + created_at=created_at, + target=target, + source=source, + ) + + catalog_metrics_tree_edge.additional_properties = d + return catalog_metrics_tree_edge + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/catalog_table.py b/lightdash_client/models/catalog_table.py index a9fe6ca..50c8ba1 100644 --- a/lightdash_client/models/catalog_table.py +++ b/lightdash_client/models/catalog_table.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -8,10 +8,11 @@ if TYPE_CHECKING: from ..models.compiled_explore_join import CompiledExploreJoin + from ..models.custom_icon import CustomIcon + from ..models.emoji_icon import EmojiIcon from ..models.inline_error import InlineError - from ..models.record_string_string_or_string_array import ( - RecordStringStringOrStringArray, - ) + from ..models.pick_tag_name_or_color_or_tag_uuid import PickTagNameOrColorOrTagUuid + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray T = TypeVar("T", bound="CatalogTable") @@ -23,11 +24,15 @@ class CatalogTable: Attributes: name (str): label (str): + icon (Union['CustomIcon', 'EmojiIcon', None]): + categories (List['PickTagNameOrColorOrTagUuid']): type (CatalogTypeTable): + catalog_search_uuid (str): description (Union[Unset, str]): required_attributes (Union[Unset, RecordStringStringOrStringArray]): Construct a type with a set of properties K of type T group_label (Union[Unset, str]): + chart_usage (Union[Unset, float]): joined_tables (Union[Unset, List['CompiledExploreJoin']]): tags (Union[Unset, List[str]]): errors (Union[Unset, List['InlineError']]): @@ -35,22 +40,48 @@ class CatalogTable: name: str label: str + icon: Union["CustomIcon", "EmojiIcon", None] + categories: List["PickTagNameOrColorOrTagUuid"] type: CatalogTypeTable + catalog_search_uuid: str description: Union[Unset, str] = UNSET required_attributes: Union[Unset, "RecordStringStringOrStringArray"] = UNSET group_label: Union[Unset, str] = UNSET + chart_usage: Union[Unset, float] = UNSET joined_tables: Union[Unset, List["CompiledExploreJoin"]] = UNSET tags: Union[Unset, List[str]] = UNSET errors: Union[Unset, List["InlineError"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.compiled_explore_join import CompiledExploreJoin + from ..models.custom_icon import CustomIcon + from ..models.emoji_icon import EmojiIcon + from ..models.inline_error import InlineError + from ..models.pick_tag_name_or_color_or_tag_uuid import PickTagNameOrColorOrTagUuid + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray + name = self.name label = self.label + icon: Union[Dict[str, Any], None] + if isinstance(self.icon, EmojiIcon): + icon = self.icon.to_dict() + elif isinstance(self.icon, CustomIcon): + icon = self.icon.to_dict() + else: + icon = self.icon + + categories = [] + for categories_item_data in self.categories: + categories_item = categories_item_data.to_dict() + categories.append(categories_item) + type = self.type.value + catalog_search_uuid = self.catalog_search_uuid + description = self.description required_attributes: Union[Unset, Dict[str, Any]] = UNSET @@ -59,6 +90,8 @@ def to_dict(self) -> Dict[str, Any]: group_label = self.group_label + chart_usage = self.chart_usage + joined_tables: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.joined_tables, Unset): joined_tables = [] @@ -83,7 +116,10 @@ def to_dict(self) -> Dict[str, Any]: { "name": name, "label": label, + "icon": icon, + "categories": categories, "type": type, + "catalogSearchUuid": catalog_search_uuid, } ) if description is not UNSET: @@ -92,6 +128,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["requiredAttributes"] = required_attributes if group_label is not UNSET: field_dict["groupLabel"] = group_label + if chart_usage is not UNSET: + field_dict["chartUsage"] = chart_usage if joined_tables is not UNSET: field_dict["joinedTables"] = joined_tables if tags is not UNSET: @@ -104,18 +142,51 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.compiled_explore_join import CompiledExploreJoin + from ..models.custom_icon import CustomIcon + from ..models.emoji_icon import EmojiIcon from ..models.inline_error import InlineError - from ..models.record_string_string_or_string_array import ( - RecordStringStringOrStringArray, - ) + from ..models.pick_tag_name_or_color_or_tag_uuid import PickTagNameOrColorOrTagUuid + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray d = src_dict.copy() name = d.pop("name") label = d.pop("label") + def _parse_icon(data: object) -> Union["CustomIcon", "EmojiIcon", None]: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_catalog_item_icon_type_0 = EmojiIcon.from_dict(data) + + return componentsschemas_catalog_item_icon_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_catalog_item_icon_type_1 = CustomIcon.from_dict(data) + + return componentsschemas_catalog_item_icon_type_1 + except: # noqa: E722 + pass + return cast(Union["CustomIcon", "EmojiIcon", None], data) + + icon = _parse_icon(d.pop("icon")) + + categories = [] + _categories = d.pop("categories") + for categories_item_data in _categories: + categories_item = PickTagNameOrColorOrTagUuid.from_dict(categories_item_data) + + categories.append(categories_item) + type = CatalogTypeTable(d.pop("type")) + catalog_search_uuid = d.pop("catalogSearchUuid") + description = d.pop("description", UNSET) _required_attributes = d.pop("requiredAttributes", UNSET) @@ -127,6 +198,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: group_label = d.pop("groupLabel", UNSET) + chart_usage = d.pop("chartUsage", UNSET) + joined_tables = [] _joined_tables = d.pop("joinedTables", UNSET) for joined_tables_item_data in _joined_tables or []: @@ -146,10 +219,14 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: catalog_table = cls( name=name, label=label, + icon=icon, + categories=categories, type=type, + catalog_search_uuid=catalog_search_uuid, description=description, required_attributes=required_attributes, group_label=group_label, + chart_usage=chart_usage, joined_tables=joined_tables, tags=tags, errors=errors, diff --git a/lightdash_client/models/chart_as_code.py b/lightdash_client/models/chart_as_code.py new file mode 100644 index 0000000..f73e9bb --- /dev/null +++ b/lightdash_client/models/chart_as_code.py @@ -0,0 +1,279 @@ +import datetime +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.big_number_config import BigNumberConfig + from ..models.cartesian_chart_config import CartesianChartConfig + from ..models.custom_vis_config import CustomVisConfig + from ..models.funnel_chart_config import FunnelChartConfig + from ..models.metric_query import MetricQuery + from ..models.pick_saved_chart_name_or_description_or_table_name_or_metric_query_or_chart_config_or_table_config_or_slug_or_dashboard_uuid_or_updated_at_table_config import ( + PickSavedChartNameOrDescriptionOrTableNameOrMetricQueryOrChartConfigOrTableConfigOrSlugOrDashboardUuidOrUpdatedAtTableConfig, + ) + from ..models.pie_chart_config import PieChartConfig + from ..models.table_chart_config import TableChartConfig + + +T = TypeVar("T", bound="ChartAsCode") + + +@_attrs_define +class ChartAsCode: + """ + Attributes: + name (str): + dashboard_uuid (Union[None, str]): + slug (str): + table_name (str): + updated_at (datetime.datetime): + metric_query (MetricQuery): + chart_config (Union['BigNumberConfig', 'CartesianChartConfig', 'CustomVisConfig', 'FunnelChartConfig', + 'PieChartConfig', 'TableChartConfig']): + table_config (PickSavedChartNameOrDescriptionOrTableNameOrMetricQueryOrChartConfigOrTableConfigOrSlugOrDashboard + UuidOrUpdatedAtTableConfig): + space_slug (str): + version (float): + description (Union[Unset, str]): + downloaded_at (Union[Unset, datetime.datetime]): + """ + + name: str + dashboard_uuid: Union[None, str] + slug: str + table_name: str + updated_at: datetime.datetime + metric_query: "MetricQuery" + chart_config: Union[ + "BigNumberConfig", + "CartesianChartConfig", + "CustomVisConfig", + "FunnelChartConfig", + "PieChartConfig", + "TableChartConfig", + ] + table_config: "PickSavedChartNameOrDescriptionOrTableNameOrMetricQueryOrChartConfigOrTableConfigOrSlugOrDashboardUuidOrUpdatedAtTableConfig" + space_slug: str + version: float + description: Union[Unset, str] = UNSET + downloaded_at: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.big_number_config import BigNumberConfig + from ..models.cartesian_chart_config import CartesianChartConfig + from ..models.custom_vis_config import CustomVisConfig + from ..models.funnel_chart_config import FunnelChartConfig + from ..models.metric_query import MetricQuery + from ..models.pick_saved_chart_name_or_description_or_table_name_or_metric_query_or_chart_config_or_table_config_or_slug_or_dashboard_uuid_or_updated_at_table_config import ( + PickSavedChartNameOrDescriptionOrTableNameOrMetricQueryOrChartConfigOrTableConfigOrSlugOrDashboardUuidOrUpdatedAtTableConfig, + ) + from ..models.pie_chart_config import PieChartConfig + from ..models.table_chart_config import TableChartConfig + + name = self.name + + dashboard_uuid: Union[None, str] + dashboard_uuid = self.dashboard_uuid + + slug = self.slug + + table_name = self.table_name + + updated_at = self.updated_at.isoformat() + + metric_query = self.metric_query.to_dict() + + chart_config: Dict[str, Any] + if isinstance(self.chart_config, BigNumberConfig): + chart_config = self.chart_config.to_dict() + elif isinstance(self.chart_config, CartesianChartConfig): + chart_config = self.chart_config.to_dict() + elif isinstance(self.chart_config, CustomVisConfig): + chart_config = self.chart_config.to_dict() + elif isinstance(self.chart_config, PieChartConfig): + chart_config = self.chart_config.to_dict() + elif isinstance(self.chart_config, FunnelChartConfig): + chart_config = self.chart_config.to_dict() + else: + chart_config = self.chart_config.to_dict() + + table_config = self.table_config.to_dict() + + space_slug = self.space_slug + + version = self.version + + description = self.description + + downloaded_at: Union[Unset, str] = UNSET + if not isinstance(self.downloaded_at, Unset): + downloaded_at = self.downloaded_at.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "dashboardUuid": dashboard_uuid, + "slug": slug, + "tableName": table_name, + "updatedAt": updated_at, + "metricQuery": metric_query, + "chartConfig": chart_config, + "tableConfig": table_config, + "spaceSlug": space_slug, + "version": version, + } + ) + if description is not UNSET: + field_dict["description"] = description + if downloaded_at is not UNSET: + field_dict["downloadedAt"] = downloaded_at + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.big_number_config import BigNumberConfig + from ..models.cartesian_chart_config import CartesianChartConfig + from ..models.custom_vis_config import CustomVisConfig + from ..models.funnel_chart_config import FunnelChartConfig + from ..models.metric_query import MetricQuery + from ..models.pick_saved_chart_name_or_description_or_table_name_or_metric_query_or_chart_config_or_table_config_or_slug_or_dashboard_uuid_or_updated_at_table_config import ( + PickSavedChartNameOrDescriptionOrTableNameOrMetricQueryOrChartConfigOrTableConfigOrSlugOrDashboardUuidOrUpdatedAtTableConfig, + ) + from ..models.pie_chart_config import PieChartConfig + from ..models.table_chart_config import TableChartConfig + + d = src_dict.copy() + name = d.pop("name") + + def _parse_dashboard_uuid(data: object) -> Union[None, str]: + if data is None: + return data + return cast(Union[None, str], data) + + dashboard_uuid = _parse_dashboard_uuid(d.pop("dashboardUuid")) + + slug = d.pop("slug") + + table_name = d.pop("tableName") + + updated_at = isoparse(d.pop("updatedAt")) + + metric_query = MetricQuery.from_dict(d.pop("metricQuery")) + + def _parse_chart_config( + data: object, + ) -> Union[ + "BigNumberConfig", + "CartesianChartConfig", + "CustomVisConfig", + "FunnelChartConfig", + "PieChartConfig", + "TableChartConfig", + ]: + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_chart_config_type_0 = BigNumberConfig.from_dict(data) + + return componentsschemas_chart_config_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_chart_config_type_1 = CartesianChartConfig.from_dict(data) + + return componentsschemas_chart_config_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_chart_config_type_2 = CustomVisConfig.from_dict(data) + + return componentsschemas_chart_config_type_2 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_chart_config_type_3 = PieChartConfig.from_dict(data) + + return componentsschemas_chart_config_type_3 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_chart_config_type_4 = FunnelChartConfig.from_dict(data) + + return componentsschemas_chart_config_type_4 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + componentsschemas_chart_config_type_5 = TableChartConfig.from_dict(data) + + return componentsschemas_chart_config_type_5 + + chart_config = _parse_chart_config(d.pop("chartConfig")) + + table_config = PickSavedChartNameOrDescriptionOrTableNameOrMetricQueryOrChartConfigOrTableConfigOrSlugOrDashboardUuidOrUpdatedAtTableConfig.from_dict( + d.pop("tableConfig") + ) + + space_slug = d.pop("spaceSlug") + + version = d.pop("version") + + description = d.pop("description", UNSET) + + _downloaded_at = d.pop("downloadedAt", UNSET) + downloaded_at: Union[Unset, datetime.datetime] + if isinstance(_downloaded_at, Unset): + downloaded_at = UNSET + else: + downloaded_at = isoparse(_downloaded_at) + + chart_as_code = cls( + name=name, + dashboard_uuid=dashboard_uuid, + slug=slug, + table_name=table_name, + updated_at=updated_at, + metric_query=metric_query, + chart_config=chart_config, + table_config=table_config, + space_slug=space_slug, + version=version, + description=description, + downloaded_at=downloaded_at, + ) + + chart_as_code.additional_properties = d + return chart_as_code + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/chart_history.py b/lightdash_client/models/chart_history.py index 0a356c8..d6e29c0 100644 --- a/lightdash_client/models/chart_history.py +++ b/lightdash_client/models/chart_history.py @@ -1,8 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.pick_chart_version_chart_uuid_or_version_uuid_or_created_at_or_created_by import ( PickChartVersionChartUuidOrVersionUuidOrCreatedAtOrCreatedBy, @@ -23,6 +25,10 @@ class ChartHistory: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pick_chart_version_chart_uuid_or_version_uuid_or_created_at_or_created_by import ( + PickChartVersionChartUuidOrVersionUuidOrCreatedAtOrCreatedBy, + ) + history = [] for history_item_data in self.history: history_item = history_item_data.to_dict() diff --git a/lightdash_client/models/chart_summary.py b/lightdash_client/models/chart_summary.py index f0a978d..43a8fc9 100644 --- a/lightdash_client/models/chart_summary.py +++ b/lightdash_client/models/chart_summary.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/chart_version.py b/lightdash_client/models/chart_version.py index 720dc98..7d441ee 100644 --- a/lightdash_client/models/chart_version.py +++ b/lightdash_client/models/chart_version.py @@ -1,10 +1,12 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from dateutil.parser import isoparse +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.pick_lightdash_user_user_uuid_or_first_name_or_last_name import ( PickLightdashUserUserUuidOrFirstNameOrLastName, @@ -37,6 +39,7 @@ def to_dict(self) -> Dict[str, Any]: from ..models.pick_lightdash_user_user_uuid_or_first_name_or_last_name import ( PickLightdashUserUserUuidOrFirstNameOrLastName, ) + from ..models.saved_chart import SavedChart chart = self.chart.to_dict() diff --git a/lightdash_client/models/comment.py b/lightdash_client/models/comment.py index a5eb999..d8fdf07 100644 --- a/lightdash_client/models/comment.py +++ b/lightdash_client/models/comment.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -43,6 +43,8 @@ class Comment: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.comment_user import CommentUser + mentions = self.mentions can_remove = self.can_remove diff --git a/lightdash_client/models/comment_user.py b/lightdash_client/models/comment_user.py index 12379df..9d7b8c7 100644 --- a/lightdash_client/models/comment_user.py +++ b/lightdash_client/models/comment_user.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="CommentUser") diff --git a/lightdash_client/models/compile_query_response_200.py b/lightdash_client/models/compile_query_response_200.py index ad2ddce..7efdfc4 100644 --- a/lightdash_client/models/compile_query_response_200.py +++ b/lightdash_client/models/compile_query_response_200.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.compile_query_response_200_status import CompileQueryResponse200Status +from ..types import UNSET, Unset T = TypeVar("T", bound="CompileQueryResponse200") diff --git a/lightdash_client/models/compiled_dimension.py b/lightdash_client/models/compiled_dimension.py new file mode 100644 index 0000000..2b7209c --- /dev/null +++ b/lightdash_client/models/compiled_dimension.py @@ -0,0 +1,410 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.compact import Compact +from ..models.compact_or_alias_type_1 import CompactOrAliasType1 +from ..models.dimension_type import DimensionType +from ..models.field_type_dimension import FieldTypeDIMENSION +from ..models.format_ import Format +from ..models.time_frames import TimeFrames +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.field_url import FieldUrl + from ..models.record_string_record_string_string_or_string_array import RecordStringRecordStringStringOrStringArray + from ..models.record_string_string import RecordStringString + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray + from ..models.source import Source + + +T = TypeVar("T", bound="CompiledDimension") + + +@_attrs_define +class CompiledDimension: + """ + Attributes: + field_type (FieldTypeDIMENSION): + type (DimensionType): + name (str): + label (str): + table (str): + table_label (str): + sql (str): + hidden (bool): + compiled_sql (str): + description (Union[Unset, str]): + source (Union[Unset, Source]): + compact (Union[Compact, CompactOrAliasType1, Unset]): + round_ (Union[Unset, float]): + format_ (Union[Unset, Format]): + group_label (Union[Unset, str]): + groups (Union[Unset, List[str]]): + urls (Union[Unset, List['FieldUrl']]): + index (Union[Unset, float]): + tags (Union[Unset, List[str]]): + group (Union[Unset, str]): + required_attributes (Union[Unset, RecordStringStringOrStringArray]): Construct a type with a set of properties K + of type T + time_interval (Union[Unset, TimeFrames]): + time_interval_base_dimension_name (Union[Unset, str]): + is_additional_dimension (Union[Unset, bool]): + colors (Union[Unset, RecordStringString]): Construct a type with a set of properties K of type T + is_interval_base (Union[Unset, bool]): + tables_references (Union[Unset, List[str]]): + tables_required_attributes (Union[Unset, RecordStringRecordStringStringOrStringArray]): Construct a type with a + set of properties K of type T + """ + + field_type: FieldTypeDIMENSION + type: DimensionType + name: str + label: str + table: str + table_label: str + sql: str + hidden: bool + compiled_sql: str + description: Union[Unset, str] = UNSET + source: Union[Unset, "Source"] = UNSET + compact: Union[Compact, CompactOrAliasType1, Unset] = UNSET + round_: Union[Unset, float] = UNSET + format_: Union[Unset, Format] = UNSET + group_label: Union[Unset, str] = UNSET + groups: Union[Unset, List[str]] = UNSET + urls: Union[Unset, List["FieldUrl"]] = UNSET + index: Union[Unset, float] = UNSET + tags: Union[Unset, List[str]] = UNSET + group: Union[Unset, str] = UNSET + required_attributes: Union[Unset, "RecordStringStringOrStringArray"] = UNSET + time_interval: Union[Unset, TimeFrames] = UNSET + time_interval_base_dimension_name: Union[Unset, str] = UNSET + is_additional_dimension: Union[Unset, bool] = UNSET + colors: Union[Unset, "RecordStringString"] = UNSET + is_interval_base: Union[Unset, bool] = UNSET + tables_references: Union[Unset, List[str]] = UNSET + tables_required_attributes: Union[Unset, "RecordStringRecordStringStringOrStringArray"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.field_url import FieldUrl + from ..models.record_string_record_string_string_or_string_array import ( + RecordStringRecordStringStringOrStringArray, + ) + from ..models.record_string_string import RecordStringString + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray + from ..models.source import Source + + field_type = self.field_type.value + + type = self.type.value + + name = self.name + + label = self.label + + table = self.table + + table_label = self.table_label + + sql = self.sql + + hidden = self.hidden + + compiled_sql = self.compiled_sql + + description = self.description + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + compact: Union[Unset, str] + if isinstance(self.compact, Unset): + compact = UNSET + elif isinstance(self.compact, Compact): + compact = self.compact.value + else: + compact = self.compact.value + + round_ = self.round_ + + format_: Union[Unset, str] = UNSET + if not isinstance(self.format_, Unset): + format_ = self.format_.value + + group_label = self.group_label + + groups: Union[Unset, List[str]] = UNSET + if not isinstance(self.groups, Unset): + groups = self.groups + + urls: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.urls, Unset): + urls = [] + for urls_item_data in self.urls: + urls_item = urls_item_data.to_dict() + urls.append(urls_item) + + index = self.index + + tags: Union[Unset, List[str]] = UNSET + if not isinstance(self.tags, Unset): + tags = self.tags + + group = self.group + + required_attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.required_attributes, Unset): + required_attributes = self.required_attributes.to_dict() + + time_interval: Union[Unset, str] = UNSET + if not isinstance(self.time_interval, Unset): + time_interval = self.time_interval.value + + time_interval_base_dimension_name = self.time_interval_base_dimension_name + + is_additional_dimension = self.is_additional_dimension + + colors: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.colors, Unset): + colors = self.colors.to_dict() + + is_interval_base = self.is_interval_base + + tables_references: Union[Unset, List[str]] = UNSET + if not isinstance(self.tables_references, Unset): + tables_references = self.tables_references + + tables_required_attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.tables_required_attributes, Unset): + tables_required_attributes = self.tables_required_attributes.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "fieldType": field_type, + "type": type, + "name": name, + "label": label, + "table": table, + "tableLabel": table_label, + "sql": sql, + "hidden": hidden, + "compiledSql": compiled_sql, + } + ) + if description is not UNSET: + field_dict["description"] = description + if source is not UNSET: + field_dict["source"] = source + if compact is not UNSET: + field_dict["compact"] = compact + if round_ is not UNSET: + field_dict["round"] = round_ + if format_ is not UNSET: + field_dict["format"] = format_ + if group_label is not UNSET: + field_dict["groupLabel"] = group_label + if groups is not UNSET: + field_dict["groups"] = groups + if urls is not UNSET: + field_dict["urls"] = urls + if index is not UNSET: + field_dict["index"] = index + if tags is not UNSET: + field_dict["tags"] = tags + if group is not UNSET: + field_dict["group"] = group + if required_attributes is not UNSET: + field_dict["requiredAttributes"] = required_attributes + if time_interval is not UNSET: + field_dict["timeInterval"] = time_interval + if time_interval_base_dimension_name is not UNSET: + field_dict["timeIntervalBaseDimensionName"] = time_interval_base_dimension_name + if is_additional_dimension is not UNSET: + field_dict["isAdditionalDimension"] = is_additional_dimension + if colors is not UNSET: + field_dict["colors"] = colors + if is_interval_base is not UNSET: + field_dict["isIntervalBase"] = is_interval_base + if tables_references is not UNSET: + field_dict["tablesReferences"] = tables_references + if tables_required_attributes is not UNSET: + field_dict["tablesRequiredAttributes"] = tables_required_attributes + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.field_url import FieldUrl + from ..models.record_string_record_string_string_or_string_array import ( + RecordStringRecordStringStringOrStringArray, + ) + from ..models.record_string_string import RecordStringString + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray + from ..models.source import Source + + d = src_dict.copy() + field_type = FieldTypeDIMENSION(d.pop("fieldType")) + + type = DimensionType(d.pop("type")) + + name = d.pop("name") + + label = d.pop("label") + + table = d.pop("table") + + table_label = d.pop("tableLabel") + + sql = d.pop("sql") + + hidden = d.pop("hidden") + + compiled_sql = d.pop("compiledSql") + + description = d.pop("description", UNSET) + + _source = d.pop("source", UNSET) + source: Union[Unset, Source] + if isinstance(_source, Unset): + source = UNSET + else: + source = Source.from_dict(_source) + + def _parse_compact(data: object) -> Union[Compact, CompactOrAliasType1, Unset]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + componentsschemas_compact_or_alias_type_0 = Compact(data) + + return componentsschemas_compact_or_alias_type_0 + except: # noqa: E722 + pass + if not isinstance(data, str): + raise TypeError() + componentsschemas_compact_or_alias_type_1 = CompactOrAliasType1(data) + + return componentsschemas_compact_or_alias_type_1 + + compact = _parse_compact(d.pop("compact", UNSET)) + + round_ = d.pop("round", UNSET) + + _format_ = d.pop("format", UNSET) + format_: Union[Unset, Format] + if isinstance(_format_, Unset): + format_ = UNSET + else: + format_ = Format(_format_) + + group_label = d.pop("groupLabel", UNSET) + + groups = cast(List[str], d.pop("groups", UNSET)) + + urls = [] + _urls = d.pop("urls", UNSET) + for urls_item_data in _urls or []: + urls_item = FieldUrl.from_dict(urls_item_data) + + urls.append(urls_item) + + index = d.pop("index", UNSET) + + tags = cast(List[str], d.pop("tags", UNSET)) + + group = d.pop("group", UNSET) + + _required_attributes = d.pop("requiredAttributes", UNSET) + required_attributes: Union[Unset, RecordStringStringOrStringArray] + if isinstance(_required_attributes, Unset): + required_attributes = UNSET + else: + required_attributes = RecordStringStringOrStringArray.from_dict(_required_attributes) + + _time_interval = d.pop("timeInterval", UNSET) + time_interval: Union[Unset, TimeFrames] + if isinstance(_time_interval, Unset): + time_interval = UNSET + else: + time_interval = TimeFrames(_time_interval) + + time_interval_base_dimension_name = d.pop("timeIntervalBaseDimensionName", UNSET) + + is_additional_dimension = d.pop("isAdditionalDimension", UNSET) + + _colors = d.pop("colors", UNSET) + colors: Union[Unset, RecordStringString] + if isinstance(_colors, Unset): + colors = UNSET + else: + colors = RecordStringString.from_dict(_colors) + + is_interval_base = d.pop("isIntervalBase", UNSET) + + tables_references = cast(List[str], d.pop("tablesReferences", UNSET)) + + _tables_required_attributes = d.pop("tablesRequiredAttributes", UNSET) + tables_required_attributes: Union[Unset, RecordStringRecordStringStringOrStringArray] + if isinstance(_tables_required_attributes, Unset): + tables_required_attributes = UNSET + else: + tables_required_attributes = RecordStringRecordStringStringOrStringArray.from_dict( + _tables_required_attributes + ) + + compiled_dimension = cls( + field_type=field_type, + type=type, + name=name, + label=label, + table=table, + table_label=table_label, + sql=sql, + hidden=hidden, + compiled_sql=compiled_sql, + description=description, + source=source, + compact=compact, + round_=round_, + format_=format_, + group_label=group_label, + groups=groups, + urls=urls, + index=index, + tags=tags, + group=group, + required_attributes=required_attributes, + time_interval=time_interval, + time_interval_base_dimension_name=time_interval_base_dimension_name, + is_additional_dimension=is_additional_dimension, + colors=colors, + is_interval_base=is_interval_base, + tables_references=tables_references, + tables_required_attributes=tables_required_attributes, + ) + + compiled_dimension.additional_properties = d + return compiled_dimension + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/compiled_explore_join.py b/lightdash_client/models/compiled_explore_join.py index 150e96b..1b8201d 100644 --- a/lightdash_client/models/compiled_explore_join.py +++ b/lightdash_client/models/compiled_explore_join.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/compiled_metric.py b/lightdash_client/models/compiled_metric.py new file mode 100644 index 0000000..b7222f2 --- /dev/null +++ b/lightdash_client/models/compiled_metric.py @@ -0,0 +1,435 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.compact import Compact +from ..models.compact_or_alias_type_1 import CompactOrAliasType1 +from ..models.field_type_metric import FieldTypeMETRIC +from ..models.format_ import Format +from ..models.metric_type import MetricType +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.custom_format import CustomFormat + from ..models.default_time_dimension import DefaultTimeDimension + from ..models.field_url import FieldUrl + from ..models.metric_filter_rule import MetricFilterRule + from ..models.record_string_record_string_string_or_string_array import RecordStringRecordStringStringOrStringArray + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray + from ..models.source import Source + + +T = TypeVar("T", bound="CompiledMetric") + + +@_attrs_define +class CompiledMetric: + """ + Attributes: + field_type (FieldTypeMETRIC): + type (MetricType): + name (str): + label (str): + table (str): + table_label (str): + sql (str): + hidden (bool): + is_auto_generated (bool): + compiled_sql (str): + description (Union[Unset, str]): + source (Union[Unset, Source]): + compact (Union[Compact, CompactOrAliasType1, Unset]): + round_ (Union[Unset, float]): + format_ (Union[Unset, Format]): + group_label (Union[Unset, str]): + groups (Union[Unset, List[str]]): + urls (Union[Unset, List['FieldUrl']]): + index (Union[Unset, float]): + tags (Union[Unset, List[str]]): + show_underlying_values (Union[Unset, List[str]]): + filters (Union[Unset, List['MetricFilterRule']]): + percentile (Union[Unset, float]): + format_options (Union[Unset, CustomFormat]): + dimension_reference (Union[Unset, str]): + required_attributes (Union[Unset, RecordStringStringOrStringArray]): Construct a type with a set of properties K + of type T + default_time_dimension (Union[Unset, DefaultTimeDimension]): + tables_references (Union[Unset, List[str]]): + tables_required_attributes (Union[Unset, RecordStringRecordStringStringOrStringArray]): Construct a type with a + set of properties K of type T + """ + + field_type: FieldTypeMETRIC + type: MetricType + name: str + label: str + table: str + table_label: str + sql: str + hidden: bool + is_auto_generated: bool + compiled_sql: str + description: Union[Unset, str] = UNSET + source: Union[Unset, "Source"] = UNSET + compact: Union[Compact, CompactOrAliasType1, Unset] = UNSET + round_: Union[Unset, float] = UNSET + format_: Union[Unset, Format] = UNSET + group_label: Union[Unset, str] = UNSET + groups: Union[Unset, List[str]] = UNSET + urls: Union[Unset, List["FieldUrl"]] = UNSET + index: Union[Unset, float] = UNSET + tags: Union[Unset, List[str]] = UNSET + show_underlying_values: Union[Unset, List[str]] = UNSET + filters: Union[Unset, List["MetricFilterRule"]] = UNSET + percentile: Union[Unset, float] = UNSET + format_options: Union[Unset, "CustomFormat"] = UNSET + dimension_reference: Union[Unset, str] = UNSET + required_attributes: Union[Unset, "RecordStringStringOrStringArray"] = UNSET + default_time_dimension: Union[Unset, "DefaultTimeDimension"] = UNSET + tables_references: Union[Unset, List[str]] = UNSET + tables_required_attributes: Union[Unset, "RecordStringRecordStringStringOrStringArray"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.custom_format import CustomFormat + from ..models.default_time_dimension import DefaultTimeDimension + from ..models.field_url import FieldUrl + from ..models.metric_filter_rule import MetricFilterRule + from ..models.record_string_record_string_string_or_string_array import ( + RecordStringRecordStringStringOrStringArray, + ) + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray + from ..models.source import Source + + field_type = self.field_type.value + + type = self.type.value + + name = self.name + + label = self.label + + table = self.table + + table_label = self.table_label + + sql = self.sql + + hidden = self.hidden + + is_auto_generated = self.is_auto_generated + + compiled_sql = self.compiled_sql + + description = self.description + + source: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.source, Unset): + source = self.source.to_dict() + + compact: Union[Unset, str] + if isinstance(self.compact, Unset): + compact = UNSET + elif isinstance(self.compact, Compact): + compact = self.compact.value + else: + compact = self.compact.value + + round_ = self.round_ + + format_: Union[Unset, str] = UNSET + if not isinstance(self.format_, Unset): + format_ = self.format_.value + + group_label = self.group_label + + groups: Union[Unset, List[str]] = UNSET + if not isinstance(self.groups, Unset): + groups = self.groups + + urls: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.urls, Unset): + urls = [] + for urls_item_data in self.urls: + urls_item = urls_item_data.to_dict() + urls.append(urls_item) + + index = self.index + + tags: Union[Unset, List[str]] = UNSET + if not isinstance(self.tags, Unset): + tags = self.tags + + show_underlying_values: Union[Unset, List[str]] = UNSET + if not isinstance(self.show_underlying_values, Unset): + show_underlying_values = self.show_underlying_values + + filters: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.filters, Unset): + filters = [] + for filters_item_data in self.filters: + filters_item = filters_item_data.to_dict() + filters.append(filters_item) + + percentile = self.percentile + + format_options: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.format_options, Unset): + format_options = self.format_options.to_dict() + + dimension_reference = self.dimension_reference + + required_attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.required_attributes, Unset): + required_attributes = self.required_attributes.to_dict() + + default_time_dimension: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.default_time_dimension, Unset): + default_time_dimension = self.default_time_dimension.to_dict() + + tables_references: Union[Unset, List[str]] = UNSET + if not isinstance(self.tables_references, Unset): + tables_references = self.tables_references + + tables_required_attributes: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.tables_required_attributes, Unset): + tables_required_attributes = self.tables_required_attributes.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "fieldType": field_type, + "type": type, + "name": name, + "label": label, + "table": table, + "tableLabel": table_label, + "sql": sql, + "hidden": hidden, + "isAutoGenerated": is_auto_generated, + "compiledSql": compiled_sql, + } + ) + if description is not UNSET: + field_dict["description"] = description + if source is not UNSET: + field_dict["source"] = source + if compact is not UNSET: + field_dict["compact"] = compact + if round_ is not UNSET: + field_dict["round"] = round_ + if format_ is not UNSET: + field_dict["format"] = format_ + if group_label is not UNSET: + field_dict["groupLabel"] = group_label + if groups is not UNSET: + field_dict["groups"] = groups + if urls is not UNSET: + field_dict["urls"] = urls + if index is not UNSET: + field_dict["index"] = index + if tags is not UNSET: + field_dict["tags"] = tags + if show_underlying_values is not UNSET: + field_dict["showUnderlyingValues"] = show_underlying_values + if filters is not UNSET: + field_dict["filters"] = filters + if percentile is not UNSET: + field_dict["percentile"] = percentile + if format_options is not UNSET: + field_dict["formatOptions"] = format_options + if dimension_reference is not UNSET: + field_dict["dimensionReference"] = dimension_reference + if required_attributes is not UNSET: + field_dict["requiredAttributes"] = required_attributes + if default_time_dimension is not UNSET: + field_dict["defaultTimeDimension"] = default_time_dimension + if tables_references is not UNSET: + field_dict["tablesReferences"] = tables_references + if tables_required_attributes is not UNSET: + field_dict["tablesRequiredAttributes"] = tables_required_attributes + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.custom_format import CustomFormat + from ..models.default_time_dimension import DefaultTimeDimension + from ..models.field_url import FieldUrl + from ..models.metric_filter_rule import MetricFilterRule + from ..models.record_string_record_string_string_or_string_array import ( + RecordStringRecordStringStringOrStringArray, + ) + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray + from ..models.source import Source + + d = src_dict.copy() + field_type = FieldTypeMETRIC(d.pop("fieldType")) + + type = MetricType(d.pop("type")) + + name = d.pop("name") + + label = d.pop("label") + + table = d.pop("table") + + table_label = d.pop("tableLabel") + + sql = d.pop("sql") + + hidden = d.pop("hidden") + + is_auto_generated = d.pop("isAutoGenerated") + + compiled_sql = d.pop("compiledSql") + + description = d.pop("description", UNSET) + + _source = d.pop("source", UNSET) + source: Union[Unset, Source] + if isinstance(_source, Unset): + source = UNSET + else: + source = Source.from_dict(_source) + + def _parse_compact(data: object) -> Union[Compact, CompactOrAliasType1, Unset]: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, str): + raise TypeError() + componentsschemas_compact_or_alias_type_0 = Compact(data) + + return componentsschemas_compact_or_alias_type_0 + except: # noqa: E722 + pass + if not isinstance(data, str): + raise TypeError() + componentsschemas_compact_or_alias_type_1 = CompactOrAliasType1(data) + + return componentsschemas_compact_or_alias_type_1 + + compact = _parse_compact(d.pop("compact", UNSET)) + + round_ = d.pop("round", UNSET) + + _format_ = d.pop("format", UNSET) + format_: Union[Unset, Format] + if isinstance(_format_, Unset): + format_ = UNSET + else: + format_ = Format(_format_) + + group_label = d.pop("groupLabel", UNSET) + + groups = cast(List[str], d.pop("groups", UNSET)) + + urls = [] + _urls = d.pop("urls", UNSET) + for urls_item_data in _urls or []: + urls_item = FieldUrl.from_dict(urls_item_data) + + urls.append(urls_item) + + index = d.pop("index", UNSET) + + tags = cast(List[str], d.pop("tags", UNSET)) + + show_underlying_values = cast(List[str], d.pop("showUnderlyingValues", UNSET)) + + filters = [] + _filters = d.pop("filters", UNSET) + for filters_item_data in _filters or []: + filters_item = MetricFilterRule.from_dict(filters_item_data) + + filters.append(filters_item) + + percentile = d.pop("percentile", UNSET) + + _format_options = d.pop("formatOptions", UNSET) + format_options: Union[Unset, CustomFormat] + if isinstance(_format_options, Unset): + format_options = UNSET + else: + format_options = CustomFormat.from_dict(_format_options) + + dimension_reference = d.pop("dimensionReference", UNSET) + + _required_attributes = d.pop("requiredAttributes", UNSET) + required_attributes: Union[Unset, RecordStringStringOrStringArray] + if isinstance(_required_attributes, Unset): + required_attributes = UNSET + else: + required_attributes = RecordStringStringOrStringArray.from_dict(_required_attributes) + + _default_time_dimension = d.pop("defaultTimeDimension", UNSET) + default_time_dimension: Union[Unset, DefaultTimeDimension] + if isinstance(_default_time_dimension, Unset): + default_time_dimension = UNSET + else: + default_time_dimension = DefaultTimeDimension.from_dict(_default_time_dimension) + + tables_references = cast(List[str], d.pop("tablesReferences", UNSET)) + + _tables_required_attributes = d.pop("tablesRequiredAttributes", UNSET) + tables_required_attributes: Union[Unset, RecordStringRecordStringStringOrStringArray] + if isinstance(_tables_required_attributes, Unset): + tables_required_attributes = UNSET + else: + tables_required_attributes = RecordStringRecordStringStringOrStringArray.from_dict( + _tables_required_attributes + ) + + compiled_metric = cls( + field_type=field_type, + type=type, + name=name, + label=label, + table=table, + table_label=table_label, + sql=sql, + hidden=hidden, + is_auto_generated=is_auto_generated, + compiled_sql=compiled_sql, + description=description, + source=source, + compact=compact, + round_=round_, + format_=format_, + group_label=group_label, + groups=groups, + urls=urls, + index=index, + tags=tags, + show_underlying_values=show_underlying_values, + filters=filters, + percentile=percentile, + format_options=format_options, + dimension_reference=dimension_reference, + required_attributes=required_attributes, + default_time_dimension=default_time_dimension, + tables_references=tables_references, + tables_required_attributes=tables_required_attributes, + ) + + compiled_metric.additional_properties = d + return compiled_metric + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/compiled_table.py b/lightdash_client/models/compiled_table.py index 0b176a0..b2a81a7 100644 --- a/lightdash_client/models/compiled_table.py +++ b/lightdash_client/models/compiled_table.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -7,16 +7,13 @@ from ..types import UNSET, Unset if TYPE_CHECKING: + from ..models.default_time_dimension import DefaultTimeDimension from ..models.metric_filter_rule import MetricFilterRule from ..models.record_string_compiled_dimension import RecordStringCompiledDimension from ..models.record_string_compiled_metric import RecordStringCompiledMetric from ..models.record_string_group_type import RecordStringGroupType - from ..models.record_string_lineage_node_dependency_array import ( - RecordStringLineageNodeDependencyArray, - ) - from ..models.record_string_string_or_string_array import ( - RecordStringStringOrStringArray, - ) + from ..models.record_string_lineage_node_dependency_array import RecordStringLineageNodeDependencyArray + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray from ..models.source import Source @@ -35,6 +32,7 @@ class CompiledTable: lineage_graph (RecordStringLineageNodeDependencyArray): Construct a type with a set of properties K of type T metrics (RecordStringCompiledMetric): Construct a type with a set of properties K of type T dimensions (RecordStringCompiledDimension): Construct a type with a set of properties K of type T + default_time_dimension (Union[Unset, DefaultTimeDimension]): group_details (Union[Unset, RecordStringGroupType]): Construct a type with a set of properties K of type T required_attributes (Union[Unset, RecordStringStringOrStringArray]): Construct a type with a set of properties K of type T @@ -57,6 +55,7 @@ class CompiledTable: lineage_graph: "RecordStringLineageNodeDependencyArray" metrics: "RecordStringCompiledMetric" dimensions: "RecordStringCompiledDimension" + default_time_dimension: Union[Unset, "DefaultTimeDimension"] = UNSET group_details: Union[Unset, "RecordStringGroupType"] = UNSET required_attributes: Union[Unset, "RecordStringStringOrStringArray"] = UNSET hidden: Union[Unset, bool] = UNSET @@ -71,6 +70,15 @@ class CompiledTable: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.default_time_dimension import DefaultTimeDimension + from ..models.metric_filter_rule import MetricFilterRule + from ..models.record_string_compiled_dimension import RecordStringCompiledDimension + from ..models.record_string_compiled_metric import RecordStringCompiledMetric + from ..models.record_string_group_type import RecordStringGroupType + from ..models.record_string_lineage_node_dependency_array import RecordStringLineageNodeDependencyArray + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray + from ..models.source import Source + sql_table = self.sql_table schema = self.schema @@ -87,6 +95,10 @@ def to_dict(self) -> Dict[str, Any]: dimensions = self.dimensions.to_dict() + default_time_dimension: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.default_time_dimension, Unset): + default_time_dimension = self.default_time_dimension.to_dict() + group_details: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.group_details, Unset): group_details = self.group_details.to_dict() @@ -136,6 +148,8 @@ def to_dict(self) -> Dict[str, Any]: "dimensions": dimensions, } ) + if default_time_dimension is not UNSET: + field_dict["defaultTimeDimension"] = default_time_dimension if group_details is not UNSET: field_dict["groupDetails"] = group_details if required_attributes is not UNSET: @@ -163,18 +177,13 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.default_time_dimension import DefaultTimeDimension from ..models.metric_filter_rule import MetricFilterRule - from ..models.record_string_compiled_dimension import ( - RecordStringCompiledDimension, - ) + from ..models.record_string_compiled_dimension import RecordStringCompiledDimension from ..models.record_string_compiled_metric import RecordStringCompiledMetric from ..models.record_string_group_type import RecordStringGroupType - from ..models.record_string_lineage_node_dependency_array import ( - RecordStringLineageNodeDependencyArray, - ) - from ..models.record_string_string_or_string_array import ( - RecordStringStringOrStringArray, - ) + from ..models.record_string_lineage_node_dependency_array import RecordStringLineageNodeDependencyArray + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray from ..models.source import Source d = src_dict.copy() @@ -194,6 +203,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: dimensions = RecordStringCompiledDimension.from_dict(d.pop("dimensions")) + _default_time_dimension = d.pop("defaultTimeDimension", UNSET) + default_time_dimension: Union[Unset, DefaultTimeDimension] + if isinstance(_default_time_dimension, Unset): + default_time_dimension = UNSET + else: + default_time_dimension = DefaultTimeDimension.from_dict(_default_time_dimension) + _group_details = d.pop("groupDetails", UNSET) group_details: Union[Unset, RecordStringGroupType] if isinstance(_group_details, Unset): @@ -250,6 +266,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: lineage_graph=lineage_graph, metrics=metrics, dimensions=dimensions, + default_time_dimension=default_time_dimension, group_details=group_details, required_attributes=required_attributes, hidden=hidden, diff --git a/lightdash_client/models/conditional_formatting_config_with_color_range.py b/lightdash_client/models/conditional_formatting_config_with_color_range.py index 7e3c13e..a1e5cc7 100644 --- a/lightdash_client/models/conditional_formatting_config_with_color_range.py +++ b/lightdash_client/models/conditional_formatting_config_with_color_range.py @@ -1,15 +1,15 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.conditional_formatting_config_with_color_range_color import ( ConditionalFormattingConfigWithColorRangeColor, ) - from ..models.conditional_formatting_with_range import ( - ConditionalFormattingWithRange, - ) + from ..models.conditional_formatting_with_range import ConditionalFormattingWithRange from ..models.field_target import FieldTarget @@ -31,6 +31,10 @@ class ConditionalFormattingConfigWithColorRange: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.conditional_formatting_config_with_color_range_color import ( + ConditionalFormattingConfigWithColorRangeColor, + ) + from ..models.conditional_formatting_with_range import ConditionalFormattingWithRange from ..models.field_target import FieldTarget rule = self.rule.to_dict() @@ -60,9 +64,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.conditional_formatting_config_with_color_range_color import ( ConditionalFormattingConfigWithColorRangeColor, ) - from ..models.conditional_formatting_with_range import ( - ConditionalFormattingWithRange, - ) + from ..models.conditional_formatting_with_range import ConditionalFormattingWithRange from ..models.field_target import FieldTarget d = src_dict.copy() diff --git a/lightdash_client/models/conditional_formatting_config_with_color_range_color.py b/lightdash_client/models/conditional_formatting_config_with_color_range_color.py index d4f6c2a..586d448 100644 --- a/lightdash_client/models/conditional_formatting_config_with_color_range_color.py +++ b/lightdash_client/models/conditional_formatting_config_with_color_range_color.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -6,6 +6,7 @@ from ..models.conditional_formatting_config_with_color_range_color_steps import ( ConditionalFormattingConfigWithColorRangeColorSteps, ) +from ..types import UNSET, Unset T = TypeVar("T", bound="ConditionalFormattingConfigWithColorRangeColor") diff --git a/lightdash_client/models/conditional_formatting_config_with_single_color.py b/lightdash_client/models/conditional_formatting_config_with_single_color.py index 91614be..84de5c8 100644 --- a/lightdash_client/models/conditional_formatting_config_with_single_color.py +++ b/lightdash_client/models/conditional_formatting_config_with_single_color.py @@ -1,12 +1,12 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: - from ..models.conditional_formatting_with_conditional_operator import ( - ConditionalFormattingWithConditionalOperator, - ) + from ..models.conditional_formatting_with_conditional_operator import ConditionalFormattingWithConditionalOperator from ..models.field_target import FieldTarget @@ -28,6 +28,9 @@ class ConditionalFormattingConfigWithSingleColor: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.conditional_formatting_with_conditional_operator import ( + ConditionalFormattingWithConditionalOperator, + ) from ..models.field_target import FieldTarget rules = [] diff --git a/lightdash_client/models/conditional_formatting_with_conditional_operator.py b/lightdash_client/models/conditional_formatting_with_conditional_operator.py index fc32e65..325f64e 100644 --- a/lightdash_client/models/conditional_formatting_with_conditional_operator.py +++ b/lightdash_client/models/conditional_formatting_with_conditional_operator.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.conditional_operator import ConditionalOperator +from ..types import UNSET, Unset T = TypeVar("T", bound="ConditionalFormattingWithConditionalOperator") diff --git a/lightdash_client/models/conditional_formatting_with_range.py b/lightdash_client/models/conditional_formatting_with_range.py index 86ecbd6..a81b062 100644 --- a/lightdash_client/models/conditional_formatting_with_range.py +++ b/lightdash_client/models/conditional_formatting_with_range.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="ConditionalFormattingWithRange") diff --git a/lightdash_client/models/conditional_rule_conditional_operator_number.py b/lightdash_client/models/conditional_rule_conditional_operator_number.py index a3308e8..ecfbcd5 100644 --- a/lightdash_client/models/conditional_rule_conditional_operator_number.py +++ b/lightdash_client/models/conditional_rule_conditional_operator_number.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/create_dashboard.py b/lightdash_client/models/create_dashboard.py new file mode 100644 index 0000000..40b67f2 --- /dev/null +++ b/lightdash_client/models/create_dashboard.py @@ -0,0 +1,240 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.create_dashboard_chart_tile import CreateDashboardChartTile + from ..models.create_dashboard_loom_tile import CreateDashboardLoomTile + from ..models.create_dashboard_markdown_tile import CreateDashboardMarkdownTile + from ..models.create_dashboard_semantic_viewer_chart_tile import CreateDashboardSemanticViewerChartTile + from ..models.create_dashboard_sql_chart_tile import CreateDashboardSqlChartTile + from ..models.dashboard_filters import DashboardFilters + from ..models.dashboard_tab import DashboardTab + from ..models.pick_updated_by_user_user_uuid import PickUpdatedByUserUserUuid + + +T = TypeVar("T", bound="CreateDashboard") + + +@_attrs_define +class CreateDashboard: + """ + Attributes: + tabs (List['DashboardTab']): + tiles (List[Union['CreateDashboardChartTile', 'CreateDashboardLoomTile', 'CreateDashboardMarkdownTile', + 'CreateDashboardSemanticViewerChartTile', 'CreateDashboardSqlChartTile']]): + name (str): + space_uuid (Union[Unset, str]): + updated_by_user (Union[Unset, PickUpdatedByUserUserUuid]): From T, pick a set of properties whose keys are in + the union K + filters (Union[Unset, DashboardFilters]): + description (Union[Unset, str]): + """ + + tabs: List["DashboardTab"] + tiles: List[ + Union[ + "CreateDashboardChartTile", + "CreateDashboardLoomTile", + "CreateDashboardMarkdownTile", + "CreateDashboardSemanticViewerChartTile", + "CreateDashboardSqlChartTile", + ] + ] + name: str + space_uuid: Union[Unset, str] = UNSET + updated_by_user: Union[Unset, "PickUpdatedByUserUserUuid"] = UNSET + filters: Union[Unset, "DashboardFilters"] = UNSET + description: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.create_dashboard_chart_tile import CreateDashboardChartTile + from ..models.create_dashboard_loom_tile import CreateDashboardLoomTile + from ..models.create_dashboard_markdown_tile import CreateDashboardMarkdownTile + from ..models.create_dashboard_semantic_viewer_chart_tile import CreateDashboardSemanticViewerChartTile + from ..models.create_dashboard_sql_chart_tile import CreateDashboardSqlChartTile + from ..models.dashboard_filters import DashboardFilters + from ..models.dashboard_tab import DashboardTab + from ..models.pick_updated_by_user_user_uuid import PickUpdatedByUserUserUuid + + tabs = [] + for tabs_item_data in self.tabs: + tabs_item = tabs_item_data.to_dict() + tabs.append(tabs_item) + + tiles = [] + for tiles_item_data in self.tiles: + tiles_item: Dict[str, Any] + if isinstance(tiles_item_data, CreateDashboardChartTile): + tiles_item = tiles_item_data.to_dict() + elif isinstance(tiles_item_data, CreateDashboardMarkdownTile): + tiles_item = tiles_item_data.to_dict() + elif isinstance(tiles_item_data, CreateDashboardLoomTile): + tiles_item = tiles_item_data.to_dict() + elif isinstance(tiles_item_data, CreateDashboardSqlChartTile): + tiles_item = tiles_item_data.to_dict() + else: + tiles_item = tiles_item_data.to_dict() + + tiles.append(tiles_item) + + name = self.name + + space_uuid = self.space_uuid + + updated_by_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.updated_by_user, Unset): + updated_by_user = self.updated_by_user.to_dict() + + filters: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.filters, Unset): + filters = self.filters.to_dict() + + description = self.description + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "tabs": tabs, + "tiles": tiles, + "name": name, + } + ) + if space_uuid is not UNSET: + field_dict["spaceUuid"] = space_uuid + if updated_by_user is not UNSET: + field_dict["updatedByUser"] = updated_by_user + if filters is not UNSET: + field_dict["filters"] = filters + if description is not UNSET: + field_dict["description"] = description + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.create_dashboard_chart_tile import CreateDashboardChartTile + from ..models.create_dashboard_loom_tile import CreateDashboardLoomTile + from ..models.create_dashboard_markdown_tile import CreateDashboardMarkdownTile + from ..models.create_dashboard_semantic_viewer_chart_tile import CreateDashboardSemanticViewerChartTile + from ..models.create_dashboard_sql_chart_tile import CreateDashboardSqlChartTile + from ..models.dashboard_filters import DashboardFilters + from ..models.dashboard_tab import DashboardTab + from ..models.pick_updated_by_user_user_uuid import PickUpdatedByUserUserUuid + + d = src_dict.copy() + tabs = [] + _tabs = d.pop("tabs") + for tabs_item_data in _tabs: + tabs_item = DashboardTab.from_dict(tabs_item_data) + + tabs.append(tabs_item) + + tiles = [] + _tiles = d.pop("tiles") + for tiles_item_data in _tiles: + + def _parse_tiles_item( + data: object, + ) -> Union[ + "CreateDashboardChartTile", + "CreateDashboardLoomTile", + "CreateDashboardMarkdownTile", + "CreateDashboardSemanticViewerChartTile", + "CreateDashboardSqlChartTile", + ]: + try: + if not isinstance(data, dict): + raise TypeError() + tiles_item_type_0 = CreateDashboardChartTile.from_dict(data) + + return tiles_item_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + tiles_item_type_1 = CreateDashboardMarkdownTile.from_dict(data) + + return tiles_item_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + tiles_item_type_2 = CreateDashboardLoomTile.from_dict(data) + + return tiles_item_type_2 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + tiles_item_type_3 = CreateDashboardSqlChartTile.from_dict(data) + + return tiles_item_type_3 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + tiles_item_type_4 = CreateDashboardSemanticViewerChartTile.from_dict(data) + + return tiles_item_type_4 + + tiles_item = _parse_tiles_item(tiles_item_data) + + tiles.append(tiles_item) + + name = d.pop("name") + + space_uuid = d.pop("spaceUuid", UNSET) + + _updated_by_user = d.pop("updatedByUser", UNSET) + updated_by_user: Union[Unset, PickUpdatedByUserUserUuid] + if isinstance(_updated_by_user, Unset): + updated_by_user = UNSET + else: + updated_by_user = PickUpdatedByUserUserUuid.from_dict(_updated_by_user) + + _filters = d.pop("filters", UNSET) + filters: Union[Unset, DashboardFilters] + if isinstance(_filters, Unset): + filters = UNSET + else: + filters = DashboardFilters.from_dict(_filters) + + description = d.pop("description", UNSET) + + create_dashboard = cls( + tabs=tabs, + tiles=tiles, + name=name, + space_uuid=space_uuid, + updated_by_user=updated_by_user, + filters=filters, + description=description, + ) + + create_dashboard.additional_properties = d + return create_dashboard + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/create_dashboard_chart_tile.py b/lightdash_client/models/create_dashboard_chart_tile.py new file mode 100644 index 0000000..0dc856c --- /dev/null +++ b/lightdash_client/models/create_dashboard_chart_tile.py @@ -0,0 +1,127 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.dashboard_tile_types_savedchart import DashboardTileTypesSAVEDCHART +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dashboard_chart_tile_properties_properties import DashboardChartTilePropertiesProperties + + +T = TypeVar("T", bound="CreateDashboardChartTile") + + +@_attrs_define +class CreateDashboardChartTile: + """ + Attributes: + w (float): + h (float): + y (float): + x (float): + type (DashboardTileTypesSAVEDCHART): + properties (DashboardChartTilePropertiesProperties): + tab_uuid (Union[Unset, str]): + uuid (Union[Unset, str]): + """ + + w: float + h: float + y: float + x: float + type: DashboardTileTypesSAVEDCHART + properties: "DashboardChartTilePropertiesProperties" + tab_uuid: Union[Unset, str] = UNSET + uuid: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_chart_tile_properties_properties import DashboardChartTilePropertiesProperties + + w = self.w + + h = self.h + + y = self.y + + x = self.x + + type = self.type.value + + properties = self.properties.to_dict() + + tab_uuid = self.tab_uuid + + uuid = self.uuid + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "w": w, + "h": h, + "y": y, + "x": x, + "type": type, + "properties": properties, + } + ) + if tab_uuid is not UNSET: + field_dict["tabUuid"] = tab_uuid + if uuid is not UNSET: + field_dict["uuid"] = uuid + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.dashboard_chart_tile_properties_properties import DashboardChartTilePropertiesProperties + + d = src_dict.copy() + w = d.pop("w") + + h = d.pop("h") + + y = d.pop("y") + + x = d.pop("x") + + type = DashboardTileTypesSAVEDCHART(d.pop("type")) + + properties = DashboardChartTilePropertiesProperties.from_dict(d.pop("properties")) + + tab_uuid = d.pop("tabUuid", UNSET) + + uuid = d.pop("uuid", UNSET) + + create_dashboard_chart_tile = cls( + w=w, + h=h, + y=y, + x=x, + type=type, + properties=properties, + tab_uuid=tab_uuid, + uuid=uuid, + ) + + create_dashboard_chart_tile.additional_properties = d + return create_dashboard_chart_tile + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/create_dashboard_loom_tile.py b/lightdash_client/models/create_dashboard_loom_tile.py new file mode 100644 index 0000000..3fc46ad --- /dev/null +++ b/lightdash_client/models/create_dashboard_loom_tile.py @@ -0,0 +1,127 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.dashboard_tile_types_loom import DashboardTileTypesLOOM +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dashboard_loom_tile_properties_properties import DashboardLoomTilePropertiesProperties + + +T = TypeVar("T", bound="CreateDashboardLoomTile") + + +@_attrs_define +class CreateDashboardLoomTile: + """ + Attributes: + w (float): + h (float): + y (float): + x (float): + type (DashboardTileTypesLOOM): + properties (DashboardLoomTilePropertiesProperties): + tab_uuid (Union[Unset, str]): + uuid (Union[Unset, str]): + """ + + w: float + h: float + y: float + x: float + type: DashboardTileTypesLOOM + properties: "DashboardLoomTilePropertiesProperties" + tab_uuid: Union[Unset, str] = UNSET + uuid: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_loom_tile_properties_properties import DashboardLoomTilePropertiesProperties + + w = self.w + + h = self.h + + y = self.y + + x = self.x + + type = self.type.value + + properties = self.properties.to_dict() + + tab_uuid = self.tab_uuid + + uuid = self.uuid + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "w": w, + "h": h, + "y": y, + "x": x, + "type": type, + "properties": properties, + } + ) + if tab_uuid is not UNSET: + field_dict["tabUuid"] = tab_uuid + if uuid is not UNSET: + field_dict["uuid"] = uuid + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.dashboard_loom_tile_properties_properties import DashboardLoomTilePropertiesProperties + + d = src_dict.copy() + w = d.pop("w") + + h = d.pop("h") + + y = d.pop("y") + + x = d.pop("x") + + type = DashboardTileTypesLOOM(d.pop("type")) + + properties = DashboardLoomTilePropertiesProperties.from_dict(d.pop("properties")) + + tab_uuid = d.pop("tabUuid", UNSET) + + uuid = d.pop("uuid", UNSET) + + create_dashboard_loom_tile = cls( + w=w, + h=h, + y=y, + x=x, + type=type, + properties=properties, + tab_uuid=tab_uuid, + uuid=uuid, + ) + + create_dashboard_loom_tile.additional_properties = d + return create_dashboard_loom_tile + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/create_dashboard_markdown_tile.py b/lightdash_client/models/create_dashboard_markdown_tile.py new file mode 100644 index 0000000..c0787aa --- /dev/null +++ b/lightdash_client/models/create_dashboard_markdown_tile.py @@ -0,0 +1,127 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.dashboard_tile_types_markdown import DashboardTileTypesMARKDOWN +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dashboard_markdown_tile_properties_properties import DashboardMarkdownTilePropertiesProperties + + +T = TypeVar("T", bound="CreateDashboardMarkdownTile") + + +@_attrs_define +class CreateDashboardMarkdownTile: + """ + Attributes: + w (float): + h (float): + y (float): + x (float): + type (DashboardTileTypesMARKDOWN): + properties (DashboardMarkdownTilePropertiesProperties): + tab_uuid (Union[Unset, str]): + uuid (Union[Unset, str]): + """ + + w: float + h: float + y: float + x: float + type: DashboardTileTypesMARKDOWN + properties: "DashboardMarkdownTilePropertiesProperties" + tab_uuid: Union[Unset, str] = UNSET + uuid: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_markdown_tile_properties_properties import DashboardMarkdownTilePropertiesProperties + + w = self.w + + h = self.h + + y = self.y + + x = self.x + + type = self.type.value + + properties = self.properties.to_dict() + + tab_uuid = self.tab_uuid + + uuid = self.uuid + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "w": w, + "h": h, + "y": y, + "x": x, + "type": type, + "properties": properties, + } + ) + if tab_uuid is not UNSET: + field_dict["tabUuid"] = tab_uuid + if uuid is not UNSET: + field_dict["uuid"] = uuid + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.dashboard_markdown_tile_properties_properties import DashboardMarkdownTilePropertiesProperties + + d = src_dict.copy() + w = d.pop("w") + + h = d.pop("h") + + y = d.pop("y") + + x = d.pop("x") + + type = DashboardTileTypesMARKDOWN(d.pop("type")) + + properties = DashboardMarkdownTilePropertiesProperties.from_dict(d.pop("properties")) + + tab_uuid = d.pop("tabUuid", UNSET) + + uuid = d.pop("uuid", UNSET) + + create_dashboard_markdown_tile = cls( + w=w, + h=h, + y=y, + x=x, + type=type, + properties=properties, + tab_uuid=tab_uuid, + uuid=uuid, + ) + + create_dashboard_markdown_tile.additional_properties = d + return create_dashboard_markdown_tile + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/create_dashboard_semantic_viewer_chart_tile.py b/lightdash_client/models/create_dashboard_semantic_viewer_chart_tile.py new file mode 100644 index 0000000..1313d51 --- /dev/null +++ b/lightdash_client/models/create_dashboard_semantic_viewer_chart_tile.py @@ -0,0 +1,133 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.dashboard_tile_types_semanticviewerchart import DashboardTileTypesSEMANTICVIEWERCHART +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dashboard_semantic_viewer_chart_tile_properties_properties import ( + DashboardSemanticViewerChartTilePropertiesProperties, + ) + + +T = TypeVar("T", bound="CreateDashboardSemanticViewerChartTile") + + +@_attrs_define +class CreateDashboardSemanticViewerChartTile: + """ + Attributes: + w (float): + h (float): + y (float): + x (float): + type (DashboardTileTypesSEMANTICVIEWERCHART): + properties (DashboardSemanticViewerChartTilePropertiesProperties): + tab_uuid (Union[Unset, str]): + uuid (Union[Unset, str]): + """ + + w: float + h: float + y: float + x: float + type: DashboardTileTypesSEMANTICVIEWERCHART + properties: "DashboardSemanticViewerChartTilePropertiesProperties" + tab_uuid: Union[Unset, str] = UNSET + uuid: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_semantic_viewer_chart_tile_properties_properties import ( + DashboardSemanticViewerChartTilePropertiesProperties, + ) + + w = self.w + + h = self.h + + y = self.y + + x = self.x + + type = self.type.value + + properties = self.properties.to_dict() + + tab_uuid = self.tab_uuid + + uuid = self.uuid + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "w": w, + "h": h, + "y": y, + "x": x, + "type": type, + "properties": properties, + } + ) + if tab_uuid is not UNSET: + field_dict["tabUuid"] = tab_uuid + if uuid is not UNSET: + field_dict["uuid"] = uuid + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.dashboard_semantic_viewer_chart_tile_properties_properties import ( + DashboardSemanticViewerChartTilePropertiesProperties, + ) + + d = src_dict.copy() + w = d.pop("w") + + h = d.pop("h") + + y = d.pop("y") + + x = d.pop("x") + + type = DashboardTileTypesSEMANTICVIEWERCHART(d.pop("type")) + + properties = DashboardSemanticViewerChartTilePropertiesProperties.from_dict(d.pop("properties")) + + tab_uuid = d.pop("tabUuid", UNSET) + + uuid = d.pop("uuid", UNSET) + + create_dashboard_semantic_viewer_chart_tile = cls( + w=w, + h=h, + y=y, + x=x, + type=type, + properties=properties, + tab_uuid=tab_uuid, + uuid=uuid, + ) + + create_dashboard_semantic_viewer_chart_tile.additional_properties = d + return create_dashboard_semantic_viewer_chart_tile + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/create_dashboard_sql_chart_tile.py b/lightdash_client/models/create_dashboard_sql_chart_tile.py new file mode 100644 index 0000000..c47cbe0 --- /dev/null +++ b/lightdash_client/models/create_dashboard_sql_chart_tile.py @@ -0,0 +1,127 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.dashboard_tile_types_sqlchart import DashboardTileTypesSQLCHART +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dashboard_sql_chart_tile_properties_properties import DashboardSqlChartTilePropertiesProperties + + +T = TypeVar("T", bound="CreateDashboardSqlChartTile") + + +@_attrs_define +class CreateDashboardSqlChartTile: + """ + Attributes: + w (float): + h (float): + y (float): + x (float): + type (DashboardTileTypesSQLCHART): + properties (DashboardSqlChartTilePropertiesProperties): + tab_uuid (Union[Unset, str]): + uuid (Union[Unset, str]): + """ + + w: float + h: float + y: float + x: float + type: DashboardTileTypesSQLCHART + properties: "DashboardSqlChartTilePropertiesProperties" + tab_uuid: Union[Unset, str] = UNSET + uuid: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_sql_chart_tile_properties_properties import DashboardSqlChartTilePropertiesProperties + + w = self.w + + h = self.h + + y = self.y + + x = self.x + + type = self.type.value + + properties = self.properties.to_dict() + + tab_uuid = self.tab_uuid + + uuid = self.uuid + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "w": w, + "h": h, + "y": y, + "x": x, + "type": type, + "properties": properties, + } + ) + if tab_uuid is not UNSET: + field_dict["tabUuid"] = tab_uuid + if uuid is not UNSET: + field_dict["uuid"] = uuid + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.dashboard_sql_chart_tile_properties_properties import DashboardSqlChartTilePropertiesProperties + + d = src_dict.copy() + w = d.pop("w") + + h = d.pop("h") + + y = d.pop("y") + + x = d.pop("x") + + type = DashboardTileTypesSQLCHART(d.pop("type")) + + properties = DashboardSqlChartTilePropertiesProperties.from_dict(d.pop("properties")) + + tab_uuid = d.pop("tabUuid", UNSET) + + uuid = d.pop("uuid", UNSET) + + create_dashboard_sql_chart_tile = cls( + w=w, + h=h, + y=y, + x=x, + type=type, + properties=properties, + tab_uuid=tab_uuid, + uuid=uuid, + ) + + create_dashboard_sql_chart_tile.additional_properties = d + return create_dashboard_sql_chart_tile + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/create_dashboard_tile_base.py b/lightdash_client/models/create_dashboard_tile_base.py new file mode 100644 index 0000000..4a12f50 --- /dev/null +++ b/lightdash_client/models/create_dashboard_tile_base.py @@ -0,0 +1,111 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.dashboard_tile_types import DashboardTileTypes +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreateDashboardTileBase") + + +@_attrs_define +class CreateDashboardTileBase: + """ + Attributes: + w (float): + h (float): + y (float): + x (float): + type (DashboardTileTypes): + tab_uuid (Union[Unset, str]): + uuid (Union[Unset, str]): + """ + + w: float + h: float + y: float + x: float + type: DashboardTileTypes + tab_uuid: Union[Unset, str] = UNSET + uuid: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + w = self.w + + h = self.h + + y = self.y + + x = self.x + + type = self.type.value + + tab_uuid = self.tab_uuid + + uuid = self.uuid + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "w": w, + "h": h, + "y": y, + "x": x, + "type": type, + } + ) + if tab_uuid is not UNSET: + field_dict["tabUuid"] = tab_uuid + if uuid is not UNSET: + field_dict["uuid"] = uuid + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + w = d.pop("w") + + h = d.pop("h") + + y = d.pop("y") + + x = d.pop("x") + + type = DashboardTileTypes(d.pop("type")) + + tab_uuid = d.pop("tabUuid", UNSET) + + uuid = d.pop("uuid", UNSET) + + create_dashboard_tile_base = cls( + w=w, + h=h, + y=y, + x=x, + type=type, + tab_uuid=tab_uuid, + uuid=uuid, + ) + + create_dashboard_tile_base.additional_properties = d + return create_dashboard_tile_base + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/create_group.py b/lightdash_client/models/create_group.py index ea3451d..e1f7cca 100644 --- a/lightdash_client/models/create_group.py +++ b/lightdash_client/models/create_group.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,6 +25,8 @@ class CreateGroup: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pick_group_member_user_uuid import PickGroupMemberUserUuid + name = self.name members: Union[Unset, List[Dict[str, Any]]] = UNSET diff --git a/lightdash_client/models/create_preview_body.py b/lightdash_client/models/create_preview_body.py new file mode 100644 index 0000000..04dae34 --- /dev/null +++ b/lightdash_client/models/create_preview_body.py @@ -0,0 +1,68 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreatePreviewBody") + + +@_attrs_define +class CreatePreviewBody: + """ + Attributes: + copy_content (bool): + name (str): + """ + + copy_content: bool + name: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + copy_content = self.copy_content + + name = self.name + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "copyContent": copy_content, + "name": name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + copy_content = d.pop("copyContent") + + name = d.pop("name") + + create_preview_body = cls( + copy_content=copy_content, + name=name, + ) + + create_preview_body.additional_properties = d + return create_preview_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/create_preview_response_200.py b/lightdash_client/models/create_preview_response_200.py new file mode 100644 index 0000000..85c3fe9 --- /dev/null +++ b/lightdash_client/models/create_preview_response_200.py @@ -0,0 +1,69 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.create_preview_response_200_status import CreatePreviewResponse200Status +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CreatePreviewResponse200") + + +@_attrs_define +class CreatePreviewResponse200: + """ + Attributes: + results (str): + status (CreatePreviewResponse200Status): + """ + + results: str + status: CreatePreviewResponse200Status + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + results = self.results + + status = self.status.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "results": results, + "status": status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + results = d.pop("results") + + status = CreatePreviewResponse200Status(d.pop("status")) + + create_preview_response_200 = cls( + results=results, + status=status, + ) + + create_preview_response_200.additional_properties = d + return create_preview_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/create_preview_response_200_status.py b/lightdash_client/models/create_preview_response_200_status.py new file mode 100644 index 0000000..e6eb1d2 --- /dev/null +++ b/lightdash_client/models/create_preview_response_200_status.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class CreatePreviewResponse200Status(str, Enum): + OK = "ok" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/create_project_member.py b/lightdash_client/models/create_project_member.py index 1312c0d..4ecf777 100644 --- a/lightdash_client/models/create_project_member.py +++ b/lightdash_client/models/create_project_member.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.project_member_role import ProjectMemberRole +from ..types import UNSET, Unset T = TypeVar("T", bound="CreateProjectMember") diff --git a/lightdash_client/models/create_pull_request_for_chart_fields_response_200.py b/lightdash_client/models/create_pull_request_for_chart_fields_response_200.py index da922fc..89f55b6 100644 --- a/lightdash_client/models/create_pull_request_for_chart_fields_response_200.py +++ b/lightdash_client/models/create_pull_request_for_chart_fields_response_200.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -6,6 +6,7 @@ from ..models.create_pull_request_for_chart_fields_response_200_status import ( CreatePullRequestForChartFieldsResponse200Status, ) +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.pull_request_created import PullRequestCreated @@ -27,6 +28,8 @@ class CreatePullRequestForChartFieldsResponse200: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pull_request_created import PullRequestCreated + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/create_pull_request_for_custom_metrics_body.py b/lightdash_client/models/create_pull_request_for_custom_metrics_body.py index 751287a..58c0a02 100644 --- a/lightdash_client/models/create_pull_request_for_custom_metrics_body.py +++ b/lightdash_client/models/create_pull_request_for_custom_metrics_body.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -6,6 +6,7 @@ from ..models.create_pull_request_for_custom_metrics_body_quote_char import ( CreatePullRequestForCustomMetricsBodyQuoteChar, ) +from ..types import UNSET, Unset T = TypeVar("T", bound="CreatePullRequestForCustomMetricsBody") diff --git a/lightdash_client/models/create_pull_request_for_custom_metrics_response_200.py b/lightdash_client/models/create_pull_request_for_custom_metrics_response_200.py index 4026c06..b041227 100644 --- a/lightdash_client/models/create_pull_request_for_custom_metrics_response_200.py +++ b/lightdash_client/models/create_pull_request_for_custom_metrics_response_200.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -6,6 +6,7 @@ from ..models.create_pull_request_for_custom_metrics_response_200_status import ( CreatePullRequestForCustomMetricsResponse200Status, ) +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.pull_request_created import PullRequestCreated @@ -27,6 +28,8 @@ class CreatePullRequestForCustomMetricsResponse200: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pull_request_created import PullRequestCreated + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/create_space.py b/lightdash_client/models/create_space.py index 99ed1f8..6167dd9 100644 --- a/lightdash_client/models/create_space.py +++ b/lightdash_client/models/create_space.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -27,6 +27,8 @@ class CreateSpace: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pick_space_share_user_uuid_or_role import PickSpaceShareUserUuidOrRole + name = self.name access: Union[Unset, List[Dict[str, Any]]] = UNSET @@ -54,9 +56,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.pick_space_share_user_uuid_or_role import ( - PickSpaceShareUserUuidOrRole, - ) + from ..models.pick_space_share_user_uuid_or_role import PickSpaceShareUserUuidOrRole d = src_dict.copy() name = d.pop("name") diff --git a/lightdash_client/models/create_user_args.py b/lightdash_client/models/create_user_args.py index acb1eae..840eeab 100644 --- a/lightdash_client/models/create_user_args.py +++ b/lightdash_client/models/create_user_args.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="CreateUserArgs") diff --git a/lightdash_client/models/create_user_attribute.py b/lightdash_client/models/create_user_attribute.py index 41d7ae5..4482e0f 100644 --- a/lightdash_client/models/create_user_attribute.py +++ b/lightdash_client/models/create_user_attribute.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -34,6 +34,11 @@ class CreateUserAttribute: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.group_attribute_value import GroupAttributeValue + from ..models.pick_user_attribute_value_exclude_keyof_user_attribute_value_email import ( + PickUserAttributeValueExcludeKeyofUserAttributeValueEmail, + ) + name = self.name attribute_default: Union[None, str] diff --git a/lightdash_client/models/create_warehouse_credentials_response_200.py b/lightdash_client/models/create_warehouse_credentials_response_200.py index 18f2b42..f45d49d 100644 --- a/lightdash_client/models/create_warehouse_credentials_response_200.py +++ b/lightdash_client/models/create_warehouse_credentials_response_200.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_warehouse_credentials_response_200_status import ( - CreateWarehouseCredentialsResponse200Status, -) +from ..models.create_warehouse_credentials_response_200_status import CreateWarehouseCredentialsResponse200Status +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.user_warehouse_credentials import UserWarehouseCredentials @@ -27,6 +26,8 @@ class CreateWarehouseCredentialsResponse200: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.user_warehouse_credentials import UserWarehouseCredentials + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/cube_semantic_layer_connection.py b/lightdash_client/models/cube_semantic_layer_connection.py index 5430796..8fb1ed9 100644 --- a/lightdash_client/models/cube_semantic_layer_connection.py +++ b/lightdash_client/models/cube_semantic_layer_connection.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.semantic_layer_type_cube import SemanticLayerTypeCUBE +from ..types import UNSET, Unset T = TypeVar("T", bound="CubeSemanticLayerConnection") diff --git a/lightdash_client/models/custom_bin_dimension.py b/lightdash_client/models/custom_bin_dimension.py index b2d65e5..82892c4 100644 --- a/lightdash_client/models/custom_bin_dimension.py +++ b/lightdash_client/models/custom_bin_dimension.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -41,6 +41,8 @@ class CustomBinDimension: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.bin_range import BinRange + id = self.id name = self.name diff --git a/lightdash_client/models/custom_format.py b/lightdash_client/models/custom_format.py index 505ee06..c629320 100644 --- a/lightdash_client/models/custom_format.py +++ b/lightdash_client/models/custom_format.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/custom_icon.py b/lightdash_client/models/custom_icon.py new file mode 100644 index 0000000..fa18f7d --- /dev/null +++ b/lightdash_client/models/custom_icon.py @@ -0,0 +1,60 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="CustomIcon") + + +@_attrs_define +class CustomIcon: + """ + Attributes: + url (str): + """ + + url: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + url = self.url + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "url": url, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + url = d.pop("url") + + custom_icon = cls( + url=url, + ) + + custom_icon.additional_properties = d + return custom_icon + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/custom_label.py b/lightdash_client/models/custom_label.py index 9add4a2..1201b7c 100644 --- a/lightdash_client/models/custom_label.py +++ b/lightdash_client/models/custom_label.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="CustomLabel") diff --git a/lightdash_client/models/custom_sql_dimension.py b/lightdash_client/models/custom_sql_dimension.py index b8609ff..5429cc4 100644 --- a/lightdash_client/models/custom_sql_dimension.py +++ b/lightdash_client/models/custom_sql_dimension.py @@ -1,10 +1,11 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.custom_dimension_type_sql import CustomDimensionTypeSQL from ..models.dimension_type import DimensionType +from ..types import UNSET, Unset T = TypeVar("T", bound="CustomSqlDimension") diff --git a/lightdash_client/models/custom_vis.py b/lightdash_client/models/custom_vis.py index 9ad6d6d..33e4c90 100644 --- a/lightdash_client/models/custom_vis.py +++ b/lightdash_client/models/custom_vis.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,6 +23,8 @@ class CustomVis: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.custom_vis_spec import CustomVisSpec + spec: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.spec, Unset): spec = self.spec.to_dict() diff --git a/lightdash_client/models/custom_vis_config.py b/lightdash_client/models/custom_vis_config.py index 272bbed..3824662 100644 --- a/lightdash_client/models/custom_vis_config.py +++ b/lightdash_client/models/custom_vis_config.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,6 +26,8 @@ class CustomVisConfig: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.custom_vis import CustomVis + type = self.type.value config: Union[Unset, Dict[str, Any]] = UNSET diff --git a/lightdash_client/models/custom_vis_spec.py b/lightdash_client/models/custom_vis_spec.py index bf8aab4..bedc711 100644 --- a/lightdash_client/models/custom_vis_spec.py +++ b/lightdash_client/models/custom_vis_spec.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="CustomVisSpec") diff --git a/lightdash_client/models/dashboard.py b/lightdash_client/models/dashboard.py new file mode 100644 index 0000000..bd32b4a --- /dev/null +++ b/lightdash_client/models/dashboard.py @@ -0,0 +1,400 @@ +import datetime +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dashboard_chart_tile import DashboardChartTile + from ..models.dashboard_filters import DashboardFilters + from ..models.dashboard_loom_tile import DashboardLoomTile + from ..models.dashboard_markdown_tile import DashboardMarkdownTile + from ..models.dashboard_semantic_viewer_chart_tile import DashboardSemanticViewerChartTile + from ..models.dashboard_sql_chart_tile import DashboardSqlChartTile + from ..models.dashboard_tab import DashboardTab + from ..models.space_share import SpaceShare + from ..models.updated_by_user import UpdatedByUser + + +T = TypeVar("T", bound="Dashboard") + + +@_attrs_define +class Dashboard: + """ + Attributes: + slug (str): + access (Union[List['SpaceShare'], None]): + is_private (Union[None, bool]): + tabs (List['DashboardTab']): + pinned_list_order (Union[None, float]): + pinned_list_uuid (Union[None, str]): + first_viewed_at (Union[None, datetime.datetime, str]): + views (float): + space_name (str): + space_uuid (str): + filters (DashboardFilters): + tiles (List[Union['DashboardChartTile', 'DashboardLoomTile', 'DashboardMarkdownTile', + 'DashboardSemanticViewerChartTile', 'DashboardSqlChartTile']]): + updated_at (datetime.datetime): + name (str): + uuid (str): + dashboard_version_id (float): + project_uuid (str): + organization_uuid (str): + updated_by_user (Union[Unset, UpdatedByUser]): + description (Union[Unset, str]): + """ + + slug: str + access: Union[List["SpaceShare"], None] + is_private: Union[None, bool] + tabs: List["DashboardTab"] + pinned_list_order: Union[None, float] + pinned_list_uuid: Union[None, str] + first_viewed_at: Union[None, datetime.datetime, str] + views: float + space_name: str + space_uuid: str + filters: "DashboardFilters" + tiles: List[ + Union[ + "DashboardChartTile", + "DashboardLoomTile", + "DashboardMarkdownTile", + "DashboardSemanticViewerChartTile", + "DashboardSqlChartTile", + ] + ] + updated_at: datetime.datetime + name: str + uuid: str + dashboard_version_id: float + project_uuid: str + organization_uuid: str + updated_by_user: Union[Unset, "UpdatedByUser"] = UNSET + description: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_chart_tile import DashboardChartTile + from ..models.dashboard_filters import DashboardFilters + from ..models.dashboard_loom_tile import DashboardLoomTile + from ..models.dashboard_markdown_tile import DashboardMarkdownTile + from ..models.dashboard_semantic_viewer_chart_tile import DashboardSemanticViewerChartTile + from ..models.dashboard_sql_chart_tile import DashboardSqlChartTile + from ..models.dashboard_tab import DashboardTab + from ..models.space_share import SpaceShare + from ..models.updated_by_user import UpdatedByUser + + slug = self.slug + + access: Union[List[Dict[str, Any]], None] + if isinstance(self.access, list): + access = [] + for access_type_0_item_data in self.access: + access_type_0_item = access_type_0_item_data.to_dict() + access.append(access_type_0_item) + + else: + access = self.access + + is_private: Union[None, bool] + is_private = self.is_private + + tabs = [] + for tabs_item_data in self.tabs: + tabs_item = tabs_item_data.to_dict() + tabs.append(tabs_item) + + pinned_list_order: Union[None, float] + pinned_list_order = self.pinned_list_order + + pinned_list_uuid: Union[None, str] + pinned_list_uuid = self.pinned_list_uuid + + first_viewed_at: Union[None, str] + if isinstance(self.first_viewed_at, datetime.datetime): + first_viewed_at = self.first_viewed_at.isoformat() + else: + first_viewed_at = self.first_viewed_at + + views = self.views + + space_name = self.space_name + + space_uuid = self.space_uuid + + filters = self.filters.to_dict() + + tiles = [] + for tiles_item_data in self.tiles: + tiles_item: Dict[str, Any] + if isinstance(tiles_item_data, DashboardChartTile): + tiles_item = tiles_item_data.to_dict() + elif isinstance(tiles_item_data, DashboardMarkdownTile): + tiles_item = tiles_item_data.to_dict() + elif isinstance(tiles_item_data, DashboardLoomTile): + tiles_item = tiles_item_data.to_dict() + elif isinstance(tiles_item_data, DashboardSqlChartTile): + tiles_item = tiles_item_data.to_dict() + else: + tiles_item = tiles_item_data.to_dict() + + tiles.append(tiles_item) + + updated_at = self.updated_at.isoformat() + + name = self.name + + uuid = self.uuid + + dashboard_version_id = self.dashboard_version_id + + project_uuid = self.project_uuid + + organization_uuid = self.organization_uuid + + updated_by_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.updated_by_user, Unset): + updated_by_user = self.updated_by_user.to_dict() + + description = self.description + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "slug": slug, + "access": access, + "isPrivate": is_private, + "tabs": tabs, + "pinnedListOrder": pinned_list_order, + "pinnedListUuid": pinned_list_uuid, + "firstViewedAt": first_viewed_at, + "views": views, + "spaceName": space_name, + "spaceUuid": space_uuid, + "filters": filters, + "tiles": tiles, + "updatedAt": updated_at, + "name": name, + "uuid": uuid, + "dashboardVersionId": dashboard_version_id, + "projectUuid": project_uuid, + "organizationUuid": organization_uuid, + } + ) + if updated_by_user is not UNSET: + field_dict["updatedByUser"] = updated_by_user + if description is not UNSET: + field_dict["description"] = description + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.dashboard_chart_tile import DashboardChartTile + from ..models.dashboard_filters import DashboardFilters + from ..models.dashboard_loom_tile import DashboardLoomTile + from ..models.dashboard_markdown_tile import DashboardMarkdownTile + from ..models.dashboard_semantic_viewer_chart_tile import DashboardSemanticViewerChartTile + from ..models.dashboard_sql_chart_tile import DashboardSqlChartTile + from ..models.dashboard_tab import DashboardTab + from ..models.space_share import SpaceShare + from ..models.updated_by_user import UpdatedByUser + + d = src_dict.copy() + slug = d.pop("slug") + + def _parse_access(data: object) -> Union[List["SpaceShare"], None]: + if data is None: + return data + try: + if not isinstance(data, list): + raise TypeError() + access_type_0 = [] + _access_type_0 = data + for access_type_0_item_data in _access_type_0: + access_type_0_item = SpaceShare.from_dict(access_type_0_item_data) + + access_type_0.append(access_type_0_item) + + return access_type_0 + except: # noqa: E722 + pass + return cast(Union[List["SpaceShare"], None], data) + + access = _parse_access(d.pop("access")) + + def _parse_is_private(data: object) -> Union[None, bool]: + if data is None: + return data + return cast(Union[None, bool], data) + + is_private = _parse_is_private(d.pop("isPrivate")) + + tabs = [] + _tabs = d.pop("tabs") + for tabs_item_data in _tabs: + tabs_item = DashboardTab.from_dict(tabs_item_data) + + tabs.append(tabs_item) + + def _parse_pinned_list_order(data: object) -> Union[None, float]: + if data is None: + return data + return cast(Union[None, float], data) + + pinned_list_order = _parse_pinned_list_order(d.pop("pinnedListOrder")) + + def _parse_pinned_list_uuid(data: object) -> Union[None, str]: + if data is None: + return data + return cast(Union[None, str], data) + + pinned_list_uuid = _parse_pinned_list_uuid(d.pop("pinnedListUuid")) + + def _parse_first_viewed_at(data: object) -> Union[None, datetime.datetime, str]: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + first_viewed_at_type_0 = isoparse(data) + + return first_viewed_at_type_0 + except: # noqa: E722 + pass + return cast(Union[None, datetime.datetime, str], data) + + first_viewed_at = _parse_first_viewed_at(d.pop("firstViewedAt")) + + views = d.pop("views") + + space_name = d.pop("spaceName") + + space_uuid = d.pop("spaceUuid") + + filters = DashboardFilters.from_dict(d.pop("filters")) + + tiles = [] + _tiles = d.pop("tiles") + for tiles_item_data in _tiles: + + def _parse_tiles_item( + data: object, + ) -> Union[ + "DashboardChartTile", + "DashboardLoomTile", + "DashboardMarkdownTile", + "DashboardSemanticViewerChartTile", + "DashboardSqlChartTile", + ]: + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_dashboard_tile_type_0 = DashboardChartTile.from_dict(data) + + return componentsschemas_dashboard_tile_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_dashboard_tile_type_1 = DashboardMarkdownTile.from_dict(data) + + return componentsschemas_dashboard_tile_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_dashboard_tile_type_2 = DashboardLoomTile.from_dict(data) + + return componentsschemas_dashboard_tile_type_2 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_dashboard_tile_type_3 = DashboardSqlChartTile.from_dict(data) + + return componentsschemas_dashboard_tile_type_3 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + componentsschemas_dashboard_tile_type_4 = DashboardSemanticViewerChartTile.from_dict(data) + + return componentsschemas_dashboard_tile_type_4 + + tiles_item = _parse_tiles_item(tiles_item_data) + + tiles.append(tiles_item) + + updated_at = isoparse(d.pop("updatedAt")) + + name = d.pop("name") + + uuid = d.pop("uuid") + + dashboard_version_id = d.pop("dashboardVersionId") + + project_uuid = d.pop("projectUuid") + + organization_uuid = d.pop("organizationUuid") + + _updated_by_user = d.pop("updatedByUser", UNSET) + updated_by_user: Union[Unset, UpdatedByUser] + if isinstance(_updated_by_user, Unset): + updated_by_user = UNSET + else: + updated_by_user = UpdatedByUser.from_dict(_updated_by_user) + + description = d.pop("description", UNSET) + + dashboard = cls( + slug=slug, + access=access, + is_private=is_private, + tabs=tabs, + pinned_list_order=pinned_list_order, + pinned_list_uuid=pinned_list_uuid, + first_viewed_at=first_viewed_at, + views=views, + space_name=space_name, + space_uuid=space_uuid, + filters=filters, + tiles=tiles, + updated_at=updated_at, + name=name, + uuid=uuid, + dashboard_version_id=dashboard_version_id, + project_uuid=project_uuid, + organization_uuid=organization_uuid, + updated_by_user=updated_by_user, + description=description, + ) + + dashboard.additional_properties = d + return dashboard + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/dashboard_as_code.py b/lightdash_client/models/dashboard_as_code.py new file mode 100644 index 0000000..cc2c74d --- /dev/null +++ b/lightdash_client/models/dashboard_as_code.py @@ -0,0 +1,173 @@ +import datetime +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dashboard_filters import DashboardFilters + from ..models.dashboard_tab import DashboardTab + from ..models.dashboard_tile_without_uuids import DashboardTileWithoutUuids + + +T = TypeVar("T", bound="DashboardAsCode") + + +@_attrs_define +class DashboardAsCode: + """ + Attributes: + name (str): + slug (str): + updated_at (datetime.datetime): + filters (DashboardFilters): + tabs (List['DashboardTab']): + space_slug (str): + version (float): + tiles (List['DashboardTileWithoutUuids']): + description (Union[Unset, str]): + downloaded_at (Union[Unset, datetime.datetime]): + """ + + name: str + slug: str + updated_at: datetime.datetime + filters: "DashboardFilters" + tabs: List["DashboardTab"] + space_slug: str + version: float + tiles: List["DashboardTileWithoutUuids"] + description: Union[Unset, str] = UNSET + downloaded_at: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_filters import DashboardFilters + from ..models.dashboard_tab import DashboardTab + from ..models.dashboard_tile_without_uuids import DashboardTileWithoutUuids + + name = self.name + + slug = self.slug + + updated_at = self.updated_at.isoformat() + + filters = self.filters.to_dict() + + tabs = [] + for tabs_item_data in self.tabs: + tabs_item = tabs_item_data.to_dict() + tabs.append(tabs_item) + + space_slug = self.space_slug + + version = self.version + + tiles = [] + for tiles_item_data in self.tiles: + tiles_item = tiles_item_data.to_dict() + tiles.append(tiles_item) + + description = self.description + + downloaded_at: Union[Unset, str] = UNSET + if not isinstance(self.downloaded_at, Unset): + downloaded_at = self.downloaded_at.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "slug": slug, + "updatedAt": updated_at, + "filters": filters, + "tabs": tabs, + "spaceSlug": space_slug, + "version": version, + "tiles": tiles, + } + ) + if description is not UNSET: + field_dict["description"] = description + if downloaded_at is not UNSET: + field_dict["downloadedAt"] = downloaded_at + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.dashboard_filters import DashboardFilters + from ..models.dashboard_tab import DashboardTab + from ..models.dashboard_tile_without_uuids import DashboardTileWithoutUuids + + d = src_dict.copy() + name = d.pop("name") + + slug = d.pop("slug") + + updated_at = isoparse(d.pop("updatedAt")) + + filters = DashboardFilters.from_dict(d.pop("filters")) + + tabs = [] + _tabs = d.pop("tabs") + for tabs_item_data in _tabs: + tabs_item = DashboardTab.from_dict(tabs_item_data) + + tabs.append(tabs_item) + + space_slug = d.pop("spaceSlug") + + version = d.pop("version") + + tiles = [] + _tiles = d.pop("tiles") + for tiles_item_data in _tiles: + tiles_item = DashboardTileWithoutUuids.from_dict(tiles_item_data) + + tiles.append(tiles_item) + + description = d.pop("description", UNSET) + + _downloaded_at = d.pop("downloadedAt", UNSET) + downloaded_at: Union[Unset, datetime.datetime] + if isinstance(_downloaded_at, Unset): + downloaded_at = UNSET + else: + downloaded_at = isoparse(_downloaded_at) + + dashboard_as_code = cls( + name=name, + slug=slug, + updated_at=updated_at, + filters=filters, + tabs=tabs, + space_slug=space_slug, + version=version, + tiles=tiles, + description=description, + downloaded_at=downloaded_at, + ) + + dashboard_as_code.additional_properties = d + return dashboard_as_code + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/dashboard_basic_details.py b/lightdash_client/models/dashboard_basic_details.py index ff3322d..8e52c3d 100644 --- a/lightdash_client/models/dashboard_basic_details.py +++ b/lightdash_client/models/dashboard_basic_details.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -52,6 +52,11 @@ class DashboardBasicDetails: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pick_validation_response_error_or_created_at_or_validation_id import ( + PickValidationResponseErrorOrCreatedAtOrValidationId, + ) + from ..models.updated_by_user import UpdatedByUser + name = self.name uuid = self.uuid diff --git a/lightdash_client/models/dashboard_basic_details_with_tile_types.py b/lightdash_client/models/dashboard_basic_details_with_tile_types.py new file mode 100644 index 0000000..1cf029f --- /dev/null +++ b/lightdash_client/models/dashboard_basic_details_with_tile_types.py @@ -0,0 +1,243 @@ +import datetime +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..models.dashboard_tile_types import DashboardTileTypes +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.pick_validation_response_error_or_created_at_or_validation_id import ( + PickValidationResponseErrorOrCreatedAtOrValidationId, + ) + from ..models.updated_by_user import UpdatedByUser + + +T = TypeVar("T", bound="DashboardBasicDetailsWithTileTypes") + + +@_attrs_define +class DashboardBasicDetailsWithTileTypes: + """ + Attributes: + name (str): + uuid (str): + space_uuid (str): + project_uuid (str): + organization_uuid (str): + pinned_list_uuid (Union[None, str]): + updated_at (datetime.datetime): + views (float): + first_viewed_at (Union[None, datetime.datetime, str]): + pinned_list_order (Union[None, float]): + tile_types (List[DashboardTileTypes]): + description (Union[Unset, str]): + updated_by_user (Union[Unset, UpdatedByUser]): + validation_errors (Union[Unset, List['PickValidationResponseErrorOrCreatedAtOrValidationId']]): + """ + + name: str + uuid: str + space_uuid: str + project_uuid: str + organization_uuid: str + pinned_list_uuid: Union[None, str] + updated_at: datetime.datetime + views: float + first_viewed_at: Union[None, datetime.datetime, str] + pinned_list_order: Union[None, float] + tile_types: List[DashboardTileTypes] + description: Union[Unset, str] = UNSET + updated_by_user: Union[Unset, "UpdatedByUser"] = UNSET + validation_errors: Union[Unset, List["PickValidationResponseErrorOrCreatedAtOrValidationId"]] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.pick_validation_response_error_or_created_at_or_validation_id import ( + PickValidationResponseErrorOrCreatedAtOrValidationId, + ) + from ..models.updated_by_user import UpdatedByUser + + name = self.name + + uuid = self.uuid + + space_uuid = self.space_uuid + + project_uuid = self.project_uuid + + organization_uuid = self.organization_uuid + + pinned_list_uuid: Union[None, str] + pinned_list_uuid = self.pinned_list_uuid + + updated_at = self.updated_at.isoformat() + + views = self.views + + first_viewed_at: Union[None, str] + if isinstance(self.first_viewed_at, datetime.datetime): + first_viewed_at = self.first_viewed_at.isoformat() + else: + first_viewed_at = self.first_viewed_at + + pinned_list_order: Union[None, float] + pinned_list_order = self.pinned_list_order + + tile_types = [] + for tile_types_item_data in self.tile_types: + tile_types_item = tile_types_item_data.value + tile_types.append(tile_types_item) + + description = self.description + + updated_by_user: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.updated_by_user, Unset): + updated_by_user = self.updated_by_user.to_dict() + + validation_errors: Union[Unset, List[Dict[str, Any]]] = UNSET + if not isinstance(self.validation_errors, Unset): + validation_errors = [] + for validation_errors_item_data in self.validation_errors: + validation_errors_item = validation_errors_item_data.to_dict() + validation_errors.append(validation_errors_item) + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "uuid": uuid, + "spaceUuid": space_uuid, + "projectUuid": project_uuid, + "organizationUuid": organization_uuid, + "pinnedListUuid": pinned_list_uuid, + "updatedAt": updated_at, + "views": views, + "firstViewedAt": first_viewed_at, + "pinnedListOrder": pinned_list_order, + "tileTypes": tile_types, + } + ) + if description is not UNSET: + field_dict["description"] = description + if updated_by_user is not UNSET: + field_dict["updatedByUser"] = updated_by_user + if validation_errors is not UNSET: + field_dict["validationErrors"] = validation_errors + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.pick_validation_response_error_or_created_at_or_validation_id import ( + PickValidationResponseErrorOrCreatedAtOrValidationId, + ) + from ..models.updated_by_user import UpdatedByUser + + d = src_dict.copy() + name = d.pop("name") + + uuid = d.pop("uuid") + + space_uuid = d.pop("spaceUuid") + + project_uuid = d.pop("projectUuid") + + organization_uuid = d.pop("organizationUuid") + + def _parse_pinned_list_uuid(data: object) -> Union[None, str]: + if data is None: + return data + return cast(Union[None, str], data) + + pinned_list_uuid = _parse_pinned_list_uuid(d.pop("pinnedListUuid")) + + updated_at = isoparse(d.pop("updatedAt")) + + views = d.pop("views") + + def _parse_first_viewed_at(data: object) -> Union[None, datetime.datetime, str]: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + first_viewed_at_type_0 = isoparse(data) + + return first_viewed_at_type_0 + except: # noqa: E722 + pass + return cast(Union[None, datetime.datetime, str], data) + + first_viewed_at = _parse_first_viewed_at(d.pop("firstViewedAt")) + + def _parse_pinned_list_order(data: object) -> Union[None, float]: + if data is None: + return data + return cast(Union[None, float], data) + + pinned_list_order = _parse_pinned_list_order(d.pop("pinnedListOrder")) + + tile_types = [] + _tile_types = d.pop("tileTypes") + for tile_types_item_data in _tile_types: + tile_types_item = DashboardTileTypes(tile_types_item_data) + + tile_types.append(tile_types_item) + + description = d.pop("description", UNSET) + + _updated_by_user = d.pop("updatedByUser", UNSET) + updated_by_user: Union[Unset, UpdatedByUser] + if isinstance(_updated_by_user, Unset): + updated_by_user = UNSET + else: + updated_by_user = UpdatedByUser.from_dict(_updated_by_user) + + validation_errors = [] + _validation_errors = d.pop("validationErrors", UNSET) + for validation_errors_item_data in _validation_errors or []: + validation_errors_item = PickValidationResponseErrorOrCreatedAtOrValidationId.from_dict( + validation_errors_item_data + ) + + validation_errors.append(validation_errors_item) + + dashboard_basic_details_with_tile_types = cls( + name=name, + uuid=uuid, + space_uuid=space_uuid, + project_uuid=project_uuid, + organization_uuid=organization_uuid, + pinned_list_uuid=pinned_list_uuid, + updated_at=updated_at, + views=views, + first_viewed_at=first_viewed_at, + pinned_list_order=pinned_list_order, + tile_types=tile_types, + description=description, + updated_by_user=updated_by_user, + validation_errors=validation_errors, + ) + + dashboard_basic_details_with_tile_types.additional_properties = d + return dashboard_basic_details_with_tile_types + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/dashboard_chart_tile.py b/lightdash_client/models/dashboard_chart_tile.py index c7ea8d8..2f41d59 100644 --- a/lightdash_client/models/dashboard_chart_tile.py +++ b/lightdash_client/models/dashboard_chart_tile.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -7,9 +7,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.dashboard_chart_tile_properties_properties import ( - DashboardChartTilePropertiesProperties, - ) + from ..models.dashboard_chart_tile_properties_properties import DashboardChartTilePropertiesProperties T = TypeVar("T", bound="DashboardChartTile") @@ -40,6 +38,8 @@ class DashboardChartTile: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_chart_tile_properties_properties import DashboardChartTilePropertiesProperties + uuid = self.uuid type = self.type.value @@ -76,9 +76,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.dashboard_chart_tile_properties_properties import ( - DashboardChartTilePropertiesProperties, - ) + from ..models.dashboard_chart_tile_properties_properties import DashboardChartTilePropertiesProperties d = src_dict.copy() uuid = d.pop("uuid") diff --git a/lightdash_client/models/dashboard_chart_tile_properties.py b/lightdash_client/models/dashboard_chart_tile_properties.py index 012ddb8..6ad5727 100644 --- a/lightdash_client/models/dashboard_chart_tile_properties.py +++ b/lightdash_client/models/dashboard_chart_tile_properties.py @@ -1,14 +1,13 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.dashboard_tile_types_savedchart import DashboardTileTypesSAVEDCHART +from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.dashboard_chart_tile_properties_properties import ( - DashboardChartTilePropertiesProperties, - ) + from ..models.dashboard_chart_tile_properties_properties import DashboardChartTilePropertiesProperties T = TypeVar("T", bound="DashboardChartTileProperties") @@ -27,6 +26,8 @@ class DashboardChartTileProperties: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_chart_tile_properties_properties import DashboardChartTilePropertiesProperties + properties = self.properties.to_dict() type = self.type.value @@ -44,9 +45,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.dashboard_chart_tile_properties_properties import ( - DashboardChartTilePropertiesProperties, - ) + from ..models.dashboard_chart_tile_properties_properties import DashboardChartTilePropertiesProperties d = src_dict.copy() properties = DashboardChartTilePropertiesProperties.from_dict(d.pop("properties")) diff --git a/lightdash_client/models/dashboard_chart_tile_properties_properties.py b/lightdash_client/models/dashboard_chart_tile_properties_properties.py index 2fbeca0..4d3ab23 100644 --- a/lightdash_client/models/dashboard_chart_tile_properties_properties.py +++ b/lightdash_client/models/dashboard_chart_tile_properties_properties.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,6 +14,7 @@ class DashboardChartTilePropertiesProperties: """ Attributes: saved_chart_uuid (Union[None, str]): + chart_slug (Union[Unset, str]): last_version_chart_kind (Union[ChartKind, None, Unset]): chart_name (Union[None, Unset, str]): belongs_to_dashboard (Union[Unset, bool]): @@ -22,6 +23,7 @@ class DashboardChartTilePropertiesProperties: """ saved_chart_uuid: Union[None, str] + chart_slug: Union[Unset, str] = UNSET last_version_chart_kind: Union[ChartKind, None, Unset] = UNSET chart_name: Union[None, Unset, str] = UNSET belongs_to_dashboard: Union[Unset, bool] = UNSET @@ -33,6 +35,8 @@ def to_dict(self) -> Dict[str, Any]: saved_chart_uuid: Union[None, str] saved_chart_uuid = self.saved_chart_uuid + chart_slug = self.chart_slug + last_version_chart_kind: Union[None, Unset, str] if isinstance(self.last_version_chart_kind, Unset): last_version_chart_kind = UNSET @@ -60,6 +64,8 @@ def to_dict(self) -> Dict[str, Any]: "savedChartUuid": saved_chart_uuid, } ) + if chart_slug is not UNSET: + field_dict["chartSlug"] = chart_slug if last_version_chart_kind is not UNSET: field_dict["lastVersionChartKind"] = last_version_chart_kind if chart_name is not UNSET: @@ -84,6 +90,8 @@ def _parse_saved_chart_uuid(data: object) -> Union[None, str]: saved_chart_uuid = _parse_saved_chart_uuid(d.pop("savedChartUuid")) + chart_slug = d.pop("chartSlug", UNSET) + def _parse_last_version_chart_kind(data: object) -> Union[ChartKind, None, Unset]: if data is None: return data @@ -118,6 +126,7 @@ def _parse_chart_name(data: object) -> Union[None, Unset, str]: dashboard_chart_tile_properties_properties = cls( saved_chart_uuid=saved_chart_uuid, + chart_slug=chart_slug, last_version_chart_kind=last_version_chart_kind, chart_name=chart_name, belongs_to_dashboard=belongs_to_dashboard, diff --git a/lightdash_client/models/dashboard_field_target.py b/lightdash_client/models/dashboard_field_target.py index b429d79..6bf3003 100644 --- a/lightdash_client/models/dashboard_field_target.py +++ b/lightdash_client/models/dashboard_field_target.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="DashboardFieldTarget") diff --git a/lightdash_client/models/dashboard_filter_rule.py b/lightdash_client/models/dashboard_filter_rule.py index 25cbc08..3f39253 100644 --- a/lightdash_client/models/dashboard_filter_rule.py +++ b/lightdash_client/models/dashboard_filter_rule.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -8,9 +8,7 @@ if TYPE_CHECKING: from ..models.dashboard_field_target import DashboardFieldTarget - from ..models.record_string_dashboard_tile_target import ( - RecordStringDashboardTileTarget, - ) + from ..models.record_string_dashboard_tile_target import RecordStringDashboardTileTarget T = TypeVar("T", bound="DashboardFilterRule") @@ -44,6 +42,9 @@ class DashboardFilterRule: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_field_target import DashboardFieldTarget + from ..models.record_string_dashboard_tile_target import RecordStringDashboardTileTarget + operator = self.operator.value id = self.id @@ -93,9 +94,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.dashboard_field_target import DashboardFieldTarget - from ..models.record_string_dashboard_tile_target import ( - RecordStringDashboardTileTarget, - ) + from ..models.record_string_dashboard_tile_target import RecordStringDashboardTileTarget d = src_dict.copy() operator = ConditionalOperator(d.pop("operator")) diff --git a/lightdash_client/models/dashboard_filters.py b/lightdash_client/models/dashboard_filters.py index d06e7ec..0b713ae 100644 --- a/lightdash_client/models/dashboard_filters.py +++ b/lightdash_client/models/dashboard_filters.py @@ -1,8 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.dashboard_filter_rule import DashboardFilterRule @@ -25,6 +27,8 @@ class DashboardFilters: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_filter_rule import DashboardFilterRule + table_calculations = [] for table_calculations_item_data in self.table_calculations: table_calculations_item = table_calculations_item_data.to_dict() diff --git a/lightdash_client/models/dashboard_loom_tile.py b/lightdash_client/models/dashboard_loom_tile.py index 3eebaaf..34b303e 100644 --- a/lightdash_client/models/dashboard_loom_tile.py +++ b/lightdash_client/models/dashboard_loom_tile.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -7,9 +7,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.dashboard_loom_tile_properties_properties import ( - DashboardLoomTilePropertiesProperties, - ) + from ..models.dashboard_loom_tile_properties_properties import DashboardLoomTilePropertiesProperties T = TypeVar("T", bound="DashboardLoomTile") @@ -40,6 +38,8 @@ class DashboardLoomTile: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_loom_tile_properties_properties import DashboardLoomTilePropertiesProperties + uuid = self.uuid type = self.type.value @@ -76,9 +76,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.dashboard_loom_tile_properties_properties import ( - DashboardLoomTilePropertiesProperties, - ) + from ..models.dashboard_loom_tile_properties_properties import DashboardLoomTilePropertiesProperties d = src_dict.copy() uuid = d.pop("uuid") diff --git a/lightdash_client/models/dashboard_loom_tile_properties.py b/lightdash_client/models/dashboard_loom_tile_properties.py index 8eec541..60683db 100644 --- a/lightdash_client/models/dashboard_loom_tile_properties.py +++ b/lightdash_client/models/dashboard_loom_tile_properties.py @@ -1,14 +1,13 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.dashboard_tile_types_loom import DashboardTileTypesLOOM +from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.dashboard_loom_tile_properties_properties import ( - DashboardLoomTilePropertiesProperties, - ) + from ..models.dashboard_loom_tile_properties_properties import DashboardLoomTilePropertiesProperties T = TypeVar("T", bound="DashboardLoomTileProperties") @@ -27,6 +26,8 @@ class DashboardLoomTileProperties: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_loom_tile_properties_properties import DashboardLoomTilePropertiesProperties + properties = self.properties.to_dict() type = self.type.value @@ -44,9 +45,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.dashboard_loom_tile_properties_properties import ( - DashboardLoomTilePropertiesProperties, - ) + from ..models.dashboard_loom_tile_properties_properties import DashboardLoomTilePropertiesProperties d = src_dict.copy() properties = DashboardLoomTilePropertiesProperties.from_dict(d.pop("properties")) diff --git a/lightdash_client/models/dashboard_loom_tile_properties_properties.py b/lightdash_client/models/dashboard_loom_tile_properties_properties.py index f92e877..b09dc0c 100644 --- a/lightdash_client/models/dashboard_loom_tile_properties_properties.py +++ b/lightdash_client/models/dashboard_loom_tile_properties_properties.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/dashboard_markdown_tile.py b/lightdash_client/models/dashboard_markdown_tile.py index 9dad0c9..ce418f4 100644 --- a/lightdash_client/models/dashboard_markdown_tile.py +++ b/lightdash_client/models/dashboard_markdown_tile.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -7,9 +7,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.dashboard_markdown_tile_properties_properties import ( - DashboardMarkdownTilePropertiesProperties, - ) + from ..models.dashboard_markdown_tile_properties_properties import DashboardMarkdownTilePropertiesProperties T = TypeVar("T", bound="DashboardMarkdownTile") @@ -40,6 +38,8 @@ class DashboardMarkdownTile: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_markdown_tile_properties_properties import DashboardMarkdownTilePropertiesProperties + uuid = self.uuid type = self.type.value @@ -76,9 +76,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.dashboard_markdown_tile_properties_properties import ( - DashboardMarkdownTilePropertiesProperties, - ) + from ..models.dashboard_markdown_tile_properties_properties import DashboardMarkdownTilePropertiesProperties d = src_dict.copy() uuid = d.pop("uuid") diff --git a/lightdash_client/models/dashboard_markdown_tile_properties.py b/lightdash_client/models/dashboard_markdown_tile_properties.py index 6a1fa7d..0689c70 100644 --- a/lightdash_client/models/dashboard_markdown_tile_properties.py +++ b/lightdash_client/models/dashboard_markdown_tile_properties.py @@ -1,14 +1,13 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.dashboard_tile_types_markdown import DashboardTileTypesMARKDOWN +from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.dashboard_markdown_tile_properties_properties import ( - DashboardMarkdownTilePropertiesProperties, - ) + from ..models.dashboard_markdown_tile_properties_properties import DashboardMarkdownTilePropertiesProperties T = TypeVar("T", bound="DashboardMarkdownTileProperties") @@ -27,6 +26,8 @@ class DashboardMarkdownTileProperties: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_markdown_tile_properties_properties import DashboardMarkdownTilePropertiesProperties + properties = self.properties.to_dict() type = self.type.value @@ -44,9 +45,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.dashboard_markdown_tile_properties_properties import ( - DashboardMarkdownTilePropertiesProperties, - ) + from ..models.dashboard_markdown_tile_properties_properties import DashboardMarkdownTilePropertiesProperties d = src_dict.copy() properties = DashboardMarkdownTilePropertiesProperties.from_dict(d.pop("properties")) diff --git a/lightdash_client/models/dashboard_markdown_tile_properties_properties.py b/lightdash_client/models/dashboard_markdown_tile_properties_properties.py index 1be4f07..eaa84dd 100644 --- a/lightdash_client/models/dashboard_markdown_tile_properties_properties.py +++ b/lightdash_client/models/dashboard_markdown_tile_properties_properties.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="DashboardMarkdownTilePropertiesProperties") diff --git a/lightdash_client/models/dashboard_semantic_viewer_chart_tile.py b/lightdash_client/models/dashboard_semantic_viewer_chart_tile.py index 2818877..27c6750 100644 --- a/lightdash_client/models/dashboard_semantic_viewer_chart_tile.py +++ b/lightdash_client/models/dashboard_semantic_viewer_chart_tile.py @@ -1,11 +1,9 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.dashboard_tile_types_semanticviewerchart import ( - DashboardTileTypesSEMANTICVIEWERCHART, -) +from ..models.dashboard_tile_types_semanticviewerchart import DashboardTileTypesSEMANTICVIEWERCHART from ..types import UNSET, Unset if TYPE_CHECKING: @@ -42,6 +40,10 @@ class DashboardSemanticViewerChartTile: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_semantic_viewer_chart_tile_properties_properties import ( + DashboardSemanticViewerChartTilePropertiesProperties, + ) + uuid = self.uuid type = self.type.value diff --git a/lightdash_client/models/dashboard_semantic_viewer_chart_tile_properties.py b/lightdash_client/models/dashboard_semantic_viewer_chart_tile_properties.py index 956c646..56c8e2c 100644 --- a/lightdash_client/models/dashboard_semantic_viewer_chart_tile_properties.py +++ b/lightdash_client/models/dashboard_semantic_viewer_chart_tile_properties.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.dashboard_tile_types_semanticviewerchart import ( - DashboardTileTypesSEMANTICVIEWERCHART, -) +from ..models.dashboard_tile_types_semanticviewerchart import DashboardTileTypesSEMANTICVIEWERCHART +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.dashboard_semantic_viewer_chart_tile_properties_properties import ( @@ -29,6 +28,10 @@ class DashboardSemanticViewerChartTileProperties: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_semantic_viewer_chart_tile_properties_properties import ( + DashboardSemanticViewerChartTilePropertiesProperties, + ) + properties = self.properties.to_dict() type = self.type.value diff --git a/lightdash_client/models/dashboard_semantic_viewer_chart_tile_properties_properties.py b/lightdash_client/models/dashboard_semantic_viewer_chart_tile_properties_properties.py index 66ef444..83a1fa6 100644 --- a/lightdash_client/models/dashboard_semantic_viewer_chart_tile_properties_properties.py +++ b/lightdash_client/models/dashboard_semantic_viewer_chart_tile_properties_properties.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,12 +14,14 @@ class DashboardSemanticViewerChartTilePropertiesProperties: Attributes: chart_name (str): saved_semantic_viewer_chart_uuid (Union[None, str]): + chart_slug (Union[Unset, str]): hide_title (Union[Unset, bool]): title (Union[Unset, str]): """ chart_name: str saved_semantic_viewer_chart_uuid: Union[None, str] + chart_slug: Union[Unset, str] = UNSET hide_title: Union[Unset, bool] = UNSET title: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -30,6 +32,8 @@ def to_dict(self) -> Dict[str, Any]: saved_semantic_viewer_chart_uuid: Union[None, str] saved_semantic_viewer_chart_uuid = self.saved_semantic_viewer_chart_uuid + chart_slug = self.chart_slug + hide_title = self.hide_title title = self.title @@ -42,6 +46,8 @@ def to_dict(self) -> Dict[str, Any]: "savedSemanticViewerChartUuid": saved_semantic_viewer_chart_uuid, } ) + if chart_slug is not UNSET: + field_dict["chartSlug"] = chart_slug if hide_title is not UNSET: field_dict["hideTitle"] = hide_title if title is not UNSET: @@ -63,6 +69,8 @@ def _parse_saved_semantic_viewer_chart_uuid(data: object) -> Union[None, str]: d.pop("savedSemanticViewerChartUuid") ) + chart_slug = d.pop("chartSlug", UNSET) + hide_title = d.pop("hideTitle", UNSET) title = d.pop("title", UNSET) @@ -70,6 +78,7 @@ def _parse_saved_semantic_viewer_chart_uuid(data: object) -> Union[None, str]: dashboard_semantic_viewer_chart_tile_properties_properties = cls( chart_name=chart_name, saved_semantic_viewer_chart_uuid=saved_semantic_viewer_chart_uuid, + chart_slug=chart_slug, hide_title=hide_title, title=title, ) diff --git a/lightdash_client/models/dashboard_sql_chart_tile.py b/lightdash_client/models/dashboard_sql_chart_tile.py index 64a0543..c4b63cf 100644 --- a/lightdash_client/models/dashboard_sql_chart_tile.py +++ b/lightdash_client/models/dashboard_sql_chart_tile.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -7,9 +7,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.dashboard_sql_chart_tile_properties_properties import ( - DashboardSqlChartTilePropertiesProperties, - ) + from ..models.dashboard_sql_chart_tile_properties_properties import DashboardSqlChartTilePropertiesProperties T = TypeVar("T", bound="DashboardSqlChartTile") @@ -40,6 +38,8 @@ class DashboardSqlChartTile: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_sql_chart_tile_properties_properties import DashboardSqlChartTilePropertiesProperties + uuid = self.uuid type = self.type.value @@ -76,9 +76,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.dashboard_sql_chart_tile_properties_properties import ( - DashboardSqlChartTilePropertiesProperties, - ) + from ..models.dashboard_sql_chart_tile_properties_properties import DashboardSqlChartTilePropertiesProperties d = src_dict.copy() uuid = d.pop("uuid") diff --git a/lightdash_client/models/dashboard_sql_chart_tile_properties.py b/lightdash_client/models/dashboard_sql_chart_tile_properties.py index 7ccd965..c4f3138 100644 --- a/lightdash_client/models/dashboard_sql_chart_tile_properties.py +++ b/lightdash_client/models/dashboard_sql_chart_tile_properties.py @@ -1,14 +1,13 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.dashboard_tile_types_sqlchart import DashboardTileTypesSQLCHART +from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.dashboard_sql_chart_tile_properties_properties import ( - DashboardSqlChartTilePropertiesProperties, - ) + from ..models.dashboard_sql_chart_tile_properties_properties import DashboardSqlChartTilePropertiesProperties T = TypeVar("T", bound="DashboardSqlChartTileProperties") @@ -27,6 +26,8 @@ class DashboardSqlChartTileProperties: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_sql_chart_tile_properties_properties import DashboardSqlChartTilePropertiesProperties + properties = self.properties.to_dict() type = self.type.value @@ -44,9 +45,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.dashboard_sql_chart_tile_properties_properties import ( - DashboardSqlChartTilePropertiesProperties, - ) + from ..models.dashboard_sql_chart_tile_properties_properties import DashboardSqlChartTilePropertiesProperties d = src_dict.copy() properties = DashboardSqlChartTilePropertiesProperties.from_dict(d.pop("properties")) diff --git a/lightdash_client/models/dashboard_sql_chart_tile_properties_properties.py b/lightdash_client/models/dashboard_sql_chart_tile_properties_properties.py index f60bb4e..5a6f4c3 100644 --- a/lightdash_client/models/dashboard_sql_chart_tile_properties_properties.py +++ b/lightdash_client/models/dashboard_sql_chart_tile_properties_properties.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -14,12 +14,14 @@ class DashboardSqlChartTilePropertiesProperties: Attributes: chart_name (str): saved_sql_uuid (Union[None, str]): + chart_slug (Union[Unset, str]): hide_title (Union[Unset, bool]): title (Union[Unset, str]): """ chart_name: str saved_sql_uuid: Union[None, str] + chart_slug: Union[Unset, str] = UNSET hide_title: Union[Unset, bool] = UNSET title: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -30,6 +32,8 @@ def to_dict(self) -> Dict[str, Any]: saved_sql_uuid: Union[None, str] saved_sql_uuid = self.saved_sql_uuid + chart_slug = self.chart_slug + hide_title = self.hide_title title = self.title @@ -42,6 +46,8 @@ def to_dict(self) -> Dict[str, Any]: "savedSqlUuid": saved_sql_uuid, } ) + if chart_slug is not UNSET: + field_dict["chartSlug"] = chart_slug if hide_title is not UNSET: field_dict["hideTitle"] = hide_title if title is not UNSET: @@ -61,6 +67,8 @@ def _parse_saved_sql_uuid(data: object) -> Union[None, str]: saved_sql_uuid = _parse_saved_sql_uuid(d.pop("savedSqlUuid")) + chart_slug = d.pop("chartSlug", UNSET) + hide_title = d.pop("hideTitle", UNSET) title = d.pop("title", UNSET) @@ -68,6 +76,7 @@ def _parse_saved_sql_uuid(data: object) -> Union[None, str]: dashboard_sql_chart_tile_properties_properties = cls( chart_name=chart_name, saved_sql_uuid=saved_sql_uuid, + chart_slug=chart_slug, hide_title=hide_title, title=title, ) diff --git a/lightdash_client/models/dashboard_tab.py b/lightdash_client/models/dashboard_tab.py index 467b19c..474336e 100644 --- a/lightdash_client/models/dashboard_tab.py +++ b/lightdash_client/models/dashboard_tab.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="DashboardTab") diff --git a/lightdash_client/models/dashboard_tile_without_uuids.py b/lightdash_client/models/dashboard_tile_without_uuids.py new file mode 100644 index 0000000..933d927 --- /dev/null +++ b/lightdash_client/models/dashboard_tile_without_uuids.py @@ -0,0 +1,136 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.dashboard_tile_types import DashboardTileTypes +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.pick_dashboard_tile_at_properties_exclude_keyof_dashboard_tile_at_properties_saved_chart_uuid_or_saved_sql_uuid_or_saved_semantic_viewer_chart_uuid import ( + PickDashboardTileAtPropertiesExcludeKeyofDashboardTileAtPropertiesSavedChartUuidOrSavedSqlUuidOrSavedSemanticViewerChartUuid, + ) + + +T = TypeVar("T", bound="DashboardTileWithoutUuids") + + +@_attrs_define +class DashboardTileWithoutUuids: + """ + Attributes: + type (DashboardTileTypes): + x (float): + y (float): + h (float): + w (float): + properties (PickDashboardTileAtPropertiesExcludeKeyofDashboardTileAtPropertiesSavedChartUuidOrSavedSqlUuidOrSave + dSemanticViewerChartUuid): From T, pick a set of properties whose keys are in the union K + uuid (Union[Unset, str]): + tab_uuid (Union[Unset, str]): + """ + + type: DashboardTileTypes + x: float + y: float + h: float + w: float + properties: "PickDashboardTileAtPropertiesExcludeKeyofDashboardTileAtPropertiesSavedChartUuidOrSavedSqlUuidOrSavedSemanticViewerChartUuid" + uuid: Union[Unset, str] = UNSET + tab_uuid: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.pick_dashboard_tile_at_properties_exclude_keyof_dashboard_tile_at_properties_saved_chart_uuid_or_saved_sql_uuid_or_saved_semantic_viewer_chart_uuid import ( + PickDashboardTileAtPropertiesExcludeKeyofDashboardTileAtPropertiesSavedChartUuidOrSavedSqlUuidOrSavedSemanticViewerChartUuid, + ) + + type = self.type.value + + x = self.x + + y = self.y + + h = self.h + + w = self.w + + properties = self.properties.to_dict() + + uuid = self.uuid + + tab_uuid = self.tab_uuid + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + "x": x, + "y": y, + "h": h, + "w": w, + "properties": properties, + } + ) + if uuid is not UNSET: + field_dict["uuid"] = uuid + if tab_uuid is not UNSET: + field_dict["tabUuid"] = tab_uuid + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.pick_dashboard_tile_at_properties_exclude_keyof_dashboard_tile_at_properties_saved_chart_uuid_or_saved_sql_uuid_or_saved_semantic_viewer_chart_uuid import ( + PickDashboardTileAtPropertiesExcludeKeyofDashboardTileAtPropertiesSavedChartUuidOrSavedSqlUuidOrSavedSemanticViewerChartUuid, + ) + + d = src_dict.copy() + type = DashboardTileTypes(d.pop("type")) + + x = d.pop("x") + + y = d.pop("y") + + h = d.pop("h") + + w = d.pop("w") + + properties = PickDashboardTileAtPropertiesExcludeKeyofDashboardTileAtPropertiesSavedChartUuidOrSavedSqlUuidOrSavedSemanticViewerChartUuid.from_dict( + d.pop("properties") + ) + + uuid = d.pop("uuid", UNSET) + + tab_uuid = d.pop("tabUuid", UNSET) + + dashboard_tile_without_uuids = cls( + type=type, + x=x, + y=y, + h=h, + w=w, + properties=properties, + uuid=uuid, + tab_uuid=tab_uuid, + ) + + dashboard_tile_without_uuids.additional_properties = d + return dashboard_tile_without_uuids + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/dbt_azure_dev_ops_project_config.py b/lightdash_client/models/dbt_azure_dev_ops_project_config.py index 01fa50f..ad211ab 100644 --- a/lightdash_client/models/dbt_azure_dev_ops_project_config.py +++ b/lightdash_client/models/dbt_azure_dev_ops_project_config.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -40,6 +40,8 @@ class DbtAzureDevOpsProjectConfig: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.dbt_project_environment_variable import DbtProjectEnvironmentVariable + type = self.type.value personal_access_token = self.personal_access_token @@ -85,9 +87,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.dbt_project_environment_variable import ( - DbtProjectEnvironmentVariable, - ) + from ..models.dbt_project_environment_variable import DbtProjectEnvironmentVariable d = src_dict.copy() type = DbtProjectTypeAZUREDEVOPS(d.pop("type")) diff --git a/lightdash_client/models/dbt_bit_bucket_project_config.py b/lightdash_client/models/dbt_bit_bucket_project_config.py index 9cbdf3a..f1933fe 100644 --- a/lightdash_client/models/dbt_bit_bucket_project_config.py +++ b/lightdash_client/models/dbt_bit_bucket_project_config.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -40,6 +40,8 @@ class DbtBitBucketProjectConfig: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.dbt_project_environment_variable import DbtProjectEnvironmentVariable + type = self.type.value username = self.username @@ -86,9 +88,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.dbt_project_environment_variable import ( - DbtProjectEnvironmentVariable, - ) + from ..models.dbt_project_environment_variable import DbtProjectEnvironmentVariable d = src_dict.copy() type = DbtProjectTypeBITBUCKET(d.pop("type")) diff --git a/lightdash_client/models/dbt_cloud_ide_project_config.py b/lightdash_client/models/dbt_cloud_ide_project_config.py index 45f6e45..ea4695b 100644 --- a/lightdash_client/models/dbt_cloud_ide_project_config.py +++ b/lightdash_client/models/dbt_cloud_ide_project_config.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.dbt_project_type_dbtcloudide import DbtProjectTypeDBTCLOUDIDE +from ..types import UNSET, Unset T = TypeVar("T", bound="DbtCloudIDEProjectConfig") diff --git a/lightdash_client/models/dbt_github_project_config.py b/lightdash_client/models/dbt_github_project_config.py index bb1b789..1e6bade 100644 --- a/lightdash_client/models/dbt_github_project_config.py +++ b/lightdash_client/models/dbt_github_project_config.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -38,6 +38,8 @@ class DbtGithubProjectConfig: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.dbt_project_environment_variable import DbtProjectEnvironmentVariable + type = self.type.value personal_access_token = self.personal_access_token @@ -81,9 +83,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.dbt_project_environment_variable import ( - DbtProjectEnvironmentVariable, - ) + from ..models.dbt_project_environment_variable import DbtProjectEnvironmentVariable d = src_dict.copy() type = DbtProjectTypeGITHUB(d.pop("type")) diff --git a/lightdash_client/models/dbt_gitlab_project_config.py b/lightdash_client/models/dbt_gitlab_project_config.py index 7e45b5f..b46db44 100644 --- a/lightdash_client/models/dbt_gitlab_project_config.py +++ b/lightdash_client/models/dbt_gitlab_project_config.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -38,6 +38,8 @@ class DbtGitlabProjectConfig: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.dbt_project_environment_variable import DbtProjectEnvironmentVariable + type = self.type.value personal_access_token = self.personal_access_token @@ -81,9 +83,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.dbt_project_environment_variable import ( - DbtProjectEnvironmentVariable, - ) + from ..models.dbt_project_environment_variable import DbtProjectEnvironmentVariable d = src_dict.copy() type = DbtProjectTypeGITLAB(d.pop("type")) diff --git a/lightdash_client/models/dbt_local_project_config.py b/lightdash_client/models/dbt_local_project_config.py index 4774a00..719a211 100644 --- a/lightdash_client/models/dbt_local_project_config.py +++ b/lightdash_client/models/dbt_local_project_config.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -32,6 +32,8 @@ class DbtLocalProjectConfig: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.dbt_project_environment_variable import DbtProjectEnvironmentVariable + type = self.type.value target = self.target @@ -67,9 +69,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.dbt_project_environment_variable import ( - DbtProjectEnvironmentVariable, - ) + from ..models.dbt_project_environment_variable import DbtProjectEnvironmentVariable d = src_dict.copy() type = DbtProjectTypeDBT(d.pop("type")) diff --git a/lightdash_client/models/dbt_none_project_config.py b/lightdash_client/models/dbt_none_project_config.py index 988f391..0ac8321 100644 --- a/lightdash_client/models/dbt_none_project_config.py +++ b/lightdash_client/models/dbt_none_project_config.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -30,6 +30,8 @@ class DbtNoneProjectConfig: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.dbt_project_environment_variable import DbtProjectEnvironmentVariable + type = self.type.value target = self.target @@ -61,9 +63,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.dbt_project_environment_variable import ( - DbtProjectEnvironmentVariable, - ) + from ..models.dbt_project_environment_variable import DbtProjectEnvironmentVariable d = src_dict.copy() type = DbtProjectTypeNONE(d.pop("type")) diff --git a/lightdash_client/models/dbt_project_environment_variable.py b/lightdash_client/models/dbt_project_environment_variable.py index 740edeb..affb0ef 100644 --- a/lightdash_client/models/dbt_project_environment_variable.py +++ b/lightdash_client/models/dbt_project_environment_variable.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="DbtProjectEnvironmentVariable") diff --git a/lightdash_client/models/dbt_semantic_layer_connection.py b/lightdash_client/models/dbt_semantic_layer_connection.py index f9ae5bd..89febc2 100644 --- a/lightdash_client/models/dbt_semantic_layer_connection.py +++ b/lightdash_client/models/dbt_semantic_layer_connection.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.semantic_layer_type_dbt import SemanticLayerTypeDBT +from ..types import UNSET, Unset T = TypeVar("T", bound="DbtSemanticLayerConnection") diff --git a/lightdash_client/models/default_time_dimension.py b/lightdash_client/models/default_time_dimension.py new file mode 100644 index 0000000..f27d557 --- /dev/null +++ b/lightdash_client/models/default_time_dimension.py @@ -0,0 +1,69 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.time_frames import TimeFrames +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DefaultTimeDimension") + + +@_attrs_define +class DefaultTimeDimension: + """ + Attributes: + interval (TimeFrames): + field (str): + """ + + interval: TimeFrames + field: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + interval = self.interval.value + + field = self.field + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "interval": interval, + "field": field, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + interval = TimeFrames(d.pop("interval")) + + field = d.pop("field") + + default_time_dimension = cls( + interval=interval, + field=field, + ) + + default_time_dimension.additional_properties = d + return default_time_dimension + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/delete_scheduler_response_201.py b/lightdash_client/models/delete_scheduler_response_201.py index 56857a1..a07b2f7 100644 --- a/lightdash_client/models/delete_scheduler_response_201.py +++ b/lightdash_client/models/delete_scheduler_response_201.py @@ -1,11 +1,9 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.delete_scheduler_response_201_status import ( - DeleteSchedulerResponse201Status, -) +from ..models.delete_scheduler_response_201_status import DeleteSchedulerResponse201Status from ..types import UNSET, Unset T = TypeVar("T", bound="DeleteSchedulerResponse201") diff --git a/lightdash_client/models/dimension_type_date.py b/lightdash_client/models/dimension_type_date.py new file mode 100644 index 0000000..9bb73d8 --- /dev/null +++ b/lightdash_client/models/dimension_type_date.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DimensionTypeDATE(str, Enum): + DATE = "date" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/dimension_type_timestamp.py b/lightdash_client/models/dimension_type_timestamp.py new file mode 100644 index 0000000..4e54b0d --- /dev/null +++ b/lightdash_client/models/dimension_type_timestamp.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DimensionTypeTIMESTAMP(str, Enum): + TIMESTAMP = "timestamp" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/download_csv_from_explore_body.py b/lightdash_client/models/download_csv_from_explore_body.py index 3d2d96a..eb2089a 100644 --- a/lightdash_client/models/download_csv_from_explore_body.py +++ b/lightdash_client/models/download_csv_from_explore_body.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -9,9 +9,7 @@ from ..models.additional_metric import AdditionalMetric from ..models.custom_bin_dimension import CustomBinDimension from ..models.custom_sql_dimension import CustomSqlDimension - from ..models.download_csv_from_explore_body_custom_labels import ( - DownloadCsvFromExploreBodyCustomLabels, - ) + from ..models.download_csv_from_explore_body_custom_labels import DownloadCsvFromExploreBodyCustomLabels from ..models.filters import Filters from ..models.metric_query_metadata import MetricQueryMetadata from ..models.sort_field import SortField @@ -39,6 +37,7 @@ class DownloadCsvFromExploreBody: timezone (Union[Unset, str]): custom_dimensions (Union[Unset, List[Union['CustomBinDimension', 'CustomSqlDimension']]]): additional_metrics (Union[Unset, List['AdditionalMetric']]): + pivot_columns (Union[Unset, List[str]]): chart_name (Union[Unset, str]): hidden_fields (Union[Unset, List[str]]): custom_labels (Union[Unset, DownloadCsvFromExploreBodyCustomLabels]): @@ -59,6 +58,7 @@ class DownloadCsvFromExploreBody: timezone: Union[Unset, str] = UNSET custom_dimensions: Union[Unset, List[Union["CustomBinDimension", "CustomSqlDimension"]]] = UNSET additional_metrics: Union[Unset, List["AdditionalMetric"]] = UNSET + pivot_columns: Union[Unset, List[str]] = UNSET chart_name: Union[Unset, str] = UNSET hidden_fields: Union[Unset, List[str]] = UNSET custom_labels: Union[Unset, "DownloadCsvFromExploreBodyCustomLabels"] = UNSET @@ -66,7 +66,14 @@ class DownloadCsvFromExploreBody: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.additional_metric import AdditionalMetric from ..models.custom_bin_dimension import CustomBinDimension + from ..models.custom_sql_dimension import CustomSqlDimension + from ..models.download_csv_from_explore_body_custom_labels import DownloadCsvFromExploreBodyCustomLabels + from ..models.filters import Filters + from ..models.metric_query_metadata import MetricQueryMetadata + from ..models.sort_field import SortField + from ..models.table_calculation import TableCalculation table_calculations = [] for table_calculations_item_data in self.table_calculations: @@ -119,6 +126,10 @@ def to_dict(self) -> Dict[str, Any]: additional_metrics_item = additional_metrics_item_data.to_dict() additional_metrics.append(additional_metrics_item) + pivot_columns: Union[Unset, List[str]] = UNSET + if not isinstance(self.pivot_columns, Unset): + pivot_columns = self.pivot_columns + chart_name = self.chart_name hidden_fields: Union[Unset, List[str]] = UNSET @@ -159,6 +170,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["customDimensions"] = custom_dimensions if additional_metrics is not UNSET: field_dict["additionalMetrics"] = additional_metrics + if pivot_columns is not UNSET: + field_dict["pivotColumns"] = pivot_columns if chart_name is not UNSET: field_dict["chartName"] = chart_name if hidden_fields is not UNSET: @@ -175,9 +188,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.additional_metric import AdditionalMetric from ..models.custom_bin_dimension import CustomBinDimension from ..models.custom_sql_dimension import CustomSqlDimension - from ..models.download_csv_from_explore_body_custom_labels import ( - DownloadCsvFromExploreBodyCustomLabels, - ) + from ..models.download_csv_from_explore_body_custom_labels import DownloadCsvFromExploreBodyCustomLabels from ..models.filters import Filters from ..models.metric_query_metadata import MetricQueryMetadata from ..models.sort_field import SortField @@ -253,6 +264,8 @@ def _parse_custom_dimensions_item(data: object) -> Union["CustomBinDimension", " additional_metrics.append(additional_metrics_item) + pivot_columns = cast(List[str], d.pop("pivotColumns", UNSET)) + chart_name = d.pop("chartName", UNSET) hidden_fields = cast(List[str], d.pop("hiddenFields", UNSET)) @@ -288,6 +301,7 @@ def _parse_csv_limit(data: object) -> Union[None, Unset, float]: timezone=timezone, custom_dimensions=custom_dimensions, additional_metrics=additional_metrics, + pivot_columns=pivot_columns, chart_name=chart_name, hidden_fields=hidden_fields, custom_labels=custom_labels, diff --git a/lightdash_client/models/download_csv_from_explore_body_custom_labels.py b/lightdash_client/models/download_csv_from_explore_body_custom_labels.py index 097661d..fc3eb55 100644 --- a/lightdash_client/models/download_csv_from_explore_body_custom_labels.py +++ b/lightdash_client/models/download_csv_from_explore_body_custom_labels.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="DownloadCsvFromExploreBodyCustomLabels") diff --git a/lightdash_client/models/download_csv_from_explore_response_200.py b/lightdash_client/models/download_csv_from_explore_response_200.py index 98799b8..6484355 100644 --- a/lightdash_client/models/download_csv_from_explore_response_200.py +++ b/lightdash_client/models/download_csv_from_explore_response_200.py @@ -1,16 +1,13 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.download_csv_from_explore_response_200_status import ( - DownloadCsvFromExploreResponse200Status, -) +from ..models.download_csv_from_explore_response_200_status import DownloadCsvFromExploreResponse200Status +from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.download_csv_from_explore_response_200_results import ( - DownloadCsvFromExploreResponse200Results, - ) + from ..models.download_csv_from_explore_response_200_results import DownloadCsvFromExploreResponse200Results T = TypeVar("T", bound="DownloadCsvFromExploreResponse200") @@ -29,6 +26,8 @@ class DownloadCsvFromExploreResponse200: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.download_csv_from_explore_response_200_results import DownloadCsvFromExploreResponse200Results + results = self.results.to_dict() status = self.status.value @@ -46,9 +45,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.download_csv_from_explore_response_200_results import ( - DownloadCsvFromExploreResponse200Results, - ) + from ..models.download_csv_from_explore_response_200_results import DownloadCsvFromExploreResponse200Results d = src_dict.copy() results = DownloadCsvFromExploreResponse200Results.from_dict(d.pop("results")) diff --git a/lightdash_client/models/download_csv_from_explore_response_200_results.py b/lightdash_client/models/download_csv_from_explore_response_200_results.py index 9f938f1..e2b88e5 100644 --- a/lightdash_client/models/download_csv_from_explore_response_200_results.py +++ b/lightdash_client/models/download_csv_from_explore_response_200_results.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="DownloadCsvFromExploreResponse200Results") diff --git a/lightdash_client/models/download_csv_from_saved_chart_body.py b/lightdash_client/models/download_csv_from_saved_chart_body.py new file mode 100644 index 0000000..547b487 --- /dev/null +++ b/lightdash_client/models/download_csv_from_saved_chart_body.py @@ -0,0 +1,97 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DownloadCsvFromSavedChartBody") + + +@_attrs_define +class DownloadCsvFromSavedChartBody: + """ + Attributes: + only_raw (bool): + dashboard_filters (Any): + csv_limit (Union[None, Unset, float]): + tile_uuid (Union[Unset, str]): + """ + + only_raw: bool + dashboard_filters: Any + csv_limit: Union[None, Unset, float] = UNSET + tile_uuid: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + only_raw = self.only_raw + + dashboard_filters = self.dashboard_filters + + csv_limit: Union[None, Unset, float] + if isinstance(self.csv_limit, Unset): + csv_limit = UNSET + else: + csv_limit = self.csv_limit + + tile_uuid = self.tile_uuid + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "onlyRaw": only_raw, + "dashboardFilters": dashboard_filters, + } + ) + if csv_limit is not UNSET: + field_dict["csvLimit"] = csv_limit + if tile_uuid is not UNSET: + field_dict["tileUuid"] = tile_uuid + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + only_raw = d.pop("onlyRaw") + + dashboard_filters = d.pop("dashboardFilters") + + def _parse_csv_limit(data: object) -> Union[None, Unset, float]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, float], data) + + csv_limit = _parse_csv_limit(d.pop("csvLimit", UNSET)) + + tile_uuid = d.pop("tileUuid", UNSET) + + download_csv_from_saved_chart_body = cls( + only_raw=only_raw, + dashboard_filters=dashboard_filters, + csv_limit=csv_limit, + tile_uuid=tile_uuid, + ) + + download_csv_from_saved_chart_body.additional_properties = d + return download_csv_from_saved_chart_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/download_csv_from_saved_chart_response_200.py b/lightdash_client/models/download_csv_from_saved_chart_response_200.py new file mode 100644 index 0000000..6f3799a --- /dev/null +++ b/lightdash_client/models/download_csv_from_saved_chart_response_200.py @@ -0,0 +1,81 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.download_csv_from_saved_chart_response_200_status import DownloadCsvFromSavedChartResponse200Status +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.download_csv_from_saved_chart_response_200_results import DownloadCsvFromSavedChartResponse200Results + + +T = TypeVar("T", bound="DownloadCsvFromSavedChartResponse200") + + +@_attrs_define +class DownloadCsvFromSavedChartResponse200: + """ + Attributes: + results (DownloadCsvFromSavedChartResponse200Results): + status (DownloadCsvFromSavedChartResponse200Status): + """ + + results: "DownloadCsvFromSavedChartResponse200Results" + status: DownloadCsvFromSavedChartResponse200Status + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.download_csv_from_saved_chart_response_200_results import ( + DownloadCsvFromSavedChartResponse200Results, + ) + + results = self.results.to_dict() + + status = self.status.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "results": results, + "status": status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.download_csv_from_saved_chart_response_200_results import ( + DownloadCsvFromSavedChartResponse200Results, + ) + + d = src_dict.copy() + results = DownloadCsvFromSavedChartResponse200Results.from_dict(d.pop("results")) + + status = DownloadCsvFromSavedChartResponse200Status(d.pop("status")) + + download_csv_from_saved_chart_response_200 = cls( + results=results, + status=status, + ) + + download_csv_from_saved_chart_response_200.additional_properties = d + return download_csv_from_saved_chart_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/download_csv_from_saved_chart_response_200_results.py b/lightdash_client/models/download_csv_from_saved_chart_response_200_results.py new file mode 100644 index 0000000..d73d17f --- /dev/null +++ b/lightdash_client/models/download_csv_from_saved_chart_response_200_results.py @@ -0,0 +1,60 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DownloadCsvFromSavedChartResponse200Results") + + +@_attrs_define +class DownloadCsvFromSavedChartResponse200Results: + """ + Attributes: + job_id (str): + """ + + job_id: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + job_id = self.job_id + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "jobId": job_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + job_id = d.pop("jobId") + + download_csv_from_saved_chart_response_200_results = cls( + job_id=job_id, + ) + + download_csv_from_saved_chart_response_200_results.additional_properties = d + return download_csv_from_saved_chart_response_200_results + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/download_csv_from_saved_chart_response_200_status.py b/lightdash_client/models/download_csv_from_saved_chart_response_200_status.py new file mode 100644 index 0000000..6e46a54 --- /dev/null +++ b/lightdash_client/models/download_csv_from_saved_chart_response_200_status.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class DownloadCsvFromSavedChartResponse200Status(str, Enum): + OK = "ok" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/duplicate_dashboard_params.py b/lightdash_client/models/duplicate_dashboard_params.py new file mode 100644 index 0000000..6958ceb --- /dev/null +++ b/lightdash_client/models/duplicate_dashboard_params.py @@ -0,0 +1,68 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="DuplicateDashboardParams") + + +@_attrs_define +class DuplicateDashboardParams: + """ + Attributes: + dashboard_desc (str): + dashboard_name (str): + """ + + dashboard_desc: str + dashboard_name: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + dashboard_desc = self.dashboard_desc + + dashboard_name = self.dashboard_name + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "dashboardDesc": dashboard_desc, + "dashboardName": dashboard_name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + dashboard_desc = d.pop("dashboardDesc") + + dashboard_name = d.pop("dashboardName") + + duplicate_dashboard_params = cls( + dashboard_desc=dashboard_desc, + dashboard_name=dashboard_name, + ) + + duplicate_dashboard_params.additional_properties = d + return duplicate_dashboard_params + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/echarts_grid.py b/lightdash_client/models/echarts_grid.py index 5a8bb6c..cec2c35 100644 --- a/lightdash_client/models/echarts_grid.py +++ b/lightdash_client/models/echarts_grid.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/echarts_legend.py b/lightdash_client/models/echarts_legend.py index 8a59c46..0c6ccfe 100644 --- a/lightdash_client/models/echarts_legend.py +++ b/lightdash_client/models/echarts_legend.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/email_one_time_password.py b/lightdash_client/models/email_one_time_password.py index 9ee4900..ff7e38b 100644 --- a/lightdash_client/models/email_one_time_password.py +++ b/lightdash_client/models/email_one_time_password.py @@ -1,10 +1,12 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from dateutil.parser import isoparse +from ..types import UNSET, Unset + T = TypeVar("T", bound="EmailOneTimePassword") diff --git a/lightdash_client/models/email_one_time_password_expiring.py b/lightdash_client/models/email_one_time_password_expiring.py index d629dd4..d860290 100644 --- a/lightdash_client/models/email_one_time_password_expiring.py +++ b/lightdash_client/models/email_one_time_password_expiring.py @@ -1,10 +1,12 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from dateutil.parser import isoparse +from ..types import UNSET, Unset + T = TypeVar("T", bound="EmailOneTimePasswordExpiring") diff --git a/lightdash_client/models/email_status.py b/lightdash_client/models/email_status.py index b6fc0c2..32a3ef2 100644 --- a/lightdash_client/models/email_status.py +++ b/lightdash_client/models/email_status.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -27,6 +27,8 @@ class EmailStatus: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.email_one_time_password import EmailOneTimePassword + is_verified = self.is_verified email = self.email diff --git a/lightdash_client/models/emoji_icon.py b/lightdash_client/models/emoji_icon.py new file mode 100644 index 0000000..62c6c10 --- /dev/null +++ b/lightdash_client/models/emoji_icon.py @@ -0,0 +1,60 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="EmojiIcon") + + +@_attrs_define +class EmojiIcon: + """ + Attributes: + unicode (str): + """ + + unicode: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + unicode = self.unicode + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "unicode": unicode, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + unicode = d.pop("unicode") + + emoji_icon = cls( + unicode=unicode, + ) + + emoji_icon.additional_properties = d + return emoji_icon + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/explore.py b/lightdash_client/models/explore.py index 8c389c7..f105802 100644 --- a/lightdash_client/models/explore.py +++ b/lightdash_client/models/explore.py @@ -1,8 +1,9 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.explore_type import ExploreType from ..models.supported_dbt_adapter import SupportedDbtAdapter from ..types import UNSET, Unset @@ -25,6 +26,7 @@ class Explore: tags (List[str]): label (str): name (str): + type (Union[Unset, ExploreType]): sql_path (Union[Unset, str]): yml_path (Union[Unset, str]): warehouse (Union[Unset, str]): @@ -38,6 +40,7 @@ class Explore: tags: List[str] label: str name: str + type: Union[Unset, ExploreType] = UNSET sql_path: Union[Unset, str] = UNSET yml_path: Union[Unset, str] = UNSET warehouse: Union[Unset, str] = UNSET @@ -45,6 +48,9 @@ class Explore: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.compiled_explore_join import CompiledExploreJoin + from ..models.explore_tables import ExploreTables + target_database = self.target_database.value tables = self.tables.to_dict() @@ -62,6 +68,10 @@ def to_dict(self) -> Dict[str, Any]: name = self.name + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + sql_path = self.sql_path yml_path = self.yml_path @@ -83,6 +93,8 @@ def to_dict(self) -> Dict[str, Any]: "name": name, } ) + if type is not UNSET: + field_dict["type"] = type if sql_path is not UNSET: field_dict["sqlPath"] = sql_path if yml_path is not UNSET: @@ -119,6 +131,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: name = d.pop("name") + _type = d.pop("type", UNSET) + type: Union[Unset, ExploreType] + if isinstance(_type, Unset): + type = UNSET + else: + type = ExploreType(_type) + sql_path = d.pop("sqlPath", UNSET) yml_path = d.pop("ymlPath", UNSET) @@ -135,6 +154,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: tags=tags, label=label, name=name, + type=type, sql_path=sql_path, yml_path=yml_path, warehouse=warehouse, diff --git a/lightdash_client/models/explore_tables.py b/lightdash_client/models/explore_tables.py index 1848df8..4205cf2 100644 --- a/lightdash_client/models/explore_tables.py +++ b/lightdash_client/models/explore_tables.py @@ -1,8 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.compiled_table import CompiledTable @@ -17,6 +19,8 @@ class ExploreTables: additional_properties: Dict[str, "CompiledTable"] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.compiled_table import CompiledTable + field_dict: Dict[str, Any] = {} for prop_name, prop in self.additional_properties.items(): field_dict[prop_name] = prop.to_dict() @@ -30,6 +34,15 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() explore_tables = cls() + from ..models.default_time_dimension import DefaultTimeDimension + from ..models.metric_filter_rule import MetricFilterRule + from ..models.record_string_compiled_dimension import RecordStringCompiledDimension + from ..models.record_string_compiled_metric import RecordStringCompiledMetric + from ..models.record_string_group_type import RecordStringGroupType + from ..models.record_string_lineage_node_dependency_array import RecordStringLineageNodeDependencyArray + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray + from ..models.source import Source + additional_properties = {} for prop_name, prop_dict in d.items(): additional_property = CompiledTable.from_dict(prop_dict) diff --git a/lightdash_client/models/explore_type.py b/lightdash_client/models/explore_type.py new file mode 100644 index 0000000..a2a4a29 --- /dev/null +++ b/lightdash_client/models/explore_type.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class ExploreType(str, Enum): + DEFAULT = "default" + VIRTUAL = "virtual" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/field_target.py b/lightdash_client/models/field_target.py index 5060dae..8b92f2a 100644 --- a/lightdash_client/models/field_target.py +++ b/lightdash_client/models/field_target.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="FieldTarget") diff --git a/lightdash_client/models/field_type_dimension.py b/lightdash_client/models/field_type_dimension.py new file mode 100644 index 0000000..3851d9d --- /dev/null +++ b/lightdash_client/models/field_type_dimension.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FieldTypeDIMENSION(str, Enum): + DIMENSION = "dimension" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/field_type_metric.py b/lightdash_client/models/field_type_metric.py new file mode 100644 index 0000000..0a3e5b5 --- /dev/null +++ b/lightdash_client/models/field_type_metric.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class FieldTypeMETRIC(str, Enum): + METRIC = "metric" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/field_url.py b/lightdash_client/models/field_url.py new file mode 100644 index 0000000..687e274 --- /dev/null +++ b/lightdash_client/models/field_url.py @@ -0,0 +1,68 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="FieldUrl") + + +@_attrs_define +class FieldUrl: + """ + Attributes: + label (str): + url (str): + """ + + label: str + url: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + label = self.label + + url = self.url + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "label": label, + "url": url, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + label = d.pop("label") + + url = d.pop("url") + + field_url = cls( + label=label, + url=url, + ) + + field_url.additional_properties = d + return field_url + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/filter_group_response_type_0.py b/lightdash_client/models/filter_group_response_type_0.py index 0b36158..c22025f 100644 --- a/lightdash_client/models/filter_group_response_type_0.py +++ b/lightdash_client/models/filter_group_response_type_0.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="FilterGroupResponseType0") diff --git a/lightdash_client/models/filter_group_response_type_1.py b/lightdash_client/models/filter_group_response_type_1.py index 56c3525..644504b 100644 --- a/lightdash_client/models/filter_group_response_type_1.py +++ b/lightdash_client/models/filter_group_response_type_1.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="FilterGroupResponseType1") diff --git a/lightdash_client/models/filter_rule.py b/lightdash_client/models/filter_rule.py index eb45e2e..687d90f 100644 --- a/lightdash_client/models/filter_rule.py +++ b/lightdash_client/models/filter_rule.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -36,6 +36,8 @@ class FilterRule: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.field_target import FieldTarget + operator = self.operator.value id = self.id diff --git a/lightdash_client/models/filter_rule_conditional_operator_tv_any.py b/lightdash_client/models/filter_rule_conditional_operator_tv_any.py index 3b052b6..bf25af0 100644 --- a/lightdash_client/models/filter_rule_conditional_operator_tv_any.py +++ b/lightdash_client/models/filter_rule_conditional_operator_tv_any.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -36,6 +36,8 @@ class FilterRuleConditionalOperatorTVAny: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_field_target import DashboardFieldTarget + operator = self.operator.value id = self.id diff --git a/lightdash_client/models/filters.py b/lightdash_client/models/filters.py index 46871f5..4a3cb6b 100644 --- a/lightdash_client/models/filters.py +++ b/lightdash_client/models/filters.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -28,6 +28,7 @@ class Filters: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.and_filter_group import AndFilterGroup from ..models.or_filter_group import OrFilterGroup table_calculations: Union[Dict[str, Any], Unset] diff --git a/lightdash_client/models/filters_response.py b/lightdash_client/models/filters_response.py index 7d430e1..f88c6b8 100644 --- a/lightdash_client/models/filters_response.py +++ b/lightdash_client/models/filters_response.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -29,6 +29,7 @@ class FiltersResponse: def to_dict(self) -> Dict[str, Any]: from ..models.filter_group_response_type_0 import FilterGroupResponseType0 + from ..models.filter_group_response_type_1 import FilterGroupResponseType1 table_calculations: Union[Dict[str, Any], Unset] if isinstance(self.table_calculations, Unset): diff --git a/lightdash_client/models/funnel_chart.py b/lightdash_client/models/funnel_chart.py index 611a853..0a103e8 100644 --- a/lightdash_client/models/funnel_chart.py +++ b/lightdash_client/models/funnel_chart.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -41,6 +41,10 @@ class FunnelChart: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.funnel_chart_labels import FunnelChartLabels + from ..models.record_string_series_metadata import RecordStringSeriesMetadata + from ..models.record_string_string import RecordStringString + legend_position: Union[Unset, str] = UNSET if not isinstance(self.legend_position, Unset): legend_position = self.legend_position.value diff --git a/lightdash_client/models/funnel_chart_config.py b/lightdash_client/models/funnel_chart_config.py index bbd0adf..63629a3 100644 --- a/lightdash_client/models/funnel_chart_config.py +++ b/lightdash_client/models/funnel_chart_config.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,6 +26,8 @@ class FunnelChartConfig: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.funnel_chart import FunnelChart + type = self.type.value config: Union[Unset, Dict[str, Any]] = UNSET diff --git a/lightdash_client/models/funnel_chart_labels.py b/lightdash_client/models/funnel_chart_labels.py index ea71f11..132ae9c 100644 --- a/lightdash_client/models/funnel_chart_labels.py +++ b/lightdash_client/models/funnel_chart_labels.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/get_analytics_field_response_200.py b/lightdash_client/models/get_analytics_field_response_200.py index 4582c3a..3047dcb 100644 --- a/lightdash_client/models/get_analytics_field_response_200.py +++ b/lightdash_client/models/get_analytics_field_response_200.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.get_analytics_field_response_200_status import ( - GetAnalyticsFieldResponse200Status, -) +from ..models.get_analytics_field_response_200_status import GetAnalyticsFieldResponse200Status +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.catalog_analytics import CatalogAnalytics @@ -27,6 +26,8 @@ class GetAnalyticsFieldResponse200: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.catalog_analytics import CatalogAnalytics + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/get_analytics_response_200.py b/lightdash_client/models/get_analytics_response_200.py index 0c8623d..857baf6 100644 --- a/lightdash_client/models/get_analytics_response_200.py +++ b/lightdash_client/models/get_analytics_response_200.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.get_analytics_response_200_status import GetAnalyticsResponse200Status +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.catalog_analytics import CatalogAnalytics @@ -25,6 +26,8 @@ class GetAnalyticsResponse200: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.catalog_analytics import CatalogAnalytics + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/get_catalog_response_200.py b/lightdash_client/models/get_catalog_response_200.py index c4d9fd0..76d445e 100644 --- a/lightdash_client/models/get_catalog_response_200.py +++ b/lightdash_client/models/get_catalog_response_200.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.get_catalog_response_200_status import GetCatalogResponse200Status +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.catalog_field import CatalogField @@ -27,6 +28,7 @@ class GetCatalogResponse200: def to_dict(self) -> Dict[str, Any]: from ..models.catalog_field import CatalogField + from ..models.catalog_table import CatalogTable results = [] for componentsschemas_api_catalog_results_item_data in self.results: diff --git a/lightdash_client/models/get_configuration_response_200.py b/lightdash_client/models/get_configuration_response_200.py index 4637179..8df66c3 100644 --- a/lightdash_client/models/get_configuration_response_200.py +++ b/lightdash_client/models/get_configuration_response_200.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.get_configuration_response_200_status import ( - GetConfigurationResponse200Status, -) +from ..models.get_configuration_response_200_status import GetConfigurationResponse200Status +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.git_integration_configuration import GitIntegrationConfiguration @@ -27,6 +26,8 @@ class GetConfigurationResponse200: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.git_integration_configuration import GitIntegrationConfiguration + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/get_custom_metrics_response_200.py b/lightdash_client/models/get_custom_metrics_response_200.py index 61abe4c..a8bb46e 100644 --- a/lightdash_client/models/get_custom_metrics_response_200.py +++ b/lightdash_client/models/get_custom_metrics_response_200.py @@ -1,16 +1,13 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.get_custom_metrics_response_200_status import ( - GetCustomMetricsResponse200Status, -) +from ..models.get_custom_metrics_response_200_status import GetCustomMetricsResponse200Status +from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.get_custom_metrics_response_200_results_item import ( - GetCustomMetricsResponse200ResultsItem, - ) + from ..models.get_custom_metrics_response_200_results_item import GetCustomMetricsResponse200ResultsItem T = TypeVar("T", bound="GetCustomMetricsResponse200") @@ -29,6 +26,8 @@ class GetCustomMetricsResponse200: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.get_custom_metrics_response_200_results_item import GetCustomMetricsResponse200ResultsItem + results = [] for results_item_data in self.results: results_item = results_item_data.to_dict() @@ -49,9 +48,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.get_custom_metrics_response_200_results_item import ( - GetCustomMetricsResponse200ResultsItem, - ) + from ..models.get_custom_metrics_response_200_results_item import GetCustomMetricsResponse200ResultsItem d = src_dict.copy() results = [] diff --git a/lightdash_client/models/get_custom_metrics_response_200_results_item.py b/lightdash_client/models/get_custom_metrics_response_200_results_item.py index 6689899..8a7e295 100644 --- a/lightdash_client/models/get_custom_metrics_response_200_results_item.py +++ b/lightdash_client/models/get_custom_metrics_response_200_results_item.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="GetCustomMetricsResponse200ResultsItem") diff --git a/lightdash_client/models/get_explore_response_200.py b/lightdash_client/models/get_explore_response_200.py index 2559015..53c14ce 100644 --- a/lightdash_client/models/get_explore_response_200.py +++ b/lightdash_client/models/get_explore_response_200.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.get_explore_response_200_status import GetExploreResponse200Status +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.explore import Explore @@ -25,6 +26,8 @@ class GetExploreResponse200: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.explore import Explore + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/get_github_list_repositories_response_200.py b/lightdash_client/models/get_github_list_repositories_response_200.py index c32d976..84982da 100644 --- a/lightdash_client/models/get_github_list_repositories_response_200.py +++ b/lightdash_client/models/get_github_list_repositories_response_200.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.get_github_list_repositories_response_200_status import ( - GetGithubListRepositoriesResponse200Status, -) +from ..models.get_github_list_repositories_response_200_status import GetGithubListRepositoriesResponse200Status +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.git_repo import GitRepo @@ -27,6 +26,8 @@ class GetGithubListRepositoriesResponse200: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.git_repo import GitRepo + results = [] for results_item_data in self.results: results_item = results_item_data.to_dict() diff --git a/lightdash_client/models/get_metadata_response_200.py b/lightdash_client/models/get_metadata_response_200.py index eb909a7..f8473a3 100644 --- a/lightdash_client/models/get_metadata_response_200.py +++ b/lightdash_client/models/get_metadata_response_200.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.get_metadata_response_200_status import GetMetadataResponse200Status +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.catalog_metadata import CatalogMetadata @@ -25,6 +26,8 @@ class GetMetadataResponse200: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.catalog_metadata import CatalogMetadata + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/get_user_warehouse_credentials_preference_response_200.py b/lightdash_client/models/get_user_warehouse_credentials_preference_response_200.py index fcb9005..63f0809 100644 --- a/lightdash_client/models/get_user_warehouse_credentials_preference_response_200.py +++ b/lightdash_client/models/get_user_warehouse_credentials_preference_response_200.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -28,6 +28,8 @@ class GetUserWarehouseCredentialsPreferenceResponse200: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.user_warehouse_credentials import UserWarehouseCredentials + status = self.status.value results: Union[Unset, Dict[str, Any]] = UNSET diff --git a/lightdash_client/models/get_warehouse_credentials_response_200.py b/lightdash_client/models/get_warehouse_credentials_response_200.py index d49437e..acfec6e 100644 --- a/lightdash_client/models/get_warehouse_credentials_response_200.py +++ b/lightdash_client/models/get_warehouse_credentials_response_200.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.get_warehouse_credentials_response_200_status import ( - GetWarehouseCredentialsResponse200Status, -) +from ..models.get_warehouse_credentials_response_200_status import GetWarehouseCredentialsResponse200Status +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.user_warehouse_credentials import UserWarehouseCredentials @@ -27,6 +26,8 @@ class GetWarehouseCredentialsResponse200: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.user_warehouse_credentials import UserWarehouseCredentials + results = [] for results_item_data in self.results: results_item = results_item_data.to_dict() diff --git a/lightdash_client/models/git_integration_configuration.py b/lightdash_client/models/git_integration_configuration.py index 82a2e08..8ebd9ff 100644 --- a/lightdash_client/models/git_integration_configuration.py +++ b/lightdash_client/models/git_integration_configuration.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="GitIntegrationConfiguration") diff --git a/lightdash_client/models/git_repo.py b/lightdash_client/models/git_repo.py index b2e5f0d..35bb91f 100644 --- a/lightdash_client/models/git_repo.py +++ b/lightdash_client/models/git_repo.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="GitRepo") diff --git a/lightdash_client/models/group.py b/lightdash_client/models/group.py index 5c05f55..159fcfd 100644 --- a/lightdash_client/models/group.py +++ b/lightdash_client/models/group.py @@ -1,10 +1,12 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from dateutil.parser import isoparse +from ..types import UNSET, Unset + T = TypeVar("T", bound="Group") @@ -13,12 +15,18 @@ class Group: """ Attributes: organization_uuid (str): The UUID of the organization that the group belongs to + updated_by_user_uuid (Union[None, str]): The UUID of the user that last updated the group + updated_at (datetime.datetime): The time that the group was last updated + created_by_user_uuid (Union[None, str]): The UUID of the user that created the group created_at (datetime.datetime): The time that the group was created name (str): A friendly name for the group uuid (str): The group's UUID """ organization_uuid: str + updated_by_user_uuid: Union[None, str] + updated_at: datetime.datetime + created_by_user_uuid: Union[None, str] created_at: datetime.datetime name: str uuid: str @@ -27,6 +35,14 @@ class Group: def to_dict(self) -> Dict[str, Any]: organization_uuid = self.organization_uuid + updated_by_user_uuid: Union[None, str] + updated_by_user_uuid = self.updated_by_user_uuid + + updated_at = self.updated_at.isoformat() + + created_by_user_uuid: Union[None, str] + created_by_user_uuid = self.created_by_user_uuid + created_at = self.created_at.isoformat() name = self.name @@ -38,6 +54,9 @@ def to_dict(self) -> Dict[str, Any]: field_dict.update( { "organizationUuid": organization_uuid, + "updatedByUserUuid": updated_by_user_uuid, + "updatedAt": updated_at, + "createdByUserUuid": created_by_user_uuid, "createdAt": created_at, "name": name, "uuid": uuid, @@ -51,6 +70,22 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() organization_uuid = d.pop("organizationUuid") + def _parse_updated_by_user_uuid(data: object) -> Union[None, str]: + if data is None: + return data + return cast(Union[None, str], data) + + updated_by_user_uuid = _parse_updated_by_user_uuid(d.pop("updatedByUserUuid")) + + updated_at = isoparse(d.pop("updatedAt")) + + def _parse_created_by_user_uuid(data: object) -> Union[None, str]: + if data is None: + return data + return cast(Union[None, str], data) + + created_by_user_uuid = _parse_created_by_user_uuid(d.pop("createdByUserUuid")) + created_at = isoparse(d.pop("createdAt")) name = d.pop("name") @@ -59,6 +94,9 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: group = cls( organization_uuid=organization_uuid, + updated_by_user_uuid=updated_by_user_uuid, + updated_at=updated_at, + created_by_user_uuid=created_by_user_uuid, created_at=created_at, name=name, uuid=uuid, diff --git a/lightdash_client/models/group_attribute_value.py b/lightdash_client/models/group_attribute_value.py index dafd4c8..bab9e9a 100644 --- a/lightdash_client/models/group_attribute_value.py +++ b/lightdash_client/models/group_attribute_value.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="GroupAttributeValue") diff --git a/lightdash_client/models/group_member.py b/lightdash_client/models/group_member.py index 4d4ed95..87c0717 100644 --- a/lightdash_client/models/group_member.py +++ b/lightdash_client/models/group_member.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="GroupMember") diff --git a/lightdash_client/models/group_with_members.py b/lightdash_client/models/group_with_members.py index 7d86f50..6fc0094 100644 --- a/lightdash_client/models/group_with_members.py +++ b/lightdash_client/models/group_with_members.py @@ -1,10 +1,12 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from dateutil.parser import isoparse +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.group_member import GroupMember @@ -18,6 +20,9 @@ class GroupWithMembers: Attributes: organization_uuid (str): The UUID of the organization that the group belongs to + updated_by_user_uuid (Union[None, str]): The UUID of the user that last updated the group + updated_at (datetime.datetime): The time that the group was last updated + created_by_user_uuid (Union[None, str]): The UUID of the user that created the group created_at (datetime.datetime): The time that the group was created name (str): A friendly name for the group uuid (str): The group's UUID @@ -26,6 +31,9 @@ class GroupWithMembers: """ organization_uuid: str + updated_by_user_uuid: Union[None, str] + updated_at: datetime.datetime + created_by_user_uuid: Union[None, str] created_at: datetime.datetime name: str uuid: str @@ -34,8 +42,18 @@ class GroupWithMembers: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.group_member import GroupMember + organization_uuid = self.organization_uuid + updated_by_user_uuid: Union[None, str] + updated_by_user_uuid = self.updated_by_user_uuid + + updated_at = self.updated_at.isoformat() + + created_by_user_uuid: Union[None, str] + created_by_user_uuid = self.created_by_user_uuid + created_at = self.created_at.isoformat() name = self.name @@ -54,6 +72,9 @@ def to_dict(self) -> Dict[str, Any]: field_dict.update( { "organizationUuid": organization_uuid, + "updatedByUserUuid": updated_by_user_uuid, + "updatedAt": updated_at, + "createdByUserUuid": created_by_user_uuid, "createdAt": created_at, "name": name, "uuid": uuid, @@ -71,6 +92,22 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() organization_uuid = d.pop("organizationUuid") + def _parse_updated_by_user_uuid(data: object) -> Union[None, str]: + if data is None: + return data + return cast(Union[None, str], data) + + updated_by_user_uuid = _parse_updated_by_user_uuid(d.pop("updatedByUserUuid")) + + updated_at = isoparse(d.pop("updatedAt")) + + def _parse_created_by_user_uuid(data: object) -> Union[None, str]: + if data is None: + return data + return cast(Union[None, str], data) + + created_by_user_uuid = _parse_created_by_user_uuid(d.pop("createdByUserUuid")) + created_at = isoparse(d.pop("createdAt")) name = d.pop("name") @@ -88,6 +125,9 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: group_with_members = cls( organization_uuid=organization_uuid, + updated_by_user_uuid=updated_by_user_uuid, + updated_at=updated_at, + created_by_user_uuid=created_by_user_uuid, created_at=created_at, name=name, uuid=uuid, diff --git a/lightdash_client/models/inline_error.py b/lightdash_client/models/inline_error.py index 6640e34..484b9f3 100644 --- a/lightdash_client/models/inline_error.py +++ b/lightdash_client/models/inline_error.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.inline_error_type import InlineErrorType +from ..types import UNSET, Unset T = TypeVar("T", bound="InlineError") diff --git a/lightdash_client/models/knex_paginate_args.py b/lightdash_client/models/knex_paginate_args.py index 13a6d4d..bb66fc9 100644 --- a/lightdash_client/models/knex_paginate_args.py +++ b/lightdash_client/models/knex_paginate_args.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="KnexPaginateArgs") diff --git a/lightdash_client/models/knex_paginated_data_api_metrics_catalog_results.py b/lightdash_client/models/knex_paginated_data_api_metrics_catalog_results.py new file mode 100644 index 0000000..d2298b9 --- /dev/null +++ b/lightdash_client/models/knex_paginated_data_api_metrics_catalog_results.py @@ -0,0 +1,105 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.catalog_field import CatalogField + from ..models.knex_paginated_data_api_metrics_catalog_results_pagination import ( + KnexPaginatedDataApiMetricsCatalogResultsPagination, + ) + + +T = TypeVar("T", bound="KnexPaginatedDataApiMetricsCatalogResults") + + +@_attrs_define +class KnexPaginatedDataApiMetricsCatalogResults: + """ + Attributes: + data (List['CatalogField']): + pagination (Union[Unset, KnexPaginatedDataApiMetricsCatalogResultsPagination]): + """ + + data: List["CatalogField"] + pagination: Union[Unset, "KnexPaginatedDataApiMetricsCatalogResultsPagination"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.catalog_field import CatalogField + from ..models.knex_paginated_data_api_metrics_catalog_results_pagination import ( + KnexPaginatedDataApiMetricsCatalogResultsPagination, + ) + + data = [] + for componentsschemas_api_metrics_catalog_results_item_data in self.data: + componentsschemas_api_metrics_catalog_results_item = ( + componentsschemas_api_metrics_catalog_results_item_data.to_dict() + ) + data.append(componentsschemas_api_metrics_catalog_results_item) + + pagination: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.pagination, Unset): + pagination = self.pagination.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + if pagination is not UNSET: + field_dict["pagination"] = pagination + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.catalog_field import CatalogField + from ..models.knex_paginated_data_api_metrics_catalog_results_pagination import ( + KnexPaginatedDataApiMetricsCatalogResultsPagination, + ) + + d = src_dict.copy() + data = [] + _data = d.pop("data") + for componentsschemas_api_metrics_catalog_results_item_data in _data: + componentsschemas_api_metrics_catalog_results_item = CatalogField.from_dict( + componentsschemas_api_metrics_catalog_results_item_data + ) + + data.append(componentsschemas_api_metrics_catalog_results_item) + + _pagination = d.pop("pagination", UNSET) + pagination: Union[Unset, KnexPaginatedDataApiMetricsCatalogResultsPagination] + if isinstance(_pagination, Unset): + pagination = UNSET + else: + pagination = KnexPaginatedDataApiMetricsCatalogResultsPagination.from_dict(_pagination) + + knex_paginated_data_api_metrics_catalog_results = cls( + data=data, + pagination=pagination, + ) + + knex_paginated_data_api_metrics_catalog_results.additional_properties = d + return knex_paginated_data_api_metrics_catalog_results + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/knex_paginated_data_api_metrics_catalog_results_pagination.py b/lightdash_client/models/knex_paginated_data_api_metrics_catalog_results_pagination.py new file mode 100644 index 0000000..bb0d831 --- /dev/null +++ b/lightdash_client/models/knex_paginated_data_api_metrics_catalog_results_pagination.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="KnexPaginatedDataApiMetricsCatalogResultsPagination") + + +@_attrs_define +class KnexPaginatedDataApiMetricsCatalogResultsPagination: + """ + Attributes: + page (float): + page_size (float): + total_results (float): + total_page_count (float): + """ + + page: float + page_size: float + total_results: float + total_page_count: float + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + page = self.page + + page_size = self.page_size + + total_results = self.total_results + + total_page_count = self.total_page_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "page": page, + "pageSize": page_size, + "totalResults": total_results, + "totalPageCount": total_page_count, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + page = d.pop("page") + + page_size = d.pop("pageSize") + + total_results = d.pop("totalResults") + + total_page_count = d.pop("totalPageCount") + + knex_paginated_data_api_metrics_catalog_results_pagination = cls( + page=page, + page_size=page_size, + total_results=total_results, + total_page_count=total_page_count, + ) + + knex_paginated_data_api_metrics_catalog_results_pagination.additional_properties = d + return knex_paginated_data_api_metrics_catalog_results_pagination + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/knex_paginated_data_group_array_or_group_with_members_array.py b/lightdash_client/models/knex_paginated_data_group_array_or_group_with_members_array.py new file mode 100644 index 0000000..c17af38 --- /dev/null +++ b/lightdash_client/models/knex_paginated_data_group_array_or_group_with_members_array.py @@ -0,0 +1,133 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.group import Group + from ..models.group_with_members import GroupWithMembers + from ..models.knex_paginated_data_group_array_or_group_with_members_array_pagination import ( + KnexPaginatedDataGroupArrayOrGroupWithMembersArrayPagination, + ) + + +T = TypeVar("T", bound="KnexPaginatedDataGroupArrayOrGroupWithMembersArray") + + +@_attrs_define +class KnexPaginatedDataGroupArrayOrGroupWithMembersArray: + """ + Attributes: + data (Union[List['Group'], List['GroupWithMembers']]): + pagination (Union[Unset, KnexPaginatedDataGroupArrayOrGroupWithMembersArrayPagination]): + """ + + data: Union[List["Group"], List["GroupWithMembers"]] + pagination: Union[Unset, "KnexPaginatedDataGroupArrayOrGroupWithMembersArrayPagination"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.group import Group + from ..models.group_with_members import GroupWithMembers + from ..models.knex_paginated_data_group_array_or_group_with_members_array_pagination import ( + KnexPaginatedDataGroupArrayOrGroupWithMembersArrayPagination, + ) + + data: List[Dict[str, Any]] + if isinstance(self.data, list): + data = [] + for data_type_0_item_data in self.data: + data_type_0_item = data_type_0_item_data.to_dict() + data.append(data_type_0_item) + + else: + data = [] + for data_type_1_item_data in self.data: + data_type_1_item = data_type_1_item_data.to_dict() + data.append(data_type_1_item) + + pagination: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.pagination, Unset): + pagination = self.pagination.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + if pagination is not UNSET: + field_dict["pagination"] = pagination + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.group import Group + from ..models.group_with_members import GroupWithMembers + from ..models.knex_paginated_data_group_array_or_group_with_members_array_pagination import ( + KnexPaginatedDataGroupArrayOrGroupWithMembersArrayPagination, + ) + + d = src_dict.copy() + + def _parse_data(data: object) -> Union[List["Group"], List["GroupWithMembers"]]: + try: + if not isinstance(data, list): + raise TypeError() + data_type_0 = [] + _data_type_0 = data + for data_type_0_item_data in _data_type_0: + data_type_0_item = Group.from_dict(data_type_0_item_data) + + data_type_0.append(data_type_0_item) + + return data_type_0 + except: # noqa: E722 + pass + if not isinstance(data, list): + raise TypeError() + data_type_1 = [] + _data_type_1 = data + for data_type_1_item_data in _data_type_1: + data_type_1_item = GroupWithMembers.from_dict(data_type_1_item_data) + + data_type_1.append(data_type_1_item) + + return data_type_1 + + data = _parse_data(d.pop("data")) + + _pagination = d.pop("pagination", UNSET) + pagination: Union[Unset, KnexPaginatedDataGroupArrayOrGroupWithMembersArrayPagination] + if isinstance(_pagination, Unset): + pagination = UNSET + else: + pagination = KnexPaginatedDataGroupArrayOrGroupWithMembersArrayPagination.from_dict(_pagination) + + knex_paginated_data_group_array_or_group_with_members_array = cls( + data=data, + pagination=pagination, + ) + + knex_paginated_data_group_array_or_group_with_members_array.additional_properties = d + return knex_paginated_data_group_array_or_group_with_members_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/knex_paginated_data_group_array_or_group_with_members_array_pagination.py b/lightdash_client/models/knex_paginated_data_group_array_or_group_with_members_array_pagination.py new file mode 100644 index 0000000..ad6e9f2 --- /dev/null +++ b/lightdash_client/models/knex_paginated_data_group_array_or_group_with_members_array_pagination.py @@ -0,0 +1,84 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="KnexPaginatedDataGroupArrayOrGroupWithMembersArrayPagination") + + +@_attrs_define +class KnexPaginatedDataGroupArrayOrGroupWithMembersArrayPagination: + """ + Attributes: + page (float): + page_size (float): + total_results (float): + total_page_count (float): + """ + + page: float + page_size: float + total_results: float + total_page_count: float + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + page = self.page + + page_size = self.page_size + + total_results = self.total_results + + total_page_count = self.total_page_count + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "page": page, + "pageSize": page_size, + "totalResults": total_results, + "totalPageCount": total_page_count, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + page = d.pop("page") + + page_size = d.pop("pageSize") + + total_results = d.pop("totalResults") + + total_page_count = d.pop("totalPageCount") + + knex_paginated_data_group_array_or_group_with_members_array_pagination = cls( + page=page, + page_size=page_size, + total_results=total_results, + total_page_count=total_page_count, + ) + + knex_paginated_data_group_array_or_group_with_members_array_pagination.additional_properties = d + return knex_paginated_data_group_array_or_group_with_members_array_pagination + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/knex_paginated_data_organization_member_profile_array.py b/lightdash_client/models/knex_paginated_data_organization_member_profile_array.py index 4d60614..a2519a3 100644 --- a/lightdash_client/models/knex_paginated_data_organization_member_profile_array.py +++ b/lightdash_client/models/knex_paginated_data_organization_member_profile_array.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -28,6 +28,11 @@ class KnexPaginatedDataOrganizationMemberProfileArray: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.knex_paginated_data_organization_member_profile_array_pagination import ( + KnexPaginatedDataOrganizationMemberProfileArrayPagination, + ) + from ..models.organization_member_profile import OrganizationMemberProfile + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() diff --git a/lightdash_client/models/knex_paginated_data_organization_member_profile_array_pagination.py b/lightdash_client/models/knex_paginated_data_organization_member_profile_array_pagination.py index ea5bda4..ddb388e 100644 --- a/lightdash_client/models/knex_paginated_data_organization_member_profile_array_pagination.py +++ b/lightdash_client/models/knex_paginated_data_organization_member_profile_array_pagination.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="KnexPaginatedDataOrganizationMemberProfileArrayPagination") @@ -12,11 +14,13 @@ class KnexPaginatedDataOrganizationMemberProfileArrayPagination: Attributes: page (float): page_size (float): + total_results (float): total_page_count (float): """ page: float page_size: float + total_results: float total_page_count: float additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -25,6 +29,8 @@ def to_dict(self) -> Dict[str, Any]: page_size = self.page_size + total_results = self.total_results + total_page_count = self.total_page_count field_dict: Dict[str, Any] = {} @@ -33,6 +39,7 @@ def to_dict(self) -> Dict[str, Any]: { "page": page, "pageSize": page_size, + "totalResults": total_results, "totalPageCount": total_page_count, } ) @@ -46,11 +53,14 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: page_size = d.pop("pageSize") + total_results = d.pop("totalResults") + total_page_count = d.pop("totalPageCount") knex_paginated_data_organization_member_profile_array_pagination = cls( page=page, page_size=page_size, + total_results=total_results, total_page_count=total_page_count, ) diff --git a/lightdash_client/models/lightdash_user.py b/lightdash_client/models/lightdash_user.py index 454176a..608a900 100644 --- a/lightdash_client/models/lightdash_user.py +++ b/lightdash_client/models/lightdash_user.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -21,12 +21,15 @@ class LightdashUser: is_tracking_anonymized (bool): is_marketing_opted_in (bool): is_setup_complete (bool): - is_active (bool): + created_at (datetime.datetime): + updated_at (datetime.datetime): + is_active (bool): Whether the user can login email (Union[Unset, str]): organization_uuid (Union[Unset, str]): organization_name (Union[Unset, str]): organization_created_at (Union[Unset, datetime.datetime]): role (Union[Unset, OrganizationMemberRole]): + is_pending (Union[Unset, bool]): Whether the user doesn't have an authentication method (password or openId) """ user_uuid: str @@ -35,12 +38,15 @@ class LightdashUser: is_tracking_anonymized: bool is_marketing_opted_in: bool is_setup_complete: bool + created_at: datetime.datetime + updated_at: datetime.datetime is_active: bool email: Union[Unset, str] = UNSET organization_uuid: Union[Unset, str] = UNSET organization_name: Union[Unset, str] = UNSET organization_created_at: Union[Unset, datetime.datetime] = UNSET role: Union[Unset, OrganizationMemberRole] = UNSET + is_pending: Union[Unset, bool] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -56,6 +62,10 @@ def to_dict(self) -> Dict[str, Any]: is_setup_complete = self.is_setup_complete + created_at = self.created_at.isoformat() + + updated_at = self.updated_at.isoformat() + is_active = self.is_active email = self.email @@ -72,6 +82,8 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.role, Unset): role = self.role.value + is_pending = self.is_pending + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -82,6 +94,8 @@ def to_dict(self) -> Dict[str, Any]: "isTrackingAnonymized": is_tracking_anonymized, "isMarketingOptedIn": is_marketing_opted_in, "isSetupComplete": is_setup_complete, + "createdAt": created_at, + "updatedAt": updated_at, "isActive": is_active, } ) @@ -95,6 +109,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["organizationCreatedAt"] = organization_created_at if role is not UNSET: field_dict["role"] = role + if is_pending is not UNSET: + field_dict["isPending"] = is_pending return field_dict @@ -113,6 +129,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: is_setup_complete = d.pop("isSetupComplete") + created_at = isoparse(d.pop("createdAt")) + + updated_at = isoparse(d.pop("updatedAt")) + is_active = d.pop("isActive") email = d.pop("email", UNSET) @@ -135,6 +155,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: role = OrganizationMemberRole(_role) + is_pending = d.pop("isPending", UNSET) + lightdash_user = cls( user_uuid=user_uuid, first_name=first_name, @@ -142,12 +164,15 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: is_tracking_anonymized=is_tracking_anonymized, is_marketing_opted_in=is_marketing_opted_in, is_setup_complete=is_setup_complete, + created_at=created_at, + updated_at=updated_at, is_active=is_active, email=email, organization_uuid=organization_uuid, organization_name=organization_name, organization_created_at=organization_created_at, role=role, + is_pending=is_pending, ) lightdash_user.additional_properties = d diff --git a/lightdash_client/models/login_options.py b/lightdash_client/models/login_options.py index eab4f0e..7c52ca0 100644 --- a/lightdash_client/models/login_options.py +++ b/lightdash_client/models/login_options.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/mark_line.py b/lightdash_client/models/mark_line.py index 8ccc7a6..de4b1e4 100644 --- a/lightdash_client/models/mark_line.py +++ b/lightdash_client/models/mark_line.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -31,6 +31,10 @@ class MarkLine: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.mark_line_data import MarkLineData + from ..models.mark_line_label import MarkLineLabel + from ..models.mark_line_line_style import MarkLineLineStyle + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() diff --git a/lightdash_client/models/mark_line_data.py b/lightdash_client/models/mark_line_data.py index 1f18723..cfaaccf 100644 --- a/lightdash_client/models/mark_line_data.py +++ b/lightdash_client/models/mark_line_data.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -41,6 +41,9 @@ class MarkLineData: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.mark_line_data_label import MarkLineDataLabel + from ..models.mark_line_data_line_style import MarkLineDataLineStyle + uuid = self.uuid dynamic_value: Union[Unset, str] = UNSET diff --git a/lightdash_client/models/mark_line_data_label.py b/lightdash_client/models/mark_line_data_label.py index 364cec0..10a97d7 100644 --- a/lightdash_client/models/mark_line_data_label.py +++ b/lightdash_client/models/mark_line_data_label.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/mark_line_data_line_style.py b/lightdash_client/models/mark_line_data_line_style.py index b7c4524..3aa6a68 100644 --- a/lightdash_client/models/mark_line_data_line_style.py +++ b/lightdash_client/models/mark_line_data_line_style.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="MarkLineDataLineStyle") diff --git a/lightdash_client/models/mark_line_label.py b/lightdash_client/models/mark_line_label.py index c148ece..aeb4665 100644 --- a/lightdash_client/models/mark_line_label.py +++ b/lightdash_client/models/mark_line_label.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/mark_line_line_style.py b/lightdash_client/models/mark_line_line_style.py index a5cbe4e..0ddc6ca 100644 --- a/lightdash_client/models/mark_line_line_style.py +++ b/lightdash_client/models/mark_line_line_style.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="MarkLineLineStyle") diff --git a/lightdash_client/models/metric_explorer_comparison_differentmetric.py b/lightdash_client/models/metric_explorer_comparison_differentmetric.py new file mode 100644 index 0000000..266e2d7 --- /dev/null +++ b/lightdash_client/models/metric_explorer_comparison_differentmetric.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class MetricExplorerComparisonDIFFERENTMETRIC(str, Enum): + DIFFERENT_METRIC = "different_metric" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/metric_explorer_comparison_none.py b/lightdash_client/models/metric_explorer_comparison_none.py new file mode 100644 index 0000000..f13d118 --- /dev/null +++ b/lightdash_client/models/metric_explorer_comparison_none.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class MetricExplorerComparisonNONE(str, Enum): + NONE = "none" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/metric_explorer_comparison_previousperiod.py b/lightdash_client/models/metric_explorer_comparison_previousperiod.py new file mode 100644 index 0000000..b002aed --- /dev/null +++ b/lightdash_client/models/metric_explorer_comparison_previousperiod.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class MetricExplorerComparisonPREVIOUSPERIOD(str, Enum): + PREVIOUS_PERIOD = "previous_period" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/metric_explorer_comparison_type_type_0.py b/lightdash_client/models/metric_explorer_comparison_type_type_0.py new file mode 100644 index 0000000..09e88ab --- /dev/null +++ b/lightdash_client/models/metric_explorer_comparison_type_type_0.py @@ -0,0 +1,61 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.metric_explorer_comparison_none import MetricExplorerComparisonNONE +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MetricExplorerComparisonTypeType0") + + +@_attrs_define +class MetricExplorerComparisonTypeType0: + """ + Attributes: + type (MetricExplorerComparisonNONE): + """ + + type: MetricExplorerComparisonNONE + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = MetricExplorerComparisonNONE(d.pop("type")) + + metric_explorer_comparison_type_type_0 = cls( + type=type, + ) + + metric_explorer_comparison_type_type_0.additional_properties = d + return metric_explorer_comparison_type_type_0 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/metric_explorer_comparison_type_type_1.py b/lightdash_client/models/metric_explorer_comparison_type_type_1.py new file mode 100644 index 0000000..3507ca5 --- /dev/null +++ b/lightdash_client/models/metric_explorer_comparison_type_type_1.py @@ -0,0 +1,61 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.metric_explorer_comparison_previousperiod import MetricExplorerComparisonPREVIOUSPERIOD +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MetricExplorerComparisonTypeType1") + + +@_attrs_define +class MetricExplorerComparisonTypeType1: + """ + Attributes: + type (MetricExplorerComparisonPREVIOUSPERIOD): + """ + + type: MetricExplorerComparisonPREVIOUSPERIOD + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = MetricExplorerComparisonPREVIOUSPERIOD(d.pop("type")) + + metric_explorer_comparison_type_type_1 = cls( + type=type, + ) + + metric_explorer_comparison_type_type_1.additional_properties = d + return metric_explorer_comparison_type_type_1 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/metric_explorer_comparison_type_type_2.py b/lightdash_client/models/metric_explorer_comparison_type_type_2.py new file mode 100644 index 0000000..12bec44 --- /dev/null +++ b/lightdash_client/models/metric_explorer_comparison_type_type_2.py @@ -0,0 +1,77 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.metric_explorer_comparison_differentmetric import MetricExplorerComparisonDIFFERENTMETRIC +from ..types import UNSET, Unset + +T = TypeVar("T", bound="MetricExplorerComparisonTypeType2") + + +@_attrs_define +class MetricExplorerComparisonTypeType2: + """ + Attributes: + metric_name (str): + metric_table (str): + type (MetricExplorerComparisonDIFFERENTMETRIC): + """ + + metric_name: str + metric_table: str + type: MetricExplorerComparisonDIFFERENTMETRIC + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + metric_name = self.metric_name + + metric_table = self.metric_table + + type = self.type.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "metricName": metric_name, + "metricTable": metric_table, + "type": type, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + metric_name = d.pop("metricName") + + metric_table = d.pop("metricTable") + + type = MetricExplorerComparisonDIFFERENTMETRIC(d.pop("type")) + + metric_explorer_comparison_type_type_2 = cls( + metric_name=metric_name, + metric_table=metric_table, + type=type, + ) + + metric_explorer_comparison_type_type_2.additional_properties = d + return metric_explorer_comparison_type_type_2 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/metric_filter_rule.py b/lightdash_client/models/metric_filter_rule.py index 430907a..4ef5ac8 100644 --- a/lightdash_client/models/metric_filter_rule.py +++ b/lightdash_client/models/metric_filter_rule.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -36,6 +36,8 @@ class MetricFilterRule: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.metric_filter_rule_target import MetricFilterRuleTarget + operator = self.operator.value id = self.id diff --git a/lightdash_client/models/metric_filter_rule_target.py b/lightdash_client/models/metric_filter_rule_target.py index 97b0706..a58521c 100644 --- a/lightdash_client/models/metric_filter_rule_target.py +++ b/lightdash_client/models/metric_filter_rule_target.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="MetricFilterRuleTarget") diff --git a/lightdash_client/models/metric_query.py b/lightdash_client/models/metric_query.py index 8b7aefe..e5efc82 100644 --- a/lightdash_client/models/metric_query.py +++ b/lightdash_client/models/metric_query.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -49,7 +49,13 @@ class MetricQuery: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.additional_metric import AdditionalMetric from ..models.custom_bin_dimension import CustomBinDimension + from ..models.custom_sql_dimension import CustomSqlDimension + from ..models.filters import Filters + from ..models.metric_query_metadata import MetricQueryMetadata + from ..models.sort_field import SortField + from ..models.table_calculation import TableCalculation table_calculations = [] for table_calculations_item_data in self.table_calculations: diff --git a/lightdash_client/models/metric_query_metadata.py b/lightdash_client/models/metric_query_metadata.py index 70e5eaa..21f04b3 100644 --- a/lightdash_client/models/metric_query_metadata.py +++ b/lightdash_client/models/metric_query_metadata.py @@ -1,12 +1,12 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: - from ..models.pick_compiled_dimension_label_or_name import ( - PickCompiledDimensionLabelOrName, - ) + from ..models.pick_compiled_dimension_label_or_name import PickCompiledDimensionLabelOrName T = TypeVar("T", bound="MetricQueryMetadata") @@ -24,6 +24,8 @@ class MetricQueryMetadata: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pick_compiled_dimension_label_or_name import PickCompiledDimensionLabelOrName + has_a_date_dimension = self.has_a_date_dimension.to_dict() field_dict: Dict[str, Any] = {} @@ -38,9 +40,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.pick_compiled_dimension_label_or_name import ( - PickCompiledDimensionLabelOrName, - ) + from ..models.pick_compiled_dimension_label_or_name import PickCompiledDimensionLabelOrName d = src_dict.copy() has_a_date_dimension = PickCompiledDimensionLabelOrName.from_dict(d.pop("hasADateDimension")) diff --git a/lightdash_client/models/metric_query_request.py b/lightdash_client/models/metric_query_request.py index d336c29..a54781a 100644 --- a/lightdash_client/models/metric_query_request.py +++ b/lightdash_client/models/metric_query_request.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -54,7 +54,13 @@ class MetricQueryRequest: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.additional_metric import AdditionalMetric from ..models.custom_bin_dimension import CustomBinDimension + from ..models.custom_sql_dimension import CustomSqlDimension + from ..models.metric_query_request_filters import MetricQueryRequestFilters + from ..models.metric_query_request_metadata import MetricQueryRequestMetadata + from ..models.sort_field import SortField + from ..models.table_calculation import TableCalculation table_calculations = [] for table_calculations_item_data in self.table_calculations: diff --git a/lightdash_client/models/metric_query_request_filters.py b/lightdash_client/models/metric_query_request_filters.py index fc0ca17..3299f92 100644 --- a/lightdash_client/models/metric_query_request_filters.py +++ b/lightdash_client/models/metric_query_request_filters.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/metric_query_request_metadata.py b/lightdash_client/models/metric_query_request_metadata.py index 89bc7ff..4820fa0 100644 --- a/lightdash_client/models/metric_query_request_metadata.py +++ b/lightdash_client/models/metric_query_request_metadata.py @@ -1,12 +1,12 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: - from ..models.pick_compiled_dimension_label_or_name import ( - PickCompiledDimensionLabelOrName, - ) + from ..models.pick_compiled_dimension_label_or_name import PickCompiledDimensionLabelOrName T = TypeVar("T", bound="MetricQueryRequestMetadata") @@ -24,6 +24,8 @@ class MetricQueryRequestMetadata: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pick_compiled_dimension_label_or_name import PickCompiledDimensionLabelOrName + has_a_date_dimension = self.has_a_date_dimension.to_dict() field_dict: Dict[str, Any] = {} @@ -38,9 +40,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.pick_compiled_dimension_label_or_name import ( - PickCompiledDimensionLabelOrName, - ) + from ..models.pick_compiled_dimension_label_or_name import PickCompiledDimensionLabelOrName d = src_dict.copy() has_a_date_dimension = PickCompiledDimensionLabelOrName.from_dict(d.pop("hasADateDimension")) diff --git a/lightdash_client/models/metric_query_response.py b/lightdash_client/models/metric_query_response.py index 8495ff7..d493a7f 100644 --- a/lightdash_client/models/metric_query_response.py +++ b/lightdash_client/models/metric_query_response.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -47,7 +47,13 @@ class MetricQueryResponse: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.additional_metric import AdditionalMetric from ..models.custom_bin_dimension import CustomBinDimension + from ..models.custom_sql_dimension import CustomSqlDimension + from ..models.filters_response import FiltersResponse + from ..models.metric_query_response_metadata import MetricQueryResponseMetadata + from ..models.sort_field import SortField + from ..models.table_calculation import TableCalculation table_calculations = [] for table_calculations_item_data in self.table_calculations: diff --git a/lightdash_client/models/metric_query_response_metadata.py b/lightdash_client/models/metric_query_response_metadata.py index a2c1d7a..1f0d4f5 100644 --- a/lightdash_client/models/metric_query_response_metadata.py +++ b/lightdash_client/models/metric_query_response_metadata.py @@ -1,12 +1,12 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: - from ..models.pick_compiled_dimension_label_or_name import ( - PickCompiledDimensionLabelOrName, - ) + from ..models.pick_compiled_dimension_label_or_name import PickCompiledDimensionLabelOrName T = TypeVar("T", bound="MetricQueryResponseMetadata") @@ -24,6 +24,8 @@ class MetricQueryResponseMetadata: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pick_compiled_dimension_label_or_name import PickCompiledDimensionLabelOrName + has_a_date_dimension = self.has_a_date_dimension.to_dict() field_dict: Dict[str, Any] = {} @@ -38,9 +40,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.pick_compiled_dimension_label_or_name import ( - PickCompiledDimensionLabelOrName, - ) + from ..models.pick_compiled_dimension_label_or_name import PickCompiledDimensionLabelOrName d = src_dict.copy() has_a_date_dimension = PickCompiledDimensionLabelOrName.from_dict(d.pop("hasADateDimension")) diff --git a/lightdash_client/models/notification_base.py b/lightdash_client/models/notification_base.py index 1e7ad3e..89a619d 100644 --- a/lightdash_client/models/notification_base.py +++ b/lightdash_client/models/notification_base.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/notification_dashboard_comment.py b/lightdash_client/models/notification_dashboard_comment.py index f809f2a..b34181e 100644 --- a/lightdash_client/models/notification_dashboard_comment.py +++ b/lightdash_client/models/notification_dashboard_comment.py @@ -1,19 +1,15 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from dateutil.parser import isoparse -from ..models.api_notification_resource_type_dashboard_comments import ( - ApiNotificationResourceTypeDashboardComments, -) +from ..models.api_notification_resource_type_dashboard_comments import ApiNotificationResourceTypeDashboardComments from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.notification_dashboard_tile_comment_metadata import ( - NotificationDashboardTileCommentMetadata, - ) + from ..models.notification_dashboard_tile_comment_metadata import NotificationDashboardTileCommentMetadata T = TypeVar("T", bound="NotificationDashboardComment") @@ -44,6 +40,8 @@ class NotificationDashboardComment: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.notification_dashboard_tile_comment_metadata import NotificationDashboardTileCommentMetadata + viewed = self.viewed created_at = self.created_at.isoformat() @@ -85,9 +83,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.notification_dashboard_tile_comment_metadata import ( - NotificationDashboardTileCommentMetadata, - ) + from ..models.notification_dashboard_tile_comment_metadata import NotificationDashboardTileCommentMetadata d = src_dict.copy() viewed = d.pop("viewed") diff --git a/lightdash_client/models/notification_dashboard_tile_comment_metadata.py b/lightdash_client/models/notification_dashboard_tile_comment_metadata.py index 8eee7e5..497bf51 100644 --- a/lightdash_client/models/notification_dashboard_tile_comment_metadata.py +++ b/lightdash_client/models/notification_dashboard_tile_comment_metadata.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="NotificationDashboardTileCommentMetadata") diff --git a/lightdash_client/models/or_filter_group.py b/lightdash_client/models/or_filter_group.py index 2999c17..aaec540 100644 --- a/lightdash_client/models/or_filter_group.py +++ b/lightdash_client/models/or_filter_group.py @@ -1,8 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.and_filter_group import AndFilterGroup from ..models.filter_rule import FilterRule @@ -25,6 +27,7 @@ class OrFilterGroup: def to_dict(self) -> Dict[str, Any]: from ..models.and_filter_group import AndFilterGroup + from ..models.filter_rule import FilterRule or_ = [] for or_item_data in self.or_: diff --git a/lightdash_client/models/organization.py b/lightdash_client/models/organization.py index 769c3f3..e8f81b4 100644 --- a/lightdash_client/models/organization.py +++ b/lightdash_client/models/organization.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/organization_member_profile.py b/lightdash_client/models/organization_member_profile.py index 9241cfc..c7ebf28 100644 --- a/lightdash_client/models/organization_member_profile.py +++ b/lightdash_client/models/organization_member_profile.py @@ -1,7 +1,9 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +import datetime +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from dateutil.parser import isoparse from ..models.organization_member_role import OrganizationMemberRole from ..types import UNSET, Unset @@ -14,13 +16,16 @@ class OrganizationMemberProfile: """Profile for a user's membership in an organization Attributes: - is_active (bool): Whether the user has accepted their invite to the organization + is_active (bool): Whether the user can login role (OrganizationMemberRole): organization_uuid (str): Unique identifier for the organization the user is a member of email (str): last_name (str): first_name (str): + user_updated_at (datetime.datetime): + user_created_at (datetime.datetime): user_uuid (str): Unique identifier for the user + is_pending (Union[Unset, bool]): Whether the user doesn't have an authentication method (password or openId) is_invite_expired (Union[Unset, bool]): Whether the user's invite to the organization has expired """ @@ -30,7 +35,10 @@ class OrganizationMemberProfile: email: str last_name: str first_name: str + user_updated_at: datetime.datetime + user_created_at: datetime.datetime user_uuid: str + is_pending: Union[Unset, bool] = UNSET is_invite_expired: Union[Unset, bool] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -47,8 +55,14 @@ def to_dict(self) -> Dict[str, Any]: first_name = self.first_name + user_updated_at = self.user_updated_at.isoformat() + + user_created_at = self.user_created_at.isoformat() + user_uuid = self.user_uuid + is_pending = self.is_pending + is_invite_expired = self.is_invite_expired field_dict: Dict[str, Any] = {} @@ -61,9 +75,13 @@ def to_dict(self) -> Dict[str, Any]: "email": email, "lastName": last_name, "firstName": first_name, + "userUpdatedAt": user_updated_at, + "userCreatedAt": user_created_at, "userUuid": user_uuid, } ) + if is_pending is not UNSET: + field_dict["isPending"] = is_pending if is_invite_expired is not UNSET: field_dict["isInviteExpired"] = is_invite_expired @@ -84,8 +102,14 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: first_name = d.pop("firstName") + user_updated_at = isoparse(d.pop("userUpdatedAt")) + + user_created_at = isoparse(d.pop("userCreatedAt")) + user_uuid = d.pop("userUuid") + is_pending = d.pop("isPending", UNSET) + is_invite_expired = d.pop("isInviteExpired", UNSET) organization_member_profile = cls( @@ -95,7 +119,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: email=email, last_name=last_name, first_name=first_name, + user_updated_at=user_updated_at, + user_created_at=user_created_at, user_uuid=user_uuid, + is_pending=is_pending, is_invite_expired=is_invite_expired, ) diff --git a/lightdash_client/models/organization_member_profile_update.py b/lightdash_client/models/organization_member_profile_update.py index 66bad9f..7c171b0 100644 --- a/lightdash_client/models/organization_member_profile_update.py +++ b/lightdash_client/models/organization_member_profile_update.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.organization_member_role import OrganizationMemberRole +from ..types import UNSET, Unset T = TypeVar("T", bound="OrganizationMemberProfileUpdate") diff --git a/lightdash_client/models/organization_project.py b/lightdash_client/models/organization_project.py index 0ad043f..dd67220 100644 --- a/lightdash_client/models/organization_project.py +++ b/lightdash_client/models/organization_project.py @@ -1,10 +1,11 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.project_type import ProjectType from ..models.warehouse_types import WarehouseTypes +from ..types import UNSET, Unset T = TypeVar("T", bound="OrganizationProject") @@ -16,6 +17,8 @@ class OrganizationProject: Attributes: require_user_credentials (bool): warehouse_type (WarehouseTypes): + upstream_project_uuid (Union[None, str]): + created_by_user_uuid (Union[None, str]): type (ProjectType): name (str): project_uuid (str): The unique identifier of the project @@ -23,6 +26,8 @@ class OrganizationProject: require_user_credentials: bool warehouse_type: WarehouseTypes + upstream_project_uuid: Union[None, str] + created_by_user_uuid: Union[None, str] type: ProjectType name: str project_uuid: str @@ -33,6 +38,12 @@ def to_dict(self) -> Dict[str, Any]: warehouse_type = self.warehouse_type.value + upstream_project_uuid: Union[None, str] + upstream_project_uuid = self.upstream_project_uuid + + created_by_user_uuid: Union[None, str] + created_by_user_uuid = self.created_by_user_uuid + type = self.type.value name = self.name @@ -45,6 +56,8 @@ def to_dict(self) -> Dict[str, Any]: { "requireUserCredentials": require_user_credentials, "warehouseType": warehouse_type, + "upstreamProjectUuid": upstream_project_uuid, + "createdByUserUuid": created_by_user_uuid, "type": type, "name": name, "projectUuid": project_uuid, @@ -60,6 +73,20 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: warehouse_type = WarehouseTypes(d.pop("warehouseType")) + def _parse_upstream_project_uuid(data: object) -> Union[None, str]: + if data is None: + return data + return cast(Union[None, str], data) + + upstream_project_uuid = _parse_upstream_project_uuid(d.pop("upstreamProjectUuid")) + + def _parse_created_by_user_uuid(data: object) -> Union[None, str]: + if data is None: + return data + return cast(Union[None, str], data) + + created_by_user_uuid = _parse_created_by_user_uuid(d.pop("createdByUserUuid")) + type = ProjectType(d.pop("type")) name = d.pop("name") @@ -69,6 +96,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: organization_project = cls( require_user_credentials=require_user_credentials, warehouse_type=warehouse_type, + upstream_project_uuid=upstream_project_uuid, + created_by_user_uuid=created_by_user_uuid, type=type, name=name, project_uuid=project_uuid, diff --git a/lightdash_client/models/partial_complete_cartesian_chart_layout.py b/lightdash_client/models/partial_complete_cartesian_chart_layout.py index a846601..4448173 100644 --- a/lightdash_client/models/partial_complete_cartesian_chart_layout.py +++ b/lightdash_client/models/partial_complete_cartesian_chart_layout.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/partial_complete_e_charts_config.py b/lightdash_client/models/partial_complete_e_charts_config.py index 42fa6ae..4d24e99 100644 --- a/lightdash_client/models/partial_complete_e_charts_config.py +++ b/lightdash_client/models/partial_complete_e_charts_config.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -35,6 +35,11 @@ class PartialCompleteEChartsConfig: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.axis import Axis + from ..models.echarts_grid import EchartsGrid + from ..models.echarts_legend import EchartsLegend + from ..models.series import Series + legend: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.legend, Unset): legend = self.legend.to_dict() diff --git a/lightdash_client/models/partial_cube_semantic_layer_connection.py b/lightdash_client/models/partial_cube_semantic_layer_connection.py new file mode 100644 index 0000000..c422db2 --- /dev/null +++ b/lightdash_client/models/partial_cube_semantic_layer_connection.py @@ -0,0 +1,85 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.semantic_layer_type_cube import SemanticLayerTypeCUBE +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PartialCubeSemanticLayerConnection") + + +@_attrs_define +class PartialCubeSemanticLayerConnection: + """Make all properties in T optional + + Attributes: + type (Union[Unset, SemanticLayerTypeCUBE]): + domain (Union[Unset, str]): + token (Union[Unset, str]): + """ + + type: Union[Unset, SemanticLayerTypeCUBE] = UNSET + domain: Union[Unset, str] = UNSET + token: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + domain = self.domain + + token = self.token + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if domain is not UNSET: + field_dict["domain"] = domain + if token is not UNSET: + field_dict["token"] = token + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, SemanticLayerTypeCUBE] + if isinstance(_type, Unset): + type = UNSET + else: + type = SemanticLayerTypeCUBE(_type) + + domain = d.pop("domain", UNSET) + + token = d.pop("token", UNSET) + + partial_cube_semantic_layer_connection = cls( + type=type, + domain=domain, + token=token, + ) + + partial_cube_semantic_layer_connection.additional_properties = d + return partial_cube_semantic_layer_connection + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/partial_dbt_semantic_layer_connection.py b/lightdash_client/models/partial_dbt_semantic_layer_connection.py new file mode 100644 index 0000000..044cded --- /dev/null +++ b/lightdash_client/models/partial_dbt_semantic_layer_connection.py @@ -0,0 +1,94 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.semantic_layer_type_dbt import SemanticLayerTypeDBT +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PartialDbtSemanticLayerConnection") + + +@_attrs_define +class PartialDbtSemanticLayerConnection: + """Make all properties in T optional + + Attributes: + type (Union[Unset, SemanticLayerTypeDBT]): + environment_id (Union[Unset, str]): + domain (Union[Unset, str]): + token (Union[Unset, str]): + """ + + type: Union[Unset, SemanticLayerTypeDBT] = UNSET + environment_id: Union[Unset, str] = UNSET + domain: Union[Unset, str] = UNSET + token: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + + environment_id = self.environment_id + + domain = self.domain + + token = self.token + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if type is not UNSET: + field_dict["type"] = type + if environment_id is not UNSET: + field_dict["environmentId"] = environment_id + if domain is not UNSET: + field_dict["domain"] = domain + if token is not UNSET: + field_dict["token"] = token + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + _type = d.pop("type", UNSET) + type: Union[Unset, SemanticLayerTypeDBT] + if isinstance(_type, Unset): + type = UNSET + else: + type = SemanticLayerTypeDBT(_type) + + environment_id = d.pop("environmentId", UNSET) + + domain = d.pop("domain", UNSET) + + token = d.pop("token", UNSET) + + partial_dbt_semantic_layer_connection = cls( + type=type, + environment_id=environment_id, + domain=domain, + token=token, + ) + + partial_dbt_semantic_layer_connection.additional_properties = d + return partial_dbt_semantic_layer_connection + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/partial_omit_organization_organization_uuid_or_needs_project.py b/lightdash_client/models/partial_omit_organization_organization_uuid_or_needs_project.py index 1bf82fe..f476614 100644 --- a/lightdash_client/models/partial_omit_organization_organization_uuid_or_needs_project.py +++ b/lightdash_client/models/partial_omit_organization_organization_uuid_or_needs_project.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/partial_pick_db_tag_name_or_color.py b/lightdash_client/models/partial_pick_db_tag_name_or_color.py new file mode 100644 index 0000000..a183def --- /dev/null +++ b/lightdash_client/models/partial_pick_db_tag_name_or_color.py @@ -0,0 +1,68 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PartialPickDbTagNameOrColor") + + +@_attrs_define +class PartialPickDbTagNameOrColor: + """Make all properties in T optional + + Attributes: + name (Union[Unset, str]): + color (Union[Unset, str]): + """ + + name: Union[Unset, str] = UNSET + color: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + + color = self.color + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if name is not UNSET: + field_dict["name"] = name + if color is not UNSET: + field_dict["color"] = color + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name", UNSET) + + color = d.pop("color", UNSET) + + partial_pick_db_tag_name_or_color = cls( + name=name, + color=color, + ) + + partial_pick_db_tag_name_or_color.additional_properties = d + return partial_pick_db_tag_name_or_color + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/partial_summary_extra_fields.py b/lightdash_client/models/partial_summary_extra_fields.py index 2243562..fb1e857 100644 --- a/lightdash_client/models/partial_summary_extra_fields.py +++ b/lightdash_client/models/partial_summary_extra_fields.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/personal_access_token.py b/lightdash_client/models/personal_access_token.py new file mode 100644 index 0000000..3d84333 --- /dev/null +++ b/lightdash_client/models/personal_access_token.py @@ -0,0 +1,153 @@ +import datetime +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PersonalAccessToken") + + +@_attrs_define +class PersonalAccessToken: + """ + Attributes: + description (str): + expires_at (Union[None, datetime.datetime]): + rotated_at (Union[None, datetime.datetime]): + last_used_at (Union[None, datetime.datetime]): + created_at (datetime.datetime): + uuid (str): + """ + + description: str + expires_at: Union[None, datetime.datetime] + rotated_at: Union[None, datetime.datetime] + last_used_at: Union[None, datetime.datetime] + created_at: datetime.datetime + uuid: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + description = self.description + + expires_at: Union[None, str] + if isinstance(self.expires_at, datetime.datetime): + expires_at = self.expires_at.isoformat() + else: + expires_at = self.expires_at + + rotated_at: Union[None, str] + if isinstance(self.rotated_at, datetime.datetime): + rotated_at = self.rotated_at.isoformat() + else: + rotated_at = self.rotated_at + + last_used_at: Union[None, str] + if isinstance(self.last_used_at, datetime.datetime): + last_used_at = self.last_used_at.isoformat() + else: + last_used_at = self.last_used_at + + created_at = self.created_at.isoformat() + + uuid = self.uuid + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "description": description, + "expiresAt": expires_at, + "rotatedAt": rotated_at, + "lastUsedAt": last_used_at, + "createdAt": created_at, + "uuid": uuid, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + description = d.pop("description") + + def _parse_expires_at(data: object) -> Union[None, datetime.datetime]: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + expires_at_type_0 = isoparse(data) + + return expires_at_type_0 + except: # noqa: E722 + pass + return cast(Union[None, datetime.datetime], data) + + expires_at = _parse_expires_at(d.pop("expiresAt")) + + def _parse_rotated_at(data: object) -> Union[None, datetime.datetime]: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + rotated_at_type_0 = isoparse(data) + + return rotated_at_type_0 + except: # noqa: E722 + pass + return cast(Union[None, datetime.datetime], data) + + rotated_at = _parse_rotated_at(d.pop("rotatedAt")) + + def _parse_last_used_at(data: object) -> Union[None, datetime.datetime]: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + last_used_at_type_0 = isoparse(data) + + return last_used_at_type_0 + except: # noqa: E722 + pass + return cast(Union[None, datetime.datetime], data) + + last_used_at = _parse_last_used_at(d.pop("lastUsedAt")) + + created_at = isoparse(d.pop("createdAt")) + + uuid = d.pop("uuid") + + personal_access_token = cls( + description=description, + expires_at=expires_at, + rotated_at=rotated_at, + last_used_at=last_used_at, + created_at=created_at, + uuid=uuid, + ) + + personal_access_token.additional_properties = d + return personal_access_token + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/personal_access_token_with_token.py b/lightdash_client/models/personal_access_token_with_token.py new file mode 100644 index 0000000..2142531 --- /dev/null +++ b/lightdash_client/models/personal_access_token_with_token.py @@ -0,0 +1,161 @@ +import datetime +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PersonalAccessTokenWithToken") + + +@_attrs_define +class PersonalAccessTokenWithToken: + """ + Attributes: + description (str): + expires_at (Union[None, datetime.datetime]): + rotated_at (Union[None, datetime.datetime]): + last_used_at (Union[None, datetime.datetime]): + created_at (datetime.datetime): + uuid (str): + token (str): + """ + + description: str + expires_at: Union[None, datetime.datetime] + rotated_at: Union[None, datetime.datetime] + last_used_at: Union[None, datetime.datetime] + created_at: datetime.datetime + uuid: str + token: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + description = self.description + + expires_at: Union[None, str] + if isinstance(self.expires_at, datetime.datetime): + expires_at = self.expires_at.isoformat() + else: + expires_at = self.expires_at + + rotated_at: Union[None, str] + if isinstance(self.rotated_at, datetime.datetime): + rotated_at = self.rotated_at.isoformat() + else: + rotated_at = self.rotated_at + + last_used_at: Union[None, str] + if isinstance(self.last_used_at, datetime.datetime): + last_used_at = self.last_used_at.isoformat() + else: + last_used_at = self.last_used_at + + created_at = self.created_at.isoformat() + + uuid = self.uuid + + token = self.token + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "description": description, + "expiresAt": expires_at, + "rotatedAt": rotated_at, + "lastUsedAt": last_used_at, + "createdAt": created_at, + "uuid": uuid, + "token": token, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + description = d.pop("description") + + def _parse_expires_at(data: object) -> Union[None, datetime.datetime]: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + expires_at_type_0 = isoparse(data) + + return expires_at_type_0 + except: # noqa: E722 + pass + return cast(Union[None, datetime.datetime], data) + + expires_at = _parse_expires_at(d.pop("expiresAt")) + + def _parse_rotated_at(data: object) -> Union[None, datetime.datetime]: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + rotated_at_type_0 = isoparse(data) + + return rotated_at_type_0 + except: # noqa: E722 + pass + return cast(Union[None, datetime.datetime], data) + + rotated_at = _parse_rotated_at(d.pop("rotatedAt")) + + def _parse_last_used_at(data: object) -> Union[None, datetime.datetime]: + if data is None: + return data + try: + if not isinstance(data, str): + raise TypeError() + last_used_at_type_0 = isoparse(data) + + return last_used_at_type_0 + except: # noqa: E722 + pass + return cast(Union[None, datetime.datetime], data) + + last_used_at = _parse_last_used_at(d.pop("lastUsedAt")) + + created_at = isoparse(d.pop("createdAt")) + + uuid = d.pop("uuid") + + token = d.pop("token") + + personal_access_token_with_token = cls( + description=description, + expires_at=expires_at, + rotated_at=rotated_at, + last_used_at=last_used_at, + created_at=created_at, + uuid=uuid, + token=token, + ) + + personal_access_token_with_token.additional_properties = d + return personal_access_token_with_token + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/pick_allowed_email_domains_exclude_keyof_allowed_email_domains_organization_uuid.py b/lightdash_client/models/pick_allowed_email_domains_exclude_keyof_allowed_email_domains_organization_uuid.py index 541e2e5..68f950a 100644 --- a/lightdash_client/models/pick_allowed_email_domains_exclude_keyof_allowed_email_domains_organization_uuid.py +++ b/lightdash_client/models/pick_allowed_email_domains_exclude_keyof_allowed_email_domains_organization_uuid.py @@ -1,14 +1,13 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.organization_member_role_editor import OrganizationMemberRoleEDITOR -from ..models.organization_member_role_interactiveviewer import ( - OrganizationMemberRoleINTERACTIVEVIEWER, -) +from ..models.organization_member_role_interactiveviewer import OrganizationMemberRoleINTERACTIVEVIEWER from ..models.organization_member_role_member import OrganizationMemberRoleMEMBER from ..models.organization_member_role_viewer import OrganizationMemberRoleVIEWER +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.pick_allowed_email_domains_exclude_keyof_allowed_email_domains_organization_uuid_projects_item import ( @@ -41,6 +40,10 @@ class PickAllowedEmailDomainsExcludeKeyofAllowedEmailDomainsOrganizationUuid: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pick_allowed_email_domains_exclude_keyof_allowed_email_domains_organization_uuid_projects_item import ( + PickAllowedEmailDomainsExcludeKeyofAllowedEmailDomainsOrganizationUuidProjectsItem, + ) + role: str if isinstance(self.role, OrganizationMemberRoleEDITOR): role = self.role.value diff --git a/lightdash_client/models/pick_allowed_email_domains_exclude_keyof_allowed_email_domains_organization_uuid_projects_item.py b/lightdash_client/models/pick_allowed_email_domains_exclude_keyof_allowed_email_domains_organization_uuid_projects_item.py index 02b16a5..2eb2901 100644 --- a/lightdash_client/models/pick_allowed_email_domains_exclude_keyof_allowed_email_domains_organization_uuid_projects_item.py +++ b/lightdash_client/models/pick_allowed_email_domains_exclude_keyof_allowed_email_domains_organization_uuid_projects_item.py @@ -1,13 +1,12 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.project_member_role_editor import ProjectMemberRoleEDITOR -from ..models.project_member_role_interactiveviewer import ( - ProjectMemberRoleINTERACTIVEVIEWER, -) +from ..models.project_member_role_interactiveviewer import ProjectMemberRoleINTERACTIVEVIEWER from ..models.project_member_role_viewer import ProjectMemberRoleVIEWER +from ..types import UNSET, Unset T = TypeVar("T", bound="PickAllowedEmailDomainsExcludeKeyofAllowedEmailDomainsOrganizationUuidProjectsItem") diff --git a/lightdash_client/models/pick_catalog_field_catalog_search_uuid_or_name_or_table_name.py b/lightdash_client/models/pick_catalog_field_catalog_search_uuid_or_name_or_table_name.py new file mode 100644 index 0000000..1375d94 --- /dev/null +++ b/lightdash_client/models/pick_catalog_field_catalog_search_uuid_or_name_or_table_name.py @@ -0,0 +1,77 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PickCatalogFieldCatalogSearchUuidOrNameOrTableName") + + +@_attrs_define +class PickCatalogFieldCatalogSearchUuidOrNameOrTableName: + """From T, pick a set of properties whose keys are in the union K + + Attributes: + name (str): + catalog_search_uuid (str): + table_name (str): + """ + + name: str + catalog_search_uuid: str + table_name: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + + catalog_search_uuid = self.catalog_search_uuid + + table_name = self.table_name + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "catalogSearchUuid": catalog_search_uuid, + "tableName": table_name, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name") + + catalog_search_uuid = d.pop("catalogSearchUuid") + + table_name = d.pop("tableName") + + pick_catalog_field_catalog_search_uuid_or_name_or_table_name = cls( + name=name, + catalog_search_uuid=catalog_search_uuid, + table_name=table_name, + ) + + pick_catalog_field_catalog_search_uuid_or_name_or_table_name.additional_properties = d + return pick_catalog_field_catalog_search_uuid_or_name_or_table_name + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/pick_chart_as_code_exclude_keyof_chart_as_code_metric_query_or_chart_config.py b/lightdash_client/models/pick_chart_as_code_exclude_keyof_chart_as_code_metric_query_or_chart_config.py new file mode 100644 index 0000000..a5bc014 --- /dev/null +++ b/lightdash_client/models/pick_chart_as_code_exclude_keyof_chart_as_code_metric_query_or_chart_config.py @@ -0,0 +1,166 @@ +import datetime +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.pick_chart_as_code_exclude_keyof_chart_as_code_metric_query_or_chart_config_table_config import ( + PickChartAsCodeExcludeKeyofChartAsCodeMetricQueryOrChartConfigTableConfig, + ) + + +T = TypeVar("T", bound="PickChartAsCodeExcludeKeyofChartAsCodeMetricQueryOrChartConfig") + + +@_attrs_define +class PickChartAsCodeExcludeKeyofChartAsCodeMetricQueryOrChartConfig: + """From T, pick a set of properties whose keys are in the union K + + Attributes: + name (str): + dashboard_uuid (Union[None, str]): + slug (str): + table_name (str): + updated_at (datetime.datetime): + table_config (PickChartAsCodeExcludeKeyofChartAsCodeMetricQueryOrChartConfigTableConfig): + version (float): + space_slug (str): + description (Union[Unset, str]): + downloaded_at (Union[Unset, datetime.datetime]): + """ + + name: str + dashboard_uuid: Union[None, str] + slug: str + table_name: str + updated_at: datetime.datetime + table_config: "PickChartAsCodeExcludeKeyofChartAsCodeMetricQueryOrChartConfigTableConfig" + version: float + space_slug: str + description: Union[Unset, str] = UNSET + downloaded_at: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.pick_chart_as_code_exclude_keyof_chart_as_code_metric_query_or_chart_config_table_config import ( + PickChartAsCodeExcludeKeyofChartAsCodeMetricQueryOrChartConfigTableConfig, + ) + + name = self.name + + dashboard_uuid: Union[None, str] + dashboard_uuid = self.dashboard_uuid + + slug = self.slug + + table_name = self.table_name + + updated_at = self.updated_at.isoformat() + + table_config = self.table_config.to_dict() + + version = self.version + + space_slug = self.space_slug + + description = self.description + + downloaded_at: Union[Unset, str] = UNSET + if not isinstance(self.downloaded_at, Unset): + downloaded_at = self.downloaded_at.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "dashboardUuid": dashboard_uuid, + "slug": slug, + "tableName": table_name, + "updatedAt": updated_at, + "tableConfig": table_config, + "version": version, + "spaceSlug": space_slug, + } + ) + if description is not UNSET: + field_dict["description"] = description + if downloaded_at is not UNSET: + field_dict["downloadedAt"] = downloaded_at + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.pick_chart_as_code_exclude_keyof_chart_as_code_metric_query_or_chart_config_table_config import ( + PickChartAsCodeExcludeKeyofChartAsCodeMetricQueryOrChartConfigTableConfig, + ) + + d = src_dict.copy() + name = d.pop("name") + + def _parse_dashboard_uuid(data: object) -> Union[None, str]: + if data is None: + return data + return cast(Union[None, str], data) + + dashboard_uuid = _parse_dashboard_uuid(d.pop("dashboardUuid")) + + slug = d.pop("slug") + + table_name = d.pop("tableName") + + updated_at = isoparse(d.pop("updatedAt")) + + table_config = PickChartAsCodeExcludeKeyofChartAsCodeMetricQueryOrChartConfigTableConfig.from_dict( + d.pop("tableConfig") + ) + + version = d.pop("version") + + space_slug = d.pop("spaceSlug") + + description = d.pop("description", UNSET) + + _downloaded_at = d.pop("downloadedAt", UNSET) + downloaded_at: Union[Unset, datetime.datetime] + if isinstance(_downloaded_at, Unset): + downloaded_at = UNSET + else: + downloaded_at = isoparse(_downloaded_at) + + pick_chart_as_code_exclude_keyof_chart_as_code_metric_query_or_chart_config = cls( + name=name, + dashboard_uuid=dashboard_uuid, + slug=slug, + table_name=table_name, + updated_at=updated_at, + table_config=table_config, + version=version, + space_slug=space_slug, + description=description, + downloaded_at=downloaded_at, + ) + + pick_chart_as_code_exclude_keyof_chart_as_code_metric_query_or_chart_config.additional_properties = d + return pick_chart_as_code_exclude_keyof_chart_as_code_metric_query_or_chart_config + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/pick_chart_as_code_exclude_keyof_chart_as_code_metric_query_or_chart_config_table_config.py b/lightdash_client/models/pick_chart_as_code_exclude_keyof_chart_as_code_metric_query_or_chart_config_table_config.py new file mode 100644 index 0000000..15d8d6c --- /dev/null +++ b/lightdash_client/models/pick_chart_as_code_exclude_keyof_chart_as_code_metric_query_or_chart_config_table_config.py @@ -0,0 +1,60 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PickChartAsCodeExcludeKeyofChartAsCodeMetricQueryOrChartConfigTableConfig") + + +@_attrs_define +class PickChartAsCodeExcludeKeyofChartAsCodeMetricQueryOrChartConfigTableConfig: + """ + Attributes: + column_order (List[str]): + """ + + column_order: List[str] + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + column_order = self.column_order + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "columnOrder": column_order, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + column_order = cast(List[str], d.pop("columnOrder")) + + pick_chart_as_code_exclude_keyof_chart_as_code_metric_query_or_chart_config_table_config = cls( + column_order=column_order, + ) + + pick_chart_as_code_exclude_keyof_chart_as_code_metric_query_or_chart_config_table_config.additional_properties = d + return pick_chart_as_code_exclude_keyof_chart_as_code_metric_query_or_chart_config_table_config + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/pick_chart_summary_uuid_or_name_or_space_uuid_or_space_name_or_dashboard_name_or_dashboard_uuid_or_chart_kind.py b/lightdash_client/models/pick_chart_summary_uuid_or_name_or_space_uuid_or_space_name_or_dashboard_name_or_dashboard_uuid_or_chart_kind.py index 63c3545..90983dd 100644 --- a/lightdash_client/models/pick_chart_summary_uuid_or_name_or_space_uuid_or_space_name_or_dashboard_name_or_dashboard_uuid_or_chart_kind.py +++ b/lightdash_client/models/pick_chart_summary_uuid_or_name_or_space_uuid_or_space_name_or_dashboard_name_or_dashboard_uuid_or_chart_kind.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/pick_chart_version_chart_uuid_or_version_uuid_or_created_at_or_created_by.py b/lightdash_client/models/pick_chart_version_chart_uuid_or_version_uuid_or_created_at_or_created_by.py index f7f8433..c1f6472 100644 --- a/lightdash_client/models/pick_chart_version_chart_uuid_or_version_uuid_or_created_at_or_created_by.py +++ b/lightdash_client/models/pick_chart_version_chart_uuid_or_version_uuid_or_created_at_or_created_by.py @@ -1,10 +1,12 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from dateutil.parser import isoparse +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.pick_lightdash_user_user_uuid_or_first_name_or_last_name import ( PickLightdashUserUserUuidOrFirstNameOrLastName, diff --git a/lightdash_client/models/pick_comment_text_or_reply_to_or_mentions_or_text_html.py b/lightdash_client/models/pick_comment_text_or_reply_to_or_mentions_or_text_html.py index 6d3703b..618f561 100644 --- a/lightdash_client/models/pick_comment_text_or_reply_to_or_mentions_or_text_html.py +++ b/lightdash_client/models/pick_comment_text_or_reply_to_or_mentions_or_text_html.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/pick_compiled_dimension_label_or_name.py b/lightdash_client/models/pick_compiled_dimension_label_or_name.py index cb82a02..3c84aa4 100644 --- a/lightdash_client/models/pick_compiled_dimension_label_or_name.py +++ b/lightdash_client/models/pick_compiled_dimension_label_or_name.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="PickCompiledDimensionLabelOrName") diff --git a/lightdash_client/models/pick_create_bigquery_credentials_exclude_keyof_create_bigquery_credentials_sensitive_credentials_field_names.py b/lightdash_client/models/pick_create_bigquery_credentials_exclude_keyof_create_bigquery_credentials_sensitive_credentials_field_names.py index 789b6ab..0617024 100644 --- a/lightdash_client/models/pick_create_bigquery_credentials_exclude_keyof_create_bigquery_credentials_sensitive_credentials_field_names.py +++ b/lightdash_client/models/pick_create_bigquery_credentials_exclude_keyof_create_bigquery_credentials_sensitive_credentials_field_names.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/pick_create_bigquery_credentials_type.py b/lightdash_client/models/pick_create_bigquery_credentials_type.py index 78543c4..d3f9816 100644 --- a/lightdash_client/models/pick_create_bigquery_credentials_type.py +++ b/lightdash_client/models/pick_create_bigquery_credentials_type.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.warehouse_types_bigquery import WarehouseTypesBIGQUERY +from ..types import UNSET, Unset T = TypeVar("T", bound="PickCreateBigqueryCredentialsType") diff --git a/lightdash_client/models/pick_create_bigquery_credentials_type_or_keyfile_contents.py b/lightdash_client/models/pick_create_bigquery_credentials_type_or_keyfile_contents.py index d67a98d..3a30793 100644 --- a/lightdash_client/models/pick_create_bigquery_credentials_type_or_keyfile_contents.py +++ b/lightdash_client/models/pick_create_bigquery_credentials_type_or_keyfile_contents.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.warehouse_types_bigquery import WarehouseTypesBIGQUERY +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.record_string_string import RecordStringString @@ -26,6 +27,8 @@ class PickCreateBigqueryCredentialsTypeOrKeyfileContents: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.record_string_string import RecordStringString + type = self.type.value keyfile_contents = self.keyfile_contents.to_dict() diff --git a/lightdash_client/models/pick_create_databricks_credentials_exclude_keyof_create_databricks_credentials_sensitive_credentials_field_names.py b/lightdash_client/models/pick_create_databricks_credentials_exclude_keyof_create_databricks_credentials_sensitive_credentials_field_names.py index 70133e7..8c3a678 100644 --- a/lightdash_client/models/pick_create_databricks_credentials_exclude_keyof_create_databricks_credentials_sensitive_credentials_field_names.py +++ b/lightdash_client/models/pick_create_databricks_credentials_exclude_keyof_create_databricks_credentials_sensitive_credentials_field_names.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/pick_create_databricks_credentials_type.py b/lightdash_client/models/pick_create_databricks_credentials_type.py index 4ee50b7..9ddbe08 100644 --- a/lightdash_client/models/pick_create_databricks_credentials_type.py +++ b/lightdash_client/models/pick_create_databricks_credentials_type.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.warehouse_types_databricks import WarehouseTypesDATABRICKS +from ..types import UNSET, Unset T = TypeVar("T", bound="PickCreateDatabricksCredentialsType") diff --git a/lightdash_client/models/pick_create_databricks_credentials_type_or_personal_access_token.py b/lightdash_client/models/pick_create_databricks_credentials_type_or_personal_access_token.py index 054ad6b..816dd54 100644 --- a/lightdash_client/models/pick_create_databricks_credentials_type_or_personal_access_token.py +++ b/lightdash_client/models/pick_create_databricks_credentials_type_or_personal_access_token.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.warehouse_types_databricks import WarehouseTypesDATABRICKS +from ..types import UNSET, Unset T = TypeVar("T", bound="PickCreateDatabricksCredentialsTypeOrPersonalAccessToken") diff --git a/lightdash_client/models/pick_create_db_project_group_access_role.py b/lightdash_client/models/pick_create_db_project_group_access_role.py index 9b5d154..7cc0e40 100644 --- a/lightdash_client/models/pick_create_db_project_group_access_role.py +++ b/lightdash_client/models/pick_create_db_project_group_access_role.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.project_member_role import ProjectMemberRole +from ..types import UNSET, Unset T = TypeVar("T", bound="PickCreateDBProjectGroupAccessRole") diff --git a/lightdash_client/models/pick_create_postgres_credentials_exclude_keyof_create_postgres_credentials_sensitive_credentials_field_names.py b/lightdash_client/models/pick_create_postgres_credentials_exclude_keyof_create_postgres_credentials_sensitive_credentials_field_names.py index beefcea..572e62e 100644 --- a/lightdash_client/models/pick_create_postgres_credentials_exclude_keyof_create_postgres_credentials_sensitive_credentials_field_names.py +++ b/lightdash_client/models/pick_create_postgres_credentials_exclude_keyof_create_postgres_credentials_sensitive_credentials_field_names.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/pick_create_postgres_credentials_type_or_user_or_password.py b/lightdash_client/models/pick_create_postgres_credentials_type_or_user_or_password.py index c8f56fc..1c1f4e3 100644 --- a/lightdash_client/models/pick_create_postgres_credentials_type_or_user_or_password.py +++ b/lightdash_client/models/pick_create_postgres_credentials_type_or_user_or_password.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.warehouse_types_postgres import WarehouseTypesPOSTGRES +from ..types import UNSET, Unset T = TypeVar("T", bound="PickCreatePostgresCredentialsTypeOrUserOrPassword") diff --git a/lightdash_client/models/pick_create_redshift_credentials_exclude_keyof_create_redshift_credentials_sensitive_credentials_field_names.py b/lightdash_client/models/pick_create_redshift_credentials_exclude_keyof_create_redshift_credentials_sensitive_credentials_field_names.py index 3c8ea4d..5359fc0 100644 --- a/lightdash_client/models/pick_create_redshift_credentials_exclude_keyof_create_redshift_credentials_sensitive_credentials_field_names.py +++ b/lightdash_client/models/pick_create_redshift_credentials_exclude_keyof_create_redshift_credentials_sensitive_credentials_field_names.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/pick_create_redshift_credentials_or_create_postgres_credentials_or_create_snowflake_credentials_or_create_trino_credentials_type_or_user.py b/lightdash_client/models/pick_create_redshift_credentials_or_create_postgres_credentials_or_create_snowflake_credentials_or_create_trino_credentials_type_or_user.py index 4378383..dd8c4aa 100644 --- a/lightdash_client/models/pick_create_redshift_credentials_or_create_postgres_credentials_or_create_snowflake_credentials_or_create_trino_credentials_type_or_user.py +++ b/lightdash_client/models/pick_create_redshift_credentials_or_create_postgres_credentials_or_create_snowflake_credentials_or_create_trino_credentials_type_or_user.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.warehouse_types_snowflake import WarehouseTypesSNOWFLAKE +from ..types import UNSET, Unset T = TypeVar( "T", diff --git a/lightdash_client/models/pick_create_redshift_credentials_type_or_user_or_password.py b/lightdash_client/models/pick_create_redshift_credentials_type_or_user_or_password.py index 7f653d5..9a7afd7 100644 --- a/lightdash_client/models/pick_create_redshift_credentials_type_or_user_or_password.py +++ b/lightdash_client/models/pick_create_redshift_credentials_type_or_user_or_password.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.warehouse_types_redshift import WarehouseTypesREDSHIFT +from ..types import UNSET, Unset T = TypeVar("T", bound="PickCreateRedshiftCredentialsTypeOrUserOrPassword") diff --git a/lightdash_client/models/pick_create_snowflake_credentials_exclude_keyof_create_snowflake_credentials_sensitive_credentials_field_names.py b/lightdash_client/models/pick_create_snowflake_credentials_exclude_keyof_create_snowflake_credentials_sensitive_credentials_field_names.py index cf5a407..d8f05c5 100644 --- a/lightdash_client/models/pick_create_snowflake_credentials_exclude_keyof_create_snowflake_credentials_sensitive_credentials_field_names.py +++ b/lightdash_client/models/pick_create_snowflake_credentials_exclude_keyof_create_snowflake_credentials_sensitive_credentials_field_names.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/pick_create_snowflake_credentials_type_or_user_or_password.py b/lightdash_client/models/pick_create_snowflake_credentials_type_or_user_or_password.py index 93aae2f..32f8279 100644 --- a/lightdash_client/models/pick_create_snowflake_credentials_type_or_user_or_password.py +++ b/lightdash_client/models/pick_create_snowflake_credentials_type_or_user_or_password.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/pick_create_trino_credentials_exclude_keyof_create_trino_credentials_sensitive_credentials_field_names.py b/lightdash_client/models/pick_create_trino_credentials_exclude_keyof_create_trino_credentials_sensitive_credentials_field_names.py index 3a772b9..d89f834 100644 --- a/lightdash_client/models/pick_create_trino_credentials_exclude_keyof_create_trino_credentials_sensitive_credentials_field_names.py +++ b/lightdash_client/models/pick_create_trino_credentials_exclude_keyof_create_trino_credentials_sensitive_credentials_field_names.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/pick_create_trino_credentials_type_or_user_or_password.py b/lightdash_client/models/pick_create_trino_credentials_type_or_user_or_password.py index bdd1960..adb4c7e 100644 --- a/lightdash_client/models/pick_create_trino_credentials_type_or_user_or_password.py +++ b/lightdash_client/models/pick_create_trino_credentials_type_or_user_or_password.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.warehouse_types_trino import WarehouseTypesTRINO +from ..types import UNSET, Unset T = TypeVar("T", bound="PickCreateTrinoCredentialsTypeOrUserOrPassword") diff --git a/lightdash_client/models/pick_dashboard_as_code_exclude_keyof_dashboard_as_code_filters_or_tiles_or_description.py b/lightdash_client/models/pick_dashboard_as_code_exclude_keyof_dashboard_as_code_filters_or_tiles_or_description.py new file mode 100644 index 0000000..32b46eb --- /dev/null +++ b/lightdash_client/models/pick_dashboard_as_code_exclude_keyof_dashboard_as_code_filters_or_tiles_or_description.py @@ -0,0 +1,135 @@ +import datetime +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dashboard_tab import DashboardTab + + +T = TypeVar("T", bound="PickDashboardAsCodeExcludeKeyofDashboardAsCodeFiltersOrTilesOrDescription") + + +@_attrs_define +class PickDashboardAsCodeExcludeKeyofDashboardAsCodeFiltersOrTilesOrDescription: + """From T, pick a set of properties whose keys are in the union K + + Attributes: + name (str): + slug (str): + updated_at (datetime.datetime): + tabs (List['DashboardTab']): + version (float): + space_slug (str): + downloaded_at (Union[Unset, datetime.datetime]): + """ + + name: str + slug: str + updated_at: datetime.datetime + tabs: List["DashboardTab"] + version: float + space_slug: str + downloaded_at: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_tab import DashboardTab + + name = self.name + + slug = self.slug + + updated_at = self.updated_at.isoformat() + + tabs = [] + for tabs_item_data in self.tabs: + tabs_item = tabs_item_data.to_dict() + tabs.append(tabs_item) + + version = self.version + + space_slug = self.space_slug + + downloaded_at: Union[Unset, str] = UNSET + if not isinstance(self.downloaded_at, Unset): + downloaded_at = self.downloaded_at.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "slug": slug, + "updatedAt": updated_at, + "tabs": tabs, + "version": version, + "spaceSlug": space_slug, + } + ) + if downloaded_at is not UNSET: + field_dict["downloadedAt"] = downloaded_at + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.dashboard_tab import DashboardTab + + d = src_dict.copy() + name = d.pop("name") + + slug = d.pop("slug") + + updated_at = isoparse(d.pop("updatedAt")) + + tabs = [] + _tabs = d.pop("tabs") + for tabs_item_data in _tabs: + tabs_item = DashboardTab.from_dict(tabs_item_data) + + tabs.append(tabs_item) + + version = d.pop("version") + + space_slug = d.pop("spaceSlug") + + _downloaded_at = d.pop("downloadedAt", UNSET) + downloaded_at: Union[Unset, datetime.datetime] + if isinstance(_downloaded_at, Unset): + downloaded_at = UNSET + else: + downloaded_at = isoparse(_downloaded_at) + + pick_dashboard_as_code_exclude_keyof_dashboard_as_code_filters_or_tiles_or_description = cls( + name=name, + slug=slug, + updated_at=updated_at, + tabs=tabs, + version=version, + space_slug=space_slug, + downloaded_at=downloaded_at, + ) + + pick_dashboard_as_code_exclude_keyof_dashboard_as_code_filters_or_tiles_or_description.additional_properties = d + return pick_dashboard_as_code_exclude_keyof_dashboard_as_code_filters_or_tiles_or_description + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/pick_dashboard_basic_details_uuid_or_space_uuid_or_description_or_name_or_views_or_first_viewed_at_or_pinned_list_uuid_or_pinned_list_order_or_updated_at_or_updated_by_user_or_validation_errors.py b/lightdash_client/models/pick_dashboard_basic_details_uuid_or_space_uuid_or_description_or_name_or_views_or_first_viewed_at_or_pinned_list_uuid_or_pinned_list_order_or_updated_at_or_updated_by_user_or_validation_errors.py index 55a29e0..906b13f 100644 --- a/lightdash_client/models/pick_dashboard_basic_details_uuid_or_space_uuid_or_description_or_name_or_views_or_first_viewed_at_or_pinned_list_uuid_or_pinned_list_order_or_updated_at_or_updated_by_user_or_validation_errors.py +++ b/lightdash_client/models/pick_dashboard_basic_details_uuid_or_space_uuid_or_description_or_name_or_views_or_first_viewed_at_or_pinned_list_uuid_or_pinned_list_order_or_updated_at_or_updated_by_user_or_validation_errors.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -52,6 +52,11 @@ class PickDashboardBasicDetailsUuidOrSpaceUuidOrDescriptionOrNameOrViewsOrFirstV additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pick_validation_response_error_or_created_at_or_validation_id import ( + PickValidationResponseErrorOrCreatedAtOrValidationId, + ) + from ..models.updated_by_user import UpdatedByUser + name = self.name uuid = self.uuid diff --git a/lightdash_client/models/pick_dashboard_exclude_keyof_dashboard_is_private_or_access.py b/lightdash_client/models/pick_dashboard_exclude_keyof_dashboard_is_private_or_access.py index 061e079..f7bdb70 100644 --- a/lightdash_client/models/pick_dashboard_exclude_keyof_dashboard_is_private_or_access.py +++ b/lightdash_client/models/pick_dashboard_exclude_keyof_dashboard_is_private_or_access.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -12,9 +12,7 @@ from ..models.dashboard_filters import DashboardFilters from ..models.dashboard_loom_tile import DashboardLoomTile from ..models.dashboard_markdown_tile import DashboardMarkdownTile - from ..models.dashboard_semantic_viewer_chart_tile import ( - DashboardSemanticViewerChartTile, - ) + from ..models.dashboard_semantic_viewer_chart_tile import DashboardSemanticViewerChartTile from ..models.dashboard_sql_chart_tile import DashboardSqlChartTile from ..models.dashboard_tab import DashboardTab from ..models.updated_by_user import UpdatedByUser @@ -79,9 +77,13 @@ class PickDashboardExcludeKeyofDashboardIsPrivateOrAccess: def to_dict(self) -> Dict[str, Any]: from ..models.dashboard_chart_tile import DashboardChartTile + from ..models.dashboard_filters import DashboardFilters from ..models.dashboard_loom_tile import DashboardLoomTile from ..models.dashboard_markdown_tile import DashboardMarkdownTile + from ..models.dashboard_semantic_viewer_chart_tile import DashboardSemanticViewerChartTile from ..models.dashboard_sql_chart_tile import DashboardSqlChartTile + from ..models.dashboard_tab import DashboardTab + from ..models.updated_by_user import UpdatedByUser name = self.name @@ -179,9 +181,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.dashboard_filters import DashboardFilters from ..models.dashboard_loom_tile import DashboardLoomTile from ..models.dashboard_markdown_tile import DashboardMarkdownTile - from ..models.dashboard_semantic_viewer_chart_tile import ( - DashboardSemanticViewerChartTile, - ) + from ..models.dashboard_semantic_viewer_chart_tile import DashboardSemanticViewerChartTile from ..models.dashboard_sql_chart_tile import DashboardSqlChartTile from ..models.dashboard_tab import DashboardTab from ..models.updated_by_user import UpdatedByUser diff --git a/lightdash_client/models/pick_dashboard_name_or_description_or_updated_at_or_filters_or_tabs_or_slug.py b/lightdash_client/models/pick_dashboard_name_or_description_or_updated_at_or_filters_or_tabs_or_slug.py new file mode 100644 index 0000000..95879a6 --- /dev/null +++ b/lightdash_client/models/pick_dashboard_name_or_description_or_updated_at_or_filters_or_tabs_or_slug.py @@ -0,0 +1,123 @@ +import datetime +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dashboard_filters import DashboardFilters + from ..models.dashboard_tab import DashboardTab + + +T = TypeVar("T", bound="PickDashboardNameOrDescriptionOrUpdatedAtOrFiltersOrTabsOrSlug") + + +@_attrs_define +class PickDashboardNameOrDescriptionOrUpdatedAtOrFiltersOrTabsOrSlug: + """From T, pick a set of properties whose keys are in the union K + + Attributes: + name (str): + slug (str): + updated_at (datetime.datetime): + filters (DashboardFilters): + tabs (List['DashboardTab']): + description (Union[Unset, str]): + """ + + name: str + slug: str + updated_at: datetime.datetime + filters: "DashboardFilters" + tabs: List["DashboardTab"] + description: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_filters import DashboardFilters + from ..models.dashboard_tab import DashboardTab + + name = self.name + + slug = self.slug + + updated_at = self.updated_at.isoformat() + + filters = self.filters.to_dict() + + tabs = [] + for tabs_item_data in self.tabs: + tabs_item = tabs_item_data.to_dict() + tabs.append(tabs_item) + + description = self.description + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "slug": slug, + "updatedAt": updated_at, + "filters": filters, + "tabs": tabs, + } + ) + if description is not UNSET: + field_dict["description"] = description + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.dashboard_filters import DashboardFilters + from ..models.dashboard_tab import DashboardTab + + d = src_dict.copy() + name = d.pop("name") + + slug = d.pop("slug") + + updated_at = isoparse(d.pop("updatedAt")) + + filters = DashboardFilters.from_dict(d.pop("filters")) + + tabs = [] + _tabs = d.pop("tabs") + for tabs_item_data in _tabs: + tabs_item = DashboardTab.from_dict(tabs_item_data) + + tabs.append(tabs_item) + + description = d.pop("description", UNSET) + + pick_dashboard_name_or_description_or_updated_at_or_filters_or_tabs_or_slug = cls( + name=name, + slug=slug, + updated_at=updated_at, + filters=filters, + tabs=tabs, + description=description, + ) + + pick_dashboard_name_or_description_or_updated_at_or_filters_or_tabs_or_slug.additional_properties = d + return pick_dashboard_name_or_description_or_updated_at_or_filters_or_tabs_or_slug + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/pick_dashboard_tile_at_properties_exclude_keyof_dashboard_tile_at_properties_saved_chart_uuid_or_saved_sql_uuid_or_saved_semantic_viewer_chart_uuid.py b/lightdash_client/models/pick_dashboard_tile_at_properties_exclude_keyof_dashboard_tile_at_properties_saved_chart_uuid_or_saved_sql_uuid_or_saved_semantic_viewer_chart_uuid.py new file mode 100644 index 0000000..f2204ba --- /dev/null +++ b/lightdash_client/models/pick_dashboard_tile_at_properties_exclude_keyof_dashboard_tile_at_properties_saved_chart_uuid_or_saved_sql_uuid_or_saved_semantic_viewer_chart_uuid.py @@ -0,0 +1,62 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="PickDashboardTileAtPropertiesExcludeKeyofDashboardTileAtPropertiesSavedChartUuidOrSavedSqlUuidOrSavedSemanticViewerChartUuid", +) + + +@_attrs_define +class PickDashboardTileAtPropertiesExcludeKeyofDashboardTileAtPropertiesSavedChartUuidOrSavedSqlUuidOrSavedSemanticViewerChartUuid: + """From T, pick a set of properties whose keys are in the union K + + Attributes: + title (Union[Unset, str]): + """ + + title: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + title = self.title + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if title is not UNSET: + field_dict["title"] = title + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + title = d.pop("title", UNSET) + + pick_dashboard_tile_at_properties_exclude_keyof_dashboard_tile_at_properties_saved_chart_uuid_or_saved_sql_uuid_or_saved_semantic_viewer_chart_uuid = cls( + title=title, + ) + + pick_dashboard_tile_at_properties_exclude_keyof_dashboard_tile_at_properties_saved_chart_uuid_or_saved_sql_uuid_or_saved_semantic_viewer_chart_uuid.additional_properties = d + return pick_dashboard_tile_at_properties_exclude_keyof_dashboard_tile_at_properties_saved_chart_uuid_or_saved_sql_uuid_or_saved_semantic_viewer_chart_uuid + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/pick_dashboard_tile_exclude_keyof_dashboard_tile_properties.py b/lightdash_client/models/pick_dashboard_tile_exclude_keyof_dashboard_tile_properties.py new file mode 100644 index 0000000..860f03e --- /dev/null +++ b/lightdash_client/models/pick_dashboard_tile_exclude_keyof_dashboard_tile_properties.py @@ -0,0 +1,112 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.dashboard_tile_types import DashboardTileTypes +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PickDashboardTileExcludeKeyofDashboardTileProperties") + + +@_attrs_define +class PickDashboardTileExcludeKeyofDashboardTileProperties: + """From T, pick a set of properties whose keys are in the union K + + Attributes: + type (DashboardTileTypes): + x (float): + y (float): + h (float): + w (float): + uuid (Union[Unset, str]): + tab_uuid (Union[Unset, str]): + """ + + type: DashboardTileTypes + x: float + y: float + h: float + w: float + uuid: Union[Unset, str] = UNSET + tab_uuid: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + type = self.type.value + + x = self.x + + y = self.y + + h = self.h + + w = self.w + + uuid = self.uuid + + tab_uuid = self.tab_uuid + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "type": type, + "x": x, + "y": y, + "h": h, + "w": w, + } + ) + if uuid is not UNSET: + field_dict["uuid"] = uuid + if tab_uuid is not UNSET: + field_dict["tabUuid"] = tab_uuid + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + type = DashboardTileTypes(d.pop("type")) + + x = d.pop("x") + + y = d.pop("y") + + h = d.pop("h") + + w = d.pop("w") + + uuid = d.pop("uuid", UNSET) + + tab_uuid = d.pop("tabUuid", UNSET) + + pick_dashboard_tile_exclude_keyof_dashboard_tile_properties = cls( + type=type, + x=x, + y=y, + h=h, + w=w, + uuid=uuid, + tab_uuid=tab_uuid, + ) + + pick_dashboard_tile_exclude_keyof_dashboard_tile_properties.additional_properties = d + return pick_dashboard_tile_exclude_keyof_dashboard_tile_properties + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/pick_dashboard_uuid_or_name_or_description_or_space_uuid.py b/lightdash_client/models/pick_dashboard_uuid_or_name_or_description_or_space_uuid.py new file mode 100644 index 0000000..2ae8798 --- /dev/null +++ b/lightdash_client/models/pick_dashboard_uuid_or_name_or_description_or_space_uuid.py @@ -0,0 +1,86 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PickDashboardUuidOrNameOrDescriptionOrSpaceUuid") + + +@_attrs_define +class PickDashboardUuidOrNameOrDescriptionOrSpaceUuid: + """From T, pick a set of properties whose keys are in the union K + + Attributes: + name (str): + uuid (str): + space_uuid (str): + description (Union[Unset, str]): + """ + + name: str + uuid: str + space_uuid: str + description: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + + uuid = self.uuid + + space_uuid = self.space_uuid + + description = self.description + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "uuid": uuid, + "spaceUuid": space_uuid, + } + ) + if description is not UNSET: + field_dict["description"] = description + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name") + + uuid = d.pop("uuid") + + space_uuid = d.pop("spaceUuid") + + description = d.pop("description", UNSET) + + pick_dashboard_uuid_or_name_or_description_or_space_uuid = cls( + name=name, + uuid=uuid, + space_uuid=space_uuid, + description=description, + ) + + pick_dashboard_uuid_or_name_or_description_or_space_uuid.additional_properties = d + return pick_dashboard_uuid_or_name_or_description_or_space_uuid + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/pick_dashboard_uuid_or_name_or_description_or_updated_at_or_project_uuid_or_updated_by_user_or_organization_uuid_or_space_uuid_or_views_or_first_viewed_at_or_pinned_list_uuid_or_pinned_list_order.py b/lightdash_client/models/pick_dashboard_uuid_or_name_or_description_or_updated_at_or_project_uuid_or_updated_by_user_or_organization_uuid_or_space_uuid_or_views_or_first_viewed_at_or_pinned_list_uuid_or_pinned_list_order.py index 738ec6c..23ebc09 100644 --- a/lightdash_client/models/pick_dashboard_uuid_or_name_or_description_or_updated_at_or_project_uuid_or_updated_by_user_or_organization_uuid_or_space_uuid_or_views_or_first_viewed_at_or_pinned_list_uuid_or_pinned_list_order.py +++ b/lightdash_client/models/pick_dashboard_uuid_or_name_or_description_or_updated_at_or_project_uuid_or_updated_by_user_or_organization_uuid_or_space_uuid_or_views_or_first_viewed_at_or_pinned_list_uuid_or_pinned_list_order.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -51,6 +51,8 @@ class PickDashboardUuidOrNameOrDescriptionOrUpdatedAtOrProjectUuidOrUpdatedByUse additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.updated_by_user import UpdatedByUser + name = self.name uuid = self.uuid diff --git a/lightdash_client/models/pick_db_project_group_access_role.py b/lightdash_client/models/pick_db_project_group_access_role.py index c05103c..ba1b5d0 100644 --- a/lightdash_client/models/pick_db_project_group_access_role.py +++ b/lightdash_client/models/pick_db_project_group_access_role.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.project_member_role import ProjectMemberRole +from ..types import UNSET, Unset T = TypeVar("T", bound="PickDBProjectGroupAccessRole") diff --git a/lightdash_client/models/pick_dimension_required_attributes.py b/lightdash_client/models/pick_dimension_required_attributes.py index 2f85ec1..4feb8c6 100644 --- a/lightdash_client/models/pick_dimension_required_attributes.py +++ b/lightdash_client/models/pick_dimension_required_attributes.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -6,9 +6,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.record_string_string_or_string_array import ( - RecordStringStringOrStringArray, - ) + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray T = TypeVar("T", bound="PickDimensionRequiredAttributes") @@ -27,6 +25,8 @@ class PickDimensionRequiredAttributes: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray + required_attributes: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.required_attributes, Unset): required_attributes = self.required_attributes.to_dict() @@ -41,9 +41,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.record_string_string_or_string_array import ( - RecordStringStringOrStringArray, - ) + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray d = src_dict.copy() _required_attributes = d.pop("requiredAttributes", UNSET) diff --git a/lightdash_client/models/pick_explore_error_summary_explore_error_fields.py b/lightdash_client/models/pick_explore_error_summary_explore_error_fields.py index daf1ab1..f07400f 100644 --- a/lightdash_client/models/pick_explore_error_summary_explore_error_fields.py +++ b/lightdash_client/models/pick_explore_error_summary_explore_error_fields.py @@ -1,8 +1,9 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.explore_type import ExploreType from ..types import UNSET, Unset if TYPE_CHECKING: @@ -22,6 +23,7 @@ class PickExploreErrorSummaryExploreErrorFields: tags (List[str]): errors (List['InlineError']): group_label (Union[Unset, str]): + type (Union[Unset, ExploreType]): """ name: str @@ -29,9 +31,12 @@ class PickExploreErrorSummaryExploreErrorFields: tags: List[str] errors: List["InlineError"] group_label: Union[Unset, str] = UNSET + type: Union[Unset, ExploreType] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.inline_error import InlineError + name = self.name label = self.label @@ -45,6 +50,10 @@ def to_dict(self) -> Dict[str, Any]: group_label = self.group_label + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -57,6 +66,8 @@ def to_dict(self) -> Dict[str, Any]: ) if group_label is not UNSET: field_dict["groupLabel"] = group_label + if type is not UNSET: + field_dict["type"] = type return field_dict @@ -80,12 +91,20 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: group_label = d.pop("groupLabel", UNSET) + _type = d.pop("type", UNSET) + type: Union[Unset, ExploreType] + if isinstance(_type, Unset): + type = UNSET + else: + type = ExploreType(_type) + pick_explore_error_summary_explore_error_fields = cls( name=name, label=label, tags=tags, errors=errors, group_label=group_label, + type=type, ) pick_explore_error_summary_explore_error_fields.additional_properties = d diff --git a/lightdash_client/models/pick_explore_join_table_or_sql_on_or_type_or_hidden_or_always.py b/lightdash_client/models/pick_explore_join_table_or_sql_on_or_type_or_hidden_or_always.py index 61a7dfa..aec75d8 100644 --- a/lightdash_client/models/pick_explore_join_table_or_sql_on_or_type_or_hidden_or_always.py +++ b/lightdash_client/models/pick_explore_join_table_or_sql_on_or_type_or_hidden_or_always.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/pick_explore_summary_explore_fields.py b/lightdash_client/models/pick_explore_summary_explore_fields.py index 3a020ce..f83b6bb 100644 --- a/lightdash_client/models/pick_explore_summary_explore_fields.py +++ b/lightdash_client/models/pick_explore_summary_explore_fields.py @@ -1,8 +1,9 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.explore_type import ExploreType from ..types import UNSET, Unset T = TypeVar("T", bound="PickExploreSummaryExploreFields") @@ -17,12 +18,14 @@ class PickExploreSummaryExploreFields: label (str): tags (List[str]): group_label (Union[Unset, str]): + type (Union[Unset, ExploreType]): """ name: str label: str tags: List[str] group_label: Union[Unset, str] = UNSET + type: Union[Unset, ExploreType] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -34,6 +37,10 @@ def to_dict(self) -> Dict[str, Any]: group_label = self.group_label + type: Union[Unset, str] = UNSET + if not isinstance(self.type, Unset): + type = self.type.value + field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -45,6 +52,8 @@ def to_dict(self) -> Dict[str, Any]: ) if group_label is not UNSET: field_dict["groupLabel"] = group_label + if type is not UNSET: + field_dict["type"] = type return field_dict @@ -59,11 +68,19 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: group_label = d.pop("groupLabel", UNSET) + _type = d.pop("type", UNSET) + type: Union[Unset, ExploreType] + if isinstance(_type, Unset): + type = UNSET + else: + type = ExploreType(_type) + pick_explore_summary_explore_fields = cls( name=name, label=label, tags=tags, group_label=group_label, + type=type, ) pick_explore_summary_explore_fields.additional_properties = d diff --git a/lightdash_client/models/pick_field_name_or_label_or_field_type_or_table_label_or_description.py b/lightdash_client/models/pick_field_name_or_label_or_field_type_or_table_label_or_description.py index 418b6f8..88a256c 100644 --- a/lightdash_client/models/pick_field_name_or_label_or_field_type_or_table_label_or_description.py +++ b/lightdash_client/models/pick_field_name_or_label_or_field_type_or_table_label_or_description.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/pick_group_member_user_uuid.py b/lightdash_client/models/pick_group_member_user_uuid.py index 02c53c2..d0377d1 100644 --- a/lightdash_client/models/pick_group_member_user_uuid.py +++ b/lightdash_client/models/pick_group_member_user_uuid.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="PickGroupMemberUserUuid") diff --git a/lightdash_client/models/pick_group_name.py b/lightdash_client/models/pick_group_name.py index 108cd8c..9e0e8af 100644 --- a/lightdash_client/models/pick_group_name.py +++ b/lightdash_client/models/pick_group_name.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="PickGroupName") diff --git a/lightdash_client/models/pick_lightdash_user_user_uuid_or_first_name_or_last_name.py b/lightdash_client/models/pick_lightdash_user_user_uuid_or_first_name_or_last_name.py index 1d4bcf3..33f9ec8 100644 --- a/lightdash_client/models/pick_lightdash_user_user_uuid_or_first_name_or_last_name.py +++ b/lightdash_client/models/pick_lightdash_user_user_uuid_or_first_name_or_last_name.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="PickLightdashUserUserUuidOrFirstNameOrLastName") diff --git a/lightdash_client/models/pick_notification_viewed.py b/lightdash_client/models/pick_notification_viewed.py index 420ff69..acd4502 100644 --- a/lightdash_client/models/pick_notification_viewed.py +++ b/lightdash_client/models/pick_notification_viewed.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="PickNotificationViewed") diff --git a/lightdash_client/models/pick_organization_name.py b/lightdash_client/models/pick_organization_name.py index 7fbb68b..e7a7643 100644 --- a/lightdash_client/models/pick_organization_name.py +++ b/lightdash_client/models/pick_organization_name.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="PickOrganizationName") diff --git a/lightdash_client/models/pick_resource_view_item_at_data_uuid_or_pinned_list_order.py b/lightdash_client/models/pick_resource_view_item_at_data_uuid_or_pinned_list_order.py index bc7a977..1dc577b 100644 --- a/lightdash_client/models/pick_resource_view_item_at_data_uuid_or_pinned_list_order.py +++ b/lightdash_client/models/pick_resource_view_item_at_data_uuid_or_pinned_list_order.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="PickResourceViewItemAtDataUuidOrPinnedListOrder") diff --git a/lightdash_client/models/pick_saved_chart_exclude_keyof_saved_chart_is_private_or_access.py b/lightdash_client/models/pick_saved_chart_exclude_keyof_saved_chart_is_private_or_access.py index dfc608d..561d76f 100644 --- a/lightdash_client/models/pick_saved_chart_exclude_keyof_saved_chart_is_private_or_access.py +++ b/lightdash_client/models/pick_saved_chart_exclude_keyof_saved_chart_is_private_or_access.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -42,9 +42,9 @@ class PickSavedChartExcludeKeyofSavedChartIsPrivateOrAccess: dashboard_uuid (Union[None, str]): dashboard_name (Union[None, str]): slug (str): + table_name (str): updated_at (datetime.datetime): pinned_list_order (Union[None, float]): - table_name (str): metric_query (MetricQuery): chart_config (Union['BigNumberConfig', 'CartesianChartConfig', 'CustomVisConfig', 'FunnelChartConfig', 'PieChartConfig', 'TableChartConfig']): @@ -65,9 +65,9 @@ class PickSavedChartExcludeKeyofSavedChartIsPrivateOrAccess: dashboard_uuid: Union[None, str] dashboard_name: Union[None, str] slug: str + table_name: str updated_at: datetime.datetime pinned_list_order: Union[None, float] - table_name: str metric_query: "MetricQuery" chart_config: Union[ "BigNumberConfig", @@ -89,7 +89,16 @@ def to_dict(self) -> Dict[str, Any]: from ..models.cartesian_chart_config import CartesianChartConfig from ..models.custom_vis_config import CustomVisConfig from ..models.funnel_chart_config import FunnelChartConfig + from ..models.metric_query import MetricQuery + from ..models.pick_saved_chart_exclude_keyof_saved_chart_is_private_or_access_pivot_config import ( + PickSavedChartExcludeKeyofSavedChartIsPrivateOrAccessPivotConfig, + ) + from ..models.pick_saved_chart_exclude_keyof_saved_chart_is_private_or_access_table_config import ( + PickSavedChartExcludeKeyofSavedChartIsPrivateOrAccessTableConfig, + ) from ..models.pie_chart_config import PieChartConfig + from ..models.table_chart_config import TableChartConfig + from ..models.updated_by_user import UpdatedByUser name = self.name @@ -114,13 +123,13 @@ def to_dict(self) -> Dict[str, Any]: slug = self.slug + table_name = self.table_name + updated_at = self.updated_at.isoformat() pinned_list_order: Union[None, float] pinned_list_order = self.pinned_list_order - table_name = self.table_name - metric_query = self.metric_query.to_dict() chart_config: Dict[str, Any] @@ -165,9 +174,9 @@ def to_dict(self) -> Dict[str, Any]: "dashboardUuid": dashboard_uuid, "dashboardName": dashboard_name, "slug": slug, + "tableName": table_name, "updatedAt": updated_at, "pinnedListOrder": pinned_list_order, - "tableName": table_name, "metricQuery": metric_query, "chartConfig": chart_config, "tableConfig": table_config, @@ -236,6 +245,8 @@ def _parse_dashboard_name(data: object) -> Union[None, str]: slug = d.pop("slug") + table_name = d.pop("tableName") + updated_at = isoparse(d.pop("updatedAt")) def _parse_pinned_list_order(data: object) -> Union[None, float]: @@ -245,8 +256,6 @@ def _parse_pinned_list_order(data: object) -> Union[None, float]: pinned_list_order = _parse_pinned_list_order(d.pop("pinnedListOrder")) - table_name = d.pop("tableName") - metric_query = MetricQuery.from_dict(d.pop("metricQuery")) def _parse_chart_config( @@ -338,9 +347,9 @@ def _parse_chart_config( dashboard_uuid=dashboard_uuid, dashboard_name=dashboard_name, slug=slug, + table_name=table_name, updated_at=updated_at, pinned_list_order=pinned_list_order, - table_name=table_name, metric_query=metric_query, chart_config=chart_config, table_config=table_config, diff --git a/lightdash_client/models/pick_saved_chart_exclude_keyof_saved_chart_is_private_or_access_pivot_config.py b/lightdash_client/models/pick_saved_chart_exclude_keyof_saved_chart_is_private_or_access_pivot_config.py index feeb8ee..27ed306 100644 --- a/lightdash_client/models/pick_saved_chart_exclude_keyof_saved_chart_is_private_or_access_pivot_config.py +++ b/lightdash_client/models/pick_saved_chart_exclude_keyof_saved_chart_is_private_or_access_pivot_config.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="PickSavedChartExcludeKeyofSavedChartIsPrivateOrAccessPivotConfig") diff --git a/lightdash_client/models/pick_saved_chart_exclude_keyof_saved_chart_is_private_or_access_table_config.py b/lightdash_client/models/pick_saved_chart_exclude_keyof_saved_chart_is_private_or_access_table_config.py index 9cbe361..1f571cf 100644 --- a/lightdash_client/models/pick_saved_chart_exclude_keyof_saved_chart_is_private_or_access_table_config.py +++ b/lightdash_client/models/pick_saved_chart_exclude_keyof_saved_chart_is_private_or_access_table_config.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="PickSavedChartExcludeKeyofSavedChartIsPrivateOrAccessTableConfig") diff --git a/lightdash_client/models/pick_saved_chart_name_or_description_or_table_name_or_metric_query_or_chart_config_or_table_config_or_slug_or_dashboard_uuid_or_updated_at.py b/lightdash_client/models/pick_saved_chart_name_or_description_or_table_name_or_metric_query_or_chart_config_or_table_config_or_slug_or_dashboard_uuid_or_updated_at.py new file mode 100644 index 0000000..576bdd5 --- /dev/null +++ b/lightdash_client/models/pick_saved_chart_name_or_description_or_table_name_or_metric_query_or_chart_config_or_table_config_or_slug_or_dashboard_uuid_or_updated_at.py @@ -0,0 +1,251 @@ +import datetime +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.big_number_config import BigNumberConfig + from ..models.cartesian_chart_config import CartesianChartConfig + from ..models.custom_vis_config import CustomVisConfig + from ..models.funnel_chart_config import FunnelChartConfig + from ..models.metric_query import MetricQuery + from ..models.pick_saved_chart_name_or_description_or_table_name_or_metric_query_or_chart_config_or_table_config_or_slug_or_dashboard_uuid_or_updated_at_table_config import ( + PickSavedChartNameOrDescriptionOrTableNameOrMetricQueryOrChartConfigOrTableConfigOrSlugOrDashboardUuidOrUpdatedAtTableConfig, + ) + from ..models.pie_chart_config import PieChartConfig + from ..models.table_chart_config import TableChartConfig + + +T = TypeVar( + "T", + bound="PickSavedChartNameOrDescriptionOrTableNameOrMetricQueryOrChartConfigOrTableConfigOrSlugOrDashboardUuidOrUpdatedAt", +) + + +@_attrs_define +class PickSavedChartNameOrDescriptionOrTableNameOrMetricQueryOrChartConfigOrTableConfigOrSlugOrDashboardUuidOrUpdatedAt: + """From T, pick a set of properties whose keys are in the union K + + Attributes: + name (str): + dashboard_uuid (Union[None, str]): + slug (str): + table_name (str): + updated_at (datetime.datetime): + metric_query (MetricQuery): + chart_config (Union['BigNumberConfig', 'CartesianChartConfig', 'CustomVisConfig', 'FunnelChartConfig', + 'PieChartConfig', 'TableChartConfig']): + table_config (PickSavedChartNameOrDescriptionOrTableNameOrMetricQueryOrChartConfigOrTableConfigOrSlugOrDashboard + UuidOrUpdatedAtTableConfig): + description (Union[Unset, str]): + """ + + name: str + dashboard_uuid: Union[None, str] + slug: str + table_name: str + updated_at: datetime.datetime + metric_query: "MetricQuery" + chart_config: Union[ + "BigNumberConfig", + "CartesianChartConfig", + "CustomVisConfig", + "FunnelChartConfig", + "PieChartConfig", + "TableChartConfig", + ] + table_config: "PickSavedChartNameOrDescriptionOrTableNameOrMetricQueryOrChartConfigOrTableConfigOrSlugOrDashboardUuidOrUpdatedAtTableConfig" + description: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.big_number_config import BigNumberConfig + from ..models.cartesian_chart_config import CartesianChartConfig + from ..models.custom_vis_config import CustomVisConfig + from ..models.funnel_chart_config import FunnelChartConfig + from ..models.metric_query import MetricQuery + from ..models.pick_saved_chart_name_or_description_or_table_name_or_metric_query_or_chart_config_or_table_config_or_slug_or_dashboard_uuid_or_updated_at_table_config import ( + PickSavedChartNameOrDescriptionOrTableNameOrMetricQueryOrChartConfigOrTableConfigOrSlugOrDashboardUuidOrUpdatedAtTableConfig, + ) + from ..models.pie_chart_config import PieChartConfig + from ..models.table_chart_config import TableChartConfig + + name = self.name + + dashboard_uuid: Union[None, str] + dashboard_uuid = self.dashboard_uuid + + slug = self.slug + + table_name = self.table_name + + updated_at = self.updated_at.isoformat() + + metric_query = self.metric_query.to_dict() + + chart_config: Dict[str, Any] + if isinstance(self.chart_config, BigNumberConfig): + chart_config = self.chart_config.to_dict() + elif isinstance(self.chart_config, CartesianChartConfig): + chart_config = self.chart_config.to_dict() + elif isinstance(self.chart_config, CustomVisConfig): + chart_config = self.chart_config.to_dict() + elif isinstance(self.chart_config, PieChartConfig): + chart_config = self.chart_config.to_dict() + elif isinstance(self.chart_config, FunnelChartConfig): + chart_config = self.chart_config.to_dict() + else: + chart_config = self.chart_config.to_dict() + + table_config = self.table_config.to_dict() + + description = self.description + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "dashboardUuid": dashboard_uuid, + "slug": slug, + "tableName": table_name, + "updatedAt": updated_at, + "metricQuery": metric_query, + "chartConfig": chart_config, + "tableConfig": table_config, + } + ) + if description is not UNSET: + field_dict["description"] = description + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.big_number_config import BigNumberConfig + from ..models.cartesian_chart_config import CartesianChartConfig + from ..models.custom_vis_config import CustomVisConfig + from ..models.funnel_chart_config import FunnelChartConfig + from ..models.metric_query import MetricQuery + from ..models.pick_saved_chart_name_or_description_or_table_name_or_metric_query_or_chart_config_or_table_config_or_slug_or_dashboard_uuid_or_updated_at_table_config import ( + PickSavedChartNameOrDescriptionOrTableNameOrMetricQueryOrChartConfigOrTableConfigOrSlugOrDashboardUuidOrUpdatedAtTableConfig, + ) + from ..models.pie_chart_config import PieChartConfig + from ..models.table_chart_config import TableChartConfig + + d = src_dict.copy() + name = d.pop("name") + + def _parse_dashboard_uuid(data: object) -> Union[None, str]: + if data is None: + return data + return cast(Union[None, str], data) + + dashboard_uuid = _parse_dashboard_uuid(d.pop("dashboardUuid")) + + slug = d.pop("slug") + + table_name = d.pop("tableName") + + updated_at = isoparse(d.pop("updatedAt")) + + metric_query = MetricQuery.from_dict(d.pop("metricQuery")) + + def _parse_chart_config( + data: object, + ) -> Union[ + "BigNumberConfig", + "CartesianChartConfig", + "CustomVisConfig", + "FunnelChartConfig", + "PieChartConfig", + "TableChartConfig", + ]: + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_chart_config_type_0 = BigNumberConfig.from_dict(data) + + return componentsschemas_chart_config_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_chart_config_type_1 = CartesianChartConfig.from_dict(data) + + return componentsschemas_chart_config_type_1 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_chart_config_type_2 = CustomVisConfig.from_dict(data) + + return componentsschemas_chart_config_type_2 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_chart_config_type_3 = PieChartConfig.from_dict(data) + + return componentsschemas_chart_config_type_3 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_chart_config_type_4 = FunnelChartConfig.from_dict(data) + + return componentsschemas_chart_config_type_4 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + componentsschemas_chart_config_type_5 = TableChartConfig.from_dict(data) + + return componentsschemas_chart_config_type_5 + + chart_config = _parse_chart_config(d.pop("chartConfig")) + + table_config = PickSavedChartNameOrDescriptionOrTableNameOrMetricQueryOrChartConfigOrTableConfigOrSlugOrDashboardUuidOrUpdatedAtTableConfig.from_dict( + d.pop("tableConfig") + ) + + description = d.pop("description", UNSET) + + pick_saved_chart_name_or_description_or_table_name_or_metric_query_or_chart_config_or_table_config_or_slug_or_dashboard_uuid_or_updated_at = cls( + name=name, + dashboard_uuid=dashboard_uuid, + slug=slug, + table_name=table_name, + updated_at=updated_at, + metric_query=metric_query, + chart_config=chart_config, + table_config=table_config, + description=description, + ) + + pick_saved_chart_name_or_description_or_table_name_or_metric_query_or_chart_config_or_table_config_or_slug_or_dashboard_uuid_or_updated_at.additional_properties = d + return pick_saved_chart_name_or_description_or_table_name_or_metric_query_or_chart_config_or_table_config_or_slug_or_dashboard_uuid_or_updated_at + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/pick_saved_chart_name_or_description_or_table_name_or_metric_query_or_chart_config_or_table_config_or_slug_or_dashboard_uuid_or_updated_at_table_config.py b/lightdash_client/models/pick_saved_chart_name_or_description_or_table_name_or_metric_query_or_chart_config_or_table_config_or_slug_or_dashboard_uuid_or_updated_at_table_config.py new file mode 100644 index 0000000..169c111 --- /dev/null +++ b/lightdash_client/models/pick_saved_chart_name_or_description_or_table_name_or_metric_query_or_chart_config_or_table_config_or_slug_or_dashboard_uuid_or_updated_at_table_config.py @@ -0,0 +1,63 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar( + "T", + bound="PickSavedChartNameOrDescriptionOrTableNameOrMetricQueryOrChartConfigOrTableConfigOrSlugOrDashboardUuidOrUpdatedAtTableConfig", +) + + +@_attrs_define +class PickSavedChartNameOrDescriptionOrTableNameOrMetricQueryOrChartConfigOrTableConfigOrSlugOrDashboardUuidOrUpdatedAtTableConfig: + """ + Attributes: + column_order (List[str]): + """ + + column_order: List[str] + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + column_order = self.column_order + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "columnOrder": column_order, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + column_order = cast(List[str], d.pop("columnOrder")) + + pick_saved_chart_name_or_description_or_table_name_or_metric_query_or_chart_config_or_table_config_or_slug_or_dashboard_uuid_or_updated_at_table_config = cls( + column_order=column_order, + ) + + pick_saved_chart_name_or_description_or_table_name_or_metric_query_or_chart_config_or_table_config_or_slug_or_dashboard_uuid_or_updated_at_table_config.additional_properties = d + return pick_saved_chart_name_or_description_or_table_name_or_metric_query_or_chart_config_or_table_config_or_slug_or_dashboard_uuid_or_updated_at_table_config + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/pick_saved_chart_updated_at_or_updated_by_user_or_pinned_list_order.py b/lightdash_client/models/pick_saved_chart_updated_at_or_updated_by_user_or_pinned_list_order.py index a7eb8aa..3508554 100644 --- a/lightdash_client/models/pick_saved_chart_updated_at_or_updated_by_user_or_pinned_list_order.py +++ b/lightdash_client/models/pick_saved_chart_updated_at_or_updated_by_user_or_pinned_list_order.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -30,6 +30,8 @@ class PickSavedChartUpdatedAtOrUpdatedByUserOrPinnedListOrder: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.updated_by_user import UpdatedByUser + updated_at = self.updated_at.isoformat() pinned_list_order: Union[None, float] diff --git a/lightdash_client/models/pick_saved_chart_uuid_or_name_or_description_or_space_name_or_space_uuid_or_project_uuid_or_organization_uuid_or_pinned_list_uuid_or_dashboard_uuid_or_dashboard_name_or_slug.py b/lightdash_client/models/pick_saved_chart_uuid_or_name_or_description_or_space_name_or_space_uuid_or_project_uuid_or_organization_uuid_or_pinned_list_uuid_or_dashboard_uuid_or_dashboard_name_or_slug.py index a4d66ca..470c169 100644 --- a/lightdash_client/models/pick_saved_chart_uuid_or_name_or_description_or_space_name_or_space_uuid_or_project_uuid_or_organization_uuid_or_pinned_list_uuid_or_dashboard_uuid_or_dashboard_name_or_slug.py +++ b/lightdash_client/models/pick_saved_chart_uuid_or_name_or_description_or_space_name_or_space_uuid_or_project_uuid_or_organization_uuid_or_pinned_list_uuid_or_dashboard_uuid_or_dashboard_name_or_slug.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/pick_share_url_path_or_params.py b/lightdash_client/models/pick_share_url_path_or_params.py index 02e59da..136a415 100644 --- a/lightdash_client/models/pick_share_url_path_or_params.py +++ b/lightdash_client/models/pick_share_url_path_or_params.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="PickShareUrlPathOrParams") diff --git a/lightdash_client/models/pick_space_organization_uuid_or_project_uuid_or_uuid_or_name_or_is_private_or_pinned_list_uuid_or_pinned_list_order_or_slug.py b/lightdash_client/models/pick_space_organization_uuid_or_project_uuid_or_uuid_or_name_or_is_private_or_pinned_list_uuid_or_pinned_list_order_or_slug.py index 020ba26..06a910d 100644 --- a/lightdash_client/models/pick_space_organization_uuid_or_project_uuid_or_uuid_or_name_or_is_private_or_pinned_list_uuid_or_pinned_list_order_or_slug.py +++ b/lightdash_client/models/pick_space_organization_uuid_or_project_uuid_or_uuid_or_name_or_is_private_or_pinned_list_uuid_or_pinned_list_order_or_slug.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar( "T", bound="PickSpaceOrganizationUuidOrProjectUuidOrUuidOrNameOrIsPrivateOrPinnedListUuidOrPinnedListOrderOrSlug" ) diff --git a/lightdash_client/models/pick_space_project_uuid_or_uuid_or_name_or_is_private_or_pinned_list_uuid_or_pinned_list_order_or_organization_uuid.py b/lightdash_client/models/pick_space_project_uuid_or_uuid_or_name_or_is_private_or_pinned_list_uuid_or_pinned_list_order_or_organization_uuid.py index 7dc8b5a..da772b1 100644 --- a/lightdash_client/models/pick_space_project_uuid_or_uuid_or_name_or_is_private_or_pinned_list_uuid_or_pinned_list_order_or_organization_uuid.py +++ b/lightdash_client/models/pick_space_project_uuid_or_uuid_or_name_or_is_private_or_pinned_list_uuid_or_pinned_list_order_or_organization_uuid.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="PickSpaceProjectUuidOrUuidOrNameOrIsPrivateOrPinnedListUuidOrPinnedListOrderOrOrganizationUuid") diff --git a/lightdash_client/models/pick_space_query_uuid_or_name_or_chart_type_or_chart_kind_or_first_viewed_at_or_views_or_pinned_list_uuid_or_pinned_list_order_or_space_uuid_or_description_or_updated_at_or_updated_by_user_or_validation_errors_or_slug.py b/lightdash_client/models/pick_space_query_uuid_or_name_or_chart_type_or_chart_kind_or_first_viewed_at_or_views_or_pinned_list_uuid_or_pinned_list_order_or_space_uuid_or_description_or_updated_at_or_updated_by_user_or_validation_errors_or_slug.py index 310e392..583944b 100644 --- a/lightdash_client/models/pick_space_query_uuid_or_name_or_chart_type_or_chart_kind_or_first_viewed_at_or_views_or_pinned_list_uuid_or_pinned_list_order_or_space_uuid_or_description_or_updated_at_or_updated_by_user_or_validation_errors_or_slug.py +++ b/lightdash_client/models/pick_space_query_uuid_or_name_or_chart_type_or_chart_kind_or_first_viewed_at_or_views_or_pinned_list_uuid_or_pinned_list_order_or_space_uuid_or_description_or_updated_at_or_updated_by_user_or_validation_errors_or_slug.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -60,6 +60,11 @@ class PickSpaceQueryUuidOrNameOrChartTypeOrChartKindOrFirstViewedAtOrViewsOrPinn additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pick_validation_response_error_or_created_at_or_validation_id import ( + PickValidationResponseErrorOrCreatedAtOrValidationId, + ) + from ..models.updated_by_user import UpdatedByUser + name = self.name uuid = self.uuid diff --git a/lightdash_client/models/pick_space_share_user_uuid_or_role.py b/lightdash_client/models/pick_space_share_user_uuid_or_role.py index e527ccf..232374f 100644 --- a/lightdash_client/models/pick_space_share_user_uuid_or_role.py +++ b/lightdash_client/models/pick_space_share_user_uuid_or_role.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.space_member_role import SpaceMemberRole +from ..types import UNSET, Unset T = TypeVar("T", bound="PickSpaceShareUserUuidOrRole") diff --git a/lightdash_client/models/pick_space_summary_exclude_keyof_space_summary_user_access.py b/lightdash_client/models/pick_space_summary_exclude_keyof_space_summary_user_access.py index e792231..a0ba67d 100644 --- a/lightdash_client/models/pick_space_summary_exclude_keyof_space_summary_user_access.py +++ b/lightdash_client/models/pick_space_summary_exclude_keyof_space_summary_user_access.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="PickSpaceSummaryExcludeKeyofSpaceSummaryUserAccess") diff --git a/lightdash_client/models/pick_ssh_key_pair_public_key.py b/lightdash_client/models/pick_ssh_key_pair_public_key.py index d3384df..06381cf 100644 --- a/lightdash_client/models/pick_ssh_key_pair_public_key.py +++ b/lightdash_client/models/pick_ssh_key_pair_public_key.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="PickSshKeyPairPublicKey") diff --git a/lightdash_client/models/pick_table_base_name_or_label_or_group_label_or_description_or_required_attributes.py b/lightdash_client/models/pick_table_base_name_or_label_or_group_label_or_description_or_required_attributes.py index 7f3fa2e..a1e96aa 100644 --- a/lightdash_client/models/pick_table_base_name_or_label_or_group_label_or_description_or_required_attributes.py +++ b/lightdash_client/models/pick_table_base_name_or_label_or_group_label_or_description_or_required_attributes.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -6,9 +6,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.record_string_string_or_string_array import ( - RecordStringStringOrStringArray, - ) + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray T = TypeVar("T", bound="PickTableBaseNameOrLabelOrGroupLabelOrDescriptionOrRequiredAttributes") @@ -35,6 +33,8 @@ class PickTableBaseNameOrLabelOrGroupLabelOrDescriptionOrRequiredAttributes: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray + name = self.name label = self.label @@ -66,9 +66,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.record_string_string_or_string_array import ( - RecordStringStringOrStringArray, - ) + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray d = src_dict.copy() name = d.pop("name") diff --git a/lightdash_client/models/pick_tag_name_or_color.py b/lightdash_client/models/pick_tag_name_or_color.py new file mode 100644 index 0000000..17c4fec --- /dev/null +++ b/lightdash_client/models/pick_tag_name_or_color.py @@ -0,0 +1,69 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PickTagNameOrColor") + + +@_attrs_define +class PickTagNameOrColor: + """From T, pick a set of properties whose keys are in the union K + + Attributes: + name (str): + color (str): + """ + + name: str + color: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + + color = self.color + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "color": color, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name") + + color = d.pop("color") + + pick_tag_name_or_color = cls( + name=name, + color=color, + ) + + pick_tag_name_or_color.additional_properties = d + return pick_tag_name_or_color + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/pick_tag_name_or_color_or_tag_uuid.py b/lightdash_client/models/pick_tag_name_or_color_or_tag_uuid.py new file mode 100644 index 0000000..8ce1205 --- /dev/null +++ b/lightdash_client/models/pick_tag_name_or_color_or_tag_uuid.py @@ -0,0 +1,77 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PickTagNameOrColorOrTagUuid") + + +@_attrs_define +class PickTagNameOrColorOrTagUuid: + """From T, pick a set of properties whose keys are in the union K + + Attributes: + name (str): + color (str): + tag_uuid (str): + """ + + name: str + color: str + tag_uuid: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + name = self.name + + color = self.color + + tag_uuid = self.tag_uuid + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "color": color, + "tagUuid": tag_uuid, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + name = d.pop("name") + + color = d.pop("color") + + tag_uuid = d.pop("tagUuid") + + pick_tag_name_or_color_or_tag_uuid = cls( + name=name, + color=color, + tag_uuid=tag_uuid, + ) + + pick_tag_name_or_color_or_tag_uuid.additional_properties = d + return pick_tag_name_or_color_or_tag_uuid + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/pick_updated_by_user_user_uuid.py b/lightdash_client/models/pick_updated_by_user_user_uuid.py new file mode 100644 index 0000000..fe6cad0 --- /dev/null +++ b/lightdash_client/models/pick_updated_by_user_user_uuid.py @@ -0,0 +1,61 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="PickUpdatedByUserUserUuid") + + +@_attrs_define +class PickUpdatedByUserUserUuid: + """From T, pick a set of properties whose keys are in the union K + + Attributes: + user_uuid (str): + """ + + user_uuid: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + user_uuid = self.user_uuid + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "userUuid": user_uuid, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + user_uuid = d.pop("userUuid") + + pick_updated_by_user_user_uuid = cls( + user_uuid=user_uuid, + ) + + pick_updated_by_user_user_uuid.additional_properties = d + return pick_updated_by_user_user_uuid + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/pick_user_attribute_name_or_description_or_attribute_default.py b/lightdash_client/models/pick_user_attribute_name_or_description_or_attribute_default.py index 0836f27..6465c17 100644 --- a/lightdash_client/models/pick_user_attribute_name_or_description_or_attribute_default.py +++ b/lightdash_client/models/pick_user_attribute_name_or_description_or_attribute_default.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/pick_user_attribute_value_exclude_keyof_user_attribute_value_email.py b/lightdash_client/models/pick_user_attribute_value_exclude_keyof_user_attribute_value_email.py index 42bdd3f..96a6623 100644 --- a/lightdash_client/models/pick_user_attribute_value_exclude_keyof_user_attribute_value_email.py +++ b/lightdash_client/models/pick_user_attribute_value_exclude_keyof_user_attribute_value_email.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="PickUserAttributeValueExcludeKeyofUserAttributeValueEmail") diff --git a/lightdash_client/models/pick_validation_response_base_exclude_keyof_validation_response_base_name.py b/lightdash_client/models/pick_validation_response_base_exclude_keyof_validation_response_base_name.py index 8df0744..7acecac 100644 --- a/lightdash_client/models/pick_validation_response_base_exclude_keyof_validation_response_base_name.py +++ b/lightdash_client/models/pick_validation_response_base_exclude_keyof_validation_response_base_name.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/pick_validation_response_error_or_created_at_or_validation_id.py b/lightdash_client/models/pick_validation_response_error_or_created_at_or_validation_id.py index 075b06b..5638b5f 100644 --- a/lightdash_client/models/pick_validation_response_error_or_created_at_or_validation_id.py +++ b/lightdash_client/models/pick_validation_response_error_or_created_at_or_validation_id.py @@ -1,10 +1,12 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from dateutil.parser import isoparse +from ..types import UNSET, Unset + T = TypeVar("T", bound="PickValidationResponseErrorOrCreatedAtOrValidationId") diff --git a/lightdash_client/models/pie_chart.py b/lightdash_client/models/pie_chart.py index e8bfda6..b596655 100644 --- a/lightdash_client/models/pie_chart.py +++ b/lightdash_client/models/pie_chart.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -8,9 +8,7 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.record_string_partial_pie_chart_value_options import ( - RecordStringPartialPieChartValueOptions, - ) + from ..models.record_string_partial_pie_chart_value_options import RecordStringPartialPieChartValueOptions from ..models.record_string_series_metadata import RecordStringSeriesMetadata from ..models.record_string_string import RecordStringString @@ -54,6 +52,10 @@ class PieChart: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.record_string_partial_pie_chart_value_options import RecordStringPartialPieChartValueOptions + from ..models.record_string_series_metadata import RecordStringSeriesMetadata + from ..models.record_string_string import RecordStringString + metadata: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.metadata, Unset): metadata = self.metadata.to_dict() @@ -130,9 +132,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.record_string_partial_pie_chart_value_options import ( - RecordStringPartialPieChartValueOptions, - ) + from ..models.record_string_partial_pie_chart_value_options import RecordStringPartialPieChartValueOptions from ..models.record_string_series_metadata import RecordStringSeriesMetadata from ..models.record_string_string import RecordStringString diff --git a/lightdash_client/models/pie_chart_config.py b/lightdash_client/models/pie_chart_config.py index c6f9504..1382418 100644 --- a/lightdash_client/models/pie_chart_config.py +++ b/lightdash_client/models/pie_chart_config.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,6 +26,8 @@ class PieChartConfig: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pie_chart import PieChart + type = self.type.value config: Union[Unset, Dict[str, Any]] = UNSET diff --git a/lightdash_client/models/pivot_reference.py b/lightdash_client/models/pivot_reference.py index 5d31cb5..09f757e 100644 --- a/lightdash_client/models/pivot_reference.py +++ b/lightdash_client/models/pivot_reference.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,6 +25,8 @@ class PivotReference: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pivot_value import PivotValue + field = self.field pivot_values: Union[Unset, List[Dict[str, Any]]] = UNSET diff --git a/lightdash_client/models/pivot_value.py b/lightdash_client/models/pivot_value.py index e413387..17600a1 100644 --- a/lightdash_client/models/pivot_value.py +++ b/lightdash_client/models/pivot_value.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="PivotValue") diff --git a/lightdash_client/models/post_chart_results_body.py b/lightdash_client/models/post_chart_results_body.py index 3d1f9f9..257fc3e 100644 --- a/lightdash_client/models/post_chart_results_body.py +++ b/lightdash_client/models/post_chart_results_body.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/post_dashboard_tile_body.py b/lightdash_client/models/post_dashboard_tile_body.py index 2914b11..c975131 100644 --- a/lightdash_client/models/post_dashboard_tile_body.py +++ b/lightdash_client/models/post_dashboard_tile_body.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -34,6 +34,8 @@ class PostDashboardTileBody: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.sort_field import SortField + dashboard_uuid = self.dashboard_uuid dashboard_sorts = [] diff --git a/lightdash_client/models/project.py b/lightdash_client/models/project.py index 2ff14ea..e07f090 100644 --- a/lightdash_client/models/project.py +++ b/lightdash_client/models/project.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -44,6 +44,8 @@ class Project: """ Attributes: + created_by_user_uuid (Union[None, str]): + scheduler_timezone (str): dbt_version (SupportedDbtVersions): dbt_connection (Union['DbtAzureDevOpsProjectConfig', 'DbtBitBucketProjectConfig', 'DbtCloudIDEProjectConfig', 'DbtGithubProjectConfig', 'DbtGitlabProjectConfig', 'DbtLocalProjectConfig', 'DbtNoneProjectConfig']): @@ -63,6 +65,8 @@ class Project: 'PickCreateTrinoCredentialsExcludeKeyofCreateTrinoCredentialsSensitiveCredentialsFieldNames', Unset]): """ + created_by_user_uuid: Union[None, str] + scheduler_timezone: str dbt_version: SupportedDbtVersions dbt_connection: Union[ "DbtAzureDevOpsProjectConfig", @@ -92,14 +96,14 @@ class Project: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - from ..models.dbt_azure_dev_ops_project_config import ( - DbtAzureDevOpsProjectConfig, - ) + from ..models.cube_semantic_layer_connection import CubeSemanticLayerConnection + from ..models.dbt_azure_dev_ops_project_config import DbtAzureDevOpsProjectConfig from ..models.dbt_bit_bucket_project_config import DbtBitBucketProjectConfig from ..models.dbt_cloud_ide_project_config import DbtCloudIDEProjectConfig from ..models.dbt_github_project_config import DbtGithubProjectConfig from ..models.dbt_gitlab_project_config import DbtGitlabProjectConfig from ..models.dbt_local_project_config import DbtLocalProjectConfig + from ..models.dbt_none_project_config import DbtNoneProjectConfig from ..models.dbt_semantic_layer_connection import DbtSemanticLayerConnection from ..models.pick_create_bigquery_credentials_exclude_keyof_create_bigquery_credentials_sensitive_credentials_field_names import ( PickCreateBigqueryCredentialsExcludeKeyofCreateBigqueryCredentialsSensitiveCredentialsFieldNames, @@ -116,6 +120,14 @@ def to_dict(self) -> Dict[str, Any]: from ..models.pick_create_snowflake_credentials_exclude_keyof_create_snowflake_credentials_sensitive_credentials_field_names import ( PickCreateSnowflakeCredentialsExcludeKeyofCreateSnowflakeCredentialsSensitiveCredentialsFieldNames, ) + from ..models.pick_create_trino_credentials_exclude_keyof_create_trino_credentials_sensitive_credentials_field_names import ( + PickCreateTrinoCredentialsExcludeKeyofCreateTrinoCredentialsSensitiveCredentialsFieldNames, + ) + + created_by_user_uuid: Union[None, str] + created_by_user_uuid = self.created_by_user_uuid + + scheduler_timezone = self.scheduler_timezone dbt_version = self.dbt_version.value @@ -190,6 +202,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { + "createdByUserUuid": created_by_user_uuid, + "schedulerTimezone": scheduler_timezone, "dbtVersion": dbt_version, "dbtConnection": dbt_connection, "type": type, @@ -212,9 +226,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.cube_semantic_layer_connection import CubeSemanticLayerConnection - from ..models.dbt_azure_dev_ops_project_config import ( - DbtAzureDevOpsProjectConfig, - ) + from ..models.dbt_azure_dev_ops_project_config import DbtAzureDevOpsProjectConfig from ..models.dbt_bit_bucket_project_config import DbtBitBucketProjectConfig from ..models.dbt_cloud_ide_project_config import DbtCloudIDEProjectConfig from ..models.dbt_github_project_config import DbtGithubProjectConfig @@ -242,6 +254,16 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: ) d = src_dict.copy() + + def _parse_created_by_user_uuid(data: object) -> Union[None, str]: + if data is None: + return data + return cast(Union[None, str], data) + + created_by_user_uuid = _parse_created_by_user_uuid(d.pop("createdByUserUuid")) + + scheduler_timezone = d.pop("schedulerTimezone") + dbt_version = SupportedDbtVersions(d.pop("dbtVersion")) def _parse_dbt_connection( @@ -420,6 +442,8 @@ def _parse_warehouse_connection( warehouse_connection = _parse_warehouse_connection(d.pop("warehouseConnection", UNSET)) project = cls( + created_by_user_uuid=created_by_user_uuid, + scheduler_timezone=scheduler_timezone, dbt_version=dbt_version, dbt_connection=dbt_connection, type=type, diff --git a/lightdash_client/models/project_group_access.py b/lightdash_client/models/project_group_access.py index 18194f6..9d1f024 100644 --- a/lightdash_client/models/project_group_access.py +++ b/lightdash_client/models/project_group_access.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.project_member_role import ProjectMemberRole +from ..types import UNSET, Unset T = TypeVar("T", bound="ProjectGroupAccess") diff --git a/lightdash_client/models/project_member_profile.py b/lightdash_client/models/project_member_profile.py index 4605a1f..e5ada89 100644 --- a/lightdash_client/models/project_member_profile.py +++ b/lightdash_client/models/project_member_profile.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.project_member_role import ProjectMemberRole +from ..types import UNSET, Unset T = TypeVar("T", bound="ProjectMemberProfile") diff --git a/lightdash_client/models/promoted_chart.py b/lightdash_client/models/promoted_chart.py index 0bf29fa..92b8d2b 100644 --- a/lightdash_client/models/promoted_chart.py +++ b/lightdash_client/models/promoted_chart.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -41,9 +41,9 @@ class PromotedChart: dashboard_uuid (Union[None, str]): dashboard_name (Union[None, str]): slug (str): + table_name (str): updated_at (datetime.datetime): pinned_list_order (Union[None, float]): - table_name (str): metric_query (MetricQuery): chart_config (Union['BigNumberConfig', 'CartesianChartConfig', 'CustomVisConfig', 'FunnelChartConfig', 'PieChartConfig', 'TableChartConfig']): @@ -66,9 +66,9 @@ class PromotedChart: dashboard_uuid: Union[None, str] dashboard_name: Union[None, str] slug: str + table_name: str updated_at: datetime.datetime pinned_list_order: Union[None, float] - table_name: str metric_query: "MetricQuery" chart_config: Union[ "BigNumberConfig", @@ -92,7 +92,16 @@ def to_dict(self) -> Dict[str, Any]: from ..models.cartesian_chart_config import CartesianChartConfig from ..models.custom_vis_config import CustomVisConfig from ..models.funnel_chart_config import FunnelChartConfig + from ..models.metric_query import MetricQuery + from ..models.pick_saved_chart_exclude_keyof_saved_chart_is_private_or_access_pivot_config import ( + PickSavedChartExcludeKeyofSavedChartIsPrivateOrAccessPivotConfig, + ) + from ..models.pick_saved_chart_exclude_keyof_saved_chart_is_private_or_access_table_config import ( + PickSavedChartExcludeKeyofSavedChartIsPrivateOrAccessTableConfig, + ) from ..models.pie_chart_config import PieChartConfig + from ..models.table_chart_config import TableChartConfig + from ..models.updated_by_user import UpdatedByUser name = self.name @@ -117,13 +126,13 @@ def to_dict(self) -> Dict[str, Any]: slug = self.slug + table_name = self.table_name + updated_at = self.updated_at.isoformat() pinned_list_order: Union[None, float] pinned_list_order = self.pinned_list_order - table_name = self.table_name - metric_query = self.metric_query.to_dict() chart_config: Dict[str, Any] @@ -172,9 +181,9 @@ def to_dict(self) -> Dict[str, Any]: "dashboardUuid": dashboard_uuid, "dashboardName": dashboard_name, "slug": slug, + "tableName": table_name, "updatedAt": updated_at, "pinnedListOrder": pinned_list_order, - "tableName": table_name, "metricQuery": metric_query, "chartConfig": chart_config, "tableConfig": table_config, @@ -245,6 +254,8 @@ def _parse_dashboard_name(data: object) -> Union[None, str]: slug = d.pop("slug") + table_name = d.pop("tableName") + updated_at = isoparse(d.pop("updatedAt")) def _parse_pinned_list_order(data: object) -> Union[None, float]: @@ -254,8 +265,6 @@ def _parse_pinned_list_order(data: object) -> Union[None, float]: pinned_list_order = _parse_pinned_list_order(d.pop("pinnedListOrder")) - table_name = d.pop("tableName") - metric_query = MetricQuery.from_dict(d.pop("metricQuery")) def _parse_chart_config( @@ -351,9 +360,9 @@ def _parse_chart_config( dashboard_uuid=dashboard_uuid, dashboard_name=dashboard_name, slug=slug, + table_name=table_name, updated_at=updated_at, pinned_list_order=pinned_list_order, - table_name=table_name, metric_query=metric_query, chart_config=chart_config, table_config=table_config, diff --git a/lightdash_client/models/promoted_dashboard.py b/lightdash_client/models/promoted_dashboard.py index 1cc33b3..3410ad2 100644 --- a/lightdash_client/models/promoted_dashboard.py +++ b/lightdash_client/models/promoted_dashboard.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -12,9 +12,7 @@ from ..models.dashboard_filters import DashboardFilters from ..models.dashboard_loom_tile import DashboardLoomTile from ..models.dashboard_markdown_tile import DashboardMarkdownTile - from ..models.dashboard_semantic_viewer_chart_tile import ( - DashboardSemanticViewerChartTile, - ) + from ..models.dashboard_semantic_viewer_chart_tile import DashboardSemanticViewerChartTile from ..models.dashboard_sql_chart_tile import DashboardSqlChartTile from ..models.dashboard_tab import DashboardTab from ..models.updated_by_user import UpdatedByUser @@ -80,9 +78,13 @@ class PromotedDashboard: def to_dict(self) -> Dict[str, Any]: from ..models.dashboard_chart_tile import DashboardChartTile + from ..models.dashboard_filters import DashboardFilters from ..models.dashboard_loom_tile import DashboardLoomTile from ..models.dashboard_markdown_tile import DashboardMarkdownTile + from ..models.dashboard_semantic_viewer_chart_tile import DashboardSemanticViewerChartTile from ..models.dashboard_sql_chart_tile import DashboardSqlChartTile + from ..models.dashboard_tab import DashboardTab + from ..models.updated_by_user import UpdatedByUser name = self.name @@ -183,9 +185,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.dashboard_filters import DashboardFilters from ..models.dashboard_loom_tile import DashboardLoomTile from ..models.dashboard_markdown_tile import DashboardMarkdownTile - from ..models.dashboard_semantic_viewer_chart_tile import ( - DashboardSemanticViewerChartTile, - ) + from ..models.dashboard_semantic_viewer_chart_tile import DashboardSemanticViewerChartTile from ..models.dashboard_sql_chart_tile import DashboardSqlChartTile from ..models.dashboard_tab import DashboardTab from ..models.updated_by_user import UpdatedByUser diff --git a/lightdash_client/models/promotion_changes.py b/lightdash_client/models/promotion_changes.py index 6b978f2..3c8e070 100644 --- a/lightdash_client/models/promotion_changes.py +++ b/lightdash_client/models/promotion_changes.py @@ -1,13 +1,13 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.promotion_changes_charts_item import PromotionChangesChartsItem - from ..models.promotion_changes_dashboards_item import ( - PromotionChangesDashboardsItem, - ) + from ..models.promotion_changes_dashboards_item import PromotionChangesDashboardsItem from ..models.promotion_changes_spaces_item import PromotionChangesSpacesItem @@ -29,6 +29,10 @@ class PromotionChanges: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.promotion_changes_charts_item import PromotionChangesChartsItem + from ..models.promotion_changes_dashboards_item import PromotionChangesDashboardsItem + from ..models.promotion_changes_spaces_item import PromotionChangesSpacesItem + charts = [] for charts_item_data in self.charts: charts_item = charts_item_data.to_dict() @@ -59,9 +63,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.promotion_changes_charts_item import PromotionChangesChartsItem - from ..models.promotion_changes_dashboards_item import ( - PromotionChangesDashboardsItem, - ) + from ..models.promotion_changes_dashboards_item import PromotionChangesDashboardsItem from ..models.promotion_changes_spaces_item import PromotionChangesSpacesItem d = src_dict.copy() diff --git a/lightdash_client/models/promotion_changes_charts_item.py b/lightdash_client/models/promotion_changes_charts_item.py index b92d2f7..34b256d 100644 --- a/lightdash_client/models/promotion_changes_charts_item.py +++ b/lightdash_client/models/promotion_changes_charts_item.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.promotion_action import PromotionAction +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.promoted_chart import PromotedChart @@ -25,6 +26,8 @@ class PromotionChangesChartsItem: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.promoted_chart import PromotedChart + data = self.data.to_dict() action = self.action.value diff --git a/lightdash_client/models/promotion_changes_dashboards_item.py b/lightdash_client/models/promotion_changes_dashboards_item.py index c5cc764..9b9f154 100644 --- a/lightdash_client/models/promotion_changes_dashboards_item.py +++ b/lightdash_client/models/promotion_changes_dashboards_item.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.promotion_action import PromotionAction +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.promoted_dashboard import PromotedDashboard @@ -25,6 +26,8 @@ class PromotionChangesDashboardsItem: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.promoted_dashboard import PromotedDashboard + data = self.data.to_dict() action = self.action.value diff --git a/lightdash_client/models/promotion_changes_spaces_item.py b/lightdash_client/models/promotion_changes_spaces_item.py index 83b937a..b80e03c 100644 --- a/lightdash_client/models/promotion_changes_spaces_item.py +++ b/lightdash_client/models/promotion_changes_spaces_item.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.promotion_action import PromotionAction +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.pick_space_summary_exclude_keyof_space_summary_user_access import ( @@ -28,6 +29,10 @@ class PromotionChangesSpacesItem: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pick_space_summary_exclude_keyof_space_summary_user_access import ( + PickSpaceSummaryExcludeKeyofSpaceSummaryUserAccess, + ) + data = self.data.to_dict() action = self.action.value diff --git a/lightdash_client/models/pull_request_created.py b/lightdash_client/models/pull_request_created.py index ad950a2..2bdd81c 100644 --- a/lightdash_client/models/pull_request_created.py +++ b/lightdash_client/models/pull_request_created.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="PullRequestCreated") diff --git a/lightdash_client/models/record_string_any.py b/lightdash_client/models/record_string_any.py index dc2fd4d..cc70b75 100644 --- a/lightdash_client/models/record_string_any.py +++ b/lightdash_client/models/record_string_any.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="RecordStringAny") diff --git a/lightdash_client/models/record_string_column_properties.py b/lightdash_client/models/record_string_column_properties.py index 5b488c7..f10f7b7 100644 --- a/lightdash_client/models/record_string_column_properties.py +++ b/lightdash_client/models/record_string_column_properties.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="RecordStringColumnProperties") diff --git a/lightdash_client/models/record_string_compiled_dimension.py b/lightdash_client/models/record_string_compiled_dimension.py index a87b20c..caae873 100644 --- a/lightdash_client/models/record_string_compiled_dimension.py +++ b/lightdash_client/models/record_string_compiled_dimension.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="RecordStringCompiledDimension") diff --git a/lightdash_client/models/record_string_compiled_metric.py b/lightdash_client/models/record_string_compiled_metric.py index 158c27e..2d1ba03 100644 --- a/lightdash_client/models/record_string_compiled_metric.py +++ b/lightdash_client/models/record_string_compiled_metric.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="RecordStringCompiledMetric") diff --git a/lightdash_client/models/record_string_dashboard_tile_target.py b/lightdash_client/models/record_string_dashboard_tile_target.py index 5023489..26cb051 100644 --- a/lightdash_client/models/record_string_dashboard_tile_target.py +++ b/lightdash_client/models/record_string_dashboard_tile_target.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="RecordStringDashboardTileTarget") diff --git a/lightdash_client/models/record_string_field_or_table_calculation_or_custom_dimension_or_metric.py b/lightdash_client/models/record_string_field_or_table_calculation_or_custom_dimension_or_metric.py new file mode 100644 index 0000000..9489cfd --- /dev/null +++ b/lightdash_client/models/record_string_field_or_table_calculation_or_custom_dimension_or_metric.py @@ -0,0 +1,45 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordStringFieldOrTableCalculationOrCustomDimensionOrMetric") + + +@_attrs_define +class RecordStringFieldOrTableCalculationOrCustomDimensionOrMetric: + """Construct a type with a set of properties K of type T""" + + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + record_string_field_or_table_calculation_or_custom_dimension_or_metric = cls() + + record_string_field_or_table_calculation_or_custom_dimension_or_metric.additional_properties = d + return record_string_field_or_table_calculation_or_custom_dimension_or_metric + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/record_string_group_type.py b/lightdash_client/models/record_string_group_type.py index 1eb83d5..0b39ac9 100644 --- a/lightdash_client/models/record_string_group_type.py +++ b/lightdash_client/models/record_string_group_type.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="RecordStringGroupType") diff --git a/lightdash_client/models/record_string_item_or_additional_metric.py b/lightdash_client/models/record_string_item_or_additional_metric.py index d6fba56..5c17ea5 100644 --- a/lightdash_client/models/record_string_item_or_additional_metric.py +++ b/lightdash_client/models/record_string_item_or_additional_metric.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="RecordStringItemOrAdditionalMetric") diff --git a/lightdash_client/models/record_string_lineage_node_dependency_array.py b/lightdash_client/models/record_string_lineage_node_dependency_array.py index 5e022f1..6ed4dd2 100644 --- a/lightdash_client/models/record_string_lineage_node_dependency_array.py +++ b/lightdash_client/models/record_string_lineage_node_dependency_array.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="RecordStringLineageNodeDependencyArray") diff --git a/lightdash_client/models/record_string_number.py b/lightdash_client/models/record_string_number.py index 185d9df..79bc7f4 100644 --- a/lightdash_client/models/record_string_number.py +++ b/lightdash_client/models/record_string_number.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="RecordStringNumber") diff --git a/lightdash_client/models/record_string_partial_pie_chart_value_options.py b/lightdash_client/models/record_string_partial_pie_chart_value_options.py index 7fbd24a..976bcd0 100644 --- a/lightdash_client/models/record_string_partial_pie_chart_value_options.py +++ b/lightdash_client/models/record_string_partial_pie_chart_value_options.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="RecordStringPartialPieChartValueOptions") diff --git a/lightdash_client/models/record_string_record_string_string_or_string_array.py b/lightdash_client/models/record_string_record_string_string_or_string_array.py new file mode 100644 index 0000000..a1ce983 --- /dev/null +++ b/lightdash_client/models/record_string_record_string_string_or_string_array.py @@ -0,0 +1,45 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordStringRecordStringStringOrStringArray") + + +@_attrs_define +class RecordStringRecordStringStringOrStringArray: + """Construct a type with a set of properties K of type T""" + + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + record_string_record_string_string_or_string_array = cls() + + record_string_record_string_string_or_string_array.additional_properties = d + return record_string_record_string_string_or_string_array + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/record_string_series_metadata.py b/lightdash_client/models/record_string_series_metadata.py index 34d88f2..21065bd 100644 --- a/lightdash_client/models/record_string_series_metadata.py +++ b/lightdash_client/models/record_string_series_metadata.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="RecordStringSeriesMetadata") diff --git a/lightdash_client/models/record_string_string.py b/lightdash_client/models/record_string_string.py index 6d7580a..414ba26 100644 --- a/lightdash_client/models/record_string_string.py +++ b/lightdash_client/models/record_string_string.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="RecordStringString") diff --git a/lightdash_client/models/record_string_string_or_string_array.py b/lightdash_client/models/record_string_string_or_string_array.py index b54361b..9db96b2 100644 --- a/lightdash_client/models/record_string_string_or_string_array.py +++ b/lightdash_client/models/record_string_string_or_string_array.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="RecordStringStringOrStringArray") diff --git a/lightdash_client/models/record_string_type_dimension_type.py b/lightdash_client/models/record_string_type_dimension_type.py index c90b013..843af6c 100644 --- a/lightdash_client/models/record_string_type_dimension_type.py +++ b/lightdash_client/models/record_string_type_dimension_type.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="RecordStringTypeDimensionType") diff --git a/lightdash_client/models/record_string_unknown.py b/lightdash_client/models/record_string_unknown.py index 763b5d8..bd3a6fe 100644 --- a/lightdash_client/models/record_string_unknown.py +++ b/lightdash_client/models/record_string_unknown.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="RecordStringUnknown") diff --git a/lightdash_client/models/record_string_value_result_value.py b/lightdash_client/models/record_string_value_result_value.py new file mode 100644 index 0000000..b71d92d --- /dev/null +++ b/lightdash_client/models/record_string_value_result_value.py @@ -0,0 +1,45 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RecordStringValueResultValue") + + +@_attrs_define +class RecordStringValueResultValue: + """Construct a type with a set of properties K of type T""" + + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + record_string_value_result_value = cls() + + record_string_value_result_value.additional_properties = d + return record_string_value_result_value + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/remove_category_from_catalog_item_response_200.py b/lightdash_client/models/remove_category_from_catalog_item_response_200.py new file mode 100644 index 0000000..0938026 --- /dev/null +++ b/lightdash_client/models/remove_category_from_catalog_item_response_200.py @@ -0,0 +1,68 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RemoveCategoryFromCatalogItemResponse200") + + +@_attrs_define +class RemoveCategoryFromCatalogItemResponse200: + """ + Attributes: + results (Any): + status (str): + """ + + results: Any + status: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + results = self.results + + status = self.status + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "results": results, + "status": status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + results = d.pop("results") + + status = d.pop("status") + + remove_category_from_catalog_item_response_200 = cls( + results=results, + status=status, + ) + + remove_category_from_catalog_item_response_200.additional_properties = d + return remove_category_from_catalog_item_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/required_create_dashboard_tile_base.py b/lightdash_client/models/required_create_dashboard_tile_base.py index cc1001f..2d8f622 100644 --- a/lightdash_client/models/required_create_dashboard_tile_base.py +++ b/lightdash_client/models/required_create_dashboard_tile_base.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/resource_view_chart_item.py b/lightdash_client/models/resource_view_chart_item.py index 4454d01..a966bb4 100644 --- a/lightdash_client/models/resource_view_chart_item.py +++ b/lightdash_client/models/resource_view_chart_item.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -29,6 +29,8 @@ class ResourceViewChartItem: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.resource_view_chart_item_data import ResourceViewChartItemData + data = self.data.to_dict() type = self.type.value diff --git a/lightdash_client/models/resource_view_chart_item_data.py b/lightdash_client/models/resource_view_chart_item_data.py index a53f2bc..5f929ae 100644 --- a/lightdash_client/models/resource_view_chart_item_data.py +++ b/lightdash_client/models/resource_view_chart_item_data.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -59,6 +59,11 @@ class ResourceViewChartItemData: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pick_validation_response_error_or_created_at_or_validation_id import ( + PickValidationResponseErrorOrCreatedAtOrValidationId, + ) + from ..models.updated_by_user import UpdatedByUser + name = self.name uuid = self.uuid diff --git a/lightdash_client/models/resource_view_dashboard_item.py b/lightdash_client/models/resource_view_dashboard_item.py index 16b45fc..ff1e803 100644 --- a/lightdash_client/models/resource_view_dashboard_item.py +++ b/lightdash_client/models/resource_view_dashboard_item.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -33,6 +33,10 @@ class ResourceViewDashboardItem: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pick_dashboard_basic_details_uuid_or_space_uuid_or_description_or_name_or_views_or_first_viewed_at_or_pinned_list_uuid_or_pinned_list_order_or_updated_at_or_updated_by_user_or_validation_errors import ( + PickDashboardBasicDetailsUuidOrSpaceUuidOrDescriptionOrNameOrViewsOrFirstViewedAtOrPinnedListUuidOrPinnedListOrderOrUpdatedAtOrUpdatedByUserOrValidationErrors, + ) + data = self.data.to_dict() type = self.type.value diff --git a/lightdash_client/models/resource_view_space_item.py b/lightdash_client/models/resource_view_space_item.py index 44613bb..03a568b 100644 --- a/lightdash_client/models/resource_view_space_item.py +++ b/lightdash_client/models/resource_view_space_item.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.resource_view_item_type_space import ResourceViewItemTypeSPACE +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.resource_view_space_item_data import ResourceViewSpaceItemData @@ -25,6 +26,8 @@ class ResourceViewSpaceItem: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.resource_view_space_item_data import ResourceViewSpaceItemData + data = self.data.to_dict() type = self.type.value diff --git a/lightdash_client/models/resource_view_space_item_data.py b/lightdash_client/models/resource_view_space_item_data.py index 17dec5a..7928288 100644 --- a/lightdash_client/models/resource_view_space_item_data.py +++ b/lightdash_client/models/resource_view_space_item_data.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="ResourceViewSpaceItemData") diff --git a/lightdash_client/models/rotate_personal_access_token_body.py b/lightdash_client/models/rotate_personal_access_token_body.py new file mode 100644 index 0000000..cd7582a --- /dev/null +++ b/lightdash_client/models/rotate_personal_access_token_body.py @@ -0,0 +1,62 @@ +import datetime +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="RotatePersonalAccessTokenBody") + + +@_attrs_define +class RotatePersonalAccessTokenBody: + """ + Attributes: + expires_at (datetime.datetime): + """ + + expires_at: datetime.datetime + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + expires_at = self.expires_at.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "expiresAt": expires_at, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + expires_at = isoparse(d.pop("expiresAt")) + + rotate_personal_access_token_body = cls( + expires_at=expires_at, + ) + + rotate_personal_access_token_body.additional_properties = d + return rotate_personal_access_token_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/rotate_personal_access_token_response_200.py b/lightdash_client/models/rotate_personal_access_token_response_200.py new file mode 100644 index 0000000..5244ad4 --- /dev/null +++ b/lightdash_client/models/rotate_personal_access_token_response_200.py @@ -0,0 +1,77 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.rotate_personal_access_token_response_200_status import RotatePersonalAccessTokenResponse200Status +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.personal_access_token_with_token import PersonalAccessTokenWithToken + + +T = TypeVar("T", bound="RotatePersonalAccessTokenResponse200") + + +@_attrs_define +class RotatePersonalAccessTokenResponse200: + """ + Attributes: + results (PersonalAccessTokenWithToken): + status (RotatePersonalAccessTokenResponse200Status): + """ + + results: "PersonalAccessTokenWithToken" + status: RotatePersonalAccessTokenResponse200Status + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.personal_access_token_with_token import PersonalAccessTokenWithToken + + results = self.results.to_dict() + + status = self.status.value + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "results": results, + "status": status, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.personal_access_token_with_token import PersonalAccessTokenWithToken + + d = src_dict.copy() + results = PersonalAccessTokenWithToken.from_dict(d.pop("results")) + + status = RotatePersonalAccessTokenResponse200Status(d.pop("status")) + + rotate_personal_access_token_response_200 = cls( + results=results, + status=status, + ) + + rotate_personal_access_token_response_200.additional_properties = d + return rotate_personal_access_token_response_200 + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/rotate_personal_access_token_response_200_status.py b/lightdash_client/models/rotate_personal_access_token_response_200_status.py new file mode 100644 index 0000000..58640a1 --- /dev/null +++ b/lightdash_client/models/rotate_personal_access_token_response_200_status.py @@ -0,0 +1,8 @@ +from enum import Enum + + +class RotatePersonalAccessTokenResponse200Status(str, Enum): + OK = "ok" + + def __str__(self) -> str: + return str(self.value) diff --git a/lightdash_client/models/run_metric_explorer_query_body.py b/lightdash_client/models/run_metric_explorer_query_body.py new file mode 100644 index 0000000..792a0cf --- /dev/null +++ b/lightdash_client/models/run_metric_explorer_query_body.py @@ -0,0 +1,136 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.metric_explorer_comparison_type_type_0 import MetricExplorerComparisonTypeType0 + from ..models.metric_explorer_comparison_type_type_1 import MetricExplorerComparisonTypeType1 + from ..models.metric_explorer_comparison_type_type_2 import MetricExplorerComparisonTypeType2 + from ..models.time_dimension_config import TimeDimensionConfig + + +T = TypeVar("T", bound="RunMetricExplorerQueryBody") + + +@_attrs_define +class RunMetricExplorerQueryBody: + """ + Attributes: + comparison (Union['MetricExplorerComparisonTypeType0', 'MetricExplorerComparisonTypeType1', + 'MetricExplorerComparisonTypeType2']): + time_dimension_override (Union[Unset, TimeDimensionConfig]): + """ + + comparison: Union[ + "MetricExplorerComparisonTypeType0", "MetricExplorerComparisonTypeType1", "MetricExplorerComparisonTypeType2" + ] + time_dimension_override: Union[Unset, "TimeDimensionConfig"] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.metric_explorer_comparison_type_type_0 import MetricExplorerComparisonTypeType0 + from ..models.metric_explorer_comparison_type_type_1 import MetricExplorerComparisonTypeType1 + from ..models.metric_explorer_comparison_type_type_2 import MetricExplorerComparisonTypeType2 + from ..models.time_dimension_config import TimeDimensionConfig + + comparison: Dict[str, Any] + if isinstance(self.comparison, MetricExplorerComparisonTypeType0): + comparison = self.comparison.to_dict() + elif isinstance(self.comparison, MetricExplorerComparisonTypeType1): + comparison = self.comparison.to_dict() + else: + comparison = self.comparison.to_dict() + + time_dimension_override: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.time_dimension_override, Unset): + time_dimension_override = self.time_dimension_override.to_dict() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "comparison": comparison, + } + ) + if time_dimension_override is not UNSET: + field_dict["timeDimensionOverride"] = time_dimension_override + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.metric_explorer_comparison_type_type_0 import MetricExplorerComparisonTypeType0 + from ..models.metric_explorer_comparison_type_type_1 import MetricExplorerComparisonTypeType1 + from ..models.metric_explorer_comparison_type_type_2 import MetricExplorerComparisonTypeType2 + from ..models.time_dimension_config import TimeDimensionConfig + + d = src_dict.copy() + + def _parse_comparison( + data: object, + ) -> Union[ + "MetricExplorerComparisonTypeType0", + "MetricExplorerComparisonTypeType1", + "MetricExplorerComparisonTypeType2", + ]: + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_metric_explorer_comparison_type_type_0 = MetricExplorerComparisonTypeType0.from_dict( + data + ) + + return componentsschemas_metric_explorer_comparison_type_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_metric_explorer_comparison_type_type_1 = MetricExplorerComparisonTypeType1.from_dict( + data + ) + + return componentsschemas_metric_explorer_comparison_type_type_1 + except: # noqa: E722 + pass + if not isinstance(data, dict): + raise TypeError() + componentsschemas_metric_explorer_comparison_type_type_2 = MetricExplorerComparisonTypeType2.from_dict(data) + + return componentsschemas_metric_explorer_comparison_type_type_2 + + comparison = _parse_comparison(d.pop("comparison")) + + _time_dimension_override = d.pop("timeDimensionOverride", UNSET) + time_dimension_override: Union[Unset, TimeDimensionConfig] + if isinstance(_time_dimension_override, Unset): + time_dimension_override = UNSET + else: + time_dimension_override = TimeDimensionConfig.from_dict(_time_dimension_override) + + run_metric_explorer_query_body = cls( + comparison=comparison, + time_dimension_override=time_dimension_override, + ) + + run_metric_explorer_query_body.additional_properties = d + return run_metric_explorer_query_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/run_sql_query_body.py b/lightdash_client/models/run_sql_query_body.py index ac1ad0b..6fdc993 100644 --- a/lightdash_client/models/run_sql_query_body.py +++ b/lightdash_client/models/run_sql_query_body.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="RunSqlQueryBody") diff --git a/lightdash_client/models/run_sql_query_response_200.py b/lightdash_client/models/run_sql_query_response_200.py index 51edfd9..f074ebc 100644 --- a/lightdash_client/models/run_sql_query_response_200.py +++ b/lightdash_client/models/run_sql_query_response_200.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.run_sql_query_response_200_status import RunSqlQueryResponse200Status +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.api_sql_query_results import ApiSqlQueryResults @@ -25,6 +26,8 @@ class RunSqlQueryResponse200: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.api_sql_query_results import ApiSqlQueryResults + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/saved_chart.py b/lightdash_client/models/saved_chart.py index b0e1678..0102286 100644 --- a/lightdash_client/models/saved_chart.py +++ b/lightdash_client/models/saved_chart.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -89,7 +89,13 @@ def to_dict(self) -> Dict[str, Any]: from ..models.cartesian_chart_config import CartesianChartConfig from ..models.custom_vis_config import CustomVisConfig from ..models.funnel_chart_config import FunnelChartConfig + from ..models.metric_query import MetricQuery from ..models.pie_chart_config import PieChartConfig + from ..models.saved_chart_pivot_config import SavedChartPivotConfig + from ..models.saved_chart_table_config import SavedChartTableConfig + from ..models.space_share import SpaceShare + from ..models.table_chart_config import TableChartConfig + from ..models.updated_by_user import UpdatedByUser slug = self.slug diff --git a/lightdash_client/models/saved_chart_pivot_config.py b/lightdash_client/models/saved_chart_pivot_config.py index be7ea53..dcc8b5a 100644 --- a/lightdash_client/models/saved_chart_pivot_config.py +++ b/lightdash_client/models/saved_chart_pivot_config.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="SavedChartPivotConfig") diff --git a/lightdash_client/models/saved_chart_table_config.py b/lightdash_client/models/saved_chart_table_config.py index 313eb51..eab47da 100644 --- a/lightdash_client/models/saved_chart_table_config.py +++ b/lightdash_client/models/saved_chart_table_config.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="SavedChartTableConfig") diff --git a/lightdash_client/models/scheduled_jobs.py b/lightdash_client/models/scheduled_jobs.py index 5ac295f..54b34df 100644 --- a/lightdash_client/models/scheduled_jobs.py +++ b/lightdash_client/models/scheduled_jobs.py @@ -1,10 +1,12 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from dateutil.parser import isoparse +from ..types import UNSET, Unset + T = TypeVar("T", bound="ScheduledJobs") diff --git a/lightdash_client/models/scheduler_base.py b/lightdash_client/models/scheduler_base.py index 355d7b4..542e81e 100644 --- a/lightdash_client/models/scheduler_base.py +++ b/lightdash_client/models/scheduler_base.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -23,6 +23,7 @@ class SchedulerBase: """ Attributes: + include_links (bool): enabled (bool): options (Union['SchedulerCsvOptions', 'SchedulerGsheetsOptions', 'SchedulerImageOptions']): dashboard_uuid (Union[None, str]): @@ -36,9 +37,11 @@ class SchedulerBase: scheduler_uuid (str): notification_frequency (Union[Unset, NotificationFrequency]): thresholds (Union[Unset, List['ThresholdOptions']]): + timezone (Union[Unset, str]): message (Union[Unset, str]): """ + include_links: bool enabled: bool options: Union["SchedulerCsvOptions", "SchedulerGsheetsOptions", "SchedulerImageOptions"] dashboard_uuid: Union[None, str] @@ -52,12 +55,17 @@ class SchedulerBase: scheduler_uuid: str notification_frequency: Union[Unset, NotificationFrequency] = UNSET thresholds: Union[Unset, List["ThresholdOptions"]] = UNSET + timezone: Union[Unset, str] = UNSET message: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: from ..models.scheduler_csv_options import SchedulerCsvOptions + from ..models.scheduler_gsheets_options import SchedulerGsheetsOptions from ..models.scheduler_image_options import SchedulerImageOptions + from ..models.threshold_options import ThresholdOptions + + include_links = self.include_links enabled = self.enabled @@ -100,12 +108,15 @@ def to_dict(self) -> Dict[str, Any]: thresholds_item = thresholds_item_data.to_dict() thresholds.append(thresholds_item) + timezone = self.timezone + message = self.message field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { + "includeLinks": include_links, "enabled": enabled, "options": options, "dashboardUuid": dashboard_uuid, @@ -123,6 +134,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["notificationFrequency"] = notification_frequency if thresholds is not UNSET: field_dict["thresholds"] = thresholds + if timezone is not UNSET: + field_dict["timezone"] = timezone if message is not UNSET: field_dict["message"] = message @@ -136,6 +149,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.threshold_options import ThresholdOptions d = src_dict.copy() + include_links = d.pop("includeLinks") + enabled = d.pop("enabled") def _parse_options( @@ -207,9 +222,12 @@ def _parse_saved_chart_uuid(data: object) -> Union[None, str]: thresholds.append(thresholds_item) + timezone = d.pop("timezone", UNSET) + message = d.pop("message", UNSET) scheduler_base = cls( + include_links=include_links, enabled=enabled, options=options, dashboard_uuid=dashboard_uuid, @@ -223,6 +241,7 @@ def _parse_saved_chart_uuid(data: object) -> Union[None, str]: scheduler_uuid=scheduler_uuid, notification_frequency=notification_frequency, thresholds=thresholds, + timezone=timezone, message=message, ) diff --git a/lightdash_client/models/scheduler_csv_options.py b/lightdash_client/models/scheduler_csv_options.py index e204d18..1d30430 100644 --- a/lightdash_client/models/scheduler_csv_options.py +++ b/lightdash_client/models/scheduler_csv_options.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.scheduler_csv_options_limit_type_1 import SchedulerCsvOptionsLimitType1 +from ..types import UNSET, Unset T = TypeVar("T", bound="SchedulerCsvOptions") diff --git a/lightdash_client/models/scheduler_email_target.py b/lightdash_client/models/scheduler_email_target.py index 7a15b6d..99a77f8 100644 --- a/lightdash_client/models/scheduler_email_target.py +++ b/lightdash_client/models/scheduler_email_target.py @@ -1,10 +1,12 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from dateutil.parser import isoparse +from ..types import UNSET, Unset + T = TypeVar("T", bound="SchedulerEmailTarget") diff --git a/lightdash_client/models/scheduler_gsheets_options.py b/lightdash_client/models/scheduler_gsheets_options.py index 0b8120f..5ade5e3 100644 --- a/lightdash_client/models/scheduler_gsheets_options.py +++ b/lightdash_client/models/scheduler_gsheets_options.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="SchedulerGsheetsOptions") diff --git a/lightdash_client/models/scheduler_image_options.py b/lightdash_client/models/scheduler_image_options.py index 6626398..986ee13 100644 --- a/lightdash_client/models/scheduler_image_options.py +++ b/lightdash_client/models/scheduler_image_options.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/scheduler_log.py b/lightdash_client/models/scheduler_log.py index 11c3b04..c2e69c7 100644 --- a/lightdash_client/models/scheduler_log.py +++ b/lightdash_client/models/scheduler_log.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -46,6 +46,8 @@ class SchedulerLog: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.record_string_any import RecordStringAny + status = self.status.value created_at = self.created_at.isoformat() diff --git a/lightdash_client/models/scheduler_log_task.py b/lightdash_client/models/scheduler_log_task.py index 18bb805..7e20eb0 100644 --- a/lightdash_client/models/scheduler_log_task.py +++ b/lightdash_client/models/scheduler_log_task.py @@ -3,8 +3,10 @@ class SchedulerLogTask(str, Enum): COMPILEPROJECT = "compileProject" + CREATEPROJECTWITHCOMPILE = "createProjectWithCompile" DOWNLOADCSV = "downloadCsv" HANDLESCHEDULEDDELIVERY = "handleScheduledDelivery" + INDEXCATALOG = "indexCatalog" SEMANTICLAYER = "semanticLayer" SENDEMAILNOTIFICATION = "sendEmailNotification" SENDSLACKNOTIFICATION = "sendSlackNotification" diff --git a/lightdash_client/models/scheduler_slack_target.py b/lightdash_client/models/scheduler_slack_target.py index b1a6415..1dfb956 100644 --- a/lightdash_client/models/scheduler_slack_target.py +++ b/lightdash_client/models/scheduler_slack_target.py @@ -1,10 +1,12 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from dateutil.parser import isoparse +from ..types import UNSET, Unset + T = TypeVar("T", bound="SchedulerSlackTarget") diff --git a/lightdash_client/models/series.py b/lightdash_client/models/series.py index 3595e3a..a922ec8 100644 --- a/lightdash_client/models/series.py +++ b/lightdash_client/models/series.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -52,6 +52,12 @@ class Series: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.mark_line import MarkLine + from ..models.series_area_style import SeriesAreaStyle + from ..models.series_encode import SeriesEncode + from ..models.series_label import SeriesLabel + from ..models.series_stack_label import SeriesStackLabel + type = self.type.value encode = self.encode.to_dict() diff --git a/lightdash_client/models/series_area_style.py b/lightdash_client/models/series_area_style.py index fdf6550..66011e0 100644 --- a/lightdash_client/models/series_area_style.py +++ b/lightdash_client/models/series_area_style.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="SeriesAreaStyle") diff --git a/lightdash_client/models/series_encode.py b/lightdash_client/models/series_encode.py index 005188e..c1b6c50 100644 --- a/lightdash_client/models/series_encode.py +++ b/lightdash_client/models/series_encode.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -29,6 +29,8 @@ class SeriesEncode: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pivot_reference import PivotReference + y_ref = self.y_ref.to_dict() x_ref = self.x_ref.to_dict() diff --git a/lightdash_client/models/series_label.py b/lightdash_client/models/series_label.py index 5ecc73d..0839cb0 100644 --- a/lightdash_client/models/series_label.py +++ b/lightdash_client/models/series_label.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/series_stack_label.py b/lightdash_client/models/series_stack_label.py index b43b674..e13eec7 100644 --- a/lightdash_client/models/series_stack_label.py +++ b/lightdash_client/models/series_stack_label.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/share_url.py b/lightdash_client/models/share_url.py index 8812b11..c4f2aef 100644 --- a/lightdash_client/models/share_url.py +++ b/lightdash_client/models/share_url.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/slack_app_custom_settings.py b/lightdash_client/models/slack_app_custom_settings.py index ccaf166..60c2d83 100644 --- a/lightdash_client/models/slack_app_custom_settings.py +++ b/lightdash_client/models/slack_app_custom_settings.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -27,6 +27,8 @@ class SlackAppCustomSettings: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.slack_channel_project_mapping import SlackChannelProjectMapping + app_profile_photo_url: Union[None, str] app_profile_photo_url = self.app_profile_photo_url diff --git a/lightdash_client/models/slack_channel.py b/lightdash_client/models/slack_channel.py index 4ac57ea..e4464ea 100644 --- a/lightdash_client/models/slack_channel.py +++ b/lightdash_client/models/slack_channel.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="SlackChannel") diff --git a/lightdash_client/models/slack_channel_project_mapping.py b/lightdash_client/models/slack_channel_project_mapping.py index 67d4c03..06e2e2a 100644 --- a/lightdash_client/models/slack_channel_project_mapping.py +++ b/lightdash_client/models/slack_channel_project_mapping.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="SlackChannelProjectMapping") diff --git a/lightdash_client/models/sort_field.py b/lightdash_client/models/sort_field.py index 75e6bd4..2671e94 100644 --- a/lightdash_client/models/sort_field.py +++ b/lightdash_client/models/sort_field.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="SortField") diff --git a/lightdash_client/models/source.py b/lightdash_client/models/source.py index 52f5373..79c7dba 100644 --- a/lightdash_client/models/source.py +++ b/lightdash_client/models/source.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -30,6 +30,9 @@ class Source: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.source_highlight import SourceHighlight + from ..models.source_range import SourceRange + content = self.content range_ = self.range_.to_dict() diff --git a/lightdash_client/models/source_highlight.py b/lightdash_client/models/source_highlight.py index ebfea3c..bdece6d 100644 --- a/lightdash_client/models/source_highlight.py +++ b/lightdash_client/models/source_highlight.py @@ -1,8 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.source_position import SourcePosition @@ -23,6 +25,8 @@ class SourceHighlight: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.source_position import SourcePosition + end = self.end.to_dict() start = self.start.to_dict() diff --git a/lightdash_client/models/source_position.py b/lightdash_client/models/source_position.py index db6308a..332b90c 100644 --- a/lightdash_client/models/source_position.py +++ b/lightdash_client/models/source_position.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="SourcePosition") diff --git a/lightdash_client/models/source_range.py b/lightdash_client/models/source_range.py index 61f396f..dd6e01c 100644 --- a/lightdash_client/models/source_range.py +++ b/lightdash_client/models/source_range.py @@ -1,8 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.source_position import SourcePosition @@ -23,6 +25,8 @@ class SourceRange: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.source_position import SourcePosition + end = self.end.to_dict() start = self.start.to_dict() diff --git a/lightdash_client/models/space.py b/lightdash_client/models/space.py index 5f836ee..da82746 100644 --- a/lightdash_client/models/space.py +++ b/lightdash_client/models/space.py @@ -1,8 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.dashboard_basic_details import DashboardBasicDetails from ..models.space_group import SpaceGroup @@ -46,6 +48,11 @@ class Space: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_basic_details import DashboardBasicDetails + from ..models.space_group import SpaceGroup + from ..models.space_query import SpaceQuery + from ..models.space_share import SpaceShare + slug = self.slug pinned_list_order: Union[None, float] diff --git a/lightdash_client/models/space_group.py b/lightdash_client/models/space_group.py index 53a2f74..0d01c6d 100644 --- a/lightdash_client/models/space_group.py +++ b/lightdash_client/models/space_group.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.space_member_role import SpaceMemberRole +from ..types import UNSET, Unset T = TypeVar("T", bound="SpaceGroup") diff --git a/lightdash_client/models/space_query.py b/lightdash_client/models/space_query.py index 8faf4a9..1a6eb75 100644 --- a/lightdash_client/models/space_query.py +++ b/lightdash_client/models/space_query.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -69,6 +69,11 @@ class SpaceQuery: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pick_validation_response_error_or_created_at_or_validation_id import ( + PickValidationResponseErrorOrCreatedAtOrValidationId, + ) + from ..models.updated_by_user import UpdatedByUser + name = self.name uuid = self.uuid diff --git a/lightdash_client/models/space_share.py b/lightdash_client/models/space_share.py index 006cf38..65d9459 100644 --- a/lightdash_client/models/space_share.py +++ b/lightdash_client/models/space_share.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/space_summary.py b/lightdash_client/models/space_summary.py index f557fb6..15b7eab 100644 --- a/lightdash_client/models/space_summary.py +++ b/lightdash_client/models/space_summary.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -45,6 +45,8 @@ class SpaceSummary: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.space_share import SpaceShare + name = self.name uuid = self.uuid diff --git a/lightdash_client/models/summary_extra_fields.py b/lightdash_client/models/summary_extra_fields.py index 900d256..ecc9a2e 100644 --- a/lightdash_client/models/summary_extra_fields.py +++ b/lightdash_client/models/summary_extra_fields.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/table_base.py b/lightdash_client/models/table_base.py index 2bebe21..f3f077a 100644 --- a/lightdash_client/models/table_base.py +++ b/lightdash_client/models/table_base.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -7,11 +7,10 @@ from ..types import UNSET, Unset if TYPE_CHECKING: + from ..models.default_time_dimension import DefaultTimeDimension from ..models.metric_filter_rule import MetricFilterRule from ..models.record_string_group_type import RecordStringGroupType - from ..models.record_string_string_or_string_array import ( - RecordStringStringOrStringArray, - ) + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray T = TypeVar("T", bound="TableBase") @@ -26,6 +25,7 @@ class TableBase: database (str): label (str): name (str): + default_time_dimension (Union[Unset, DefaultTimeDimension]): group_details (Union[Unset, RecordStringGroupType]): Construct a type with a set of properties K of type T required_attributes (Union[Unset, RecordStringStringOrStringArray]): Construct a type with a set of properties K of type T @@ -43,6 +43,7 @@ class TableBase: database: str label: str name: str + default_time_dimension: Union[Unset, "DefaultTimeDimension"] = UNSET group_details: Union[Unset, "RecordStringGroupType"] = UNSET required_attributes: Union[Unset, "RecordStringStringOrStringArray"] = UNSET hidden: Union[Unset, bool] = UNSET @@ -55,6 +56,11 @@ class TableBase: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.default_time_dimension import DefaultTimeDimension + from ..models.metric_filter_rule import MetricFilterRule + from ..models.record_string_group_type import RecordStringGroupType + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray + sql_table = self.sql_table schema = self.schema @@ -65,6 +71,10 @@ def to_dict(self) -> Dict[str, Any]: name = self.name + default_time_dimension: Union[Unset, Dict[str, Any]] = UNSET + if not isinstance(self.default_time_dimension, Unset): + default_time_dimension = self.default_time_dimension.to_dict() + group_details: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.group_details, Unset): group_details = self.group_details.to_dict() @@ -105,6 +115,8 @@ def to_dict(self) -> Dict[str, Any]: "name": name, } ) + if default_time_dimension is not UNSET: + field_dict["defaultTimeDimension"] = default_time_dimension if group_details is not UNSET: field_dict["groupDetails"] = group_details if required_attributes is not UNSET: @@ -128,11 +140,10 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.default_time_dimension import DefaultTimeDimension from ..models.metric_filter_rule import MetricFilterRule from ..models.record_string_group_type import RecordStringGroupType - from ..models.record_string_string_or_string_array import ( - RecordStringStringOrStringArray, - ) + from ..models.record_string_string_or_string_array import RecordStringStringOrStringArray d = src_dict.copy() sql_table = d.pop("sqlTable") @@ -145,6 +156,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: name = d.pop("name") + _default_time_dimension = d.pop("defaultTimeDimension", UNSET) + default_time_dimension: Union[Unset, DefaultTimeDimension] + if isinstance(_default_time_dimension, Unset): + default_time_dimension = UNSET + else: + default_time_dimension = DefaultTimeDimension.from_dict(_default_time_dimension) + _group_details = d.pop("groupDetails", UNSET) group_details: Union[Unset, RecordStringGroupType] if isinstance(_group_details, Unset): @@ -189,6 +207,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: database=database, label=label, name=name, + default_time_dimension=default_time_dimension, group_details=group_details, required_attributes=required_attributes, hidden=hidden, diff --git a/lightdash_client/models/table_calculation.py b/lightdash_client/models/table_calculation.py index d0ca328..ee2be00 100644 --- a/lightdash_client/models/table_calculation.py +++ b/lightdash_client/models/table_calculation.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -34,6 +34,8 @@ class TableCalculation: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.custom_format import CustomFormat + sql = self.sql display_name = self.display_name diff --git a/lightdash_client/models/table_chart.py b/lightdash_client/models/table_chart.py index 9563777..c50dab7 100644 --- a/lightdash_client/models/table_chart.py +++ b/lightdash_client/models/table_chart.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -6,12 +6,8 @@ from ..types import UNSET, Unset if TYPE_CHECKING: - from ..models.conditional_formatting_config_with_color_range import ( - ConditionalFormattingConfigWithColorRange, - ) - from ..models.conditional_formatting_config_with_single_color import ( - ConditionalFormattingConfigWithSingleColor, - ) + from ..models.conditional_formatting_config_with_color_range import ConditionalFormattingConfigWithColorRange + from ..models.conditional_formatting_config_with_single_color import ConditionalFormattingConfigWithSingleColor from ..models.record_string_column_properties import RecordStringColumnProperties @@ -48,9 +44,9 @@ class TableChart: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - from ..models.conditional_formatting_config_with_single_color import ( - ConditionalFormattingConfigWithSingleColor, - ) + from ..models.conditional_formatting_config_with_color_range import ConditionalFormattingConfigWithColorRange + from ..models.conditional_formatting_config_with_single_color import ConditionalFormattingConfigWithSingleColor + from ..models.record_string_column_properties import RecordStringColumnProperties metrics_as_rows = self.metrics_as_rows @@ -108,15 +104,9 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.conditional_formatting_config_with_color_range import ( - ConditionalFormattingConfigWithColorRange, - ) - from ..models.conditional_formatting_config_with_single_color import ( - ConditionalFormattingConfigWithSingleColor, - ) - from ..models.record_string_column_properties import ( - RecordStringColumnProperties, - ) + from ..models.conditional_formatting_config_with_color_range import ConditionalFormattingConfigWithColorRange + from ..models.conditional_formatting_config_with_single_color import ConditionalFormattingConfigWithSingleColor + from ..models.record_string_column_properties import RecordStringColumnProperties d = src_dict.copy() metrics_as_rows = d.pop("metricsAsRows", UNSET) diff --git a/lightdash_client/models/table_chart_config.py b/lightdash_client/models/table_chart_config.py index 74282be..26e4a30 100644 --- a/lightdash_client/models/table_chart_config.py +++ b/lightdash_client/models/table_chart_config.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -26,6 +26,8 @@ class TableChartConfig: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.table_chart import TableChart + type = self.type.value config: Union[Unset, Dict[str, Any]] = UNSET diff --git a/lightdash_client/models/tag.py b/lightdash_client/models/tag.py new file mode 100644 index 0000000..90503d5 --- /dev/null +++ b/lightdash_client/models/tag.py @@ -0,0 +1,134 @@ +import datetime +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.pick_lightdash_user_user_uuid_or_first_name_or_last_name import ( + PickLightdashUserUserUuidOrFirstNameOrLastName, + ) + + +T = TypeVar("T", bound="Tag") + + +@_attrs_define +class Tag: + """ + Attributes: + created_by (Union['PickLightdashUserUserUuidOrFirstNameOrLastName', None]): + created_at (datetime.datetime): + color (str): + name (str): + project_uuid (str): + tag_uuid (str): + """ + + created_by: Union["PickLightdashUserUserUuidOrFirstNameOrLastName", None] + created_at: datetime.datetime + color: str + name: str + project_uuid: str + tag_uuid: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.pick_lightdash_user_user_uuid_or_first_name_or_last_name import ( + PickLightdashUserUserUuidOrFirstNameOrLastName, + ) + + created_by: Union[Dict[str, Any], None] + if isinstance(self.created_by, PickLightdashUserUserUuidOrFirstNameOrLastName): + created_by = self.created_by.to_dict() + else: + created_by = self.created_by + + created_at = self.created_at.isoformat() + + color = self.color + + name = self.name + + project_uuid = self.project_uuid + + tag_uuid = self.tag_uuid + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "createdBy": created_by, + "createdAt": created_at, + "color": color, + "name": name, + "projectUuid": project_uuid, + "tagUuid": tag_uuid, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.pick_lightdash_user_user_uuid_or_first_name_or_last_name import ( + PickLightdashUserUserUuidOrFirstNameOrLastName, + ) + + d = src_dict.copy() + + def _parse_created_by(data: object) -> Union["PickLightdashUserUserUuidOrFirstNameOrLastName", None]: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + created_by_type_1 = PickLightdashUserUserUuidOrFirstNameOrLastName.from_dict(data) + + return created_by_type_1 + except: # noqa: E722 + pass + return cast(Union["PickLightdashUserUserUuidOrFirstNameOrLastName", None], data) + + created_by = _parse_created_by(d.pop("createdBy")) + + created_at = isoparse(d.pop("createdAt")) + + color = d.pop("color") + + name = d.pop("name") + + project_uuid = d.pop("projectUuid") + + tag_uuid = d.pop("tagUuid") + + tag = cls( + created_by=created_by, + created_at=created_at, + color=color, + name=name, + project_uuid=project_uuid, + tag_uuid=tag_uuid, + ) + + tag.additional_properties = d + return tag + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/threshold_options.py b/lightdash_client/models/threshold_options.py index 5ccac9a..2d0a86c 100644 --- a/lightdash_client/models/threshold_options.py +++ b/lightdash_client/models/threshold_options.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.threshold_operator import ThresholdOperator +from ..types import UNSET, Unset T = TypeVar("T", bound="ThresholdOptions") diff --git a/lightdash_client/models/time_dimension_config.py b/lightdash_client/models/time_dimension_config.py new file mode 100644 index 0000000..bef9d02 --- /dev/null +++ b/lightdash_client/models/time_dimension_config.py @@ -0,0 +1,77 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..models.time_frames import TimeFrames +from ..types import UNSET, Unset + +T = TypeVar("T", bound="TimeDimensionConfig") + + +@_attrs_define +class TimeDimensionConfig: + """ + Attributes: + interval (TimeFrames): + field (str): + table (str): + """ + + interval: TimeFrames + field: str + table: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + interval = self.interval.value + + field = self.field + + table = self.table + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "interval": interval, + "field": field, + "table": table, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + interval = TimeFrames(d.pop("interval")) + + field = d.pop("field") + + table = d.pop("table") + + time_dimension_config = cls( + interval=interval, + field=field, + table=table, + ) + + time_dimension_config.additional_properties = d + return time_dimension_config + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/update_catalog_item_icon_body.py b/lightdash_client/models/update_catalog_item_icon_body.py new file mode 100644 index 0000000..b7c7779 --- /dev/null +++ b/lightdash_client/models/update_catalog_item_icon_body.py @@ -0,0 +1,99 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.custom_icon import CustomIcon + from ..models.emoji_icon import EmojiIcon + + +T = TypeVar("T", bound="UpdateCatalogItemIconBody") + + +@_attrs_define +class UpdateCatalogItemIconBody: + """ + Attributes: + icon (Union['CustomIcon', 'EmojiIcon', None]): + """ + + icon: Union["CustomIcon", "EmojiIcon", None] + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.custom_icon import CustomIcon + from ..models.emoji_icon import EmojiIcon + + icon: Union[Dict[str, Any], None] + if isinstance(self.icon, EmojiIcon): + icon = self.icon.to_dict() + elif isinstance(self.icon, CustomIcon): + icon = self.icon.to_dict() + else: + icon = self.icon + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "icon": icon, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.custom_icon import CustomIcon + from ..models.emoji_icon import EmojiIcon + + d = src_dict.copy() + + def _parse_icon(data: object) -> Union["CustomIcon", "EmojiIcon", None]: + if data is None: + return data + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_catalog_item_icon_type_0 = EmojiIcon.from_dict(data) + + return componentsschemas_catalog_item_icon_type_0 + except: # noqa: E722 + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemas_catalog_item_icon_type_1 = CustomIcon.from_dict(data) + + return componentsschemas_catalog_item_icon_type_1 + except: # noqa: E722 + pass + return cast(Union["CustomIcon", "EmojiIcon", None], data) + + icon = _parse_icon(d.pop("icon")) + + update_catalog_item_icon_body = cls( + icon=icon, + ) + + update_catalog_item_icon_body.additional_properties = d + return update_catalog_item_icon_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/update_group_with_members.py b/lightdash_client/models/update_group_with_members.py index d512e1e..cbc7c0c 100644 --- a/lightdash_client/models/update_group_with_members.py +++ b/lightdash_client/models/update_group_with_members.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -25,6 +25,8 @@ class UpdateGroupWithMembers: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pick_group_member_user_uuid import PickGroupMemberUserUuid + members: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.members, Unset): members = [] diff --git a/lightdash_client/models/update_metadata.py b/lightdash_client/models/update_metadata.py index 283c416..d91d9c3 100644 --- a/lightdash_client/models/update_metadata.py +++ b/lightdash_client/models/update_metadata.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/update_pinned_item_order.py b/lightdash_client/models/update_pinned_item_order.py index 809e170..aefbcb0 100644 --- a/lightdash_client/models/update_pinned_item_order.py +++ b/lightdash_client/models/update_pinned_item_order.py @@ -1,9 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.resource_view_item_type import ResourceViewItemType +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.pick_resource_view_item_at_data_uuid_or_pinned_list_order import ( @@ -28,6 +29,10 @@ class UpdatePinnedItemOrder: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.pick_resource_view_item_at_data_uuid_or_pinned_list_order import ( + PickResourceViewItemAtDataUuidOrPinnedListOrder, + ) + data = self.data.to_dict() type = self.type.value diff --git a/lightdash_client/models/update_project_member.py b/lightdash_client/models/update_project_member.py index 5683b8f..1b5b37d 100644 --- a/lightdash_client/models/update_project_member.py +++ b/lightdash_client/models/update_project_member.py @@ -1,9 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..models.project_member_role import ProjectMemberRole +from ..types import UNSET, Unset T = TypeVar("T", bound="UpdateProjectMember") diff --git a/lightdash_client/models/update_scheduler_enabled_body.py b/lightdash_client/models/update_scheduler_enabled_body.py index 24d323e..ad38861 100644 --- a/lightdash_client/models/update_scheduler_enabled_body.py +++ b/lightdash_client/models/update_scheduler_enabled_body.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="UpdateSchedulerEnabledBody") diff --git a/lightdash_client/models/update_scheduler_settings.py b/lightdash_client/models/update_scheduler_settings.py new file mode 100644 index 0000000..d66bdbc --- /dev/null +++ b/lightdash_client/models/update_scheduler_settings.py @@ -0,0 +1,60 @@ +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +T = TypeVar("T", bound="UpdateSchedulerSettings") + + +@_attrs_define +class UpdateSchedulerSettings: + """ + Attributes: + scheduler_timezone (str): + """ + + scheduler_timezone: str + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + scheduler_timezone = self.scheduler_timezone + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "schedulerTimezone": scheduler_timezone, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() + scheduler_timezone = d.pop("schedulerTimezone") + + update_scheduler_settings = cls( + scheduler_timezone=scheduler_timezone, + ) + + update_scheduler_settings.additional_properties = d + return update_scheduler_settings + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/update_space.py b/lightdash_client/models/update_space.py index 6e91199..b2439bf 100644 --- a/lightdash_client/models/update_space.py +++ b/lightdash_client/models/update_space.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="UpdateSpace") diff --git a/lightdash_client/models/update_warehouse_credentials_response_200.py b/lightdash_client/models/update_warehouse_credentials_response_200.py index 5d9e0a1..431582f 100644 --- a/lightdash_client/models/update_warehouse_credentials_response_200.py +++ b/lightdash_client/models/update_warehouse_credentials_response_200.py @@ -1,11 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_warehouse_credentials_response_200_status import ( - UpdateWarehouseCredentialsResponse200Status, -) +from ..models.update_warehouse_credentials_response_200_status import UpdateWarehouseCredentialsResponse200Status +from ..types import UNSET, Unset if TYPE_CHECKING: from ..models.user_warehouse_credentials import UserWarehouseCredentials @@ -27,6 +26,8 @@ class UpdateWarehouseCredentialsResponse200: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.user_warehouse_credentials import UserWarehouseCredentials + results = self.results.to_dict() status = self.status.value diff --git a/lightdash_client/models/updated_by_user.py b/lightdash_client/models/updated_by_user.py index 2197aaa..2312ccc 100644 --- a/lightdash_client/models/updated_by_user.py +++ b/lightdash_client/models/updated_by_user.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="UpdatedByUser") diff --git a/lightdash_client/models/upload_metric_gsheet.py b/lightdash_client/models/upload_metric_gsheet.py index bfb5f64..11864d3 100644 --- a/lightdash_client/models/upload_metric_gsheet.py +++ b/lightdash_client/models/upload_metric_gsheet.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -36,6 +36,9 @@ class UploadMetricGsheet: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.custom_label import CustomLabel + from ..models.metric_query_response import MetricQueryResponse + column_order = self.column_order show_table_names = self.show_table_names diff --git a/lightdash_client/models/upsert_chart_as_code_body.py b/lightdash_client/models/upsert_chart_as_code_body.py new file mode 100644 index 0000000..da9f692 --- /dev/null +++ b/lightdash_client/models/upsert_chart_as_code_body.py @@ -0,0 +1,181 @@ +import datetime +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.pick_chart_as_code_exclude_keyof_chart_as_code_metric_query_or_chart_config_table_config import ( + PickChartAsCodeExcludeKeyofChartAsCodeMetricQueryOrChartConfigTableConfig, + ) + + +T = TypeVar("T", bound="UpsertChartAsCodeBody") + + +@_attrs_define +class UpsertChartAsCodeBody: + """ + Attributes: + name (str): + dashboard_uuid (Union[None, str]): + slug (str): + table_name (str): + updated_at (datetime.datetime): + table_config (PickChartAsCodeExcludeKeyofChartAsCodeMetricQueryOrChartConfigTableConfig): + version (float): + space_slug (str): + metric_query (Any): + chart_config (Any): + description (Union[Unset, str]): + downloaded_at (Union[Unset, datetime.datetime]): + """ + + name: str + dashboard_uuid: Union[None, str] + slug: str + table_name: str + updated_at: datetime.datetime + table_config: "PickChartAsCodeExcludeKeyofChartAsCodeMetricQueryOrChartConfigTableConfig" + version: float + space_slug: str + metric_query: Any + chart_config: Any + description: Union[Unset, str] = UNSET + downloaded_at: Union[Unset, datetime.datetime] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.pick_chart_as_code_exclude_keyof_chart_as_code_metric_query_or_chart_config_table_config import ( + PickChartAsCodeExcludeKeyofChartAsCodeMetricQueryOrChartConfigTableConfig, + ) + + name = self.name + + dashboard_uuid: Union[None, str] + dashboard_uuid = self.dashboard_uuid + + slug = self.slug + + table_name = self.table_name + + updated_at = self.updated_at.isoformat() + + table_config = self.table_config.to_dict() + + version = self.version + + space_slug = self.space_slug + + metric_query = self.metric_query + + chart_config = self.chart_config + + description = self.description + + downloaded_at: Union[Unset, str] = UNSET + if not isinstance(self.downloaded_at, Unset): + downloaded_at = self.downloaded_at.isoformat() + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "dashboardUuid": dashboard_uuid, + "slug": slug, + "tableName": table_name, + "updatedAt": updated_at, + "tableConfig": table_config, + "version": version, + "spaceSlug": space_slug, + "metricQuery": metric_query, + "chartConfig": chart_config, + } + ) + if description is not UNSET: + field_dict["description"] = description + if downloaded_at is not UNSET: + field_dict["downloadedAt"] = downloaded_at + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.pick_chart_as_code_exclude_keyof_chart_as_code_metric_query_or_chart_config_table_config import ( + PickChartAsCodeExcludeKeyofChartAsCodeMetricQueryOrChartConfigTableConfig, + ) + + d = src_dict.copy() + name = d.pop("name") + + def _parse_dashboard_uuid(data: object) -> Union[None, str]: + if data is None: + return data + return cast(Union[None, str], data) + + dashboard_uuid = _parse_dashboard_uuid(d.pop("dashboardUuid")) + + slug = d.pop("slug") + + table_name = d.pop("tableName") + + updated_at = isoparse(d.pop("updatedAt")) + + table_config = PickChartAsCodeExcludeKeyofChartAsCodeMetricQueryOrChartConfigTableConfig.from_dict( + d.pop("tableConfig") + ) + + version = d.pop("version") + + space_slug = d.pop("spaceSlug") + + metric_query = d.pop("metricQuery") + + chart_config = d.pop("chartConfig") + + description = d.pop("description", UNSET) + + _downloaded_at = d.pop("downloadedAt", UNSET) + downloaded_at: Union[Unset, datetime.datetime] + if isinstance(_downloaded_at, Unset): + downloaded_at = UNSET + else: + downloaded_at = isoparse(_downloaded_at) + + upsert_chart_as_code_body = cls( + name=name, + dashboard_uuid=dashboard_uuid, + slug=slug, + table_name=table_name, + updated_at=updated_at, + table_config=table_config, + version=version, + space_slug=space_slug, + metric_query=metric_query, + chart_config=chart_config, + description=description, + downloaded_at=downloaded_at, + ) + + upsert_chart_as_code_body.additional_properties = d + return upsert_chart_as_code_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/upsert_dashboard_as_code_body.py b/lightdash_client/models/upsert_dashboard_as_code_body.py new file mode 100644 index 0000000..5349ffb --- /dev/null +++ b/lightdash_client/models/upsert_dashboard_as_code_body.py @@ -0,0 +1,170 @@ +import datetime +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast + +from attrs import define as _attrs_define +from attrs import field as _attrs_field +from dateutil.parser import isoparse + +from ..types import UNSET, Unset + +if TYPE_CHECKING: + from ..models.dashboard_tab import DashboardTab + + +T = TypeVar("T", bound="UpsertDashboardAsCodeBody") + + +@_attrs_define +class UpsertDashboardAsCodeBody: + """ + Attributes: + name (str): + slug (str): + updated_at (datetime.datetime): + tabs (List['DashboardTab']): + version (float): + space_slug (str): + tiles (Any): + filters (Any): + downloaded_at (Union[Unset, datetime.datetime]): + description (Union[None, Unset, str]): + """ + + name: str + slug: str + updated_at: datetime.datetime + tabs: List["DashboardTab"] + version: float + space_slug: str + tiles: Any + filters: Any + downloaded_at: Union[Unset, datetime.datetime] = UNSET + description: Union[None, Unset, str] = UNSET + additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + from ..models.dashboard_tab import DashboardTab + + name = self.name + + slug = self.slug + + updated_at = self.updated_at.isoformat() + + tabs = [] + for tabs_item_data in self.tabs: + tabs_item = tabs_item_data.to_dict() + tabs.append(tabs_item) + + version = self.version + + space_slug = self.space_slug + + tiles = self.tiles + + filters = self.filters + + downloaded_at: Union[Unset, str] = UNSET + if not isinstance(self.downloaded_at, Unset): + downloaded_at = self.downloaded_at.isoformat() + + description: Union[None, Unset, str] + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "name": name, + "slug": slug, + "updatedAt": updated_at, + "tabs": tabs, + "version": version, + "spaceSlug": space_slug, + "tiles": tiles, + "filters": filters, + } + ) + if downloaded_at is not UNSET: + field_dict["downloadedAt"] = downloaded_at + if description is not UNSET: + field_dict["description"] = description + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + from ..models.dashboard_tab import DashboardTab + + d = src_dict.copy() + name = d.pop("name") + + slug = d.pop("slug") + + updated_at = isoparse(d.pop("updatedAt")) + + tabs = [] + _tabs = d.pop("tabs") + for tabs_item_data in _tabs: + tabs_item = DashboardTab.from_dict(tabs_item_data) + + tabs.append(tabs_item) + + version = d.pop("version") + + space_slug = d.pop("spaceSlug") + + tiles = d.pop("tiles") + + filters = d.pop("filters") + + _downloaded_at = d.pop("downloadedAt", UNSET) + downloaded_at: Union[Unset, datetime.datetime] + if isinstance(_downloaded_at, Unset): + downloaded_at = UNSET + else: + downloaded_at = isoparse(_downloaded_at) + + def _parse_description(data: object) -> Union[None, Unset, str]: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(Union[None, Unset, str], data) + + description = _parse_description(d.pop("description", UNSET)) + + upsert_dashboard_as_code_body = cls( + name=name, + slug=slug, + updated_at=updated_at, + tabs=tabs, + version=version, + space_slug=space_slug, + tiles=tiles, + filters=filters, + downloaded_at=downloaded_at, + description=description, + ) + + upsert_dashboard_as_code_body.additional_properties = d + return upsert_dashboard_as_code_body + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/lightdash_client/models/upsert_user_warehouse_credentials.py b/lightdash_client/models/upsert_user_warehouse_credentials.py index ab30c48..dab9d95 100644 --- a/lightdash_client/models/upsert_user_warehouse_credentials.py +++ b/lightdash_client/models/upsert_user_warehouse_credentials.py @@ -1,8 +1,10 @@ -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + if TYPE_CHECKING: from ..models.pick_create_bigquery_credentials_type_or_keyfile_contents import ( PickCreateBigqueryCredentialsTypeOrKeyfileContents, @@ -53,6 +55,9 @@ def to_dict(self) -> Dict[str, Any]: from ..models.pick_create_bigquery_credentials_type_or_keyfile_contents import ( PickCreateBigqueryCredentialsTypeOrKeyfileContents, ) + from ..models.pick_create_databricks_credentials_type_or_personal_access_token import ( + PickCreateDatabricksCredentialsTypeOrPersonalAccessToken, + ) from ..models.pick_create_postgres_credentials_type_or_user_or_password import ( PickCreatePostgresCredentialsTypeOrUserOrPassword, ) diff --git a/lightdash_client/models/user_allowed_organization.py b/lightdash_client/models/user_allowed_organization.py index 4396f5b..965af01 100644 --- a/lightdash_client/models/user_allowed_organization.py +++ b/lightdash_client/models/user_allowed_organization.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="UserAllowedOrganization") diff --git a/lightdash_client/models/user_attribute.py b/lightdash_client/models/user_attribute.py index 3575bab..7541ff0 100644 --- a/lightdash_client/models/user_attribute.py +++ b/lightdash_client/models/user_attribute.py @@ -1,5 +1,5 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field @@ -40,6 +40,9 @@ class UserAttribute: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + from ..models.group_attribute_value import GroupAttributeValue + from ..models.user_attribute_value import UserAttributeValue + attribute_default: Union[None, str] attribute_default = self.attribute_default diff --git a/lightdash_client/models/user_attribute_value.py b/lightdash_client/models/user_attribute_value.py index d40c181..0ff0fc6 100644 --- a/lightdash_client/models/user_attribute_value.py +++ b/lightdash_client/models/user_attribute_value.py @@ -1,8 +1,10 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + T = TypeVar("T", bound="UserAttributeValue") diff --git a/lightdash_client/models/user_warehouse_credentials.py b/lightdash_client/models/user_warehouse_credentials.py index d6f0f9d..182913c 100644 --- a/lightdash_client/models/user_warehouse_credentials.py +++ b/lightdash_client/models/user_warehouse_credentials.py @@ -1,17 +1,15 @@ import datetime -from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from dateutil.parser import isoparse +from ..types import UNSET, Unset + if TYPE_CHECKING: - from ..models.pick_create_bigquery_credentials_type import ( - PickCreateBigqueryCredentialsType, - ) - from ..models.pick_create_databricks_credentials_type import ( - PickCreateDatabricksCredentialsType, - ) + from ..models.pick_create_bigquery_credentials_type import PickCreateBigqueryCredentialsType + from ..models.pick_create_databricks_credentials_type import PickCreateDatabricksCredentialsType from ..models.pick_create_redshift_credentials_or_create_postgres_credentials_or_create_snowflake_credentials_or_create_trino_credentials_type_or_user import ( PickCreateRedshiftCredentialsOrCreatePostgresCredentialsOrCreateSnowflakeCredentialsOrCreateTrinoCredentialsTypeOrUser, ) @@ -46,9 +44,8 @@ class UserWarehouseCredentials: additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: - from ..models.pick_create_bigquery_credentials_type import ( - PickCreateBigqueryCredentialsType, - ) + from ..models.pick_create_bigquery_credentials_type import PickCreateBigqueryCredentialsType + from ..models.pick_create_databricks_credentials_type import PickCreateDatabricksCredentialsType from ..models.pick_create_redshift_credentials_or_create_postgres_credentials_or_create_snowflake_credentials_or_create_trino_credentials_type_or_user import ( PickCreateRedshiftCredentialsOrCreatePostgresCredentialsOrCreateSnowflakeCredentialsOrCreateTrinoCredentialsTypeOrUser, ) @@ -91,12 +88,8 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - from ..models.pick_create_bigquery_credentials_type import ( - PickCreateBigqueryCredentialsType, - ) - from ..models.pick_create_databricks_credentials_type import ( - PickCreateDatabricksCredentialsType, - ) + from ..models.pick_create_bigquery_credentials_type import PickCreateBigqueryCredentialsType + from ..models.pick_create_databricks_credentials_type import PickCreateDatabricksCredentialsType from ..models.pick_create_redshift_credentials_or_create_postgres_credentials_or_create_snowflake_credentials_or_create_trino_credentials_type_or_user import ( PickCreateRedshiftCredentialsOrCreatePostgresCredentialsOrCreateSnowflakeCredentialsOrCreateTrinoCredentialsTypeOrUser, ) diff --git a/lightdash_client/models/validate_project_body.py b/lightdash_client/models/validate_project_body.py index 075e380..75d768c 100644 --- a/lightdash_client/models/validate_project_body.py +++ b/lightdash_client/models/validate_project_body.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/validation_error_chart_response.py b/lightdash_client/models/validation_error_chart_response.py index f3efdf5..f857505 100644 --- a/lightdash_client/models/validation_error_chart_response.py +++ b/lightdash_client/models/validation_error_chart_response.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/validation_error_dashboard_response.py b/lightdash_client/models/validation_error_dashboard_response.py index 79fde17..897dcdf 100644 --- a/lightdash_client/models/validation_error_dashboard_response.py +++ b/lightdash_client/models/validation_error_dashboard_response.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/validation_error_table_response.py b/lightdash_client/models/validation_error_table_response.py index 0deedb3..af6a2cc 100644 --- a/lightdash_client/models/validation_error_table_response.py +++ b/lightdash_client/models/validation_error_table_response.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/validation_response_base.py b/lightdash_client/models/validation_response_base.py index e95a036..81bc2ee 100644 --- a/lightdash_client/models/validation_response_base.py +++ b/lightdash_client/models/validation_response_base.py @@ -1,5 +1,5 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, Union +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field diff --git a/lightdash_client/models/view_statistics.py b/lightdash_client/models/view_statistics.py index a447b91..04f8236 100644 --- a/lightdash_client/models/view_statistics.py +++ b/lightdash_client/models/view_statistics.py @@ -1,10 +1,12 @@ import datetime -from typing import Any, Dict, List, Type, TypeVar, Union, cast +from typing import TYPE_CHECKING, Any, BinaryIO, Dict, List, Optional, TextIO, Tuple, Type, TypeVar, Union, cast from attrs import define as _attrs_define from attrs import field as _attrs_field from dateutil.parser import isoparse +from ..types import UNSET, Unset + T = TypeVar("T", bound="ViewStatistics")