diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 958e92e..b05edbc 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2a83671..8f32a6f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,9 +14,6 @@ stages: - pip install -r test-requirements.txt - pytest --cov=cm_python_openapi_sdk -pytest-3.8: - extends: .pytest - image: python:3.8-alpine pytest-3.9: extends: .pytest image: python:3.9-alpine @@ -29,3 +26,6 @@ pytest-3.11: pytest-3.12: extends: .pytest image: python:3.12-alpine +pytest-3.13: + extends: .pytest + image: python:3.13-alpine diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 46fffed..367f184 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -7,7 +7,6 @@ README.md cm_python_openapi_sdk/__init__.py cm_python_openapi_sdk/api/__init__.py cm_python_openapi_sdk/api/accounts_api.py -cm_python_openapi_sdk/api/accounts_reset_password_api.py cm_python_openapi_sdk/api/attribute_styles_api.py cm_python_openapi_sdk/api/audit_log_api.py cm_python_openapi_sdk/api/authentication_api.py @@ -23,6 +22,7 @@ cm_python_openapi_sdk/api/date_ranges_api.py cm_python_openapi_sdk/api/explain_api.py cm_python_openapi_sdk/api/export_api.py cm_python_openapi_sdk/api/exports_api.py +cm_python_openapi_sdk/api/geosearch_api.py cm_python_openapi_sdk/api/indicator_drills_api.py cm_python_openapi_sdk/api/indicators_api.py cm_python_openapi_sdk/api/invitation_api.py @@ -43,17 +43,17 @@ cm_python_openapi_sdk/api/property_values_api.py cm_python_openapi_sdk/api/property_values_distribution_api.py cm_python_openapi_sdk/api/queries_api.py cm_python_openapi_sdk/api/search_api.py +cm_python_openapi_sdk/api/vector_tiles_api.py cm_python_openapi_sdk/api/views_api.py cm_python_openapi_sdk/api_client.py cm_python_openapi_sdk/api_response.py cm_python_openapi_sdk/configuration.py cm_python_openapi_sdk/exceptions.py cm_python_openapi_sdk/models/__init__.py +cm_python_openapi_sdk/models/access_info_dto.py cm_python_openapi_sdk/models/account_dto.py -cm_python_openapi_sdk/models/account_job_info.py cm_python_openapi_sdk/models/account_onboarding_parameters.py cm_python_openapi_sdk/models/account_preferences.py -cm_python_openapi_sdk/models/account_utm_parameters.py cm_python_openapi_sdk/models/active_date_filter_dto.py cm_python_openapi_sdk/models/active_feature_filter_dto.py cm_python_openapi_sdk/models/active_filter_abstract_type.py @@ -70,6 +70,7 @@ cm_python_openapi_sdk/models/attribute_style_content_dto.py cm_python_openapi_sdk/models/attribute_style_dto.py cm_python_openapi_sdk/models/attribute_style_fallback_category_dto.py cm_python_openapi_sdk/models/attribute_style_paged_model_dto.py +cm_python_openapi_sdk/models/attribute_style_response_dto.py cm_python_openapi_sdk/models/audit_log_paged_resource.py cm_python_openapi_sdk/models/audit_log_paged_resource_page.py cm_python_openapi_sdk/models/audit_log_paged_resource_page_last_evaluated_key.py @@ -102,6 +103,7 @@ cm_python_openapi_sdk/models/dashboard_content_dto.py cm_python_openapi_sdk/models/dashboard_dataset_properties_dto.py cm_python_openapi_sdk/models/dashboard_dto.py cm_python_openapi_sdk/models/dashboard_paged_model_dto.py +cm_python_openapi_sdk/models/dashboard_response_dto.py cm_python_openapi_sdk/models/data_complete_multipart_upload_request.py cm_python_openapi_sdk/models/data_complete_multipart_upload_response.py cm_python_openapi_sdk/models/data_create_multipart_upload_response.py @@ -111,6 +113,7 @@ cm_python_openapi_sdk/models/data_dump_request.py cm_python_openapi_sdk/models/data_permission_content_dto.py cm_python_openapi_sdk/models/data_permission_dto.py cm_python_openapi_sdk/models/data_permission_paged_model_dto.py +cm_python_openapi_sdk/models/data_permission_response_dto.py cm_python_openapi_sdk/models/data_pull_job_request.py cm_python_openapi_sdk/models/data_pull_request.py cm_python_openapi_sdk/models/data_pull_request_csv_options.py @@ -124,6 +127,7 @@ cm_python_openapi_sdk/models/dataset_dwh_type_dto.py cm_python_openapi_sdk/models/dataset_h3_grid_type_dto.py cm_python_openapi_sdk/models/dataset_paged_model_dto.py cm_python_openapi_sdk/models/dataset_properties_dto.py +cm_python_openapi_sdk/models/dataset_response_dto.py cm_python_openapi_sdk/models/dataset_type.py cm_python_openapi_sdk/models/dataset_visualization_dto.py cm_python_openapi_sdk/models/dataset_vt_type_dto.py @@ -167,8 +171,14 @@ cm_python_openapi_sdk/models/dwh_query_metric_type.py cm_python_openapi_sdk/models/dwh_query_number_type.py cm_python_openapi_sdk/models/dwh_query_property_type.py cm_python_openapi_sdk/models/dwh_query_property_types.py +cm_python_openapi_sdk/models/dwh_query_property_types_filter_comp.py +cm_python_openapi_sdk/models/dwh_query_property_types_function_ntile.py +cm_python_openapi_sdk/models/dwh_query_property_types_function_percentile.py +cm_python_openapi_sdk/models/dwh_query_property_types_function_rank.py +cm_python_openapi_sdk/models/dwh_query_property_types_function_row_number.py cm_python_openapi_sdk/models/dwh_query_request.py cm_python_openapi_sdk/models/dwh_query_request1.py +cm_python_openapi_sdk/models/dwh_query_variable_type.py cm_python_openapi_sdk/models/execution_context.py cm_python_openapi_sdk/models/execution_detail.py cm_python_openapi_sdk/models/export_content_dto.py @@ -178,6 +188,7 @@ cm_python_openapi_sdk/models/export_link_dto.py cm_python_openapi_sdk/models/export_paged_model_dto.py cm_python_openapi_sdk/models/export_request.py cm_python_openapi_sdk/models/export_request_csv_options.py +cm_python_openapi_sdk/models/export_response_dto.py cm_python_openapi_sdk/models/feature_attribute_dto.py cm_python_openapi_sdk/models/feature_filter_dto.py cm_python_openapi_sdk/models/feature_function_dto.py @@ -204,7 +215,6 @@ cm_python_openapi_sdk/models/function_h3_grid.py cm_python_openapi_sdk/models/function_h3_grid_options.py cm_python_openapi_sdk/models/function_interval.py cm_python_openapi_sdk/models/function_ntile.py -cm_python_openapi_sdk/models/function_ntile_content_inner.py cm_python_openapi_sdk/models/function_ntile_options.py cm_python_openapi_sdk/models/function_percent_to_total_type_general.py cm_python_openapi_sdk/models/function_percentile.py @@ -213,6 +223,7 @@ cm_python_openapi_sdk/models/function_rank.py cm_python_openapi_sdk/models/function_round_type_general.py cm_python_openapi_sdk/models/function_row_number.py cm_python_openapi_sdk/models/function_today.py +cm_python_openapi_sdk/models/general_job_request.py cm_python_openapi_sdk/models/geosearch_paged_model_dto.py cm_python_openapi_sdk/models/get_account_by_account_id200_response.py cm_python_openapi_sdk/models/get_organizations200_response.py @@ -237,12 +248,14 @@ cm_python_openapi_sdk/models/indicator_content_dto.py cm_python_openapi_sdk/models/indicator_drill_content_dto.py cm_python_openapi_sdk/models/indicator_drill_dto.py cm_python_openapi_sdk/models/indicator_drill_paged_model_dto.py +cm_python_openapi_sdk/models/indicator_drill_response_dto.py cm_python_openapi_sdk/models/indicator_dto.py cm_python_openapi_sdk/models/indicator_filter_dto.py cm_python_openapi_sdk/models/indicator_group_dto.py cm_python_openapi_sdk/models/indicator_link_dto.py cm_python_openapi_sdk/models/indicator_link_dto_block_rows_inner.py cm_python_openapi_sdk/models/indicator_paged_model_dto.py +cm_python_openapi_sdk/models/indicator_response_dto.py cm_python_openapi_sdk/models/indicator_visualizations_dto.py cm_python_openapi_sdk/models/invitation_dto.py cm_python_openapi_sdk/models/invitation_paged_model_dto.py @@ -254,7 +267,6 @@ cm_python_openapi_sdk/models/layer_dto.py cm_python_openapi_sdk/models/layer_dto_datasets_inner.py cm_python_openapi_sdk/models/layer_dto_datasets_inner_attribute_styles_inner.py cm_python_openapi_sdk/models/linked_layer_dto.py -cm_python_openapi_sdk/models/mandatory_keys_for_pagable_response.py cm_python_openapi_sdk/models/map_content_dto.py cm_python_openapi_sdk/models/map_content_dto_base_layer.py cm_python_openapi_sdk/models/map_content_dto_options.py @@ -264,6 +276,7 @@ cm_python_openapi_sdk/models/map_dto.py cm_python_openapi_sdk/models/map_options_dto.py cm_python_openapi_sdk/models/map_options_dto_custom_tile_layer.py cm_python_openapi_sdk/models/map_paged_model_dto.py +cm_python_openapi_sdk/models/map_response_dto.py cm_python_openapi_sdk/models/mapycz_ortophoto_dto.py cm_python_openapi_sdk/models/mapycz_panorama_dto.py cm_python_openapi_sdk/models/marker_content_dto.py @@ -271,31 +284,35 @@ cm_python_openapi_sdk/models/marker_content_dto_property_filters_inner.py cm_python_openapi_sdk/models/marker_dto.py cm_python_openapi_sdk/models/marker_link_dto.py cm_python_openapi_sdk/models/marker_paged_model_dto.py +cm_python_openapi_sdk/models/marker_response_dto.py cm_python_openapi_sdk/models/marker_selector_content_dto.py cm_python_openapi_sdk/models/marker_selector_content_dto_keep_filtered.py cm_python_openapi_sdk/models/marker_selector_dto.py cm_python_openapi_sdk/models/marker_selector_paged_model_dto.py +cm_python_openapi_sdk/models/marker_selector_response_dto.py cm_python_openapi_sdk/models/max_value_dto.py cm_python_openapi_sdk/models/measure_dto.py -cm_python_openapi_sdk/models/membership_dto.py cm_python_openapi_sdk/models/membership_paged_model_dto.py +cm_python_openapi_sdk/models/membership_response_dto.py cm_python_openapi_sdk/models/metric_dto.py cm_python_openapi_sdk/models/metric_paged_model_dto.py +cm_python_openapi_sdk/models/metric_response_dto.py cm_python_openapi_sdk/models/multi_select_filter_dto.py -cm_python_openapi_sdk/models/new_account_dto.py cm_python_openapi_sdk/models/order_by.py cm_python_openapi_sdk/models/order_by_dto.py cm_python_openapi_sdk/models/organization_paged_model_dto.py cm_python_openapi_sdk/models/organization_response_dto.py cm_python_openapi_sdk/models/output_dto.py +cm_python_openapi_sdk/models/page_dto.py cm_python_openapi_sdk/models/part_e_tag.py -cm_python_openapi_sdk/models/password_change_dto.py cm_python_openapi_sdk/models/position_dto.py cm_python_openapi_sdk/models/project_paged_model_dto.py cm_python_openapi_sdk/models/project_response_dto.py +cm_python_openapi_sdk/models/project_response_dto_services.py cm_python_openapi_sdk/models/project_settings_content_dto.py cm_python_openapi_sdk/models/project_settings_dto.py cm_python_openapi_sdk/models/project_settings_paged_model_dto.py +cm_python_openapi_sdk/models/project_settings_response_dto.py cm_python_openapi_sdk/models/project_template_dto.py cm_python_openapi_sdk/models/property_filter_compare_dto.py cm_python_openapi_sdk/models/property_filter_in_dto.py @@ -307,7 +324,6 @@ cm_python_openapi_sdk/models/query_response.py cm_python_openapi_sdk/models/query_response_item_wrapper.py cm_python_openapi_sdk/models/ranking_dto.py cm_python_openapi_sdk/models/relations_dto.py -cm_python_openapi_sdk/models/reset_password_dto.py cm_python_openapi_sdk/models/restricted_account_dto.py cm_python_openapi_sdk/models/result_set_filter.py cm_python_openapi_sdk/models/result_set_filter_comp.py @@ -317,41 +333,37 @@ cm_python_openapi_sdk/models/scale_options_dto.py cm_python_openapi_sdk/models/search_query_hit.py cm_python_openapi_sdk/models/search_query_hit_id.py cm_python_openapi_sdk/models/search_query_response.py -cm_python_openapi_sdk/models/send_reset_password_dto.py cm_python_openapi_sdk/models/single_select_filter_dto.py cm_python_openapi_sdk/models/static_scale_option_dto.py cm_python_openapi_sdk/models/static_scale_option_dto_breaks.py cm_python_openapi_sdk/models/style_dto.py -cm_python_openapi_sdk/models/submit_job_execution_request.py cm_python_openapi_sdk/models/template_dataset_dto.py cm_python_openapi_sdk/models/time_series_dto.py cm_python_openapi_sdk/models/token_request_dto.py cm_python_openapi_sdk/models/token_response_dto.py cm_python_openapi_sdk/models/truncate_job_request.py cm_python_openapi_sdk/models/update_invitation.py -cm_python_openapi_sdk/models/update_membership.py +cm_python_openapi_sdk/models/update_membership_dto.py cm_python_openapi_sdk/models/update_organization_dto.py cm_python_openapi_sdk/models/update_project_dto.py cm_python_openapi_sdk/models/validate_job_request.py cm_python_openapi_sdk/models/validate_request.py cm_python_openapi_sdk/models/value_option_dto.py cm_python_openapi_sdk/models/variable_dto.py -cm_python_openapi_sdk/models/variable_type.py cm_python_openapi_sdk/models/variable_value.py cm_python_openapi_sdk/models/variables_dto.py cm_python_openapi_sdk/models/view_content_dto.py cm_python_openapi_sdk/models/view_dto.py cm_python_openapi_sdk/models/view_paged_model_dto.py +cm_python_openapi_sdk/models/view_response_dto.py cm_python_openapi_sdk/models/zoom_dto.py cm_python_openapi_sdk/py.typed cm_python_openapi_sdk/rest.py +docs/AccessInfoDTO.md docs/AccountDTO.md -docs/AccountJobInfo.md docs/AccountOnboardingParameters.md docs/AccountPreferences.md -docs/AccountUtmParameters.md docs/AccountsApi.md -docs/AccountsResetPasswordApi.md docs/ActiveDateFilterDTO.md docs/ActiveFeatureFilterDTO.md docs/ActiveFilterAbstractType.md @@ -368,6 +380,7 @@ docs/AttributeStyleContentDTO.md docs/AttributeStyleDTO.md docs/AttributeStyleFallbackCategoryDTO.md docs/AttributeStylePagedModelDTO.md +docs/AttributeStyleResponseDTO.md docs/AttributeStylesApi.md docs/AuditLogApi.md docs/AuditLogPagedResource.md @@ -405,6 +418,7 @@ docs/DashboardContentDTO.md docs/DashboardDTO.md docs/DashboardDatasetPropertiesDTO.md docs/DashboardPagedModelDTO.md +docs/DashboardResponseDTO.md docs/DashboardsApi.md docs/DataCompleteMultipartUploadRequest.md docs/DataCompleteMultipartUploadResponse.md @@ -416,6 +430,7 @@ docs/DataDumpRequest.md docs/DataPermissionContentDTO.md docs/DataPermissionDTO.md docs/DataPermissionPagedModelDTO.md +docs/DataPermissionResponseDTO.md docs/DataPermissionsApi.md docs/DataPullJobRequest.md docs/DataPullRequest.md @@ -432,6 +447,7 @@ docs/DatasetDwhTypeDTO.md docs/DatasetH3GridTypeDTO.md docs/DatasetPagedModelDTO.md docs/DatasetPropertiesDTO.md +docs/DatasetResponseDTO.md docs/DatasetType.md docs/DatasetVisualizationDTO.md docs/DatasetVtTypeDTO.md @@ -477,8 +493,14 @@ docs/DwhQueryMetricType.md docs/DwhQueryNumberType.md docs/DwhQueryPropertyType.md docs/DwhQueryPropertyTypes.md +docs/DwhQueryPropertyTypesFilterComp.md +docs/DwhQueryPropertyTypesFunctionNtile.md +docs/DwhQueryPropertyTypesFunctionPercentile.md +docs/DwhQueryPropertyTypesFunctionRank.md +docs/DwhQueryPropertyTypesFunctionRowNumber.md docs/DwhQueryRequest.md docs/DwhQueryRequest1.md +docs/DwhQueryVariableType.md docs/ExecutionContext.md docs/ExecutionDetail.md docs/ExplainApi.md @@ -490,6 +512,7 @@ docs/ExportLinkDTO.md docs/ExportPagedModelDTO.md docs/ExportRequest.md docs/ExportRequestCsvOptions.md +docs/ExportResponseDTO.md docs/ExportsApi.md docs/FeatureAttributeDTO.md docs/FeatureFilterDTO.md @@ -517,7 +540,6 @@ docs/FunctionH3Grid.md docs/FunctionH3GridOptions.md docs/FunctionInterval.md docs/FunctionNtile.md -docs/FunctionNtileContentInner.md docs/FunctionNtileOptions.md docs/FunctionPercentToTotalTypeGeneral.md docs/FunctionPercentile.md @@ -526,6 +548,8 @@ docs/FunctionRank.md docs/FunctionRoundTypeGeneral.md docs/FunctionRowNumber.md docs/FunctionToday.md +docs/GeneralJobRequest.md +docs/GeosearchApi.md docs/GeosearchPagedModelDTO.md docs/GetAccountByAccountId200Response.md docs/GetOrganizations200Response.md @@ -551,12 +575,14 @@ docs/IndicatorDTO.md docs/IndicatorDrillContentDTO.md docs/IndicatorDrillDTO.md docs/IndicatorDrillPagedModelDTO.md +docs/IndicatorDrillResponseDTO.md docs/IndicatorDrillsApi.md docs/IndicatorFilterDTO.md docs/IndicatorGroupDTO.md docs/IndicatorLinkDTO.md docs/IndicatorLinkDTOBlockRowsInner.md docs/IndicatorPagedModelDTO.md +docs/IndicatorResponseDTO.md docs/IndicatorVisualizationsDTO.md docs/IndicatorsApi.md docs/InvitationApi.md @@ -572,7 +598,6 @@ docs/LayerDTO.md docs/LayerDTODatasetsInner.md docs/LayerDTODatasetsInnerAttributeStylesInner.md docs/LinkedLayerDTO.md -docs/MandatoryKeysForPagableResponse.md docs/MapContentDTO.md docs/MapContentDTOBaseLayer.md docs/MapContentDTOOptions.md @@ -582,6 +607,7 @@ docs/MapDTO.md docs/MapOptionsDTO.md docs/MapOptionsDTOCustomTileLayer.md docs/MapPagedModelDTO.md +docs/MapResponseDTO.md docs/MapsApi.md docs/MapyczOrtophotoDTO.md docs/MapyczPanoramaDTO.md @@ -590,23 +616,25 @@ docs/MarkerContentDTOPropertyFiltersInner.md docs/MarkerDTO.md docs/MarkerLinkDTO.md docs/MarkerPagedModelDTO.md +docs/MarkerResponseDTO.md docs/MarkerSelectorContentDTO.md docs/MarkerSelectorContentDTOKeepFiltered.md docs/MarkerSelectorDTO.md docs/MarkerSelectorPagedModelDTO.md +docs/MarkerSelectorResponseDTO.md docs/MarkerSelectorsApi.md docs/MarkersApi.md docs/MaxValueDTO.md docs/MeasureDTO.md docs/MembersApi.md -docs/MembershipDTO.md docs/MembershipPagedModelDTO.md +docs/MembershipResponseDTO.md docs/MetricDTO.md docs/MetricPagedModelDTO.md docs/MetricRangesApi.md +docs/MetricResponseDTO.md docs/MetricsApi.md docs/MultiSelectFilterDTO.md -docs/NewAccountDTO.md docs/OrderBy.md docs/OrderByDTO.md docs/OrganizationPagedModelDTO.md @@ -614,16 +642,18 @@ docs/OrganizationResponseDTO.md docs/OrganizationsApi.md docs/OutputDTO.md docs/OverlapsApi.md +docs/PageDTO.md docs/PartETag.md -docs/PasswordChangeDTO.md docs/PositionDTO.md docs/ProjectInvitationsApi.md docs/ProjectPagedModelDTO.md docs/ProjectResponseDTO.md +docs/ProjectResponseDTOServices.md docs/ProjectSettingsApi.md docs/ProjectSettingsContentDTO.md docs/ProjectSettingsDTO.md docs/ProjectSettingsPagedModelDTO.md +docs/ProjectSettingsResponseDTO.md docs/ProjectTemplateDTO.md docs/ProjectsApi.md docs/PropertyFilterCompareDTO.md @@ -639,7 +669,6 @@ docs/QueryResponse.md docs/QueryResponseItemWrapper.md docs/RankingDTO.md docs/RelationsDTO.md -docs/ResetPasswordDTO.md docs/RestrictedAccountDTO.md docs/ResultSetFilter.md docs/ResultSetFilterComp.md @@ -650,31 +679,30 @@ docs/SearchApi.md docs/SearchQueryHit.md docs/SearchQueryHitId.md docs/SearchQueryResponse.md -docs/SendResetPasswordDTO.md docs/SingleSelectFilterDTO.md docs/StaticScaleOptionDTO.md docs/StaticScaleOptionDTOBreaks.md docs/StyleDTO.md -docs/SubmitJobExecutionRequest.md docs/TemplateDatasetDTO.md docs/TimeSeriesDTO.md docs/TokenRequestDTO.md docs/TokenResponseDTO.md docs/TruncateJobRequest.md docs/UpdateInvitation.md -docs/UpdateMembership.md +docs/UpdateMembershipDTO.md docs/UpdateOrganizationDTO.md docs/UpdateProjectDTO.md docs/ValidateJobRequest.md docs/ValidateRequest.md docs/ValueOptionDTO.md docs/VariableDTO.md -docs/VariableType.md docs/VariableValue.md docs/VariablesDTO.md +docs/VectorTilesApi.md docs/ViewContentDTO.md docs/ViewDTO.md docs/ViewPagedModelDTO.md +docs/ViewResponseDTO.md docs/ViewsApi.md docs/ZoomDTO.md git_push.sh @@ -684,13 +712,11 @@ setup.cfg setup.py test-requirements.txt test/__init__.py +test/test_access_info_dto.py test/test_account_dto.py -test/test_account_job_info.py test/test_account_onboarding_parameters.py test/test_account_preferences.py -test/test_account_utm_parameters.py test/test_accounts_api.py -test/test_accounts_reset_password_api.py test/test_active_date_filter_dto.py test/test_active_feature_filter_dto.py test/test_active_filter_abstract_type.py @@ -707,6 +733,7 @@ test/test_attribute_style_content_dto.py test/test_attribute_style_dto.py test/test_attribute_style_fallback_category_dto.py test/test_attribute_style_paged_model_dto.py +test/test_attribute_style_response_dto.py test/test_attribute_styles_api.py test/test_audit_log_api.py test/test_audit_log_paged_resource.py @@ -744,6 +771,7 @@ test/test_dashboard_content_dto.py test/test_dashboard_dataset_properties_dto.py test/test_dashboard_dto.py test/test_dashboard_paged_model_dto.py +test/test_dashboard_response_dto.py test/test_dashboards_api.py test/test_data_complete_multipart_upload_request.py test/test_data_complete_multipart_upload_response.py @@ -755,6 +783,7 @@ test/test_data_dump_request.py test/test_data_permission_content_dto.py test/test_data_permission_dto.py test/test_data_permission_paged_model_dto.py +test/test_data_permission_response_dto.py test/test_data_permissions_api.py test/test_data_pull_job_request.py test/test_data_pull_request.py @@ -771,6 +800,7 @@ test/test_dataset_dwh_type_dto.py test/test_dataset_h3_grid_type_dto.py test/test_dataset_paged_model_dto.py test/test_dataset_properties_dto.py +test/test_dataset_response_dto.py test/test_dataset_type.py test/test_dataset_visualization_dto.py test/test_dataset_vt_type_dto.py @@ -816,8 +846,14 @@ test/test_dwh_query_metric_type.py test/test_dwh_query_number_type.py test/test_dwh_query_property_type.py test/test_dwh_query_property_types.py +test/test_dwh_query_property_types_filter_comp.py +test/test_dwh_query_property_types_function_ntile.py +test/test_dwh_query_property_types_function_percentile.py +test/test_dwh_query_property_types_function_rank.py +test/test_dwh_query_property_types_function_row_number.py test/test_dwh_query_request.py test/test_dwh_query_request1.py +test/test_dwh_query_variable_type.py test/test_execution_context.py test/test_execution_detail.py test/test_explain_api.py @@ -829,6 +865,7 @@ test/test_export_link_dto.py test/test_export_paged_model_dto.py test/test_export_request.py test/test_export_request_csv_options.py +test/test_export_response_dto.py test/test_exports_api.py test/test_feature_attribute_dto.py test/test_feature_filter_dto.py @@ -856,7 +893,6 @@ test/test_function_h3_grid.py test/test_function_h3_grid_options.py test/test_function_interval.py test/test_function_ntile.py -test/test_function_ntile_content_inner.py test/test_function_ntile_options.py test/test_function_percent_to_total_type_general.py test/test_function_percentile.py @@ -865,6 +901,8 @@ test/test_function_rank.py test/test_function_round_type_general.py test/test_function_row_number.py test/test_function_today.py +test/test_general_job_request.py +test/test_geosearch_api.py test/test_geosearch_paged_model_dto.py test/test_get_account_by_account_id200_response.py test/test_get_organizations200_response.py @@ -889,6 +927,7 @@ test/test_indicator_content_dto.py test/test_indicator_drill_content_dto.py test/test_indicator_drill_dto.py test/test_indicator_drill_paged_model_dto.py +test/test_indicator_drill_response_dto.py test/test_indicator_drills_api.py test/test_indicator_dto.py test/test_indicator_filter_dto.py @@ -896,6 +935,7 @@ test/test_indicator_group_dto.py test/test_indicator_link_dto.py test/test_indicator_link_dto_block_rows_inner.py test/test_indicator_paged_model_dto.py +test/test_indicator_response_dto.py test/test_indicator_visualizations_dto.py test/test_indicators_api.py test/test_invitation_api.py @@ -911,7 +951,6 @@ test/test_layer_dto.py test/test_layer_dto_datasets_inner.py test/test_layer_dto_datasets_inner_attribute_styles_inner.py test/test_linked_layer_dto.py -test/test_mandatory_keys_for_pagable_response.py test/test_map_content_dto.py test/test_map_content_dto_base_layer.py test/test_map_content_dto_options.py @@ -921,6 +960,7 @@ test/test_map_dto.py test/test_map_options_dto.py test/test_map_options_dto_custom_tile_layer.py test/test_map_paged_model_dto.py +test/test_map_response_dto.py test/test_maps_api.py test/test_mapycz_ortophoto_dto.py test/test_mapycz_panorama_dto.py @@ -929,23 +969,25 @@ test/test_marker_content_dto_property_filters_inner.py test/test_marker_dto.py test/test_marker_link_dto.py test/test_marker_paged_model_dto.py +test/test_marker_response_dto.py test/test_marker_selector_content_dto.py test/test_marker_selector_content_dto_keep_filtered.py test/test_marker_selector_dto.py test/test_marker_selector_paged_model_dto.py +test/test_marker_selector_response_dto.py test/test_marker_selectors_api.py test/test_markers_api.py test/test_max_value_dto.py test/test_measure_dto.py test/test_members_api.py -test/test_membership_dto.py test/test_membership_paged_model_dto.py +test/test_membership_response_dto.py test/test_metric_dto.py test/test_metric_paged_model_dto.py test/test_metric_ranges_api.py +test/test_metric_response_dto.py test/test_metrics_api.py test/test_multi_select_filter_dto.py -test/test_new_account_dto.py test/test_order_by.py test/test_order_by_dto.py test/test_organization_paged_model_dto.py @@ -953,16 +995,18 @@ test/test_organization_response_dto.py test/test_organizations_api.py test/test_output_dto.py test/test_overlaps_api.py +test/test_page_dto.py test/test_part_e_tag.py -test/test_password_change_dto.py test/test_position_dto.py test/test_project_invitations_api.py test/test_project_paged_model_dto.py test/test_project_response_dto.py +test/test_project_response_dto_services.py test/test_project_settings_api.py test/test_project_settings_content_dto.py test/test_project_settings_dto.py test/test_project_settings_paged_model_dto.py +test/test_project_settings_response_dto.py test/test_project_template_dto.py test/test_projects_api.py test/test_property_filter_compare_dto.py @@ -978,7 +1022,6 @@ test/test_query_response.py test/test_query_response_item_wrapper.py test/test_ranking_dto.py test/test_relations_dto.py -test/test_reset_password_dto.py test/test_restricted_account_dto.py test/test_result_set_filter.py test/test_result_set_filter_comp.py @@ -989,31 +1032,30 @@ test/test_search_api.py test/test_search_query_hit.py test/test_search_query_hit_id.py test/test_search_query_response.py -test/test_send_reset_password_dto.py test/test_single_select_filter_dto.py test/test_static_scale_option_dto.py test/test_static_scale_option_dto_breaks.py test/test_style_dto.py -test/test_submit_job_execution_request.py test/test_template_dataset_dto.py test/test_time_series_dto.py test/test_token_request_dto.py test/test_token_response_dto.py test/test_truncate_job_request.py test/test_update_invitation.py -test/test_update_membership.py +test/test_update_membership_dto.py test/test_update_organization_dto.py test/test_update_project_dto.py test/test_validate_job_request.py test/test_validate_request.py test/test_value_option_dto.py test/test_variable_dto.py -test/test_variable_type.py test/test_variable_value.py test/test_variables_dto.py +test/test_vector_tiles_api.py test/test_view_content_dto.py test/test_view_dto.py test/test_view_paged_model_dto.py +test/test_view_response_dto.py test/test_views_api.py test/test_zoom_dto.py tox.ini diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 5f84a81..eb1dc6a 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.12.0 +7.13.0 diff --git a/.openapi-generator/openapi.yaml-python-client.sha256 b/.openapi-generator/openapi.yaml-python-client.sha256 index b4cce1e..ca22ba7 100644 --- a/.openapi-generator/openapi.yaml-python-client.sha256 +++ b/.openapi-generator/openapi.yaml-python-client.sha256 @@ -1 +1 @@ -78f37f8f88e935dc52557d1ef60ba426953a0eee9dc2103ed910623df255fbed \ No newline at end of file +7c89c1b6953f4b30c4a10716d9b9f773508e1cfd0eface936f04c5b8d2ad40c2 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 6fcf0d1..d9ea8c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,13 @@ # ref: https://docs.travis-ci.com/user/languages/python language: python python: - - "3.8" - "3.9" - "3.10" - "3.11" - "3.12" + - "3.13" # uncomment the following if needed - #- "3.12-dev" # 3.12 development branch + #- "3.13-dev" # 3.13 development branch #- "nightly" # nightly build # command to install dependencies install: diff --git a/README.md b/README.md index 2ebfff5..ee3a701 100644 --- a/README.md +++ b/README.md @@ -14,13 +14,13 @@ This Python package is automatically generated by the [OpenAPI Generator](https: - API version: 1.0.0 - Package version: 1.0.0 -- Generator version: 7.12.0 +- Generator version: 7.13.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://docs.clevermaps.io](https://docs.clevermaps.io) ## Requirements. -Python 3.8+ +Python 3.9+ ## Installation & Usage ### pip install @@ -104,20 +104,16 @@ All URIs are relative to *https://staging.dev.clevermaps.io/rest* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AccountsApi* | [**change_onboarding**](docs/AccountsApi.md#change_onboarding) | **PUT** /accounts/{accountId}/onboarding | Change account onboarding -*AccountsApi* | [**change_password**](docs/AccountsApi.md#change_password) | **PUT** /accounts/{accountId}/password | Change password *AccountsApi* | [**change_preferences**](docs/AccountsApi.md#change_preferences) | **PUT** /accounts/{accountId}/preferences | Change account preferences *AccountsApi* | [**delete_account_by_id**](docs/AccountsApi.md#delete_account_by_id) | **DELETE** /accounts/{accountId} | Delete account. *AccountsApi* | [**get_account_by_account_id**](docs/AccountsApi.md#get_account_by_account_id) | **GET** /accounts/{accountId} | Get account by accountId *AccountsApi* | [**get_account_by_email**](docs/AccountsApi.md#get_account_by_email) | **GET** /accounts | Find if account with email exists. *AccountsApi* | [**get_current_account**](docs/AccountsApi.md#get_current_account) | **GET** /accounts/current | Get current account. -*AccountsApi* | [**register_account**](docs/AccountsApi.md#register_account) | **POST** /accounts | Register new account -*AccountsResetPasswordApi* | [**reset_password_with_token**](docs/AccountsResetPasswordApi.md#reset_password_with_token) | **POST** /accounts/passwordReset/{passwordResetToken} | Finish reset password with token -*AccountsResetPasswordApi* | [**send_reset_password_token**](docs/AccountsResetPasswordApi.md#send_reset_password_token) | **POST** /accounts/passwordReset | Ask for reset password token -*AccountsResetPasswordApi* | [**verify_reset_password_token**](docs/AccountsResetPasswordApi.md#verify_reset_password_token) | **GET** /accounts/passwordReset/{passwordResetToken} | Verify reset password token is valid *AttributeStylesApi* | [**create_attribute_style**](docs/AttributeStylesApi.md#create_attribute_style) | **POST** /projects/{projectId}/md/attributeStyles | Creates new attribute style *AttributeStylesApi* | [**delete_attribute_style_by_id**](docs/AttributeStylesApi.md#delete_attribute_style_by_id) | **DELETE** /projects/{projectId}/md/attributeStyles/{id} | Deletes attribute style by id *AttributeStylesApi* | [**get_all_attribute_styles**](docs/AttributeStylesApi.md#get_all_attribute_styles) | **GET** /projects/{projectId}/md/attributeStyles | Returns paged collection of all Attribute Styles in a project *AttributeStylesApi* | [**get_attribute_style_by_id**](docs/AttributeStylesApi.md#get_attribute_style_by_id) | **GET** /projects/{projectId}/md/attributeStyles/{id} | Gets attribute style by id +*AttributeStylesApi* | [**get_attribute_style_by_name**](docs/AttributeStylesApi.md#get_attribute_style_by_name) | **GET** /projects/{projectId}/md/attributeStyles/{name} | Gets attribute style by name *AttributeStylesApi* | [**update_attribute_style_by_id**](docs/AttributeStylesApi.md#update_attribute_style_by_id) | **PUT** /projects/{projectId}/md/attributeStyles/{id} | Updates attribute style by id *AuditLogApi* | [**get_audit_log_event**](docs/AuditLogApi.md#get_audit_log_event) | **GET** /auditlog/{eventId} | Get audit log event by eventId *AuditLogApi* | [**get_audit_logs**](docs/AuditLogApi.md#get_audit_logs) | **GET** /auditlog | Get audit logs for project @@ -128,12 +124,14 @@ Class | Method | HTTP request | Description *DashboardsApi* | [**delete_dashboard_by_id**](docs/DashboardsApi.md#delete_dashboard_by_id) | **DELETE** /projects/{projectId}/md/dashboards/{id} | Deletes dashboard by id *DashboardsApi* | [**get_all_dashboards**](docs/DashboardsApi.md#get_all_dashboards) | **GET** /projects/{projectId}/md/dashboards | Returns paged collection of all Dashboards in a project *DashboardsApi* | [**get_dashboard_by_id**](docs/DashboardsApi.md#get_dashboard_by_id) | **GET** /projects/{projectId}/md/dashboards/{id} | Gets dashboard by id +*DashboardsApi* | [**get_dashboard_by_name**](docs/DashboardsApi.md#get_dashboard_by_name) | **GET** /projects/{projectId}/md/dashboards/{name} | Gets dashboard by name *DashboardsApi* | [**update_dashboard_by_id**](docs/DashboardsApi.md#update_dashboard_by_id) | **PUT** /projects/{projectId}/md/dashboards/{id} | Updates dashboard by id *DataDumpApi* | [**get_data_dump**](docs/DataDumpApi.md#get_data_dump) | **GET** /projects/{projectId}/data/dumps/{dumpId} | Get data dump file *DataPermissionsApi* | [**create_data_permission**](docs/DataPermissionsApi.md#create_data_permission) | **POST** /projects/{projectId}/md/dataPermissions | Creates new data permission *DataPermissionsApi* | [**delete_data_permission_by_id**](docs/DataPermissionsApi.md#delete_data_permission_by_id) | **DELETE** /projects/{projectId}/md/dataPermissions/{id} | Deletes data permission by id *DataPermissionsApi* | [**get_all_data_permissions**](docs/DataPermissionsApi.md#get_all_data_permissions) | **GET** /projects/{projectId}/md/dataPermissions | Returns paged collection of all data permissions in a project *DataPermissionsApi* | [**get_data_permission_by_id**](docs/DataPermissionsApi.md#get_data_permission_by_id) | **GET** /projects/{projectId}/md/dataPermissions/{id} | Gets data permission by id +*DataPermissionsApi* | [**get_data_permission_by_name**](docs/DataPermissionsApi.md#get_data_permission_by_name) | **GET** /projects/{projectId}/md/dataPermissions/{name} | Gets data permission by name *DataPermissionsApi* | [**update_data_permission_by_id**](docs/DataPermissionsApi.md#update_data_permission_by_id) | **PUT** /projects/{projectId}/md/dataPermissions/{id} | Updates data permission by id *DataSourcesApi* | [**get_all_data_sources**](docs/DataSourcesApi.md#get_all_data_sources) | **GET** /projects/{projectId}/md/dataSources | Return list of all unique data sources specified in datasets of a project *DataUploadApi* | [**complete_multipart_upload**](docs/DataUploadApi.md#complete_multipart_upload) | **PUT** /projects/{projectId}/dwh/data/uploads/{id} | Complete multipart upload @@ -143,6 +141,7 @@ Class | Method | HTTP request | Description *DatasetsApi* | [**generate_dataset_from_csv**](docs/DatasetsApi.md#generate_dataset_from_csv) | **POST** /projects/{projectId}/md/datasets/generateDataset | Generate dataset from CSV *DatasetsApi* | [**get_all_datasets**](docs/DatasetsApi.md#get_all_datasets) | **GET** /projects/{projectId}/md/datasets | Returns paged collection of all datasets in a project *DatasetsApi* | [**get_dataset_by_id**](docs/DatasetsApi.md#get_dataset_by_id) | **GET** /projects/{projectId}/md/datasets/{id} | Gets dataset by id +*DatasetsApi* | [**get_dataset_by_name**](docs/DatasetsApi.md#get_dataset_by_name) | **GET** /projects/{projectId}/md/datasets/{name} | Gets dataset by name *DatasetsApi* | [**update_dataset_by_id**](docs/DatasetsApi.md#update_dataset_by_id) | **PUT** /projects/{projectId}/md/datasets/{id} | Updates dataset by id *DateRangesApi* | [**accept_date_ranges**](docs/DateRangesApi.md#accept_date_ranges) | **POST** /projects/{projectId}/dwh/{dwhClusterId}/dateRanges | Accept date ranges *DateRangesApi* | [**get_date_ranges**](docs/DateRangesApi.md#get_date_ranges) | **GET** /projects/{projectId}/dwh/{dwhClusterId}/dateRanges/{dwhCacheId} | Get date ranges @@ -152,16 +151,20 @@ Class | Method | HTTP request | Description *ExportsApi* | [**delete_export_by_id**](docs/ExportsApi.md#delete_export_by_id) | **DELETE** /projects/{projectId}/md/exports/{id} | Deletes export by id *ExportsApi* | [**get_all_exports**](docs/ExportsApi.md#get_all_exports) | **GET** /projects/{projectId}/md/exports | Returns paged collection of all Exports in a project *ExportsApi* | [**get_export_by_id**](docs/ExportsApi.md#get_export_by_id) | **GET** /projects/{projectId}/md/exports/{id} | Gets export by id +*ExportsApi* | [**get_export_by_name**](docs/ExportsApi.md#get_export_by_name) | **GET** /projects/{projectId}/md/exports/{name} | Gets export by name *ExportsApi* | [**update_export_by_id**](docs/ExportsApi.md#update_export_by_id) | **PUT** /projects/{projectId}/md/exports/{id} | Updates export by id +*GeosearchApi* | [**geographic_search**](docs/GeosearchApi.md#geographic_search) | **GET** /geosearch | Geographic search *IndicatorDrillsApi* | [**create_indicator_drill**](docs/IndicatorDrillsApi.md#create_indicator_drill) | **POST** /projects/{projectId}/md/indicatorDrills | Creates new Indicator Drill. *IndicatorDrillsApi* | [**delete_indicator_drill_by_id**](docs/IndicatorDrillsApi.md#delete_indicator_drill_by_id) | **DELETE** /projects/{projectId}/md/indicatorDrills/{id} | Deletes indicator drill by id *IndicatorDrillsApi* | [**get_all_indicator_drills**](docs/IndicatorDrillsApi.md#get_all_indicator_drills) | **GET** /projects/{projectId}/md/indicatorDrills | Returns paged collection of all Indicator Drills in a project. *IndicatorDrillsApi* | [**get_indicator_drill_by_id**](docs/IndicatorDrillsApi.md#get_indicator_drill_by_id) | **GET** /projects/{projectId}/md/indicatorDrills/{id} | Gets indicator drill by id +*IndicatorDrillsApi* | [**get_indicator_drill_by_name**](docs/IndicatorDrillsApi.md#get_indicator_drill_by_name) | **GET** /projects/{projectId}/md/indicatorDrills/{name} | Gets indicator drill by name *IndicatorDrillsApi* | [**update_indicator_drill_by_id**](docs/IndicatorDrillsApi.md#update_indicator_drill_by_id) | **PUT** /projects/{projectId}/md/indicatorDrills/{id} | Updates indicator drill by id *IndicatorsApi* | [**create_indicator**](docs/IndicatorsApi.md#create_indicator) | **POST** /projects/{projectId}/md/indicators | Creates new Indicator. *IndicatorsApi* | [**delete_indicator_by_id**](docs/IndicatorsApi.md#delete_indicator_by_id) | **DELETE** /projects/{projectId}/md/indicators/{id} | Deletes indicator by id *IndicatorsApi* | [**get_all_indicators**](docs/IndicatorsApi.md#get_all_indicators) | **GET** /projects/{projectId}/md/indicators | Returns paged collection of all Indicators in a project. *IndicatorsApi* | [**get_indicator_by_id**](docs/IndicatorsApi.md#get_indicator_by_id) | **GET** /projects/{projectId}/md/indicators/{id} | Gets indicator by id +*IndicatorsApi* | [**get_indicator_by_name**](docs/IndicatorsApi.md#get_indicator_by_name) | **GET** /projects/{projectId}/md/indicators/{name} | Gets indicator by name *IndicatorsApi* | [**update_indicator_by_id**](docs/IndicatorsApi.md#update_indicator_by_id) | **PUT** /projects/{projectId}/md/indicators/{id} | Updates indicator by id *InvitationApi* | [**accept_project_invitation**](docs/InvitationApi.md#accept_project_invitation) | **POST** /invitations/{invitationHash} | Accept invitation. *InvitationApi* | [**get_invitation**](docs/InvitationApi.md#get_invitation) | **GET** /invitations/{invitationHash} | Get detail of an invitation. @@ -173,16 +176,19 @@ Class | Method | HTTP request | Description *MapsApi* | [**delete_map_by_id**](docs/MapsApi.md#delete_map_by_id) | **DELETE** /projects/{projectId}/md/maps/{id} | Deletes map by id *MapsApi* | [**get_all_maps**](docs/MapsApi.md#get_all_maps) | **GET** /projects/{projectId}/md/maps | Returns paged collection of all Maps in a project. *MapsApi* | [**get_map_by_id**](docs/MapsApi.md#get_map_by_id) | **GET** /projects/{projectId}/md/maps/{id} | Gets map by id +*MapsApi* | [**get_map_by_name**](docs/MapsApi.md#get_map_by_name) | **GET** /projects/{projectId}/md/maps/{name} | Gets map by name *MapsApi* | [**update_map_by_id**](docs/MapsApi.md#update_map_by_id) | **PUT** /projects/{projectId}/md/maps/{id} | Updates map by id *MarkerSelectorsApi* | [**create_marker_selector**](docs/MarkerSelectorsApi.md#create_marker_selector) | **POST** /projects/{projectId}/md/markerSelectors | Creates new Marker Selector. *MarkerSelectorsApi* | [**delete_marker_selector_by_id**](docs/MarkerSelectorsApi.md#delete_marker_selector_by_id) | **DELETE** /projects/{projectId}/md/markerSelectors/{id} | Deletes marker selector by id *MarkerSelectorsApi* | [**get_all_marker_selectors**](docs/MarkerSelectorsApi.md#get_all_marker_selectors) | **GET** /projects/{projectId}/md/markerSelectors | Returns paged collection of all Marker Selectors in a project. *MarkerSelectorsApi* | [**get_marker_selector_by_id**](docs/MarkerSelectorsApi.md#get_marker_selector_by_id) | **GET** /projects/{projectId}/md/markerSelectors/{id} | Gets marker selector by id +*MarkerSelectorsApi* | [**get_marker_selector_by_name**](docs/MarkerSelectorsApi.md#get_marker_selector_by_name) | **GET** /projects/{projectId}/md/markerSelectors/{name} | Gets marker selector by name *MarkerSelectorsApi* | [**update_marker_selector_by_id**](docs/MarkerSelectorsApi.md#update_marker_selector_by_id) | **PUT** /projects/{projectId}/md/markerSelectors/{id} | Updates marker selector by id *MarkersApi* | [**create_marker**](docs/MarkersApi.md#create_marker) | **POST** /projects/{projectId}/md/markers | Creates new Marker. *MarkersApi* | [**delete_marker_by_id**](docs/MarkersApi.md#delete_marker_by_id) | **DELETE** /projects/{projectId}/md/markers/{id} | Deletes marker by id *MarkersApi* | [**get_all_markers**](docs/MarkersApi.md#get_all_markers) | **GET** /projects/{projectId}/md/markers | Returns paged collection of all Markers in a project. *MarkersApi* | [**get_marker_by_id**](docs/MarkersApi.md#get_marker_by_id) | **GET** /projects/{projectId}/md/markers/{id} | Gets marker by id +*MarkersApi* | [**get_marker_by_name**](docs/MarkersApi.md#get_marker_by_name) | **GET** /projects/{projectId}/md/markers/{name} | Gets marker by name *MarkersApi* | [**update_marker_by_id**](docs/MarkersApi.md#update_marker_by_id) | **PUT** /projects/{projectId}/md/markers/{id} | Updates marker by id *MembersApi* | [**add_project_member**](docs/MembersApi.md#add_project_member) | **POST** /projects/{projectId}/members | Add new project member and assign a role. *MembersApi* | [**delete_membership**](docs/MembersApi.md#delete_membership) | **DELETE** /projects/{projectId}/members/{membershipId} | Deletes membership of user in project. @@ -195,6 +201,7 @@ Class | Method | HTTP request | Description *MetricsApi* | [**delete_metric_by_id**](docs/MetricsApi.md#delete_metric_by_id) | **DELETE** /projects/{projectId}/md/metrics/{id} | Deletes metric by id *MetricsApi* | [**get_all_metrics**](docs/MetricsApi.md#get_all_metrics) | **GET** /projects/{projectId}/md/metrics | Returns paged collection of all Metrics in a project. *MetricsApi* | [**get_metric_by_id**](docs/MetricsApi.md#get_metric_by_id) | **GET** /projects/{projectId}/md/metrics/{id} | Gets metric by id +*MetricsApi* | [**get_metric_by_name**](docs/MetricsApi.md#get_metric_by_name) | **GET** /projects/{projectId}/md/metrics/{name} | Gets metric by name *MetricsApi* | [**update_metric_by_id**](docs/MetricsApi.md#update_metric_by_id) | **PUT** /projects/{projectId}/md/metrics/{id} | Updates metric by id *OrganizationsApi* | [**create_organization**](docs/OrganizationsApi.md#create_organization) | **POST** /organizations | Creates a new organization. *OrganizationsApi* | [**delete_organization**](docs/OrganizationsApi.md#delete_organization) | **DELETE** /organizations/{organizationId} | Delete an organization. @@ -212,6 +219,7 @@ Class | Method | HTTP request | Description *ProjectSettingsApi* | [**delete_project_settings_by_id**](docs/ProjectSettingsApi.md#delete_project_settings_by_id) | **DELETE** /projects/{projectId}/md/projectSettings/{id} | Deletes project settings by id *ProjectSettingsApi* | [**get_all_project_settings**](docs/ProjectSettingsApi.md#get_all_project_settings) | **GET** /projects/{projectId}/md/projectSettings | Returns paged collection of all Project Settings objects in a project. This page will always contain only one object. *ProjectSettingsApi* | [**get_project_settings_by_id**](docs/ProjectSettingsApi.md#get_project_settings_by_id) | **GET** /projects/{projectId}/md/projectSettings/{id} | Gets project settings by id +*ProjectSettingsApi* | [**get_project_settings_by_name**](docs/ProjectSettingsApi.md#get_project_settings_by_name) | **GET** /projects/{projectId}/md/projectSettings/{name} | Gets projectSettings by name *ProjectSettingsApi* | [**update_project_settings_by_id**](docs/ProjectSettingsApi.md#update_project_settings_by_id) | **PUT** /projects/{projectId}/md/projectSettings/{id} | Updates project settings by id *ProjectsApi* | [**create_project**](docs/ProjectsApi.md#create_project) | **POST** /projects | Create new project *ProjectsApi* | [**delete_project**](docs/ProjectsApi.md#delete_project) | **DELETE** /projects/{projectId} | Delete project. @@ -225,21 +233,21 @@ Class | Method | HTTP request | Description *QueriesApi* | [**accept_queries**](docs/QueriesApi.md#accept_queries) | **POST** /projects/{projectId}/dwh/{dwhClusterId}/queries | Accept queries *QueriesApi* | [**get_queries**](docs/QueriesApi.md#get_queries) | **GET** /projects/{projectId}/dwh/{dwhClusterId}/queries/{dwhCacheId} | Get queries *SearchApi* | [**full_text_search**](docs/SearchApi.md#full_text_search) | **GET** /projects/{projectId}/search | Full text search on all internal project data. -*SearchApi* | [**geographic_search**](docs/SearchApi.md#geographic_search) | **GET** /geosearch | Geographic search +*VectorTilesApi* | [**get_vector_tile**](docs/VectorTilesApi.md#get_vector_tile) | **GET** /projects/{projectId}/dwh/{dwhClusterId}/tiles/{datasetName}/{z}/{x}/{y}.vector.pbf | *ViewsApi* | [**create_view**](docs/ViewsApi.md#create_view) | **POST** /projects/{projectId}/md/views | Creates new view *ViewsApi* | [**delete_view_by_id**](docs/ViewsApi.md#delete_view_by_id) | **DELETE** /projects/{projectId}/md/views/{id} | Deletes view by id *ViewsApi* | [**get_all_views**](docs/ViewsApi.md#get_all_views) | **GET** /projects/{projectId}/md/views | Returns collection of all views in a project *ViewsApi* | [**get_view_by_id**](docs/ViewsApi.md#get_view_by_id) | **GET** /projects/{projectId}/md/views/{id} | Gets view by id +*ViewsApi* | [**get_view_by_name**](docs/ViewsApi.md#get_view_by_name) | **GET** /projects/{projectId}/md/views/{name} | Gets view by name *ViewsApi* | [**update_view_by_id**](docs/ViewsApi.md#update_view_by_id) | **PUT** /projects/{projectId}/md/views/{id} | Updates view by id ## Documentation For Models + - [AccessInfoDTO](docs/AccessInfoDTO.md) - [AccountDTO](docs/AccountDTO.md) - - [AccountJobInfo](docs/AccountJobInfo.md) - [AccountOnboardingParameters](docs/AccountOnboardingParameters.md) - [AccountPreferences](docs/AccountPreferences.md) - - [AccountUtmParameters](docs/AccountUtmParameters.md) - [ActiveDateFilterDTO](docs/ActiveDateFilterDTO.md) - [ActiveFeatureFilterDTO](docs/ActiveFeatureFilterDTO.md) - [ActiveFilterAbstractType](docs/ActiveFilterAbstractType.md) @@ -256,6 +264,7 @@ Class | Method | HTTP request | Description - [AttributeStyleDTO](docs/AttributeStyleDTO.md) - [AttributeStyleFallbackCategoryDTO](docs/AttributeStyleFallbackCategoryDTO.md) - [AttributeStylePagedModelDTO](docs/AttributeStylePagedModelDTO.md) + - [AttributeStyleResponseDTO](docs/AttributeStyleResponseDTO.md) - [AuditLogPagedResource](docs/AuditLogPagedResource.md) - [AuditLogPagedResourcePage](docs/AuditLogPagedResourcePage.md) - [AuditLogPagedResourcePageLastEvaluatedKey](docs/AuditLogPagedResourcePageLastEvaluatedKey.md) @@ -288,6 +297,7 @@ Class | Method | HTTP request | Description - [DashboardDTO](docs/DashboardDTO.md) - [DashboardDatasetPropertiesDTO](docs/DashboardDatasetPropertiesDTO.md) - [DashboardPagedModelDTO](docs/DashboardPagedModelDTO.md) + - [DashboardResponseDTO](docs/DashboardResponseDTO.md) - [DataCompleteMultipartUploadRequest](docs/DataCompleteMultipartUploadRequest.md) - [DataCompleteMultipartUploadResponse](docs/DataCompleteMultipartUploadResponse.md) - [DataCreateMultipartUploadResponse](docs/DataCreateMultipartUploadResponse.md) @@ -297,6 +307,7 @@ Class | Method | HTTP request | Description - [DataPermissionContentDTO](docs/DataPermissionContentDTO.md) - [DataPermissionDTO](docs/DataPermissionDTO.md) - [DataPermissionPagedModelDTO](docs/DataPermissionPagedModelDTO.md) + - [DataPermissionResponseDTO](docs/DataPermissionResponseDTO.md) - [DataPullJobRequest](docs/DataPullJobRequest.md) - [DataPullRequest](docs/DataPullRequest.md) - [DataPullRequestCsvOptions](docs/DataPullRequestCsvOptions.md) @@ -310,6 +321,7 @@ Class | Method | HTTP request | Description - [DatasetH3GridTypeDTO](docs/DatasetH3GridTypeDTO.md) - [DatasetPagedModelDTO](docs/DatasetPagedModelDTO.md) - [DatasetPropertiesDTO](docs/DatasetPropertiesDTO.md) + - [DatasetResponseDTO](docs/DatasetResponseDTO.md) - [DatasetType](docs/DatasetType.md) - [DatasetVisualizationDTO](docs/DatasetVisualizationDTO.md) - [DatasetVtTypeDTO](docs/DatasetVtTypeDTO.md) @@ -353,8 +365,14 @@ Class | Method | HTTP request | Description - [DwhQueryNumberType](docs/DwhQueryNumberType.md) - [DwhQueryPropertyType](docs/DwhQueryPropertyType.md) - [DwhQueryPropertyTypes](docs/DwhQueryPropertyTypes.md) + - [DwhQueryPropertyTypesFilterComp](docs/DwhQueryPropertyTypesFilterComp.md) + - [DwhQueryPropertyTypesFunctionNtile](docs/DwhQueryPropertyTypesFunctionNtile.md) + - [DwhQueryPropertyTypesFunctionPercentile](docs/DwhQueryPropertyTypesFunctionPercentile.md) + - [DwhQueryPropertyTypesFunctionRank](docs/DwhQueryPropertyTypesFunctionRank.md) + - [DwhQueryPropertyTypesFunctionRowNumber](docs/DwhQueryPropertyTypesFunctionRowNumber.md) - [DwhQueryRequest](docs/DwhQueryRequest.md) - [DwhQueryRequest1](docs/DwhQueryRequest1.md) + - [DwhQueryVariableType](docs/DwhQueryVariableType.md) - [ExecutionContext](docs/ExecutionContext.md) - [ExecutionDetail](docs/ExecutionDetail.md) - [ExportContentDTO](docs/ExportContentDTO.md) @@ -364,6 +382,7 @@ Class | Method | HTTP request | Description - [ExportPagedModelDTO](docs/ExportPagedModelDTO.md) - [ExportRequest](docs/ExportRequest.md) - [ExportRequestCsvOptions](docs/ExportRequestCsvOptions.md) + - [ExportResponseDTO](docs/ExportResponseDTO.md) - [FeatureAttributeDTO](docs/FeatureAttributeDTO.md) - [FeatureFilterDTO](docs/FeatureFilterDTO.md) - [FeatureFunctionDTO](docs/FeatureFunctionDTO.md) @@ -390,7 +409,6 @@ Class | Method | HTTP request | Description - [FunctionH3GridOptions](docs/FunctionH3GridOptions.md) - [FunctionInterval](docs/FunctionInterval.md) - [FunctionNtile](docs/FunctionNtile.md) - - [FunctionNtileContentInner](docs/FunctionNtileContentInner.md) - [FunctionNtileOptions](docs/FunctionNtileOptions.md) - [FunctionPercentToTotalTypeGeneral](docs/FunctionPercentToTotalTypeGeneral.md) - [FunctionPercentile](docs/FunctionPercentile.md) @@ -399,6 +417,7 @@ Class | Method | HTTP request | Description - [FunctionRoundTypeGeneral](docs/FunctionRoundTypeGeneral.md) - [FunctionRowNumber](docs/FunctionRowNumber.md) - [FunctionToday](docs/FunctionToday.md) + - [GeneralJobRequest](docs/GeneralJobRequest.md) - [GeosearchPagedModelDTO](docs/GeosearchPagedModelDTO.md) - [GetAccountByAccountId200Response](docs/GetAccountByAccountId200Response.md) - [GetOrganizations200Response](docs/GetOrganizations200Response.md) @@ -424,11 +443,13 @@ Class | Method | HTTP request | Description - [IndicatorDrillContentDTO](docs/IndicatorDrillContentDTO.md) - [IndicatorDrillDTO](docs/IndicatorDrillDTO.md) - [IndicatorDrillPagedModelDTO](docs/IndicatorDrillPagedModelDTO.md) + - [IndicatorDrillResponseDTO](docs/IndicatorDrillResponseDTO.md) - [IndicatorFilterDTO](docs/IndicatorFilterDTO.md) - [IndicatorGroupDTO](docs/IndicatorGroupDTO.md) - [IndicatorLinkDTO](docs/IndicatorLinkDTO.md) - [IndicatorLinkDTOBlockRowsInner](docs/IndicatorLinkDTOBlockRowsInner.md) - [IndicatorPagedModelDTO](docs/IndicatorPagedModelDTO.md) + - [IndicatorResponseDTO](docs/IndicatorResponseDTO.md) - [IndicatorVisualizationsDTO](docs/IndicatorVisualizationsDTO.md) - [InvitationDTO](docs/InvitationDTO.md) - [InvitationPagedModelDTO](docs/InvitationPagedModelDTO.md) @@ -440,7 +461,6 @@ Class | Method | HTTP request | Description - [LayerDTODatasetsInner](docs/LayerDTODatasetsInner.md) - [LayerDTODatasetsInnerAttributeStylesInner](docs/LayerDTODatasetsInnerAttributeStylesInner.md) - [LinkedLayerDTO](docs/LinkedLayerDTO.md) - - [MandatoryKeysForPagableResponse](docs/MandatoryKeysForPagableResponse.md) - [MapContentDTO](docs/MapContentDTO.md) - [MapContentDTOBaseLayer](docs/MapContentDTOBaseLayer.md) - [MapContentDTOOptions](docs/MapContentDTOOptions.md) @@ -450,6 +470,7 @@ Class | Method | HTTP request | Description - [MapOptionsDTO](docs/MapOptionsDTO.md) - [MapOptionsDTOCustomTileLayer](docs/MapOptionsDTOCustomTileLayer.md) - [MapPagedModelDTO](docs/MapPagedModelDTO.md) + - [MapResponseDTO](docs/MapResponseDTO.md) - [MapyczOrtophotoDTO](docs/MapyczOrtophotoDTO.md) - [MapyczPanoramaDTO](docs/MapyczPanoramaDTO.md) - [MarkerContentDTO](docs/MarkerContentDTO.md) @@ -457,31 +478,35 @@ Class | Method | HTTP request | Description - [MarkerDTO](docs/MarkerDTO.md) - [MarkerLinkDTO](docs/MarkerLinkDTO.md) - [MarkerPagedModelDTO](docs/MarkerPagedModelDTO.md) + - [MarkerResponseDTO](docs/MarkerResponseDTO.md) - [MarkerSelectorContentDTO](docs/MarkerSelectorContentDTO.md) - [MarkerSelectorContentDTOKeepFiltered](docs/MarkerSelectorContentDTOKeepFiltered.md) - [MarkerSelectorDTO](docs/MarkerSelectorDTO.md) - [MarkerSelectorPagedModelDTO](docs/MarkerSelectorPagedModelDTO.md) + - [MarkerSelectorResponseDTO](docs/MarkerSelectorResponseDTO.md) - [MaxValueDTO](docs/MaxValueDTO.md) - [MeasureDTO](docs/MeasureDTO.md) - - [MembershipDTO](docs/MembershipDTO.md) - [MembershipPagedModelDTO](docs/MembershipPagedModelDTO.md) + - [MembershipResponseDTO](docs/MembershipResponseDTO.md) - [MetricDTO](docs/MetricDTO.md) - [MetricPagedModelDTO](docs/MetricPagedModelDTO.md) + - [MetricResponseDTO](docs/MetricResponseDTO.md) - [MultiSelectFilterDTO](docs/MultiSelectFilterDTO.md) - - [NewAccountDTO](docs/NewAccountDTO.md) - [OrderBy](docs/OrderBy.md) - [OrderByDTO](docs/OrderByDTO.md) - [OrganizationPagedModelDTO](docs/OrganizationPagedModelDTO.md) - [OrganizationResponseDTO](docs/OrganizationResponseDTO.md) - [OutputDTO](docs/OutputDTO.md) + - [PageDTO](docs/PageDTO.md) - [PartETag](docs/PartETag.md) - - [PasswordChangeDTO](docs/PasswordChangeDTO.md) - [PositionDTO](docs/PositionDTO.md) - [ProjectPagedModelDTO](docs/ProjectPagedModelDTO.md) - [ProjectResponseDTO](docs/ProjectResponseDTO.md) + - [ProjectResponseDTOServices](docs/ProjectResponseDTOServices.md) - [ProjectSettingsContentDTO](docs/ProjectSettingsContentDTO.md) - [ProjectSettingsDTO](docs/ProjectSettingsDTO.md) - [ProjectSettingsPagedModelDTO](docs/ProjectSettingsPagedModelDTO.md) + - [ProjectSettingsResponseDTO](docs/ProjectSettingsResponseDTO.md) - [ProjectTemplateDTO](docs/ProjectTemplateDTO.md) - [PropertyFilterCompareDTO](docs/PropertyFilterCompareDTO.md) - [PropertyFilterInDTO](docs/PropertyFilterInDTO.md) @@ -493,7 +518,6 @@ Class | Method | HTTP request | Description - [QueryResponseItemWrapper](docs/QueryResponseItemWrapper.md) - [RankingDTO](docs/RankingDTO.md) - [RelationsDTO](docs/RelationsDTO.md) - - [ResetPasswordDTO](docs/ResetPasswordDTO.md) - [RestrictedAccountDTO](docs/RestrictedAccountDTO.md) - [ResultSetFilter](docs/ResultSetFilter.md) - [ResultSetFilterComp](docs/ResultSetFilterComp.md) @@ -503,31 +527,29 @@ Class | Method | HTTP request | Description - [SearchQueryHit](docs/SearchQueryHit.md) - [SearchQueryHitId](docs/SearchQueryHitId.md) - [SearchQueryResponse](docs/SearchQueryResponse.md) - - [SendResetPasswordDTO](docs/SendResetPasswordDTO.md) - [SingleSelectFilterDTO](docs/SingleSelectFilterDTO.md) - [StaticScaleOptionDTO](docs/StaticScaleOptionDTO.md) - [StaticScaleOptionDTOBreaks](docs/StaticScaleOptionDTOBreaks.md) - [StyleDTO](docs/StyleDTO.md) - - [SubmitJobExecutionRequest](docs/SubmitJobExecutionRequest.md) - [TemplateDatasetDTO](docs/TemplateDatasetDTO.md) - [TimeSeriesDTO](docs/TimeSeriesDTO.md) - [TokenRequestDTO](docs/TokenRequestDTO.md) - [TokenResponseDTO](docs/TokenResponseDTO.md) - [TruncateJobRequest](docs/TruncateJobRequest.md) - [UpdateInvitation](docs/UpdateInvitation.md) - - [UpdateMembership](docs/UpdateMembership.md) + - [UpdateMembershipDTO](docs/UpdateMembershipDTO.md) - [UpdateOrganizationDTO](docs/UpdateOrganizationDTO.md) - [UpdateProjectDTO](docs/UpdateProjectDTO.md) - [ValidateJobRequest](docs/ValidateJobRequest.md) - [ValidateRequest](docs/ValidateRequest.md) - [ValueOptionDTO](docs/ValueOptionDTO.md) - [VariableDTO](docs/VariableDTO.md) - - [VariableType](docs/VariableType.md) - [VariableValue](docs/VariableValue.md) - [VariablesDTO](docs/VariablesDTO.md) - [ViewContentDTO](docs/ViewContentDTO.md) - [ViewDTO](docs/ViewDTO.md) - [ViewPagedModelDTO](docs/ViewPagedModelDTO.md) + - [ViewResponseDTO](docs/ViewResponseDTO.md) - [ZoomDTO](docs/ZoomDTO.md) diff --git a/cm_python_openapi_sdk/__init__.py b/cm_python_openapi_sdk/__init__.py index dd9daf0..30031a1 100644 --- a/cm_python_openapi_sdk/__init__.py +++ b/cm_python_openapi_sdk/__init__.py @@ -19,7 +19,6 @@ # import apis into sdk package from cm_python_openapi_sdk.api.accounts_api import AccountsApi -from cm_python_openapi_sdk.api.accounts_reset_password_api import AccountsResetPasswordApi from cm_python_openapi_sdk.api.attribute_styles_api import AttributeStylesApi from cm_python_openapi_sdk.api.audit_log_api import AuditLogApi from cm_python_openapi_sdk.api.authentication_api import AuthenticationApi @@ -35,6 +34,7 @@ from cm_python_openapi_sdk.api.explain_api import ExplainApi from cm_python_openapi_sdk.api.export_api import ExportApi from cm_python_openapi_sdk.api.exports_api import ExportsApi +from cm_python_openapi_sdk.api.geosearch_api import GeosearchApi from cm_python_openapi_sdk.api.indicator_drills_api import IndicatorDrillsApi from cm_python_openapi_sdk.api.indicators_api import IndicatorsApi from cm_python_openapi_sdk.api.invitation_api import InvitationApi @@ -55,6 +55,7 @@ from cm_python_openapi_sdk.api.property_values_distribution_api import PropertyValuesDistributionApi from cm_python_openapi_sdk.api.queries_api import QueriesApi from cm_python_openapi_sdk.api.search_api import SearchApi +from cm_python_openapi_sdk.api.vector_tiles_api import VectorTilesApi from cm_python_openapi_sdk.api.views_api import ViewsApi # import ApiClient @@ -69,11 +70,10 @@ from cm_python_openapi_sdk.exceptions import ApiException # import models into sdk package +from cm_python_openapi_sdk.models.access_info_dto import AccessInfoDTO from cm_python_openapi_sdk.models.account_dto import AccountDTO -from cm_python_openapi_sdk.models.account_job_info import AccountJobInfo from cm_python_openapi_sdk.models.account_onboarding_parameters import AccountOnboardingParameters from cm_python_openapi_sdk.models.account_preferences import AccountPreferences -from cm_python_openapi_sdk.models.account_utm_parameters import AccountUtmParameters from cm_python_openapi_sdk.models.active_date_filter_dto import ActiveDateFilterDTO from cm_python_openapi_sdk.models.active_feature_filter_dto import ActiveFeatureFilterDTO from cm_python_openapi_sdk.models.active_filter_abstract_type import ActiveFilterAbstractType @@ -90,6 +90,7 @@ from cm_python_openapi_sdk.models.attribute_style_dto import AttributeStyleDTO from cm_python_openapi_sdk.models.attribute_style_fallback_category_dto import AttributeStyleFallbackCategoryDTO from cm_python_openapi_sdk.models.attribute_style_paged_model_dto import AttributeStylePagedModelDTO +from cm_python_openapi_sdk.models.attribute_style_response_dto import AttributeStyleResponseDTO from cm_python_openapi_sdk.models.audit_log_paged_resource import AuditLogPagedResource from cm_python_openapi_sdk.models.audit_log_paged_resource_page import AuditLogPagedResourcePage from cm_python_openapi_sdk.models.audit_log_paged_resource_page_last_evaluated_key import AuditLogPagedResourcePageLastEvaluatedKey @@ -122,6 +123,7 @@ from cm_python_openapi_sdk.models.dashboard_dto import DashboardDTO from cm_python_openapi_sdk.models.dashboard_dataset_properties_dto import DashboardDatasetPropertiesDTO from cm_python_openapi_sdk.models.dashboard_paged_model_dto import DashboardPagedModelDTO +from cm_python_openapi_sdk.models.dashboard_response_dto import DashboardResponseDTO from cm_python_openapi_sdk.models.data_complete_multipart_upload_request import DataCompleteMultipartUploadRequest from cm_python_openapi_sdk.models.data_complete_multipart_upload_response import DataCompleteMultipartUploadResponse from cm_python_openapi_sdk.models.data_create_multipart_upload_response import DataCreateMultipartUploadResponse @@ -131,6 +133,7 @@ from cm_python_openapi_sdk.models.data_permission_content_dto import DataPermissionContentDTO from cm_python_openapi_sdk.models.data_permission_dto import DataPermissionDTO from cm_python_openapi_sdk.models.data_permission_paged_model_dto import DataPermissionPagedModelDTO +from cm_python_openapi_sdk.models.data_permission_response_dto import DataPermissionResponseDTO from cm_python_openapi_sdk.models.data_pull_job_request import DataPullJobRequest from cm_python_openapi_sdk.models.data_pull_request import DataPullRequest from cm_python_openapi_sdk.models.data_pull_request_csv_options import DataPullRequestCsvOptions @@ -144,6 +147,7 @@ from cm_python_openapi_sdk.models.dataset_h3_grid_type_dto import DatasetH3GridTypeDTO from cm_python_openapi_sdk.models.dataset_paged_model_dto import DatasetPagedModelDTO from cm_python_openapi_sdk.models.dataset_properties_dto import DatasetPropertiesDTO +from cm_python_openapi_sdk.models.dataset_response_dto import DatasetResponseDTO from cm_python_openapi_sdk.models.dataset_type import DatasetType from cm_python_openapi_sdk.models.dataset_visualization_dto import DatasetVisualizationDTO from cm_python_openapi_sdk.models.dataset_vt_type_dto import DatasetVtTypeDTO @@ -187,8 +191,14 @@ from cm_python_openapi_sdk.models.dwh_query_number_type import DwhQueryNumberType from cm_python_openapi_sdk.models.dwh_query_property_type import DwhQueryPropertyType from cm_python_openapi_sdk.models.dwh_query_property_types import DwhQueryPropertyTypes +from cm_python_openapi_sdk.models.dwh_query_property_types_filter_comp import DwhQueryPropertyTypesFilterComp +from cm_python_openapi_sdk.models.dwh_query_property_types_function_ntile import DwhQueryPropertyTypesFunctionNtile +from cm_python_openapi_sdk.models.dwh_query_property_types_function_percentile import DwhQueryPropertyTypesFunctionPercentile +from cm_python_openapi_sdk.models.dwh_query_property_types_function_rank import DwhQueryPropertyTypesFunctionRank +from cm_python_openapi_sdk.models.dwh_query_property_types_function_row_number import DwhQueryPropertyTypesFunctionRowNumber from cm_python_openapi_sdk.models.dwh_query_request import DwhQueryRequest from cm_python_openapi_sdk.models.dwh_query_request1 import DwhQueryRequest1 +from cm_python_openapi_sdk.models.dwh_query_variable_type import DwhQueryVariableType from cm_python_openapi_sdk.models.execution_context import ExecutionContext from cm_python_openapi_sdk.models.execution_detail import ExecutionDetail from cm_python_openapi_sdk.models.export_content_dto import ExportContentDTO @@ -198,6 +208,7 @@ from cm_python_openapi_sdk.models.export_paged_model_dto import ExportPagedModelDTO from cm_python_openapi_sdk.models.export_request import ExportRequest from cm_python_openapi_sdk.models.export_request_csv_options import ExportRequestCsvOptions +from cm_python_openapi_sdk.models.export_response_dto import ExportResponseDTO from cm_python_openapi_sdk.models.feature_attribute_dto import FeatureAttributeDTO from cm_python_openapi_sdk.models.feature_filter_dto import FeatureFilterDTO from cm_python_openapi_sdk.models.feature_function_dto import FeatureFunctionDTO @@ -224,7 +235,6 @@ from cm_python_openapi_sdk.models.function_h3_grid_options import FunctionH3GridOptions from cm_python_openapi_sdk.models.function_interval import FunctionInterval from cm_python_openapi_sdk.models.function_ntile import FunctionNtile -from cm_python_openapi_sdk.models.function_ntile_content_inner import FunctionNtileContentInner from cm_python_openapi_sdk.models.function_ntile_options import FunctionNtileOptions from cm_python_openapi_sdk.models.function_percent_to_total_type_general import FunctionPercentToTotalTypeGeneral from cm_python_openapi_sdk.models.function_percentile import FunctionPercentile @@ -233,6 +243,7 @@ from cm_python_openapi_sdk.models.function_round_type_general import FunctionRoundTypeGeneral from cm_python_openapi_sdk.models.function_row_number import FunctionRowNumber from cm_python_openapi_sdk.models.function_today import FunctionToday +from cm_python_openapi_sdk.models.general_job_request import GeneralJobRequest from cm_python_openapi_sdk.models.geosearch_paged_model_dto import GeosearchPagedModelDTO from cm_python_openapi_sdk.models.get_account_by_account_id200_response import GetAccountByAccountId200Response from cm_python_openapi_sdk.models.get_organizations200_response import GetOrganizations200Response @@ -258,11 +269,13 @@ from cm_python_openapi_sdk.models.indicator_drill_content_dto import IndicatorDrillContentDTO from cm_python_openapi_sdk.models.indicator_drill_dto import IndicatorDrillDTO from cm_python_openapi_sdk.models.indicator_drill_paged_model_dto import IndicatorDrillPagedModelDTO +from cm_python_openapi_sdk.models.indicator_drill_response_dto import IndicatorDrillResponseDTO from cm_python_openapi_sdk.models.indicator_filter_dto import IndicatorFilterDTO from cm_python_openapi_sdk.models.indicator_group_dto import IndicatorGroupDTO from cm_python_openapi_sdk.models.indicator_link_dto import IndicatorLinkDTO from cm_python_openapi_sdk.models.indicator_link_dto_block_rows_inner import IndicatorLinkDTOBlockRowsInner from cm_python_openapi_sdk.models.indicator_paged_model_dto import IndicatorPagedModelDTO +from cm_python_openapi_sdk.models.indicator_response_dto import IndicatorResponseDTO from cm_python_openapi_sdk.models.indicator_visualizations_dto import IndicatorVisualizationsDTO from cm_python_openapi_sdk.models.invitation_dto import InvitationDTO from cm_python_openapi_sdk.models.invitation_paged_model_dto import InvitationPagedModelDTO @@ -274,7 +287,6 @@ from cm_python_openapi_sdk.models.layer_dto_datasets_inner import LayerDTODatasetsInner from cm_python_openapi_sdk.models.layer_dto_datasets_inner_attribute_styles_inner import LayerDTODatasetsInnerAttributeStylesInner from cm_python_openapi_sdk.models.linked_layer_dto import LinkedLayerDTO -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse from cm_python_openapi_sdk.models.map_content_dto import MapContentDTO from cm_python_openapi_sdk.models.map_content_dto_base_layer import MapContentDTOBaseLayer from cm_python_openapi_sdk.models.map_content_dto_options import MapContentDTOOptions @@ -284,6 +296,7 @@ from cm_python_openapi_sdk.models.map_options_dto import MapOptionsDTO from cm_python_openapi_sdk.models.map_options_dto_custom_tile_layer import MapOptionsDTOCustomTileLayer from cm_python_openapi_sdk.models.map_paged_model_dto import MapPagedModelDTO +from cm_python_openapi_sdk.models.map_response_dto import MapResponseDTO from cm_python_openapi_sdk.models.mapycz_ortophoto_dto import MapyczOrtophotoDTO from cm_python_openapi_sdk.models.mapycz_panorama_dto import MapyczPanoramaDTO from cm_python_openapi_sdk.models.marker_content_dto import MarkerContentDTO @@ -291,31 +304,35 @@ from cm_python_openapi_sdk.models.marker_dto import MarkerDTO from cm_python_openapi_sdk.models.marker_link_dto import MarkerLinkDTO from cm_python_openapi_sdk.models.marker_paged_model_dto import MarkerPagedModelDTO +from cm_python_openapi_sdk.models.marker_response_dto import MarkerResponseDTO from cm_python_openapi_sdk.models.marker_selector_content_dto import MarkerSelectorContentDTO from cm_python_openapi_sdk.models.marker_selector_content_dto_keep_filtered import MarkerSelectorContentDTOKeepFiltered from cm_python_openapi_sdk.models.marker_selector_dto import MarkerSelectorDTO from cm_python_openapi_sdk.models.marker_selector_paged_model_dto import MarkerSelectorPagedModelDTO +from cm_python_openapi_sdk.models.marker_selector_response_dto import MarkerSelectorResponseDTO from cm_python_openapi_sdk.models.max_value_dto import MaxValueDTO from cm_python_openapi_sdk.models.measure_dto import MeasureDTO -from cm_python_openapi_sdk.models.membership_dto import MembershipDTO from cm_python_openapi_sdk.models.membership_paged_model_dto import MembershipPagedModelDTO +from cm_python_openapi_sdk.models.membership_response_dto import MembershipResponseDTO from cm_python_openapi_sdk.models.metric_dto import MetricDTO from cm_python_openapi_sdk.models.metric_paged_model_dto import MetricPagedModelDTO +from cm_python_openapi_sdk.models.metric_response_dto import MetricResponseDTO from cm_python_openapi_sdk.models.multi_select_filter_dto import MultiSelectFilterDTO -from cm_python_openapi_sdk.models.new_account_dto import NewAccountDTO from cm_python_openapi_sdk.models.order_by import OrderBy from cm_python_openapi_sdk.models.order_by_dto import OrderByDTO from cm_python_openapi_sdk.models.organization_paged_model_dto import OrganizationPagedModelDTO from cm_python_openapi_sdk.models.organization_response_dto import OrganizationResponseDTO from cm_python_openapi_sdk.models.output_dto import OutputDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO from cm_python_openapi_sdk.models.part_e_tag import PartETag -from cm_python_openapi_sdk.models.password_change_dto import PasswordChangeDTO from cm_python_openapi_sdk.models.position_dto import PositionDTO from cm_python_openapi_sdk.models.project_paged_model_dto import ProjectPagedModelDTO from cm_python_openapi_sdk.models.project_response_dto import ProjectResponseDTO +from cm_python_openapi_sdk.models.project_response_dto_services import ProjectResponseDTOServices from cm_python_openapi_sdk.models.project_settings_content_dto import ProjectSettingsContentDTO from cm_python_openapi_sdk.models.project_settings_dto import ProjectSettingsDTO from cm_python_openapi_sdk.models.project_settings_paged_model_dto import ProjectSettingsPagedModelDTO +from cm_python_openapi_sdk.models.project_settings_response_dto import ProjectSettingsResponseDTO from cm_python_openapi_sdk.models.project_template_dto import ProjectTemplateDTO from cm_python_openapi_sdk.models.property_filter_compare_dto import PropertyFilterCompareDTO from cm_python_openapi_sdk.models.property_filter_in_dto import PropertyFilterInDTO @@ -327,7 +344,6 @@ from cm_python_openapi_sdk.models.query_response_item_wrapper import QueryResponseItemWrapper from cm_python_openapi_sdk.models.ranking_dto import RankingDTO from cm_python_openapi_sdk.models.relations_dto import RelationsDTO -from cm_python_openapi_sdk.models.reset_password_dto import ResetPasswordDTO from cm_python_openapi_sdk.models.restricted_account_dto import RestrictedAccountDTO from cm_python_openapi_sdk.models.result_set_filter import ResultSetFilter from cm_python_openapi_sdk.models.result_set_filter_comp import ResultSetFilterComp @@ -337,29 +353,27 @@ from cm_python_openapi_sdk.models.search_query_hit import SearchQueryHit from cm_python_openapi_sdk.models.search_query_hit_id import SearchQueryHitId from cm_python_openapi_sdk.models.search_query_response import SearchQueryResponse -from cm_python_openapi_sdk.models.send_reset_password_dto import SendResetPasswordDTO from cm_python_openapi_sdk.models.single_select_filter_dto import SingleSelectFilterDTO from cm_python_openapi_sdk.models.static_scale_option_dto import StaticScaleOptionDTO from cm_python_openapi_sdk.models.static_scale_option_dto_breaks import StaticScaleOptionDTOBreaks from cm_python_openapi_sdk.models.style_dto import StyleDTO -from cm_python_openapi_sdk.models.submit_job_execution_request import SubmitJobExecutionRequest from cm_python_openapi_sdk.models.template_dataset_dto import TemplateDatasetDTO from cm_python_openapi_sdk.models.time_series_dto import TimeSeriesDTO from cm_python_openapi_sdk.models.token_request_dto import TokenRequestDTO from cm_python_openapi_sdk.models.token_response_dto import TokenResponseDTO from cm_python_openapi_sdk.models.truncate_job_request import TruncateJobRequest from cm_python_openapi_sdk.models.update_invitation import UpdateInvitation -from cm_python_openapi_sdk.models.update_membership import UpdateMembership +from cm_python_openapi_sdk.models.update_membership_dto import UpdateMembershipDTO from cm_python_openapi_sdk.models.update_organization_dto import UpdateOrganizationDTO from cm_python_openapi_sdk.models.update_project_dto import UpdateProjectDTO from cm_python_openapi_sdk.models.validate_job_request import ValidateJobRequest from cm_python_openapi_sdk.models.validate_request import ValidateRequest from cm_python_openapi_sdk.models.value_option_dto import ValueOptionDTO from cm_python_openapi_sdk.models.variable_dto import VariableDTO -from cm_python_openapi_sdk.models.variable_type import VariableType from cm_python_openapi_sdk.models.variable_value import VariableValue from cm_python_openapi_sdk.models.variables_dto import VariablesDTO from cm_python_openapi_sdk.models.view_content_dto import ViewContentDTO from cm_python_openapi_sdk.models.view_dto import ViewDTO from cm_python_openapi_sdk.models.view_paged_model_dto import ViewPagedModelDTO +from cm_python_openapi_sdk.models.view_response_dto import ViewResponseDTO from cm_python_openapi_sdk.models.zoom_dto import ZoomDTO diff --git a/cm_python_openapi_sdk/api/__init__.py b/cm_python_openapi_sdk/api/__init__.py index 0c9bfd3..76670f1 100644 --- a/cm_python_openapi_sdk/api/__init__.py +++ b/cm_python_openapi_sdk/api/__init__.py @@ -2,7 +2,6 @@ # import apis into api package from cm_python_openapi_sdk.api.accounts_api import AccountsApi -from cm_python_openapi_sdk.api.accounts_reset_password_api import AccountsResetPasswordApi from cm_python_openapi_sdk.api.attribute_styles_api import AttributeStylesApi from cm_python_openapi_sdk.api.audit_log_api import AuditLogApi from cm_python_openapi_sdk.api.authentication_api import AuthenticationApi @@ -18,6 +17,7 @@ from cm_python_openapi_sdk.api.explain_api import ExplainApi from cm_python_openapi_sdk.api.export_api import ExportApi from cm_python_openapi_sdk.api.exports_api import ExportsApi +from cm_python_openapi_sdk.api.geosearch_api import GeosearchApi from cm_python_openapi_sdk.api.indicator_drills_api import IndicatorDrillsApi from cm_python_openapi_sdk.api.indicators_api import IndicatorsApi from cm_python_openapi_sdk.api.invitation_api import InvitationApi @@ -38,5 +38,6 @@ from cm_python_openapi_sdk.api.property_values_distribution_api import PropertyValuesDistributionApi from cm_python_openapi_sdk.api.queries_api import QueriesApi from cm_python_openapi_sdk.api.search_api import SearchApi +from cm_python_openapi_sdk.api.vector_tiles_api import VectorTilesApi from cm_python_openapi_sdk.api.views_api import ViewsApi diff --git a/cm_python_openapi_sdk/api/accounts_api.py b/cm_python_openapi_sdk/api/accounts_api.py index 5cbf360..3e55bf5 100644 --- a/cm_python_openapi_sdk/api/accounts_api.py +++ b/cm_python_openapi_sdk/api/accounts_api.py @@ -24,8 +24,6 @@ from cm_python_openapi_sdk.models.account_onboarding_parameters import AccountOnboardingParameters from cm_python_openapi_sdk.models.account_preferences import AccountPreferences from cm_python_openapi_sdk.models.get_account_by_account_id200_response import GetAccountByAccountId200Response -from cm_python_openapi_sdk.models.new_account_dto import NewAccountDTO -from cm_python_openapi_sdk.models.password_change_dto import PasswordChangeDTO from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized from cm_python_openapi_sdk.api_response import ApiResponse @@ -327,294 +325,6 @@ def _change_onboarding_serialize( - @validate_call - def change_password( - self, - account_id: Annotated[str, Field(strict=True, description="Id of the account")], - password_change_dto: Optional[PasswordChangeDTO] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Change password - - Set password for user Account. New password must match all of following restrictions: - minimal length 8 characters - must contains at least one uppercase character - must contains at least one lowercase character - must contains at least one numeric character **Security:** User is allowed to change only it's own password. Bearer token must match `accountId` - - :param account_id: Id of the account (required) - :type account_id: str - :param password_change_dto: - :type password_change_dto: PasswordChangeDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._change_password_serialize( - account_id=account_id, - password_change_dto=password_change_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': None, - '403': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def change_password_with_http_info( - self, - account_id: Annotated[str, Field(strict=True, description="Id of the account")], - password_change_dto: Optional[PasswordChangeDTO] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Change password - - Set password for user Account. New password must match all of following restrictions: - minimal length 8 characters - must contains at least one uppercase character - must contains at least one lowercase character - must contains at least one numeric character **Security:** User is allowed to change only it's own password. Bearer token must match `accountId` - - :param account_id: Id of the account (required) - :type account_id: str - :param password_change_dto: - :type password_change_dto: PasswordChangeDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._change_password_serialize( - account_id=account_id, - password_change_dto=password_change_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': None, - '403': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def change_password_without_preload_content( - self, - account_id: Annotated[str, Field(strict=True, description="Id of the account")], - password_change_dto: Optional[PasswordChangeDTO] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Change password - - Set password for user Account. New password must match all of following restrictions: - minimal length 8 characters - must contains at least one uppercase character - must contains at least one lowercase character - must contains at least one numeric character **Security:** User is allowed to change only it's own password. Bearer token must match `accountId` - - :param account_id: Id of the account (required) - :type account_id: str - :param password_change_dto: - :type password_change_dto: PasswordChangeDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._change_password_serialize( - account_id=account_id, - password_change_dto=password_change_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '400': None, - '403': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _change_password_serialize( - self, - account_id, - password_change_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if account_id is not None: - _path_params['accountId'] = account_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if password_change_dto is not None: - _body_params = password_change_dto - - - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/accounts/{accountId}/password', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - @validate_call def change_preferences( self, @@ -1918,276 +1628,3 @@ def _get_current_account_serialize( ) - - - @validate_call - def register_account( - self, - new_account_dto: NewAccountDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AccountDTO: - """Register new account - - - :param new_account_dto: (required) - :type new_account_dto: NewAccountDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._register_account_serialize( - new_account_dto=new_account_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "AccountDTO", - '409': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def register_account_with_http_info( - self, - new_account_dto: NewAccountDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AccountDTO]: - """Register new account - - - :param new_account_dto: (required) - :type new_account_dto: NewAccountDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._register_account_serialize( - new_account_dto=new_account_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "AccountDTO", - '409': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def register_account_without_preload_content( - self, - new_account_dto: NewAccountDTO, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Register new account - - - :param new_account_dto: (required) - :type new_account_dto: NewAccountDTO - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._register_account_serialize( - new_account_dto=new_account_dto, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "AccountDTO", - '409': None, - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _register_account_serialize( - self, - new_account_dto, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if new_account_dto is not None: - _body_params = new_account_dto - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/accounts', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/cm_python_openapi_sdk/api/attribute_styles_api.py b/cm_python_openapi_sdk/api/attribute_styles_api.py index 279145a..e1b69a0 100644 --- a/cm_python_openapi_sdk/api/attribute_styles_api.py +++ b/cm_python_openapi_sdk/api/attribute_styles_api.py @@ -22,6 +22,7 @@ from typing_extensions import Annotated from cm_python_openapi_sdk.models.attribute_style_dto import AttributeStyleDTO from cm_python_openapi_sdk.models.attribute_style_paged_model_dto import AttributeStylePagedModelDTO +from cm_python_openapi_sdk.models.attribute_style_response_dto import AttributeStyleResponseDTO from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized from cm_python_openapi_sdk.api_response import ApiResponse @@ -59,7 +60,7 @@ def create_attribute_style( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AttributeStyleDTO: + ) -> AttributeStyleResponseDTO: """Creates new attribute style Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -103,7 +104,7 @@ def create_attribute_style( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AttributeStyleDTO", + '200': "AttributeStyleResponseDTO", '400': None, '409': None, } @@ -136,7 +137,7 @@ def create_attribute_style_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AttributeStyleDTO]: + ) -> ApiResponse[AttributeStyleResponseDTO]: """Creates new attribute style Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -180,7 +181,7 @@ def create_attribute_style_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AttributeStyleDTO", + '200': "AttributeStyleResponseDTO", '400': None, '409': None, } @@ -257,7 +258,7 @@ def create_attribute_style_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AttributeStyleDTO", + '200': "AttributeStyleResponseDTO", '400': None, '409': None, } @@ -949,7 +950,7 @@ def get_attribute_style_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AttributeStyleDTO: + ) -> AttributeStyleResponseDTO: """Gets attribute style by id @@ -989,7 +990,7 @@ def get_attribute_style_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AttributeStyleDTO", + '200': "AttributeStyleResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1020,7 +1021,7 @@ def get_attribute_style_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AttributeStyleDTO]: + ) -> ApiResponse[AttributeStyleResponseDTO]: """Gets attribute style by id @@ -1060,7 +1061,7 @@ def get_attribute_style_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AttributeStyleDTO", + '200': "AttributeStyleResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1131,7 +1132,7 @@ def get_attribute_style_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AttributeStyleDTO", + '200': "AttributeStyleResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1208,6 +1209,282 @@ def _get_attribute_style_by_id_serialize( + @validate_call + def get_attribute_style_by_name( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the attribute style")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> AttributeStyleResponseDTO: + """Gets attribute style by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the attribute style (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_attribute_style_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AttributeStyleResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_attribute_style_by_name_with_http_info( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the attribute style")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[AttributeStyleResponseDTO]: + """Gets attribute style by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the attribute style (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_attribute_style_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AttributeStyleResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_attribute_style_by_name_without_preload_content( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the attribute style")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Gets attribute style by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the attribute style (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_attribute_style_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "AttributeStyleResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_attribute_style_by_name_serialize( + self, + project_id, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/projects/{projectId}/md/attributeStyles/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def update_attribute_style_by_id( self, @@ -1228,7 +1505,7 @@ def update_attribute_style_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AttributeStyleDTO: + ) -> AttributeStyleResponseDTO: """Updates attribute style by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1278,7 +1555,7 @@ def update_attribute_style_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AttributeStyleDTO", + '200': "AttributeStyleResponseDTO", '400': None, '404': None, '409': None, @@ -1316,7 +1593,7 @@ def update_attribute_style_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AttributeStyleDTO]: + ) -> ApiResponse[AttributeStyleResponseDTO]: """Updates attribute style by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1366,7 +1643,7 @@ def update_attribute_style_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AttributeStyleDTO", + '200': "AttributeStyleResponseDTO", '400': None, '404': None, '409': None, @@ -1454,7 +1731,7 @@ def update_attribute_style_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "AttributeStyleDTO", + '200': "AttributeStyleResponseDTO", '400': None, '404': None, '409': None, diff --git a/cm_python_openapi_sdk/api/dashboards_api.py b/cm_python_openapi_sdk/api/dashboards_api.py index e672a55..9770bf5 100644 --- a/cm_python_openapi_sdk/api/dashboards_api.py +++ b/cm_python_openapi_sdk/api/dashboards_api.py @@ -22,6 +22,7 @@ from typing_extensions import Annotated from cm_python_openapi_sdk.models.dashboard_dto import DashboardDTO from cm_python_openapi_sdk.models.dashboard_paged_model_dto import DashboardPagedModelDTO +from cm_python_openapi_sdk.models.dashboard_response_dto import DashboardResponseDTO from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized from cm_python_openapi_sdk.api_response import ApiResponse @@ -59,7 +60,7 @@ def create_dashboard( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DashboardDTO: + ) -> DashboardResponseDTO: """Creates new dashboard Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -103,7 +104,7 @@ def create_dashboard( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DashboardDTO", + '200': "DashboardResponseDTO", '400': None, '409': None, } @@ -136,7 +137,7 @@ def create_dashboard_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DashboardDTO]: + ) -> ApiResponse[DashboardResponseDTO]: """Creates new dashboard Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -180,7 +181,7 @@ def create_dashboard_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DashboardDTO", + '200': "DashboardResponseDTO", '400': None, '409': None, } @@ -257,7 +258,7 @@ def create_dashboard_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DashboardDTO", + '200': "DashboardResponseDTO", '400': None, '409': None, } @@ -949,7 +950,7 @@ def get_dashboard_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DashboardDTO: + ) -> DashboardResponseDTO: """Gets dashboard by id @@ -989,7 +990,7 @@ def get_dashboard_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DashboardDTO", + '200': "DashboardResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1020,7 +1021,7 @@ def get_dashboard_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DashboardDTO]: + ) -> ApiResponse[DashboardResponseDTO]: """Gets dashboard by id @@ -1060,7 +1061,7 @@ def get_dashboard_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DashboardDTO", + '200': "DashboardResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1131,7 +1132,7 @@ def get_dashboard_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DashboardDTO", + '200': "DashboardResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1208,6 +1209,282 @@ def _get_dashboard_by_id_serialize( + @validate_call + def get_dashboard_by_name( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the dashboard")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DashboardResponseDTO: + """Gets dashboard by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the dashboard (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dashboard_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DashboardResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_dashboard_by_name_with_http_info( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the dashboard")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DashboardResponseDTO]: + """Gets dashboard by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the dashboard (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dashboard_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DashboardResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_dashboard_by_name_without_preload_content( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the dashboard")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Gets dashboard by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the dashboard (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dashboard_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DashboardResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_dashboard_by_name_serialize( + self, + project_id, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/projects/{projectId}/md/dashboards/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def update_dashboard_by_id( self, @@ -1228,7 +1505,7 @@ def update_dashboard_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DashboardDTO: + ) -> DashboardResponseDTO: """Updates dashboard by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1278,7 +1555,7 @@ def update_dashboard_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DashboardDTO", + '200': "DashboardResponseDTO", '400': None, '404': None, '409': None, @@ -1316,7 +1593,7 @@ def update_dashboard_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DashboardDTO]: + ) -> ApiResponse[DashboardResponseDTO]: """Updates dashboard by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1366,7 +1643,7 @@ def update_dashboard_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DashboardDTO", + '200': "DashboardResponseDTO", '400': None, '404': None, '409': None, @@ -1454,7 +1731,7 @@ def update_dashboard_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DashboardDTO", + '200': "DashboardResponseDTO", '400': None, '404': None, '409': None, diff --git a/cm_python_openapi_sdk/api/data_permissions_api.py b/cm_python_openapi_sdk/api/data_permissions_api.py index 2f4078c..c99b7df 100644 --- a/cm_python_openapi_sdk/api/data_permissions_api.py +++ b/cm_python_openapi_sdk/api/data_permissions_api.py @@ -22,6 +22,7 @@ from typing_extensions import Annotated from cm_python_openapi_sdk.models.data_permission_dto import DataPermissionDTO from cm_python_openapi_sdk.models.data_permission_paged_model_dto import DataPermissionPagedModelDTO +from cm_python_openapi_sdk.models.data_permission_response_dto import DataPermissionResponseDTO from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized from cm_python_openapi_sdk.api_response import ApiResponse @@ -59,7 +60,7 @@ def create_data_permission( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DataPermissionDTO: + ) -> DataPermissionResponseDTO: """Creates new data permission Restricted to ADMIN project role that has the permission to update data permissions of the project. @@ -103,7 +104,7 @@ def create_data_permission( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DataPermissionDTO", + '200': "DataPermissionResponseDTO", '400': None, '409': None, } @@ -136,7 +137,7 @@ def create_data_permission_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DataPermissionDTO]: + ) -> ApiResponse[DataPermissionResponseDTO]: """Creates new data permission Restricted to ADMIN project role that has the permission to update data permissions of the project. @@ -180,7 +181,7 @@ def create_data_permission_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DataPermissionDTO", + '200': "DataPermissionResponseDTO", '400': None, '409': None, } @@ -257,7 +258,7 @@ def create_data_permission_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DataPermissionDTO", + '200': "DataPermissionResponseDTO", '400': None, '409': None, } @@ -952,7 +953,7 @@ def get_data_permission_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DataPermissionDTO: + ) -> DataPermissionResponseDTO: """Gets data permission by id Restricted to ADMIN project role that has the permission to update data permissions of the project. @@ -993,7 +994,7 @@ def get_data_permission_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DataPermissionDTO", + '200': "DataPermissionResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1024,7 +1025,7 @@ def get_data_permission_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DataPermissionDTO]: + ) -> ApiResponse[DataPermissionResponseDTO]: """Gets data permission by id Restricted to ADMIN project role that has the permission to update data permissions of the project. @@ -1065,7 +1066,7 @@ def get_data_permission_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DataPermissionDTO", + '200': "DataPermissionResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1137,7 +1138,7 @@ def get_data_permission_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DataPermissionDTO", + '200': "DataPermissionResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1214,6 +1215,285 @@ def _get_data_permission_by_id_serialize( + @validate_call + def get_data_permission_by_name( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the data permission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DataPermissionResponseDTO: + """Gets data permission by name + + Restricted to ADMIN project role that has the permission to update data permissions of the project. + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the data permission (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_data_permission_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DataPermissionResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_data_permission_by_name_with_http_info( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the data permission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DataPermissionResponseDTO]: + """Gets data permission by name + + Restricted to ADMIN project role that has the permission to update data permissions of the project. + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the data permission (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_data_permission_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DataPermissionResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_data_permission_by_name_without_preload_content( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the data permission")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Gets data permission by name + + Restricted to ADMIN project role that has the permission to update data permissions of the project. + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the data permission (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_data_permission_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DataPermissionResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_data_permission_by_name_serialize( + self, + project_id, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/projects/{projectId}/md/dataPermissions/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def update_data_permission_by_id( self, @@ -1234,7 +1514,7 @@ def update_data_permission_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DataPermissionDTO: + ) -> DataPermissionResponseDTO: """Updates data permission by id Restricted to ADMIN project role that has the permission to update data permissions of the project. @@ -1284,7 +1564,7 @@ def update_data_permission_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DataPermissionDTO", + '200': "DataPermissionResponseDTO", '400': None, '404': None, '409': None, @@ -1322,7 +1602,7 @@ def update_data_permission_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DataPermissionDTO]: + ) -> ApiResponse[DataPermissionResponseDTO]: """Updates data permission by id Restricted to ADMIN project role that has the permission to update data permissions of the project. @@ -1372,7 +1652,7 @@ def update_data_permission_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DataPermissionDTO", + '200': "DataPermissionResponseDTO", '400': None, '404': None, '409': None, @@ -1460,7 +1740,7 @@ def update_data_permission_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DataPermissionDTO", + '200': "DataPermissionResponseDTO", '400': None, '404': None, '409': None, diff --git a/cm_python_openapi_sdk/api/data_upload_api.py b/cm_python_openapi_sdk/api/data_upload_api.py index ca1cc47..795585c 100644 --- a/cm_python_openapi_sdk/api/data_upload_api.py +++ b/cm_python_openapi_sdk/api/data_upload_api.py @@ -366,7 +366,7 @@ def data_upload( ) -> DataUpload200Response: """Upload CSV file to dataset - # Data Upload Methods There are four ways to update dataset data: 1. **CSV Upload** – Push a CSV file from your computer or server. 2. **Multipart CSV Upload** – Push CSV file in parts from your computer or server (recommended for files larger then 50MB) - you must specify parameter **parts** 3. **S3 Pull** – Pull data stored in your S3 bucket. 4. **HTTPS Pull** – Pull data from any HTTPS endpoint. --- ## CSV Upload Flow 1. Create a new upload resource via: `POST /rest/projects/{projectId}/dwh/data/uploads` 2. Receive a resource with an S3 pre-signed `uploadUrl`. 3. Upload the CSV file using: `PUT {uploadUrl}` (No authentication required) 4. Once the upload is finished, start a [dataPull](#operation/submitJobExecution) job with the correct input. ### Pre-signed URL Usage The pre-signed URL can be used with any HTTP tool. You can upload the content directly without additional authorization (no bearer token required). #### Example: Upload CSV File Using `curl` ```sh curl -X PUT \\ 'https://s3-eu-west-1.amazonaws.com/can-dwh-upload-uploads-prod/00ubftx6v6TSTKnAt0h7/o3d2ov0p43msl3hf/RjFJt5kW302QNLzFIVnxN369dlY6KUw4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ6BXDNGJ7WFCT7SQ%2F20170915%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20170915T141016Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=e053197d044345041268b7f22918e2e71e2a3d5a23ceed65a332e1782998739c' \\ -T /home/user/data/mydata.csv ``` ## Multipart Upload Flow To upload a large CSV file in multiple parts, follow these steps: 1. **Start the multipart upload** by sending a `POST` request: POST /rest/projects/{projectId}/dwh/data/uploads?parts=3 - This request initializes the upload and specifies the number of parts. 2. **Receive a response** containing: - An `id` identifying the upload. - A list of **uploadUrls**, which are S3 pre-signed URLs, one for each part. 3. **Split the CSV file** and upload each part to its corresponding URL using: PUT {uploadUrl} - No additional authentication is required. 4. **Complete the upload** - Once all parts are uploaded, send the [Complete Multipart Data Upload](#operation/completeMultipartUpload) request. 5. **Start the DataPull job** - After completing the upload, start a [dataPull](#operation/submitJobExecution) job with the correct input. ## S3 Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **S3 URL**. ### Example: DataPull Request for S3 Upload ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\" } } ``` ## HTTPS Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **HTTPS URL**. ### Example: DataPull Request for HTTPS Upload ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"httpsUpload\": \"https://my-domain.com/mystores.csv\", \"type\": \"csv\" } } ``` **Warning**: We do not recommend uploading sensitive information using the HTTPS pull flow, as files hosted on public URLs are accessible to anyone on the internet. **Security** Restricted to LOAD_DATA, DATA_EDITOR and ADMIN project's roles that have permission to load data into the project. ## CSV Options With **CsvOptions**, you can specify how the CSV should be processed. The available options are: | Option | Type | Description | Default Value | |-------------|----------|---------------------------------------------------------------|--------------| | `header` | boolean | Specifies if the CSV has a header. | `true` | | `separator` | char | Specifies the separator character between fields. | `,` | | `quote` | char | Specifies the quote character. | `\"` | | `escape` | char | Specifies the escape character. | `\\` | | `null` | string | Specifies the replacement value for custom CSV nulls. | *None* | | `forceNull` | string[] | Specifies which CSV columns should enforce null replacement. | *None* | ### Example: DataPull Request for S3 Upload with CSV Options ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\", \"csvOptions\": { \"header\": true, \"separator\": \";\", \"quote\": \"§\", \"escape\": \"\\\\\", \"null\": \"NULL_VALUE\", \"forceNull\": [ \"columnName\", \"otherColumn\" ] } } } ``` + # Data Upload Methods There are four ways to update dataset data: 1. **CSV Upload** – Push a CSV file from your computer or server. 2. **Multipart CSV Upload** – Push CSV file in parts from your computer or server (recommended for files larger then 50MB) - you must specify parameter **parts** 3. **S3 Pull** – Pull data stored in your S3 bucket. 4. **HTTPS Pull** – Pull data from any HTTPS endpoint. --- ## CSV Upload Flow 1. Create a new upload resource via: `POST /rest/projects/{projectId}/dwh/data/uploads` 2. Receive a resource with an S3 pre-signed `uploadUrl`. 3. Upload the CSV file using: `PUT {uploadUrl}` (No authentication required) 4. Once the upload is finished, start a [dataPull](#operation/submitJobExecution) job with the correct input. ### Pre-signed URL Usage The pre-signed URL can be used with any HTTP tool. You can upload the content directly without additional authorization (no bearer token required). #### Example: Upload CSV File Using `curl` ```sh curl -X PUT \\ 'https://s3-eu-west-1.amazonaws.com/can-dwh-upload-uploads-prod/00ubftx6v6TSTKnAt0h7/o3d2ov0p43msl3hf/RjFJt5kW302QNLzFIVnxN369dlY6KUw4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ6BXDNGJ7WFCT7SQ%2F20170915%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20170915T141016Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=e053197d044345041268b7f22918e2e71e2a3d5a23ceed65a332e1782998739c' \\ -T /home/user/data/mydata.csv ``` ## Multipart Upload Flow To upload a large CSV file in multiple parts, follow these steps: 1. **Start the multipart upload** by sending a `POST` request: POST /rest/projects/{projectId}/dwh/data/uploads?parts=3 - This request initializes the upload and specifies the number of parts. 2. **Receive a response** containing: - An `id` identifying the upload. - A list of **uploadUrls**, which are S3 pre-signed URLs, one for each part. 3. **Split the CSV file**, compress each part with GZIP and upload each part to its corresponding URL using: PUT {uploadUrl} - No additional authentication is required. 4. **Complete the upload** - Once all parts are uploaded, send the [Complete Multipart Data Upload](#operation/completeMultipartUpload) request. 5. **Start the DataPull job** - After completing the upload, start a [dataPull](#operation/submitJobExecution) job with the correct input. ## S3 Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **S3 URL**. ### Example: DataPull Request for S3 Upload ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\" } } ``` ## HTTPS Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **HTTPS URL**. ### Example: DataPull Request for HTTPS Upload ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"httpsUpload\": \"https://my-domain.com/mystores.csv\", \"type\": \"csv\" } } ``` **Warning**: We do not recommend uploading sensitive information using the HTTPS pull flow, as files hosted on public URLs are accessible to anyone on the internet. **Security** Restricted to LOAD_DATA, DATA_EDITOR and ADMIN project's roles that have permission to load data into the project. ## CSV Options With **CsvOptions**, you can specify how the CSV should be processed. The available options are: | Option | Type | Description | Default Value | |-------------|----------|---------------------------------------------------------------|--------------| | `header` | boolean | Specifies if the CSV has a header. | `true` | | `separator` | char | Specifies the separator character between fields. | `,` | | `quote` | char | Specifies the quote character. | `\"` | | `escape` | char | Specifies the escape character. | `\\` | | `null` | string | Specifies the replacement value for custom CSV nulls. | *None* | | `forceNull` | string[] | Specifies which CSV columns should enforce null replacement. | *None* | ### Example: DataPull Request for S3 Upload with CSV Options ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\", \"csvOptions\": { \"header\": true, \"separator\": \";\", \"quote\": \"§\", \"escape\": \"\\\\\", \"null\": \"NULL_VALUE\", \"forceNull\": [ \"columnName\", \"otherColumn\" ] } } } ``` :param project_id: Id of the project (required) :type project_id: str @@ -437,7 +437,7 @@ def data_upload_with_http_info( ) -> ApiResponse[DataUpload200Response]: """Upload CSV file to dataset - # Data Upload Methods There are four ways to update dataset data: 1. **CSV Upload** – Push a CSV file from your computer or server. 2. **Multipart CSV Upload** – Push CSV file in parts from your computer or server (recommended for files larger then 50MB) - you must specify parameter **parts** 3. **S3 Pull** – Pull data stored in your S3 bucket. 4. **HTTPS Pull** – Pull data from any HTTPS endpoint. --- ## CSV Upload Flow 1. Create a new upload resource via: `POST /rest/projects/{projectId}/dwh/data/uploads` 2. Receive a resource with an S3 pre-signed `uploadUrl`. 3. Upload the CSV file using: `PUT {uploadUrl}` (No authentication required) 4. Once the upload is finished, start a [dataPull](#operation/submitJobExecution) job with the correct input. ### Pre-signed URL Usage The pre-signed URL can be used with any HTTP tool. You can upload the content directly without additional authorization (no bearer token required). #### Example: Upload CSV File Using `curl` ```sh curl -X PUT \\ 'https://s3-eu-west-1.amazonaws.com/can-dwh-upload-uploads-prod/00ubftx6v6TSTKnAt0h7/o3d2ov0p43msl3hf/RjFJt5kW302QNLzFIVnxN369dlY6KUw4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ6BXDNGJ7WFCT7SQ%2F20170915%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20170915T141016Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=e053197d044345041268b7f22918e2e71e2a3d5a23ceed65a332e1782998739c' \\ -T /home/user/data/mydata.csv ``` ## Multipart Upload Flow To upload a large CSV file in multiple parts, follow these steps: 1. **Start the multipart upload** by sending a `POST` request: POST /rest/projects/{projectId}/dwh/data/uploads?parts=3 - This request initializes the upload and specifies the number of parts. 2. **Receive a response** containing: - An `id` identifying the upload. - A list of **uploadUrls**, which are S3 pre-signed URLs, one for each part. 3. **Split the CSV file** and upload each part to its corresponding URL using: PUT {uploadUrl} - No additional authentication is required. 4. **Complete the upload** - Once all parts are uploaded, send the [Complete Multipart Data Upload](#operation/completeMultipartUpload) request. 5. **Start the DataPull job** - After completing the upload, start a [dataPull](#operation/submitJobExecution) job with the correct input. ## S3 Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **S3 URL**. ### Example: DataPull Request for S3 Upload ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\" } } ``` ## HTTPS Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **HTTPS URL**. ### Example: DataPull Request for HTTPS Upload ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"httpsUpload\": \"https://my-domain.com/mystores.csv\", \"type\": \"csv\" } } ``` **Warning**: We do not recommend uploading sensitive information using the HTTPS pull flow, as files hosted on public URLs are accessible to anyone on the internet. **Security** Restricted to LOAD_DATA, DATA_EDITOR and ADMIN project's roles that have permission to load data into the project. ## CSV Options With **CsvOptions**, you can specify how the CSV should be processed. The available options are: | Option | Type | Description | Default Value | |-------------|----------|---------------------------------------------------------------|--------------| | `header` | boolean | Specifies if the CSV has a header. | `true` | | `separator` | char | Specifies the separator character between fields. | `,` | | `quote` | char | Specifies the quote character. | `\"` | | `escape` | char | Specifies the escape character. | `\\` | | `null` | string | Specifies the replacement value for custom CSV nulls. | *None* | | `forceNull` | string[] | Specifies which CSV columns should enforce null replacement. | *None* | ### Example: DataPull Request for S3 Upload with CSV Options ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\", \"csvOptions\": { \"header\": true, \"separator\": \";\", \"quote\": \"§\", \"escape\": \"\\\\\", \"null\": \"NULL_VALUE\", \"forceNull\": [ \"columnName\", \"otherColumn\" ] } } } ``` + # Data Upload Methods There are four ways to update dataset data: 1. **CSV Upload** – Push a CSV file from your computer or server. 2. **Multipart CSV Upload** – Push CSV file in parts from your computer or server (recommended for files larger then 50MB) - you must specify parameter **parts** 3. **S3 Pull** – Pull data stored in your S3 bucket. 4. **HTTPS Pull** – Pull data from any HTTPS endpoint. --- ## CSV Upload Flow 1. Create a new upload resource via: `POST /rest/projects/{projectId}/dwh/data/uploads` 2. Receive a resource with an S3 pre-signed `uploadUrl`. 3. Upload the CSV file using: `PUT {uploadUrl}` (No authentication required) 4. Once the upload is finished, start a [dataPull](#operation/submitJobExecution) job with the correct input. ### Pre-signed URL Usage The pre-signed URL can be used with any HTTP tool. You can upload the content directly without additional authorization (no bearer token required). #### Example: Upload CSV File Using `curl` ```sh curl -X PUT \\ 'https://s3-eu-west-1.amazonaws.com/can-dwh-upload-uploads-prod/00ubftx6v6TSTKnAt0h7/o3d2ov0p43msl3hf/RjFJt5kW302QNLzFIVnxN369dlY6KUw4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ6BXDNGJ7WFCT7SQ%2F20170915%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20170915T141016Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=e053197d044345041268b7f22918e2e71e2a3d5a23ceed65a332e1782998739c' \\ -T /home/user/data/mydata.csv ``` ## Multipart Upload Flow To upload a large CSV file in multiple parts, follow these steps: 1. **Start the multipart upload** by sending a `POST` request: POST /rest/projects/{projectId}/dwh/data/uploads?parts=3 - This request initializes the upload and specifies the number of parts. 2. **Receive a response** containing: - An `id` identifying the upload. - A list of **uploadUrls**, which are S3 pre-signed URLs, one for each part. 3. **Split the CSV file**, compress each part with GZIP and upload each part to its corresponding URL using: PUT {uploadUrl} - No additional authentication is required. 4. **Complete the upload** - Once all parts are uploaded, send the [Complete Multipart Data Upload](#operation/completeMultipartUpload) request. 5. **Start the DataPull job** - After completing the upload, start a [dataPull](#operation/submitJobExecution) job with the correct input. ## S3 Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **S3 URL**. ### Example: DataPull Request for S3 Upload ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\" } } ``` ## HTTPS Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **HTTPS URL**. ### Example: DataPull Request for HTTPS Upload ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"httpsUpload\": \"https://my-domain.com/mystores.csv\", \"type\": \"csv\" } } ``` **Warning**: We do not recommend uploading sensitive information using the HTTPS pull flow, as files hosted on public URLs are accessible to anyone on the internet. **Security** Restricted to LOAD_DATA, DATA_EDITOR and ADMIN project's roles that have permission to load data into the project. ## CSV Options With **CsvOptions**, you can specify how the CSV should be processed. The available options are: | Option | Type | Description | Default Value | |-------------|----------|---------------------------------------------------------------|--------------| | `header` | boolean | Specifies if the CSV has a header. | `true` | | `separator` | char | Specifies the separator character between fields. | `,` | | `quote` | char | Specifies the quote character. | `\"` | | `escape` | char | Specifies the escape character. | `\\` | | `null` | string | Specifies the replacement value for custom CSV nulls. | *None* | | `forceNull` | string[] | Specifies which CSV columns should enforce null replacement. | *None* | ### Example: DataPull Request for S3 Upload with CSV Options ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\", \"csvOptions\": { \"header\": true, \"separator\": \";\", \"quote\": \"§\", \"escape\": \"\\\\\", \"null\": \"NULL_VALUE\", \"forceNull\": [ \"columnName\", \"otherColumn\" ] } } } ``` :param project_id: Id of the project (required) :type project_id: str @@ -508,7 +508,7 @@ def data_upload_without_preload_content( ) -> RESTResponseType: """Upload CSV file to dataset - # Data Upload Methods There are four ways to update dataset data: 1. **CSV Upload** – Push a CSV file from your computer or server. 2. **Multipart CSV Upload** – Push CSV file in parts from your computer or server (recommended for files larger then 50MB) - you must specify parameter **parts** 3. **S3 Pull** – Pull data stored in your S3 bucket. 4. **HTTPS Pull** – Pull data from any HTTPS endpoint. --- ## CSV Upload Flow 1. Create a new upload resource via: `POST /rest/projects/{projectId}/dwh/data/uploads` 2. Receive a resource with an S3 pre-signed `uploadUrl`. 3. Upload the CSV file using: `PUT {uploadUrl}` (No authentication required) 4. Once the upload is finished, start a [dataPull](#operation/submitJobExecution) job with the correct input. ### Pre-signed URL Usage The pre-signed URL can be used with any HTTP tool. You can upload the content directly without additional authorization (no bearer token required). #### Example: Upload CSV File Using `curl` ```sh curl -X PUT \\ 'https://s3-eu-west-1.amazonaws.com/can-dwh-upload-uploads-prod/00ubftx6v6TSTKnAt0h7/o3d2ov0p43msl3hf/RjFJt5kW302QNLzFIVnxN369dlY6KUw4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ6BXDNGJ7WFCT7SQ%2F20170915%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20170915T141016Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=e053197d044345041268b7f22918e2e71e2a3d5a23ceed65a332e1782998739c' \\ -T /home/user/data/mydata.csv ``` ## Multipart Upload Flow To upload a large CSV file in multiple parts, follow these steps: 1. **Start the multipart upload** by sending a `POST` request: POST /rest/projects/{projectId}/dwh/data/uploads?parts=3 - This request initializes the upload and specifies the number of parts. 2. **Receive a response** containing: - An `id` identifying the upload. - A list of **uploadUrls**, which are S3 pre-signed URLs, one for each part. 3. **Split the CSV file** and upload each part to its corresponding URL using: PUT {uploadUrl} - No additional authentication is required. 4. **Complete the upload** - Once all parts are uploaded, send the [Complete Multipart Data Upload](#operation/completeMultipartUpload) request. 5. **Start the DataPull job** - After completing the upload, start a [dataPull](#operation/submitJobExecution) job with the correct input. ## S3 Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **S3 URL**. ### Example: DataPull Request for S3 Upload ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\" } } ``` ## HTTPS Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **HTTPS URL**. ### Example: DataPull Request for HTTPS Upload ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"httpsUpload\": \"https://my-domain.com/mystores.csv\", \"type\": \"csv\" } } ``` **Warning**: We do not recommend uploading sensitive information using the HTTPS pull flow, as files hosted on public URLs are accessible to anyone on the internet. **Security** Restricted to LOAD_DATA, DATA_EDITOR and ADMIN project's roles that have permission to load data into the project. ## CSV Options With **CsvOptions**, you can specify how the CSV should be processed. The available options are: | Option | Type | Description | Default Value | |-------------|----------|---------------------------------------------------------------|--------------| | `header` | boolean | Specifies if the CSV has a header. | `true` | | `separator` | char | Specifies the separator character between fields. | `,` | | `quote` | char | Specifies the quote character. | `\"` | | `escape` | char | Specifies the escape character. | `\\` | | `null` | string | Specifies the replacement value for custom CSV nulls. | *None* | | `forceNull` | string[] | Specifies which CSV columns should enforce null replacement. | *None* | ### Example: DataPull Request for S3 Upload with CSV Options ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\", \"csvOptions\": { \"header\": true, \"separator\": \";\", \"quote\": \"§\", \"escape\": \"\\\\\", \"null\": \"NULL_VALUE\", \"forceNull\": [ \"columnName\", \"otherColumn\" ] } } } ``` + # Data Upload Methods There are four ways to update dataset data: 1. **CSV Upload** – Push a CSV file from your computer or server. 2. **Multipart CSV Upload** – Push CSV file in parts from your computer or server (recommended for files larger then 50MB) - you must specify parameter **parts** 3. **S3 Pull** – Pull data stored in your S3 bucket. 4. **HTTPS Pull** – Pull data from any HTTPS endpoint. --- ## CSV Upload Flow 1. Create a new upload resource via: `POST /rest/projects/{projectId}/dwh/data/uploads` 2. Receive a resource with an S3 pre-signed `uploadUrl`. 3. Upload the CSV file using: `PUT {uploadUrl}` (No authentication required) 4. Once the upload is finished, start a [dataPull](#operation/submitJobExecution) job with the correct input. ### Pre-signed URL Usage The pre-signed URL can be used with any HTTP tool. You can upload the content directly without additional authorization (no bearer token required). #### Example: Upload CSV File Using `curl` ```sh curl -X PUT \\ 'https://s3-eu-west-1.amazonaws.com/can-dwh-upload-uploads-prod/00ubftx6v6TSTKnAt0h7/o3d2ov0p43msl3hf/RjFJt5kW302QNLzFIVnxN369dlY6KUw4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJ6BXDNGJ7WFCT7SQ%2F20170915%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20170915T141016Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=e053197d044345041268b7f22918e2e71e2a3d5a23ceed65a332e1782998739c' \\ -T /home/user/data/mydata.csv ``` ## Multipart Upload Flow To upload a large CSV file in multiple parts, follow these steps: 1. **Start the multipart upload** by sending a `POST` request: POST /rest/projects/{projectId}/dwh/data/uploads?parts=3 - This request initializes the upload and specifies the number of parts. 2. **Receive a response** containing: - An `id` identifying the upload. - A list of **uploadUrls**, which are S3 pre-signed URLs, one for each part. 3. **Split the CSV file**, compress each part with GZIP and upload each part to its corresponding URL using: PUT {uploadUrl} - No additional authentication is required. 4. **Complete the upload** - Once all parts are uploaded, send the [Complete Multipart Data Upload](#operation/completeMultipartUpload) request. 5. **Start the DataPull job** - After completing the upload, start a [dataPull](#operation/submitJobExecution) job with the correct input. ## S3 Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **S3 URL**. ### Example: DataPull Request for S3 Upload ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\" } } ``` ## HTTPS Pull Flow Start a [dataPull](#operation/submitJobExecution) job using an **HTTPS URL**. ### Example: DataPull Request for HTTPS Upload ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"httpsUpload\": \"https://my-domain.com/mystores.csv\", \"type\": \"csv\" } } ``` **Warning**: We do not recommend uploading sensitive information using the HTTPS pull flow, as files hosted on public URLs are accessible to anyone on the internet. **Security** Restricted to LOAD_DATA, DATA_EDITOR and ADMIN project's roles that have permission to load data into the project. ## CSV Options With **CsvOptions**, you can specify how the CSV should be processed. The available options are: | Option | Type | Description | Default Value | |-------------|----------|---------------------------------------------------------------|--------------| | `header` | boolean | Specifies if the CSV has a header. | `true` | | `separator` | char | Specifies the separator character between fields. | `,` | | `quote` | char | Specifies the quote character. | `\"` | | `escape` | char | Specifies the escape character. | `\\` | | `null` | string | Specifies the replacement value for custom CSV nulls. | *None* | | `forceNull` | string[] | Specifies which CSV columns should enforce null replacement. | *None* | ### Example: DataPull Request for S3 Upload with CSV Options ```json { \"type\": \"dataPull\", \"projectId\": \"ncesksvg7rjeri7v\", \"content\": { \"dataset\": \"mystores\", \"mode\": \"full\", \"s3Upload\": { \"uri\": \"s3://can-s3-dwh-pull-test/mystores.csv\", \"accessKeyId\": \"myAccessKey\", \"secretAccessKey\": \"mySecretAccessKey\" }, \"type\": \"csv\", \"csvOptions\": { \"header\": true, \"separator\": \";\", \"quote\": \"§\", \"escape\": \"\\\\\", \"null\": \"NULL_VALUE\", \"forceNull\": [ \"columnName\", \"otherColumn\" ] } } } ``` :param project_id: Id of the project (required) :type project_id: str diff --git a/cm_python_openapi_sdk/api/datasets_api.py b/cm_python_openapi_sdk/api/datasets_api.py index 4c39342..34a0dce 100644 --- a/cm_python_openapi_sdk/api/datasets_api.py +++ b/cm_python_openapi_sdk/api/datasets_api.py @@ -22,6 +22,7 @@ from typing_extensions import Annotated from cm_python_openapi_sdk.models.dataset_dto import DatasetDTO from cm_python_openapi_sdk.models.dataset_paged_model_dto import DatasetPagedModelDTO +from cm_python_openapi_sdk.models.dataset_response_dto import DatasetResponseDTO from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized from cm_python_openapi_sdk.api_response import ApiResponse @@ -59,7 +60,7 @@ def create_dataset( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DatasetDTO: + ) -> DatasetResponseDTO: """Creates new dataset Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -103,7 +104,7 @@ def create_dataset( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetDTO", + '200': "DatasetResponseDTO", '400': None, '409': None, } @@ -136,7 +137,7 @@ def create_dataset_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DatasetDTO]: + ) -> ApiResponse[DatasetResponseDTO]: """Creates new dataset Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -180,7 +181,7 @@ def create_dataset_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetDTO", + '200': "DatasetResponseDTO", '400': None, '409': None, } @@ -257,7 +258,7 @@ def create_dataset_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetDTO", + '200': "DatasetResponseDTO", '400': None, '409': None, } @@ -1383,7 +1384,7 @@ def get_dataset_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DatasetDTO: + ) -> DatasetResponseDTO: """Gets dataset by id @@ -1423,7 +1424,7 @@ def get_dataset_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetDTO", + '200': "DatasetResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1454,7 +1455,7 @@ def get_dataset_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DatasetDTO]: + ) -> ApiResponse[DatasetResponseDTO]: """Gets dataset by id @@ -1494,7 +1495,7 @@ def get_dataset_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetDTO", + '200': "DatasetResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1565,7 +1566,7 @@ def get_dataset_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetDTO", + '200': "DatasetResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1642,6 +1643,282 @@ def _get_dataset_by_id_serialize( + @validate_call + def get_dataset_by_name( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the dataset")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DatasetResponseDTO: + """Gets dataset by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the dataset (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DatasetResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_dataset_by_name_with_http_info( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the dataset")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DatasetResponseDTO]: + """Gets dataset by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the dataset (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DatasetResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_dataset_by_name_without_preload_content( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the dataset")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Gets dataset by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the dataset (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_dataset_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DatasetResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_dataset_by_name_serialize( + self, + project_id, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/projects/{projectId}/md/datasets/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def update_dataset_by_id( self, @@ -1662,7 +1939,7 @@ def update_dataset_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DatasetDTO: + ) -> DatasetResponseDTO: """Updates dataset by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1712,7 +1989,7 @@ def update_dataset_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetDTO", + '200': "DatasetResponseDTO", '400': None, '404': None, '409': None, @@ -1750,7 +2027,7 @@ def update_dataset_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DatasetDTO]: + ) -> ApiResponse[DatasetResponseDTO]: """Updates dataset by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1800,7 +2077,7 @@ def update_dataset_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetDTO", + '200': "DatasetResponseDTO", '400': None, '404': None, '409': None, @@ -1888,7 +2165,7 @@ def update_dataset_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetDTO", + '200': "DatasetResponseDTO", '400': None, '404': None, '409': None, diff --git a/cm_python_openapi_sdk/api/exports_api.py b/cm_python_openapi_sdk/api/exports_api.py index 2cc2846..781b23c 100644 --- a/cm_python_openapi_sdk/api/exports_api.py +++ b/cm_python_openapi_sdk/api/exports_api.py @@ -22,6 +22,7 @@ from typing_extensions import Annotated from cm_python_openapi_sdk.models.export_dto import ExportDTO from cm_python_openapi_sdk.models.export_paged_model_dto import ExportPagedModelDTO +from cm_python_openapi_sdk.models.export_response_dto import ExportResponseDTO from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized from cm_python_openapi_sdk.api_response import ApiResponse @@ -59,7 +60,7 @@ def create_export( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ExportDTO: + ) -> ExportResponseDTO: """Creates new export Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -103,7 +104,7 @@ def create_export( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExportDTO", + '200': "ExportResponseDTO", '400': None, '409': None, } @@ -136,7 +137,7 @@ def create_export_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ExportDTO]: + ) -> ApiResponse[ExportResponseDTO]: """Creates new export Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -180,7 +181,7 @@ def create_export_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExportDTO", + '200': "ExportResponseDTO", '400': None, '409': None, } @@ -257,7 +258,7 @@ def create_export_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExportDTO", + '200': "ExportResponseDTO", '400': None, '409': None, } @@ -949,7 +950,7 @@ def get_export_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ExportDTO: + ) -> ExportResponseDTO: """Gets export by id @@ -989,7 +990,7 @@ def get_export_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExportDTO", + '200': "ExportResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1020,7 +1021,7 @@ def get_export_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ExportDTO]: + ) -> ApiResponse[ExportResponseDTO]: """Gets export by id @@ -1060,7 +1061,7 @@ def get_export_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExportDTO", + '200': "ExportResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1131,7 +1132,7 @@ def get_export_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExportDTO", + '200': "ExportResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1208,6 +1209,282 @@ def _get_export_by_id_serialize( + @validate_call + def get_export_by_name( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the export")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ExportResponseDTO: + """Gets export by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the export (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_export_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExportResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_export_by_name_with_http_info( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the export")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ExportResponseDTO]: + """Gets export by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the export (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_export_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExportResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_export_by_name_without_preload_content( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the export")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Gets export by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the export (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_export_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ExportResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_export_by_name_serialize( + self, + project_id, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/projects/{projectId}/md/exports/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def update_export_by_id( self, @@ -1228,7 +1505,7 @@ def update_export_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ExportDTO: + ) -> ExportResponseDTO: """Updates export by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1278,7 +1555,7 @@ def update_export_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExportDTO", + '200': "ExportResponseDTO", '400': None, '404': None, '409': None, @@ -1316,7 +1593,7 @@ def update_export_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ExportDTO]: + ) -> ApiResponse[ExportResponseDTO]: """Updates export by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1366,7 +1643,7 @@ def update_export_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExportDTO", + '200': "ExportResponseDTO", '400': None, '404': None, '409': None, @@ -1454,7 +1731,7 @@ def update_export_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ExportDTO", + '200': "ExportResponseDTO", '400': None, '404': None, '409': None, diff --git a/cm_python_openapi_sdk/api/geosearch_api.py b/cm_python_openapi_sdk/api/geosearch_api.py new file mode 100644 index 0000000..fa81dab --- /dev/null +++ b/cm_python_openapi_sdk/api/geosearch_api.py @@ -0,0 +1,388 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictStr +from typing import Optional +from typing_extensions import Annotated +from cm_python_openapi_sdk.models.geosearch_paged_model_dto import GeosearchPagedModelDTO + +from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized +from cm_python_openapi_sdk.api_response import ApiResponse +from cm_python_openapi_sdk.rest import RESTResponseType + + +class GeosearchApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def geographic_search( + self, + query: Annotated[StrictStr, Field(description="Query search phrase. It is highlighted in the query result.")], + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of the page")] = None, + size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The count of records to return for one page")] = None, + country: Annotated[Optional[StrictStr], Field(description="Array of ISO 3166 alpha-2 country codes to limit the search.")] = None, + language: Annotated[Optional[StrictStr], Field(description="Language to use for query results as defined by ISO 639-1.")] = None, + types: Annotated[Optional[StrictStr], Field(description="Array of place types, available types are [region, district, city, locality, address, postcode]")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GeosearchPagedModelDTO: + """Geographic search + + Wrapper of [Mapbox Geocoding service](https://docs.mapbox.com/api/search/geocoding/). Processes the query and validates the URL parameters. If the query is valid, it is executed on Mapbox API. The result is then translated and returned. + + :param query: Query search phrase. It is highlighted in the query result. (required) + :type query: str + :param page: Number of the page + :type page: int + :param size: The count of records to return for one page + :type size: int + :param country: Array of ISO 3166 alpha-2 country codes to limit the search. + :type country: str + :param language: Language to use for query results as defined by ISO 639-1. + :type language: str + :param types: Array of place types, available types are [region, district, city, locality, address, postcode] + :type types: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._geographic_search_serialize( + query=query, + page=page, + size=size, + country=country, + language=language, + types=types, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GeosearchPagedModelDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def geographic_search_with_http_info( + self, + query: Annotated[StrictStr, Field(description="Query search phrase. It is highlighted in the query result.")], + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of the page")] = None, + size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The count of records to return for one page")] = None, + country: Annotated[Optional[StrictStr], Field(description="Array of ISO 3166 alpha-2 country codes to limit the search.")] = None, + language: Annotated[Optional[StrictStr], Field(description="Language to use for query results as defined by ISO 639-1.")] = None, + types: Annotated[Optional[StrictStr], Field(description="Array of place types, available types are [region, district, city, locality, address, postcode]")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GeosearchPagedModelDTO]: + """Geographic search + + Wrapper of [Mapbox Geocoding service](https://docs.mapbox.com/api/search/geocoding/). Processes the query and validates the URL parameters. If the query is valid, it is executed on Mapbox API. The result is then translated and returned. + + :param query: Query search phrase. It is highlighted in the query result. (required) + :type query: str + :param page: Number of the page + :type page: int + :param size: The count of records to return for one page + :type size: int + :param country: Array of ISO 3166 alpha-2 country codes to limit the search. + :type country: str + :param language: Language to use for query results as defined by ISO 639-1. + :type language: str + :param types: Array of place types, available types are [region, district, city, locality, address, postcode] + :type types: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._geographic_search_serialize( + query=query, + page=page, + size=size, + country=country, + language=language, + types=types, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GeosearchPagedModelDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def geographic_search_without_preload_content( + self, + query: Annotated[StrictStr, Field(description="Query search phrase. It is highlighted in the query result.")], + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of the page")] = None, + size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The count of records to return for one page")] = None, + country: Annotated[Optional[StrictStr], Field(description="Array of ISO 3166 alpha-2 country codes to limit the search.")] = None, + language: Annotated[Optional[StrictStr], Field(description="Language to use for query results as defined by ISO 639-1.")] = None, + types: Annotated[Optional[StrictStr], Field(description="Array of place types, available types are [region, district, city, locality, address, postcode]")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Geographic search + + Wrapper of [Mapbox Geocoding service](https://docs.mapbox.com/api/search/geocoding/). Processes the query and validates the URL parameters. If the query is valid, it is executed on Mapbox API. The result is then translated and returned. + + :param query: Query search phrase. It is highlighted in the query result. (required) + :type query: str + :param page: Number of the page + :type page: int + :param size: The count of records to return for one page + :type size: int + :param country: Array of ISO 3166 alpha-2 country codes to limit the search. + :type country: str + :param language: Language to use for query results as defined by ISO 639-1. + :type language: str + :param types: Array of place types, available types are [region, district, city, locality, address, postcode] + :type types: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._geographic_search_serialize( + query=query, + page=page, + size=size, + country=country, + language=language, + types=types, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GeosearchPagedModelDTO", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _geographic_search_serialize( + self, + query, + page, + size, + country, + language, + types, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + + if query is not None: + + _query_params.append(('query', query)) + + if country is not None: + + _query_params.append(('country', country)) + + if language is not None: + + _query_params.append(('language', language)) + + if types is not None: + + _query_params.append(('types', types)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/geosearch', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/cm_python_openapi_sdk/api/indicator_drills_api.py b/cm_python_openapi_sdk/api/indicator_drills_api.py index a8202e7..cab3133 100644 --- a/cm_python_openapi_sdk/api/indicator_drills_api.py +++ b/cm_python_openapi_sdk/api/indicator_drills_api.py @@ -22,6 +22,7 @@ from typing_extensions import Annotated from cm_python_openapi_sdk.models.indicator_drill_dto import IndicatorDrillDTO from cm_python_openapi_sdk.models.indicator_drill_paged_model_dto import IndicatorDrillPagedModelDTO +from cm_python_openapi_sdk.models.indicator_drill_response_dto import IndicatorDrillResponseDTO from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized from cm_python_openapi_sdk.api_response import ApiResponse @@ -59,7 +60,7 @@ def create_indicator_drill( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> IndicatorDrillDTO: + ) -> IndicatorDrillResponseDTO: """Creates new Indicator Drill. Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -103,7 +104,7 @@ def create_indicator_drill( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndicatorDrillDTO", + '200': "IndicatorDrillResponseDTO", '400': None, '409': None, } @@ -136,7 +137,7 @@ def create_indicator_drill_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[IndicatorDrillDTO]: + ) -> ApiResponse[IndicatorDrillResponseDTO]: """Creates new Indicator Drill. Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -180,7 +181,7 @@ def create_indicator_drill_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndicatorDrillDTO", + '200': "IndicatorDrillResponseDTO", '400': None, '409': None, } @@ -257,7 +258,7 @@ def create_indicator_drill_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndicatorDrillDTO", + '200': "IndicatorDrillResponseDTO", '400': None, '409': None, } @@ -949,7 +950,7 @@ def get_indicator_drill_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> IndicatorDrillDTO: + ) -> IndicatorDrillResponseDTO: """Gets indicator drill by id @@ -989,7 +990,7 @@ def get_indicator_drill_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndicatorDrillDTO", + '200': "IndicatorDrillResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1020,7 +1021,7 @@ def get_indicator_drill_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[IndicatorDrillDTO]: + ) -> ApiResponse[IndicatorDrillResponseDTO]: """Gets indicator drill by id @@ -1060,7 +1061,7 @@ def get_indicator_drill_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndicatorDrillDTO", + '200': "IndicatorDrillResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1131,7 +1132,7 @@ def get_indicator_drill_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndicatorDrillDTO", + '200': "IndicatorDrillResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1208,6 +1209,282 @@ def _get_indicator_drill_by_id_serialize( + @validate_call + def get_indicator_drill_by_name( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the indicator drill")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> IndicatorDrillResponseDTO: + """Gets indicator drill by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the indicator drill (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_indicator_drill_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IndicatorDrillResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_indicator_drill_by_name_with_http_info( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the indicator drill")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[IndicatorDrillResponseDTO]: + """Gets indicator drill by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the indicator drill (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_indicator_drill_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IndicatorDrillResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_indicator_drill_by_name_without_preload_content( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the indicator drill")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Gets indicator drill by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the indicator drill (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_indicator_drill_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IndicatorDrillResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_indicator_drill_by_name_serialize( + self, + project_id, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/projects/{projectId}/md/indicatorDrills/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def update_indicator_drill_by_id( self, @@ -1228,7 +1505,7 @@ def update_indicator_drill_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> IndicatorDrillDTO: + ) -> IndicatorDrillResponseDTO: """Updates indicator drill by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1278,7 +1555,7 @@ def update_indicator_drill_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndicatorDrillDTO", + '200': "IndicatorDrillResponseDTO", '400': None, '404': None, '409': None, @@ -1316,7 +1593,7 @@ def update_indicator_drill_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[IndicatorDrillDTO]: + ) -> ApiResponse[IndicatorDrillResponseDTO]: """Updates indicator drill by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1366,7 +1643,7 @@ def update_indicator_drill_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndicatorDrillDTO", + '200': "IndicatorDrillResponseDTO", '400': None, '404': None, '409': None, @@ -1454,7 +1731,7 @@ def update_indicator_drill_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndicatorDrillDTO", + '200': "IndicatorDrillResponseDTO", '400': None, '404': None, '409': None, diff --git a/cm_python_openapi_sdk/api/indicators_api.py b/cm_python_openapi_sdk/api/indicators_api.py index 0d563dd..a113b33 100644 --- a/cm_python_openapi_sdk/api/indicators_api.py +++ b/cm_python_openapi_sdk/api/indicators_api.py @@ -22,6 +22,7 @@ from typing_extensions import Annotated from cm_python_openapi_sdk.models.indicator_dto import IndicatorDTO from cm_python_openapi_sdk.models.indicator_paged_model_dto import IndicatorPagedModelDTO +from cm_python_openapi_sdk.models.indicator_response_dto import IndicatorResponseDTO from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized from cm_python_openapi_sdk.api_response import ApiResponse @@ -59,7 +60,7 @@ def create_indicator( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> IndicatorDTO: + ) -> IndicatorResponseDTO: """Creates new Indicator. Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -103,7 +104,7 @@ def create_indicator( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndicatorDTO", + '200': "IndicatorResponseDTO", '400': None, '409': None, } @@ -136,7 +137,7 @@ def create_indicator_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[IndicatorDTO]: + ) -> ApiResponse[IndicatorResponseDTO]: """Creates new Indicator. Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -180,7 +181,7 @@ def create_indicator_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndicatorDTO", + '200': "IndicatorResponseDTO", '400': None, '409': None, } @@ -257,7 +258,7 @@ def create_indicator_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndicatorDTO", + '200': "IndicatorResponseDTO", '400': None, '409': None, } @@ -949,7 +950,7 @@ def get_indicator_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> IndicatorDTO: + ) -> IndicatorResponseDTO: """Gets indicator by id @@ -989,7 +990,7 @@ def get_indicator_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndicatorDTO", + '200': "IndicatorResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1020,7 +1021,7 @@ def get_indicator_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[IndicatorDTO]: + ) -> ApiResponse[IndicatorResponseDTO]: """Gets indicator by id @@ -1060,7 +1061,7 @@ def get_indicator_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndicatorDTO", + '200': "IndicatorResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1131,7 +1132,7 @@ def get_indicator_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndicatorDTO", + '200': "IndicatorResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1208,6 +1209,282 @@ def _get_indicator_by_id_serialize( + @validate_call + def get_indicator_by_name( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the indicator")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> IndicatorResponseDTO: + """Gets indicator by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the indicator (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_indicator_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IndicatorResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_indicator_by_name_with_http_info( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the indicator")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[IndicatorResponseDTO]: + """Gets indicator by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the indicator (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_indicator_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IndicatorResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_indicator_by_name_without_preload_content( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the indicator")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Gets indicator by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the indicator (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_indicator_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "IndicatorResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_indicator_by_name_serialize( + self, + project_id, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/projects/{projectId}/md/indicators/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def update_indicator_by_id( self, @@ -1228,7 +1505,7 @@ def update_indicator_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> IndicatorDTO: + ) -> IndicatorResponseDTO: """Updates indicator by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1278,7 +1555,7 @@ def update_indicator_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndicatorDTO", + '200': "IndicatorResponseDTO", '400': None, '404': None, '409': None, @@ -1316,7 +1593,7 @@ def update_indicator_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[IndicatorDTO]: + ) -> ApiResponse[IndicatorResponseDTO]: """Updates indicator by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1366,7 +1643,7 @@ def update_indicator_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndicatorDTO", + '200': "IndicatorResponseDTO", '400': None, '404': None, '409': None, @@ -1454,7 +1731,7 @@ def update_indicator_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "IndicatorDTO", + '200': "IndicatorResponseDTO", '400': None, '404': None, '409': None, diff --git a/cm_python_openapi_sdk/api/jobs_api.py b/cm_python_openapi_sdk/api/jobs_api.py index 0532332..a10ff0a 100644 --- a/cm_python_openapi_sdk/api/jobs_api.py +++ b/cm_python_openapi_sdk/api/jobs_api.py @@ -20,9 +20,9 @@ from pydantic import Field, StrictStr, field_validator from typing import Optional from typing_extensions import Annotated +from cm_python_openapi_sdk.models.general_job_request import GeneralJobRequest from cm_python_openapi_sdk.models.job_detail_response import JobDetailResponse from cm_python_openapi_sdk.models.job_history_paged_model_dto import JobHistoryPagedModelDTO -from cm_python_openapi_sdk.models.submit_job_execution_request import SubmitJobExecutionRequest from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized from cm_python_openapi_sdk.api_response import ApiResponse @@ -671,7 +671,7 @@ def _get_jobs_history_serialize( @validate_call def submit_job_execution( self, - submit_job_execution_request: Annotated[SubmitJobExecutionRequest, Field(description="Successful response")], + general_job_request: Annotated[GeneralJobRequest, Field(description="Successful response")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -689,8 +689,8 @@ def submit_job_execution( Starts the execution of a new project task. Tasks are processed asynchronously, and all jobs are added to a queue. ### Supported Job Types - **dataPull**: Loads a CSV file into a dataset. - **dataDump**: Dumps a dataset to a CSV file. - **export**: Executes a DWH query and exports the result as a CSV file. - **bulkPointQuery**: Executes DWH queries for a given list of points (latitude, longitude); limited to 1,000 points per request. - **validate**: Validates the project. - **truncate**: Truncates the project's data, dropping all DWH, metadata, and full-text search data. - **importProject**: Imports a project into another one (server-side cloning). ### Security - **dataPull, importProject**: Requires `LOAD_DATA`, `DATA_EDITOR`, or `ADMIN` project roles. - **dataDump, truncate**: Requires the `ADMIN` project role. - **export, bulkPointQuery**: Requires `VIEWER`, `VIEW_CREATOR`, `METADATA_EDITOR`, `DATA_EDITOR`, `VIEW_CREATOR`, or `ADMIN` project roles. - **validate**: Requires `METADATA_EDITOR`, `LOAD_DATA`, `DATA_EDITOR`, or `ADMIN` project roles. - :param submit_job_execution_request: Successful response (required) - :type submit_job_execution_request: SubmitJobExecutionRequest + :param general_job_request: Successful response (required) + :type general_job_request: GeneralJobRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -714,7 +714,7 @@ def submit_job_execution( """ # noqa: E501 _param = self._submit_job_execution_serialize( - submit_job_execution_request=submit_job_execution_request, + general_job_request=general_job_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -738,7 +738,7 @@ def submit_job_execution( @validate_call def submit_job_execution_with_http_info( self, - submit_job_execution_request: Annotated[SubmitJobExecutionRequest, Field(description="Successful response")], + general_job_request: Annotated[GeneralJobRequest, Field(description="Successful response")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -756,8 +756,8 @@ def submit_job_execution_with_http_info( Starts the execution of a new project task. Tasks are processed asynchronously, and all jobs are added to a queue. ### Supported Job Types - **dataPull**: Loads a CSV file into a dataset. - **dataDump**: Dumps a dataset to a CSV file. - **export**: Executes a DWH query and exports the result as a CSV file. - **bulkPointQuery**: Executes DWH queries for a given list of points (latitude, longitude); limited to 1,000 points per request. - **validate**: Validates the project. - **truncate**: Truncates the project's data, dropping all DWH, metadata, and full-text search data. - **importProject**: Imports a project into another one (server-side cloning). ### Security - **dataPull, importProject**: Requires `LOAD_DATA`, `DATA_EDITOR`, or `ADMIN` project roles. - **dataDump, truncate**: Requires the `ADMIN` project role. - **export, bulkPointQuery**: Requires `VIEWER`, `VIEW_CREATOR`, `METADATA_EDITOR`, `DATA_EDITOR`, `VIEW_CREATOR`, or `ADMIN` project roles. - **validate**: Requires `METADATA_EDITOR`, `LOAD_DATA`, `DATA_EDITOR`, or `ADMIN` project roles. - :param submit_job_execution_request: Successful response (required) - :type submit_job_execution_request: SubmitJobExecutionRequest + :param general_job_request: Successful response (required) + :type general_job_request: GeneralJobRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -781,7 +781,7 @@ def submit_job_execution_with_http_info( """ # noqa: E501 _param = self._submit_job_execution_serialize( - submit_job_execution_request=submit_job_execution_request, + general_job_request=general_job_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -805,7 +805,7 @@ def submit_job_execution_with_http_info( @validate_call def submit_job_execution_without_preload_content( self, - submit_job_execution_request: Annotated[SubmitJobExecutionRequest, Field(description="Successful response")], + general_job_request: Annotated[GeneralJobRequest, Field(description="Successful response")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -823,8 +823,8 @@ def submit_job_execution_without_preload_content( Starts the execution of a new project task. Tasks are processed asynchronously, and all jobs are added to a queue. ### Supported Job Types - **dataPull**: Loads a CSV file into a dataset. - **dataDump**: Dumps a dataset to a CSV file. - **export**: Executes a DWH query and exports the result as a CSV file. - **bulkPointQuery**: Executes DWH queries for a given list of points (latitude, longitude); limited to 1,000 points per request. - **validate**: Validates the project. - **truncate**: Truncates the project's data, dropping all DWH, metadata, and full-text search data. - **importProject**: Imports a project into another one (server-side cloning). ### Security - **dataPull, importProject**: Requires `LOAD_DATA`, `DATA_EDITOR`, or `ADMIN` project roles. - **dataDump, truncate**: Requires the `ADMIN` project role. - **export, bulkPointQuery**: Requires `VIEWER`, `VIEW_CREATOR`, `METADATA_EDITOR`, `DATA_EDITOR`, `VIEW_CREATOR`, or `ADMIN` project roles. - **validate**: Requires `METADATA_EDITOR`, `LOAD_DATA`, `DATA_EDITOR`, or `ADMIN` project roles. - :param submit_job_execution_request: Successful response (required) - :type submit_job_execution_request: SubmitJobExecutionRequest + :param general_job_request: Successful response (required) + :type general_job_request: GeneralJobRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -848,7 +848,7 @@ def submit_job_execution_without_preload_content( """ # noqa: E501 _param = self._submit_job_execution_serialize( - submit_job_execution_request=submit_job_execution_request, + general_job_request=general_job_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -867,7 +867,7 @@ def submit_job_execution_without_preload_content( def _submit_job_execution_serialize( self, - submit_job_execution_request, + general_job_request, _request_auth, _content_type, _headers, @@ -893,8 +893,8 @@ def _submit_job_execution_serialize( # process the header parameters # process the form parameters # process the body parameter - if submit_job_execution_request is not None: - _body_params = submit_job_execution_request + if general_job_request is not None: + _body_params = general_job_request # set the HTTP header `Accept` diff --git a/cm_python_openapi_sdk/api/maps_api.py b/cm_python_openapi_sdk/api/maps_api.py index 81da8a8..b87f9eb 100644 --- a/cm_python_openapi_sdk/api/maps_api.py +++ b/cm_python_openapi_sdk/api/maps_api.py @@ -22,6 +22,7 @@ from typing_extensions import Annotated from cm_python_openapi_sdk.models.map_dto import MapDTO from cm_python_openapi_sdk.models.map_paged_model_dto import MapPagedModelDTO +from cm_python_openapi_sdk.models.map_response_dto import MapResponseDTO from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized from cm_python_openapi_sdk.api_response import ApiResponse @@ -59,7 +60,7 @@ def create_map( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MapDTO: + ) -> MapResponseDTO: """Creates new Map. Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -103,7 +104,7 @@ def create_map( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MapDTO", + '200': "MapResponseDTO", '400': None, '409': None, } @@ -136,7 +137,7 @@ def create_map_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MapDTO]: + ) -> ApiResponse[MapResponseDTO]: """Creates new Map. Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -180,7 +181,7 @@ def create_map_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MapDTO", + '200': "MapResponseDTO", '400': None, '409': None, } @@ -257,7 +258,7 @@ def create_map_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MapDTO", + '200': "MapResponseDTO", '400': None, '409': None, } @@ -949,7 +950,7 @@ def get_map_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MapDTO: + ) -> MapResponseDTO: """Gets map by id @@ -989,7 +990,7 @@ def get_map_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MapDTO", + '200': "MapResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1020,7 +1021,7 @@ def get_map_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MapDTO]: + ) -> ApiResponse[MapResponseDTO]: """Gets map by id @@ -1060,7 +1061,7 @@ def get_map_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MapDTO", + '200': "MapResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1131,7 +1132,7 @@ def get_map_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MapDTO", + '200': "MapResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1208,6 +1209,282 @@ def _get_map_by_id_serialize( + @validate_call + def get_map_by_name( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the map")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MapResponseDTO: + """Gets map by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the map (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_map_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MapResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_map_by_name_with_http_info( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the map")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MapResponseDTO]: + """Gets map by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the map (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_map_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MapResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_map_by_name_without_preload_content( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the map")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Gets map by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the map (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_map_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MapResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_map_by_name_serialize( + self, + project_id, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/projects/{projectId}/md/maps/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def update_map_by_id( self, @@ -1228,7 +1505,7 @@ def update_map_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MapDTO: + ) -> MapResponseDTO: """Updates map by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1278,7 +1555,7 @@ def update_map_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MapDTO", + '200': "MapResponseDTO", '400': None, '404': None, '409': None, @@ -1316,7 +1593,7 @@ def update_map_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MapDTO]: + ) -> ApiResponse[MapResponseDTO]: """Updates map by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1366,7 +1643,7 @@ def update_map_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MapDTO", + '200': "MapResponseDTO", '400': None, '404': None, '409': None, @@ -1454,7 +1731,7 @@ def update_map_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MapDTO", + '200': "MapResponseDTO", '400': None, '404': None, '409': None, diff --git a/cm_python_openapi_sdk/api/marker_selectors_api.py b/cm_python_openapi_sdk/api/marker_selectors_api.py index 0e45c4a..45a3e63 100644 --- a/cm_python_openapi_sdk/api/marker_selectors_api.py +++ b/cm_python_openapi_sdk/api/marker_selectors_api.py @@ -22,6 +22,7 @@ from typing_extensions import Annotated from cm_python_openapi_sdk.models.marker_selector_dto import MarkerSelectorDTO from cm_python_openapi_sdk.models.marker_selector_paged_model_dto import MarkerSelectorPagedModelDTO +from cm_python_openapi_sdk.models.marker_selector_response_dto import MarkerSelectorResponseDTO from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized from cm_python_openapi_sdk.api_response import ApiResponse @@ -59,7 +60,7 @@ def create_marker_selector( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MarkerSelectorDTO: + ) -> MarkerSelectorResponseDTO: """Creates new Marker Selector. Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -103,7 +104,7 @@ def create_marker_selector( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MarkerSelectorDTO", + '200': "MarkerSelectorResponseDTO", '400': None, '409': None, } @@ -136,7 +137,7 @@ def create_marker_selector_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MarkerSelectorDTO]: + ) -> ApiResponse[MarkerSelectorResponseDTO]: """Creates new Marker Selector. Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -180,7 +181,7 @@ def create_marker_selector_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MarkerSelectorDTO", + '200': "MarkerSelectorResponseDTO", '400': None, '409': None, } @@ -257,7 +258,7 @@ def create_marker_selector_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MarkerSelectorDTO", + '200': "MarkerSelectorResponseDTO", '400': None, '409': None, } @@ -949,7 +950,7 @@ def get_marker_selector_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MarkerSelectorDTO: + ) -> MarkerSelectorResponseDTO: """Gets marker selector by id @@ -989,7 +990,7 @@ def get_marker_selector_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MarkerSelectorDTO", + '200': "MarkerSelectorResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1020,7 +1021,7 @@ def get_marker_selector_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MarkerSelectorDTO]: + ) -> ApiResponse[MarkerSelectorResponseDTO]: """Gets marker selector by id @@ -1060,7 +1061,7 @@ def get_marker_selector_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MarkerSelectorDTO", + '200': "MarkerSelectorResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1131,7 +1132,7 @@ def get_marker_selector_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MarkerSelectorDTO", + '200': "MarkerSelectorResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1208,6 +1209,282 @@ def _get_marker_selector_by_id_serialize( + @validate_call + def get_marker_selector_by_name( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the marker selector")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MarkerSelectorResponseDTO: + """Gets marker selector by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the marker selector (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_marker_selector_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MarkerSelectorResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_marker_selector_by_name_with_http_info( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the marker selector")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MarkerSelectorResponseDTO]: + """Gets marker selector by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the marker selector (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_marker_selector_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MarkerSelectorResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_marker_selector_by_name_without_preload_content( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the marker selector")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Gets marker selector by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the marker selector (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_marker_selector_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MarkerSelectorResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_marker_selector_by_name_serialize( + self, + project_id, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/projects/{projectId}/md/markerSelectors/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def update_marker_selector_by_id( self, @@ -1228,7 +1505,7 @@ def update_marker_selector_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MarkerSelectorDTO: + ) -> MarkerSelectorResponseDTO: """Updates marker selector by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1278,7 +1555,7 @@ def update_marker_selector_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MarkerSelectorDTO", + '200': "MarkerSelectorResponseDTO", '400': None, '404': None, '409': None, @@ -1316,7 +1593,7 @@ def update_marker_selector_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MarkerSelectorDTO]: + ) -> ApiResponse[MarkerSelectorResponseDTO]: """Updates marker selector by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1366,7 +1643,7 @@ def update_marker_selector_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MarkerSelectorDTO", + '200': "MarkerSelectorResponseDTO", '400': None, '404': None, '409': None, @@ -1454,7 +1731,7 @@ def update_marker_selector_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MarkerSelectorDTO", + '200': "MarkerSelectorResponseDTO", '400': None, '404': None, '409': None, diff --git a/cm_python_openapi_sdk/api/markers_api.py b/cm_python_openapi_sdk/api/markers_api.py index ffd4a16..1e68801 100644 --- a/cm_python_openapi_sdk/api/markers_api.py +++ b/cm_python_openapi_sdk/api/markers_api.py @@ -22,6 +22,7 @@ from typing_extensions import Annotated from cm_python_openapi_sdk.models.marker_dto import MarkerDTO from cm_python_openapi_sdk.models.marker_paged_model_dto import MarkerPagedModelDTO +from cm_python_openapi_sdk.models.marker_response_dto import MarkerResponseDTO from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized from cm_python_openapi_sdk.api_response import ApiResponse @@ -59,7 +60,7 @@ def create_marker( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MarkerDTO: + ) -> MarkerResponseDTO: """Creates new Marker. Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -103,7 +104,7 @@ def create_marker( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MarkerDTO", + '200': "MarkerResponseDTO", '400': None, '409': None, } @@ -136,7 +137,7 @@ def create_marker_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MarkerDTO]: + ) -> ApiResponse[MarkerResponseDTO]: """Creates new Marker. Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -180,7 +181,7 @@ def create_marker_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MarkerDTO", + '200': "MarkerResponseDTO", '400': None, '409': None, } @@ -257,7 +258,7 @@ def create_marker_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MarkerDTO", + '200': "MarkerResponseDTO", '400': None, '409': None, } @@ -949,7 +950,7 @@ def get_marker_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MarkerDTO: + ) -> MarkerResponseDTO: """Gets marker by id @@ -989,7 +990,7 @@ def get_marker_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MarkerDTO", + '200': "MarkerResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1020,7 +1021,7 @@ def get_marker_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MarkerDTO]: + ) -> ApiResponse[MarkerResponseDTO]: """Gets marker by id @@ -1060,7 +1061,7 @@ def get_marker_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MarkerDTO", + '200': "MarkerResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1131,7 +1132,7 @@ def get_marker_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MarkerDTO", + '200': "MarkerResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1208,6 +1209,282 @@ def _get_marker_by_id_serialize( + @validate_call + def get_marker_by_name( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the marker")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MarkerResponseDTO: + """Gets marker by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the marker (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_marker_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MarkerResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_marker_by_name_with_http_info( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the marker")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MarkerResponseDTO]: + """Gets marker by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the marker (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_marker_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MarkerResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_marker_by_name_without_preload_content( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the marker")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Gets marker by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the marker (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_marker_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MarkerResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_marker_by_name_serialize( + self, + project_id, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/projects/{projectId}/md/markers/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def update_marker_by_id( self, @@ -1228,7 +1505,7 @@ def update_marker_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MarkerDTO: + ) -> MarkerResponseDTO: """Updates marker by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1278,7 +1555,7 @@ def update_marker_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MarkerDTO", + '200': "MarkerResponseDTO", '400': None, '404': None, '409': None, @@ -1316,7 +1593,7 @@ def update_marker_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MarkerDTO]: + ) -> ApiResponse[MarkerResponseDTO]: """Updates marker by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1366,7 +1643,7 @@ def update_marker_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MarkerDTO", + '200': "MarkerResponseDTO", '400': None, '404': None, '409': None, @@ -1454,7 +1731,7 @@ def update_marker_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MarkerDTO", + '200': "MarkerResponseDTO", '400': None, '404': None, '409': None, diff --git a/cm_python_openapi_sdk/api/members_api.py b/cm_python_openapi_sdk/api/members_api.py index 04a8bb3..c337362 100644 --- a/cm_python_openapi_sdk/api/members_api.py +++ b/cm_python_openapi_sdk/api/members_api.py @@ -22,8 +22,8 @@ from typing_extensions import Annotated from cm_python_openapi_sdk.models.create_membership_dto import CreateMembershipDTO from cm_python_openapi_sdk.models.get_project_members200_response import GetProjectMembers200Response -from cm_python_openapi_sdk.models.membership_dto import MembershipDTO -from cm_python_openapi_sdk.models.update_membership import UpdateMembership +from cm_python_openapi_sdk.models.membership_response_dto import MembershipResponseDTO +from cm_python_openapi_sdk.models.update_membership_dto import UpdateMembershipDTO from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized from cm_python_openapi_sdk.api_response import ApiResponse @@ -60,10 +60,10 @@ def add_project_member( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MembershipDTO: + ) -> MembershipResponseDTO: """Add new project member and assign a role. - The user is added into the project without any cooperation (acknowledgement) with invited user. See the Project Invitation resource too. It allows to invite a new member by email address and sends an invitation email. **Security:** Restricted to ADMIN project role. + The user is added into the project without any cooperation (acknowledgement) with invited user. You can add user by accountId or email. See the Project Invitation resource too. It allows to invite a new member by email address and sends an invitation email. **Security:** Restricted to ADMIN project role. :param project_id: Id of the project (required) :type project_id: str @@ -101,7 +101,7 @@ def add_project_member( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MembershipDTO", + '200': "MembershipResponseDTO", } response_data = self.api_client.call_api( *_param, @@ -131,10 +131,10 @@ def add_project_member_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MembershipDTO]: + ) -> ApiResponse[MembershipResponseDTO]: """Add new project member and assign a role. - The user is added into the project without any cooperation (acknowledgement) with invited user. See the Project Invitation resource too. It allows to invite a new member by email address and sends an invitation email. **Security:** Restricted to ADMIN project role. + The user is added into the project without any cooperation (acknowledgement) with invited user. You can add user by accountId or email. See the Project Invitation resource too. It allows to invite a new member by email address and sends an invitation email. **Security:** Restricted to ADMIN project role. :param project_id: Id of the project (required) :type project_id: str @@ -172,7 +172,7 @@ def add_project_member_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MembershipDTO", + '200': "MembershipResponseDTO", } response_data = self.api_client.call_api( *_param, @@ -205,7 +205,7 @@ def add_project_member_without_preload_content( ) -> RESTResponseType: """Add new project member and assign a role. - The user is added into the project without any cooperation (acknowledgement) with invited user. See the Project Invitation resource too. It allows to invite a new member by email address and sends an invitation email. **Security:** Restricted to ADMIN project role. + The user is added into the project without any cooperation (acknowledgement) with invited user. You can add user by accountId or email. See the Project Invitation resource too. It allows to invite a new member by email address and sends an invitation email. **Security:** Restricted to ADMIN project role. :param project_id: Id of the project (required) :type project_id: str @@ -243,7 +243,7 @@ def add_project_member_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MembershipDTO", + '200': "MembershipResponseDTO", } response_data = self.api_client.call_api( *_param, @@ -621,7 +621,7 @@ def get_membership_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MembershipDTO: + ) -> MembershipResponseDTO: """Get detail of user membership in project by membership id. **Security:** Restricted to ADMIN project role. @@ -662,7 +662,7 @@ def get_membership_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MembershipDTO", + '200': "MembershipResponseDTO", } response_data = self.api_client.call_api( *_param, @@ -692,7 +692,7 @@ def get_membership_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MembershipDTO]: + ) -> ApiResponse[MembershipResponseDTO]: """Get detail of user membership in project by membership id. **Security:** Restricted to ADMIN project role. @@ -733,7 +733,7 @@ def get_membership_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MembershipDTO", + '200': "MembershipResponseDTO", } response_data = self.api_client.call_api( *_param, @@ -804,7 +804,7 @@ def get_membership_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MembershipDTO", + '200': "MembershipResponseDTO", } response_data = self.api_client.call_api( *_param, @@ -1231,7 +1231,7 @@ def update_membership( self, project_id: Annotated[str, Field(strict=True, description="Id of the project")], membership_id: Annotated[str, Field(strict=True, description="Id of the membership")], - update_membership: UpdateMembership, + update_membership_dto: UpdateMembershipDTO, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1244,7 +1244,7 @@ def update_membership( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MembershipDTO: + ) -> MembershipResponseDTO: """Update membership by changing role or status in project. **Security:** Restricted to ADMIN project role. @@ -1253,8 +1253,8 @@ def update_membership( :type project_id: str :param membership_id: Id of the membership (required) :type membership_id: str - :param update_membership: (required) - :type update_membership: UpdateMembership + :param update_membership_dto: (required) + :type update_membership_dto: UpdateMembershipDTO :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1280,7 +1280,7 @@ def update_membership( _param = self._update_membership_serialize( project_id=project_id, membership_id=membership_id, - update_membership=update_membership, + update_membership_dto=update_membership_dto, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1288,7 +1288,7 @@ def update_membership( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MembershipDTO", + '200': "MembershipResponseDTO", '400': None, } response_data = self.api_client.call_api( @@ -1307,7 +1307,7 @@ def update_membership_with_http_info( self, project_id: Annotated[str, Field(strict=True, description="Id of the project")], membership_id: Annotated[str, Field(strict=True, description="Id of the membership")], - update_membership: UpdateMembership, + update_membership_dto: UpdateMembershipDTO, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1320,7 +1320,7 @@ def update_membership_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MembershipDTO]: + ) -> ApiResponse[MembershipResponseDTO]: """Update membership by changing role or status in project. **Security:** Restricted to ADMIN project role. @@ -1329,8 +1329,8 @@ def update_membership_with_http_info( :type project_id: str :param membership_id: Id of the membership (required) :type membership_id: str - :param update_membership: (required) - :type update_membership: UpdateMembership + :param update_membership_dto: (required) + :type update_membership_dto: UpdateMembershipDTO :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1356,7 +1356,7 @@ def update_membership_with_http_info( _param = self._update_membership_serialize( project_id=project_id, membership_id=membership_id, - update_membership=update_membership, + update_membership_dto=update_membership_dto, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1364,7 +1364,7 @@ def update_membership_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MembershipDTO", + '200': "MembershipResponseDTO", '400': None, } response_data = self.api_client.call_api( @@ -1383,7 +1383,7 @@ def update_membership_without_preload_content( self, project_id: Annotated[str, Field(strict=True, description="Id of the project")], membership_id: Annotated[str, Field(strict=True, description="Id of the membership")], - update_membership: UpdateMembership, + update_membership_dto: UpdateMembershipDTO, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1405,8 +1405,8 @@ def update_membership_without_preload_content( :type project_id: str :param membership_id: Id of the membership (required) :type membership_id: str - :param update_membership: (required) - :type update_membership: UpdateMembership + :param update_membership_dto: (required) + :type update_membership_dto: UpdateMembershipDTO :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1432,7 +1432,7 @@ def update_membership_without_preload_content( _param = self._update_membership_serialize( project_id=project_id, membership_id=membership_id, - update_membership=update_membership, + update_membership_dto=update_membership_dto, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1440,7 +1440,7 @@ def update_membership_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MembershipDTO", + '200': "MembershipResponseDTO", '400': None, } response_data = self.api_client.call_api( @@ -1454,7 +1454,7 @@ def _update_membership_serialize( self, project_id, membership_id, - update_membership, + update_membership_dto, _request_auth, _content_type, _headers, @@ -1484,8 +1484,8 @@ def _update_membership_serialize( # process the header parameters # process the form parameters # process the body parameter - if update_membership is not None: - _body_params = update_membership + if update_membership_dto is not None: + _body_params = update_membership_dto # set the HTTP header `Accept` diff --git a/cm_python_openapi_sdk/api/metrics_api.py b/cm_python_openapi_sdk/api/metrics_api.py index 0e64dde..7339438 100644 --- a/cm_python_openapi_sdk/api/metrics_api.py +++ b/cm_python_openapi_sdk/api/metrics_api.py @@ -22,6 +22,7 @@ from typing_extensions import Annotated from cm_python_openapi_sdk.models.metric_dto import MetricDTO from cm_python_openapi_sdk.models.metric_paged_model_dto import MetricPagedModelDTO +from cm_python_openapi_sdk.models.metric_response_dto import MetricResponseDTO from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized from cm_python_openapi_sdk.api_response import ApiResponse @@ -59,7 +60,7 @@ def create_metric( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MetricDTO: + ) -> MetricResponseDTO: """Creates new metric. Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -103,7 +104,7 @@ def create_metric( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MetricDTO", + '200': "MetricResponseDTO", '400': None, '409': None, } @@ -136,7 +137,7 @@ def create_metric_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MetricDTO]: + ) -> ApiResponse[MetricResponseDTO]: """Creates new metric. Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -180,7 +181,7 @@ def create_metric_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MetricDTO", + '200': "MetricResponseDTO", '400': None, '409': None, } @@ -257,7 +258,7 @@ def create_metric_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MetricDTO", + '200': "MetricResponseDTO", '400': None, '409': None, } @@ -949,7 +950,7 @@ def get_metric_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MetricDTO: + ) -> MetricResponseDTO: """Gets metric by id @@ -989,7 +990,7 @@ def get_metric_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MetricDTO", + '200': "MetricResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1020,7 +1021,7 @@ def get_metric_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MetricDTO]: + ) -> ApiResponse[MetricResponseDTO]: """Gets metric by id @@ -1060,7 +1061,7 @@ def get_metric_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MetricDTO", + '200': "MetricResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1131,7 +1132,7 @@ def get_metric_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MetricDTO", + '200': "MetricResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1208,6 +1209,282 @@ def _get_metric_by_id_serialize( + @validate_call + def get_metric_by_name( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the metric")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> MetricResponseDTO: + """Gets metric by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the metric (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_metric_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MetricResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_metric_by_name_with_http_info( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the metric")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[MetricResponseDTO]: + """Gets metric by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the metric (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_metric_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MetricResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_metric_by_name_without_preload_content( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the metric")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Gets metric by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the metric (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_metric_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "MetricResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_metric_by_name_serialize( + self, + project_id, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/projects/{projectId}/md/metrics/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def update_metric_by_id( self, @@ -1228,7 +1505,7 @@ def update_metric_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MetricDTO: + ) -> MetricResponseDTO: """Updates metric by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1278,7 +1555,7 @@ def update_metric_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MetricDTO", + '200': "MetricResponseDTO", '400': None, '404': None, '409': None, @@ -1316,7 +1593,7 @@ def update_metric_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MetricDTO]: + ) -> ApiResponse[MetricResponseDTO]: """Updates metric by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1366,7 +1643,7 @@ def update_metric_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MetricDTO", + '200': "MetricResponseDTO", '400': None, '404': None, '409': None, @@ -1454,7 +1731,7 @@ def update_metric_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "MetricDTO", + '200': "MetricResponseDTO", '400': None, '404': None, '409': None, diff --git a/cm_python_openapi_sdk/api/project_settings_api.py b/cm_python_openapi_sdk/api/project_settings_api.py index 8ee7b83..346be45 100644 --- a/cm_python_openapi_sdk/api/project_settings_api.py +++ b/cm_python_openapi_sdk/api/project_settings_api.py @@ -22,6 +22,7 @@ from typing_extensions import Annotated from cm_python_openapi_sdk.models.project_settings_dto import ProjectSettingsDTO from cm_python_openapi_sdk.models.project_settings_paged_model_dto import ProjectSettingsPagedModelDTO +from cm_python_openapi_sdk.models.project_settings_response_dto import ProjectSettingsResponseDTO from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized from cm_python_openapi_sdk.api_response import ApiResponse @@ -59,7 +60,7 @@ def create_project_settings( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ProjectSettingsDTO: + ) -> ProjectSettingsResponseDTO: """Creates new project settings Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -103,7 +104,7 @@ def create_project_settings( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProjectSettingsDTO", + '200': "ProjectSettingsResponseDTO", '400': None, '409': None, } @@ -136,7 +137,7 @@ def create_project_settings_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ProjectSettingsDTO]: + ) -> ApiResponse[ProjectSettingsResponseDTO]: """Creates new project settings Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -180,7 +181,7 @@ def create_project_settings_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProjectSettingsDTO", + '200': "ProjectSettingsResponseDTO", '400': None, '409': None, } @@ -257,7 +258,7 @@ def create_project_settings_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProjectSettingsDTO", + '200': "ProjectSettingsResponseDTO", '400': None, '409': None, } @@ -949,7 +950,7 @@ def get_project_settings_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ProjectSettingsDTO: + ) -> ProjectSettingsResponseDTO: """Gets project settings by id @@ -989,7 +990,7 @@ def get_project_settings_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProjectSettingsDTO", + '200': "ProjectSettingsResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1020,7 +1021,7 @@ def get_project_settings_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ProjectSettingsDTO]: + ) -> ApiResponse[ProjectSettingsResponseDTO]: """Gets project settings by id @@ -1060,7 +1061,7 @@ def get_project_settings_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProjectSettingsDTO", + '200': "ProjectSettingsResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1131,7 +1132,7 @@ def get_project_settings_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProjectSettingsDTO", + '200': "ProjectSettingsResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1208,6 +1209,282 @@ def _get_project_settings_by_id_serialize( + @validate_call + def get_project_settings_by_name( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the projectSettings")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ProjectSettingsResponseDTO: + """Gets projectSettings by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the projectSettings (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_project_settings_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectSettingsResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_project_settings_by_name_with_http_info( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the projectSettings")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ProjectSettingsResponseDTO]: + """Gets projectSettings by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the projectSettings (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_project_settings_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectSettingsResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_project_settings_by_name_without_preload_content( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the projectSettings")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Gets projectSettings by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the projectSettings (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_project_settings_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ProjectSettingsResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_project_settings_by_name_serialize( + self, + project_id, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/projects/{projectId}/md/projectSettings/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def update_project_settings_by_id( self, @@ -1228,7 +1505,7 @@ def update_project_settings_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ProjectSettingsDTO: + ) -> ProjectSettingsResponseDTO: """Updates project settings by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1278,7 +1555,7 @@ def update_project_settings_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProjectSettingsDTO", + '200': "ProjectSettingsResponseDTO", '400': None, '404': None, '409': None, @@ -1316,7 +1593,7 @@ def update_project_settings_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ProjectSettingsDTO]: + ) -> ApiResponse[ProjectSettingsResponseDTO]: """Updates project settings by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1366,7 +1643,7 @@ def update_project_settings_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProjectSettingsDTO", + '200': "ProjectSettingsResponseDTO", '400': None, '404': None, '409': None, @@ -1454,7 +1731,7 @@ def update_project_settings_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ProjectSettingsDTO", + '200': "ProjectSettingsResponseDTO", '400': None, '404': None, '409': None, diff --git a/cm_python_openapi_sdk/api/queries_api.py b/cm_python_openapi_sdk/api/queries_api.py index 2b88acb..9c069c6 100644 --- a/cm_python_openapi_sdk/api/queries_api.py +++ b/cm_python_openapi_sdk/api/queries_api.py @@ -386,6 +386,8 @@ def get_queries( project_id: Annotated[str, Field(strict=True, description="Id of the project")], dwh_cluster_id: Annotated[str, Field(strict=True, description="Id of the dwh cluster")], dwh_cache_id: Annotated[str, Field(strict=True, description="Id of the dwh cache")], + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of the page")] = None, + size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The count of records to return for one page")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -409,6 +411,10 @@ def get_queries( :type dwh_cluster_id: str :param dwh_cache_id: Id of the dwh cache (required) :type dwh_cache_id: str + :param page: Number of the page + :type page: int + :param size: The count of records to return for one page + :type size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -435,6 +441,8 @@ def get_queries( project_id=project_id, dwh_cluster_id=dwh_cluster_id, dwh_cache_id=dwh_cache_id, + page=page, + size=size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -462,6 +470,8 @@ def get_queries_with_http_info( project_id: Annotated[str, Field(strict=True, description="Id of the project")], dwh_cluster_id: Annotated[str, Field(strict=True, description="Id of the dwh cluster")], dwh_cache_id: Annotated[str, Field(strict=True, description="Id of the dwh cache")], + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of the page")] = None, + size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The count of records to return for one page")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -485,6 +495,10 @@ def get_queries_with_http_info( :type dwh_cluster_id: str :param dwh_cache_id: Id of the dwh cache (required) :type dwh_cache_id: str + :param page: Number of the page + :type page: int + :param size: The count of records to return for one page + :type size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -511,6 +525,8 @@ def get_queries_with_http_info( project_id=project_id, dwh_cluster_id=dwh_cluster_id, dwh_cache_id=dwh_cache_id, + page=page, + size=size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -538,6 +554,8 @@ def get_queries_without_preload_content( project_id: Annotated[str, Field(strict=True, description="Id of the project")], dwh_cluster_id: Annotated[str, Field(strict=True, description="Id of the dwh cluster")], dwh_cache_id: Annotated[str, Field(strict=True, description="Id of the dwh cache")], + page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of the page")] = None, + size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The count of records to return for one page")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -561,6 +579,10 @@ def get_queries_without_preload_content( :type dwh_cluster_id: str :param dwh_cache_id: Id of the dwh cache (required) :type dwh_cache_id: str + :param page: Number of the page + :type page: int + :param size: The count of records to return for one page + :type size: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -587,6 +609,8 @@ def get_queries_without_preload_content( project_id=project_id, dwh_cluster_id=dwh_cluster_id, dwh_cache_id=dwh_cache_id, + page=page, + size=size, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -609,6 +633,8 @@ def _get_queries_serialize( project_id, dwh_cluster_id, dwh_cache_id, + page, + size, _request_auth, _content_type, _headers, @@ -637,6 +663,14 @@ def _get_queries_serialize( if dwh_cache_id is not None: _path_params['dwhCacheId'] = dwh_cache_id # process the query parameters + if page is not None: + + _query_params.append(('page', page)) + + if size is not None: + + _query_params.append(('size', size)) + # process the header parameters # process the form parameters # process the body parameter diff --git a/cm_python_openapi_sdk/api/search_api.py b/cm_python_openapi_sdk/api/search_api.py index 2a32647..48e9f2e 100644 --- a/cm_python_openapi_sdk/api/search_api.py +++ b/cm_python_openapi_sdk/api/search_api.py @@ -20,7 +20,6 @@ from pydantic import Field, StrictStr, field_validator from typing import Optional from typing_extensions import Annotated -from cm_python_openapi_sdk.models.geosearch_paged_model_dto import GeosearchPagedModelDTO from cm_python_openapi_sdk.models.search_query_response import SearchQueryResponse from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized @@ -368,351 +367,3 @@ def _full_text_search_serialize( ) - - - @validate_call - def geographic_search( - self, - query: Annotated[StrictStr, Field(description="Query search phrase. It is highlighted in the query result.")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of the page")] = None, - size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The count of records to return for one page")] = None, - country: Annotated[Optional[StrictStr], Field(description="Array of ISO 3166 alpha-2 country codes to limit the search.")] = None, - language: Annotated[Optional[StrictStr], Field(description="Language to use for query results as defined by ISO 639-1.")] = None, - types: Annotated[Optional[StrictStr], Field(description="Array of place types, available types are [region, district, city, locality, address, postcode]")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GeosearchPagedModelDTO: - """Geographic search - - Wrapper of [Mapbox Geocoding service](https://docs.mapbox.com/api/search/geocoding/). Processes the query and validates the URL parameters. If the query is valid, it is executed on Mapbox API. The result is then translated and returned. - - :param query: Query search phrase. It is highlighted in the query result. (required) - :type query: str - :param page: Number of the page - :type page: int - :param size: The count of records to return for one page - :type size: int - :param country: Array of ISO 3166 alpha-2 country codes to limit the search. - :type country: str - :param language: Language to use for query results as defined by ISO 639-1. - :type language: str - :param types: Array of place types, available types are [region, district, city, locality, address, postcode] - :type types: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._geographic_search_serialize( - query=query, - page=page, - size=size, - country=country, - language=language, - types=types, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GeosearchPagedModelDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def geographic_search_with_http_info( - self, - query: Annotated[StrictStr, Field(description="Query search phrase. It is highlighted in the query result.")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of the page")] = None, - size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The count of records to return for one page")] = None, - country: Annotated[Optional[StrictStr], Field(description="Array of ISO 3166 alpha-2 country codes to limit the search.")] = None, - language: Annotated[Optional[StrictStr], Field(description="Language to use for query results as defined by ISO 639-1.")] = None, - types: Annotated[Optional[StrictStr], Field(description="Array of place types, available types are [region, district, city, locality, address, postcode]")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GeosearchPagedModelDTO]: - """Geographic search - - Wrapper of [Mapbox Geocoding service](https://docs.mapbox.com/api/search/geocoding/). Processes the query and validates the URL parameters. If the query is valid, it is executed on Mapbox API. The result is then translated and returned. - - :param query: Query search phrase. It is highlighted in the query result. (required) - :type query: str - :param page: Number of the page - :type page: int - :param size: The count of records to return for one page - :type size: int - :param country: Array of ISO 3166 alpha-2 country codes to limit the search. - :type country: str - :param language: Language to use for query results as defined by ISO 639-1. - :type language: str - :param types: Array of place types, available types are [region, district, city, locality, address, postcode] - :type types: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._geographic_search_serialize( - query=query, - page=page, - size=size, - country=country, - language=language, - types=types, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GeosearchPagedModelDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def geographic_search_without_preload_content( - self, - query: Annotated[StrictStr, Field(description="Query search phrase. It is highlighted in the query result.")], - page: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Number of the page")] = None, - size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="The count of records to return for one page")] = None, - country: Annotated[Optional[StrictStr], Field(description="Array of ISO 3166 alpha-2 country codes to limit the search.")] = None, - language: Annotated[Optional[StrictStr], Field(description="Language to use for query results as defined by ISO 639-1.")] = None, - types: Annotated[Optional[StrictStr], Field(description="Array of place types, available types are [region, district, city, locality, address, postcode]")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Geographic search - - Wrapper of [Mapbox Geocoding service](https://docs.mapbox.com/api/search/geocoding/). Processes the query and validates the URL parameters. If the query is valid, it is executed on Mapbox API. The result is then translated and returned. - - :param query: Query search phrase. It is highlighted in the query result. (required) - :type query: str - :param page: Number of the page - :type page: int - :param size: The count of records to return for one page - :type size: int - :param country: Array of ISO 3166 alpha-2 country codes to limit the search. - :type country: str - :param language: Language to use for query results as defined by ISO 639-1. - :type language: str - :param types: Array of place types, available types are [region, district, city, locality, address, postcode] - :type types: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._geographic_search_serialize( - query=query, - page=page, - size=size, - country=country, - language=language, - types=types, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GeosearchPagedModelDTO", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _geographic_search_serialize( - self, - query, - page, - size, - country, - language, - types, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if page is not None: - - _query_params.append(('page', page)) - - if size is not None: - - _query_params.append(('size', size)) - - if query is not None: - - _query_params.append(('query', query)) - - if country is not None: - - _query_params.append(('country', country)) - - if language is not None: - - _query_params.append(('language', language)) - - if types is not None: - - _query_params.append(('types', types)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'bearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/geosearch', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/cm_python_openapi_sdk/api/vector_tiles_api.py b/cm_python_openapi_sdk/api/vector_tiles_api.py new file mode 100644 index 0000000..f7bb38e --- /dev/null +++ b/cm_python_openapi_sdk/api/vector_tiles_api.py @@ -0,0 +1,381 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBytes, StrictStr, field_validator +from typing import Tuple, Union +from typing_extensions import Annotated + +from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized +from cm_python_openapi_sdk.api_response import ApiResponse +from cm_python_openapi_sdk.rest import RESTResponseType + + +class VectorTilesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_vector_tile( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + dwh_cluster_id: Annotated[str, Field(strict=True, description="Id of the dwh cluster")], + dataset_name: Annotated[str, Field(strict=True, description="Name of the DWH dataset with geometry data")], + z: Annotated[int, Field(strict=True, ge=0, description="Z coordinate of a vector tile")], + x: Annotated[int, Field(strict=True, ge=0, description="X coordinate of a vector tile")], + y: Annotated[int, Field(strict=True, ge=0, description="Y coordinate of a vector tile")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytearray: + """get_vector_tile + + Get a vector tile from a geometryPolygon or geometryLine dataset. This endpoint provides on-the-fly rendering of vector tiles from DWH geometryLine or geometryPolygon datasets that include a geometry property. Vector tiles are rendered upon request and cached in a Redis in-memory database to improve performance. Geometries are not generalized, so this endpoint is not optimized for serving very large datasets. This endpoint synchronously starts the vector tile computation and waits for the data. For very large datasets, the request may time out. If the vector tile is empty, a 404 response is returned. + + :param project_id: Id of the project (required) + :type project_id: str + :param dwh_cluster_id: Id of the dwh cluster (required) + :type dwh_cluster_id: str + :param dataset_name: Name of the DWH dataset with geometry data (required) + :type dataset_name: str + :param z: Z coordinate of a vector tile (required) + :type z: int + :param x: X coordinate of a vector tile (required) + :type x: int + :param y: Y coordinate of a vector tile (required) + :type y: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_vector_tile_serialize( + project_id=project_id, + dwh_cluster_id=dwh_cluster_id, + dataset_name=dataset_name, + z=z, + x=x, + y=y, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_vector_tile_with_http_info( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + dwh_cluster_id: Annotated[str, Field(strict=True, description="Id of the dwh cluster")], + dataset_name: Annotated[str, Field(strict=True, description="Name of the DWH dataset with geometry data")], + z: Annotated[int, Field(strict=True, ge=0, description="Z coordinate of a vector tile")], + x: Annotated[int, Field(strict=True, ge=0, description="X coordinate of a vector tile")], + y: Annotated[int, Field(strict=True, ge=0, description="Y coordinate of a vector tile")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytearray]: + """get_vector_tile + + Get a vector tile from a geometryPolygon or geometryLine dataset. This endpoint provides on-the-fly rendering of vector tiles from DWH geometryLine or geometryPolygon datasets that include a geometry property. Vector tiles are rendered upon request and cached in a Redis in-memory database to improve performance. Geometries are not generalized, so this endpoint is not optimized for serving very large datasets. This endpoint synchronously starts the vector tile computation and waits for the data. For very large datasets, the request may time out. If the vector tile is empty, a 404 response is returned. + + :param project_id: Id of the project (required) + :type project_id: str + :param dwh_cluster_id: Id of the dwh cluster (required) + :type dwh_cluster_id: str + :param dataset_name: Name of the DWH dataset with geometry data (required) + :type dataset_name: str + :param z: Z coordinate of a vector tile (required) + :type z: int + :param x: X coordinate of a vector tile (required) + :type x: int + :param y: Y coordinate of a vector tile (required) + :type y: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_vector_tile_serialize( + project_id=project_id, + dwh_cluster_id=dwh_cluster_id, + dataset_name=dataset_name, + z=z, + x=x, + y=y, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_vector_tile_without_preload_content( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + dwh_cluster_id: Annotated[str, Field(strict=True, description="Id of the dwh cluster")], + dataset_name: Annotated[str, Field(strict=True, description="Name of the DWH dataset with geometry data")], + z: Annotated[int, Field(strict=True, ge=0, description="Z coordinate of a vector tile")], + x: Annotated[int, Field(strict=True, ge=0, description="X coordinate of a vector tile")], + y: Annotated[int, Field(strict=True, ge=0, description="Y coordinate of a vector tile")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """get_vector_tile + + Get a vector tile from a geometryPolygon or geometryLine dataset. This endpoint provides on-the-fly rendering of vector tiles from DWH geometryLine or geometryPolygon datasets that include a geometry property. Vector tiles are rendered upon request and cached in a Redis in-memory database to improve performance. Geometries are not generalized, so this endpoint is not optimized for serving very large datasets. This endpoint synchronously starts the vector tile computation and waits for the data. For very large datasets, the request may time out. If the vector tile is empty, a 404 response is returned. + + :param project_id: Id of the project (required) + :type project_id: str + :param dwh_cluster_id: Id of the dwh cluster (required) + :type dwh_cluster_id: str + :param dataset_name: Name of the DWH dataset with geometry data (required) + :type dataset_name: str + :param z: Z coordinate of a vector tile (required) + :type z: int + :param x: X coordinate of a vector tile (required) + :type x: int + :param y: Y coordinate of a vector tile (required) + :type y: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_vector_tile_serialize( + project_id=project_id, + dwh_cluster_id=dwh_cluster_id, + dataset_name=dataset_name, + z=z, + x=x, + y=y, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray", + '400': None, + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_vector_tile_serialize( + self, + project_id, + dwh_cluster_id, + dataset_name, + z, + x, + y, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if dwh_cluster_id is not None: + _path_params['dwhClusterId'] = dwh_cluster_id + if dataset_name is not None: + _path_params['datasetName'] = dataset_name + if z is not None: + _path_params['z'] = z + if x is not None: + _path_params['x'] = x + if y is not None: + _path_params['y'] = y + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/vnd.mapbox-vector-tile' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/projects/{projectId}/dwh/{dwhClusterId}/tiles/{datasetName}/{z}/{x}/{y}.vector.pbf', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/cm_python_openapi_sdk/api/views_api.py b/cm_python_openapi_sdk/api/views_api.py index 462e8bf..8fc64e9 100644 --- a/cm_python_openapi_sdk/api/views_api.py +++ b/cm_python_openapi_sdk/api/views_api.py @@ -22,6 +22,7 @@ from typing_extensions import Annotated from cm_python_openapi_sdk.models.view_dto import ViewDTO from cm_python_openapi_sdk.models.view_paged_model_dto import ViewPagedModelDTO +from cm_python_openapi_sdk.models.view_response_dto import ViewResponseDTO from cm_python_openapi_sdk.api_client import ApiClient, RequestSerialized from cm_python_openapi_sdk.api_response import ApiResponse @@ -59,7 +60,7 @@ def create_view( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ViewDTO: + ) -> ViewResponseDTO: """Creates new view Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -103,7 +104,7 @@ def create_view( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ViewDTO", + '200': "ViewResponseDTO", '400': None, '409': None, } @@ -136,7 +137,7 @@ def create_view_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ViewDTO]: + ) -> ApiResponse[ViewResponseDTO]: """Creates new view Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -180,7 +181,7 @@ def create_view_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ViewDTO", + '200': "ViewResponseDTO", '400': None, '409': None, } @@ -257,7 +258,7 @@ def create_view_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ViewDTO", + '200': "ViewResponseDTO", '400': None, '409': None, } @@ -949,7 +950,7 @@ def get_view_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ViewDTO: + ) -> ViewResponseDTO: """Gets view by id @@ -989,7 +990,7 @@ def get_view_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ViewDTO", + '200': "ViewResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1020,7 +1021,7 @@ def get_view_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ViewDTO]: + ) -> ApiResponse[ViewResponseDTO]: """Gets view by id @@ -1060,7 +1061,7 @@ def get_view_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ViewDTO", + '200': "ViewResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1131,7 +1132,7 @@ def get_view_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ViewDTO", + '200': "ViewResponseDTO", '404': None, } response_data = self.api_client.call_api( @@ -1208,6 +1209,282 @@ def _get_view_by_id_serialize( + @validate_call + def get_view_by_name( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the view")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ViewResponseDTO: + """Gets view by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the view (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_view_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ViewResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_view_by_name_with_http_info( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the view")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ViewResponseDTO]: + """Gets view by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the view (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_view_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ViewResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_view_by_name_without_preload_content( + self, + project_id: Annotated[str, Field(strict=True, description="Id of the project")], + name: Annotated[str, Field(strict=True, description="Name of the view")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Gets view by name + + + :param project_id: Id of the project (required) + :type project_id: str + :param name: Name of the view (required) + :type name: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_view_by_name_serialize( + project_id=project_id, + name=name, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ViewResponseDTO", + '404': None, + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_view_by_name_serialize( + self, + project_id, + name, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if project_id is not None: + _path_params['projectId'] = project_id + if name is not None: + _path_params['name'] = name + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/projects/{projectId}/md/views/{name}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def update_view_by_id( self, @@ -1228,7 +1505,7 @@ def update_view_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ViewDTO: + ) -> ViewResponseDTO: """Updates view by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1278,7 +1555,7 @@ def update_view_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ViewDTO", + '200': "ViewResponseDTO", '400': None, '404': None, '409': None, @@ -1316,7 +1593,7 @@ def update_view_by_id_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ViewDTO]: + ) -> ApiResponse[ViewResponseDTO]: """Updates view by id Restricted to EDITOR project role that has the permission to update metadata of the project. @@ -1366,7 +1643,7 @@ def update_view_by_id_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ViewDTO", + '200': "ViewResponseDTO", '400': None, '404': None, '409': None, @@ -1454,7 +1731,7 @@ def update_view_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ViewDTO", + '200': "ViewResponseDTO", '400': None, '404': None, '409': None, diff --git a/cm_python_openapi_sdk/models/__init__.py b/cm_python_openapi_sdk/models/__init__.py index 917f7fb..3d22de3 100644 --- a/cm_python_openapi_sdk/models/__init__.py +++ b/cm_python_openapi_sdk/models/__init__.py @@ -15,11 +15,10 @@ # import models into model package +from cm_python_openapi_sdk.models.access_info_dto import AccessInfoDTO from cm_python_openapi_sdk.models.account_dto import AccountDTO -from cm_python_openapi_sdk.models.account_job_info import AccountJobInfo from cm_python_openapi_sdk.models.account_onboarding_parameters import AccountOnboardingParameters from cm_python_openapi_sdk.models.account_preferences import AccountPreferences -from cm_python_openapi_sdk.models.account_utm_parameters import AccountUtmParameters from cm_python_openapi_sdk.models.active_date_filter_dto import ActiveDateFilterDTO from cm_python_openapi_sdk.models.active_feature_filter_dto import ActiveFeatureFilterDTO from cm_python_openapi_sdk.models.active_filter_abstract_type import ActiveFilterAbstractType @@ -36,6 +35,7 @@ from cm_python_openapi_sdk.models.attribute_style_dto import AttributeStyleDTO from cm_python_openapi_sdk.models.attribute_style_fallback_category_dto import AttributeStyleFallbackCategoryDTO from cm_python_openapi_sdk.models.attribute_style_paged_model_dto import AttributeStylePagedModelDTO +from cm_python_openapi_sdk.models.attribute_style_response_dto import AttributeStyleResponseDTO from cm_python_openapi_sdk.models.audit_log_paged_resource import AuditLogPagedResource from cm_python_openapi_sdk.models.audit_log_paged_resource_page import AuditLogPagedResourcePage from cm_python_openapi_sdk.models.audit_log_paged_resource_page_last_evaluated_key import AuditLogPagedResourcePageLastEvaluatedKey @@ -68,6 +68,7 @@ from cm_python_openapi_sdk.models.dashboard_dto import DashboardDTO from cm_python_openapi_sdk.models.dashboard_dataset_properties_dto import DashboardDatasetPropertiesDTO from cm_python_openapi_sdk.models.dashboard_paged_model_dto import DashboardPagedModelDTO +from cm_python_openapi_sdk.models.dashboard_response_dto import DashboardResponseDTO from cm_python_openapi_sdk.models.data_complete_multipart_upload_request import DataCompleteMultipartUploadRequest from cm_python_openapi_sdk.models.data_complete_multipart_upload_response import DataCompleteMultipartUploadResponse from cm_python_openapi_sdk.models.data_create_multipart_upload_response import DataCreateMultipartUploadResponse @@ -77,6 +78,7 @@ from cm_python_openapi_sdk.models.data_permission_content_dto import DataPermissionContentDTO from cm_python_openapi_sdk.models.data_permission_dto import DataPermissionDTO from cm_python_openapi_sdk.models.data_permission_paged_model_dto import DataPermissionPagedModelDTO +from cm_python_openapi_sdk.models.data_permission_response_dto import DataPermissionResponseDTO from cm_python_openapi_sdk.models.data_pull_job_request import DataPullJobRequest from cm_python_openapi_sdk.models.data_pull_request import DataPullRequest from cm_python_openapi_sdk.models.data_pull_request_csv_options import DataPullRequestCsvOptions @@ -90,6 +92,7 @@ from cm_python_openapi_sdk.models.dataset_h3_grid_type_dto import DatasetH3GridTypeDTO from cm_python_openapi_sdk.models.dataset_paged_model_dto import DatasetPagedModelDTO from cm_python_openapi_sdk.models.dataset_properties_dto import DatasetPropertiesDTO +from cm_python_openapi_sdk.models.dataset_response_dto import DatasetResponseDTO from cm_python_openapi_sdk.models.dataset_type import DatasetType from cm_python_openapi_sdk.models.dataset_visualization_dto import DatasetVisualizationDTO from cm_python_openapi_sdk.models.dataset_vt_type_dto import DatasetVtTypeDTO @@ -133,8 +136,14 @@ from cm_python_openapi_sdk.models.dwh_query_number_type import DwhQueryNumberType from cm_python_openapi_sdk.models.dwh_query_property_type import DwhQueryPropertyType from cm_python_openapi_sdk.models.dwh_query_property_types import DwhQueryPropertyTypes +from cm_python_openapi_sdk.models.dwh_query_property_types_filter_comp import DwhQueryPropertyTypesFilterComp +from cm_python_openapi_sdk.models.dwh_query_property_types_function_ntile import DwhQueryPropertyTypesFunctionNtile +from cm_python_openapi_sdk.models.dwh_query_property_types_function_percentile import DwhQueryPropertyTypesFunctionPercentile +from cm_python_openapi_sdk.models.dwh_query_property_types_function_rank import DwhQueryPropertyTypesFunctionRank +from cm_python_openapi_sdk.models.dwh_query_property_types_function_row_number import DwhQueryPropertyTypesFunctionRowNumber from cm_python_openapi_sdk.models.dwh_query_request import DwhQueryRequest from cm_python_openapi_sdk.models.dwh_query_request1 import DwhQueryRequest1 +from cm_python_openapi_sdk.models.dwh_query_variable_type import DwhQueryVariableType from cm_python_openapi_sdk.models.execution_context import ExecutionContext from cm_python_openapi_sdk.models.execution_detail import ExecutionDetail from cm_python_openapi_sdk.models.export_content_dto import ExportContentDTO @@ -144,6 +153,7 @@ from cm_python_openapi_sdk.models.export_paged_model_dto import ExportPagedModelDTO from cm_python_openapi_sdk.models.export_request import ExportRequest from cm_python_openapi_sdk.models.export_request_csv_options import ExportRequestCsvOptions +from cm_python_openapi_sdk.models.export_response_dto import ExportResponseDTO from cm_python_openapi_sdk.models.feature_attribute_dto import FeatureAttributeDTO from cm_python_openapi_sdk.models.feature_filter_dto import FeatureFilterDTO from cm_python_openapi_sdk.models.feature_function_dto import FeatureFunctionDTO @@ -170,7 +180,6 @@ from cm_python_openapi_sdk.models.function_h3_grid_options import FunctionH3GridOptions from cm_python_openapi_sdk.models.function_interval import FunctionInterval from cm_python_openapi_sdk.models.function_ntile import FunctionNtile -from cm_python_openapi_sdk.models.function_ntile_content_inner import FunctionNtileContentInner from cm_python_openapi_sdk.models.function_ntile_options import FunctionNtileOptions from cm_python_openapi_sdk.models.function_percent_to_total_type_general import FunctionPercentToTotalTypeGeneral from cm_python_openapi_sdk.models.function_percentile import FunctionPercentile @@ -179,6 +188,7 @@ from cm_python_openapi_sdk.models.function_round_type_general import FunctionRoundTypeGeneral from cm_python_openapi_sdk.models.function_row_number import FunctionRowNumber from cm_python_openapi_sdk.models.function_today import FunctionToday +from cm_python_openapi_sdk.models.general_job_request import GeneralJobRequest from cm_python_openapi_sdk.models.geosearch_paged_model_dto import GeosearchPagedModelDTO from cm_python_openapi_sdk.models.get_account_by_account_id200_response import GetAccountByAccountId200Response from cm_python_openapi_sdk.models.get_organizations200_response import GetOrganizations200Response @@ -204,11 +214,13 @@ from cm_python_openapi_sdk.models.indicator_drill_content_dto import IndicatorDrillContentDTO from cm_python_openapi_sdk.models.indicator_drill_dto import IndicatorDrillDTO from cm_python_openapi_sdk.models.indicator_drill_paged_model_dto import IndicatorDrillPagedModelDTO +from cm_python_openapi_sdk.models.indicator_drill_response_dto import IndicatorDrillResponseDTO from cm_python_openapi_sdk.models.indicator_filter_dto import IndicatorFilterDTO from cm_python_openapi_sdk.models.indicator_group_dto import IndicatorGroupDTO from cm_python_openapi_sdk.models.indicator_link_dto import IndicatorLinkDTO from cm_python_openapi_sdk.models.indicator_link_dto_block_rows_inner import IndicatorLinkDTOBlockRowsInner from cm_python_openapi_sdk.models.indicator_paged_model_dto import IndicatorPagedModelDTO +from cm_python_openapi_sdk.models.indicator_response_dto import IndicatorResponseDTO from cm_python_openapi_sdk.models.indicator_visualizations_dto import IndicatorVisualizationsDTO from cm_python_openapi_sdk.models.invitation_dto import InvitationDTO from cm_python_openapi_sdk.models.invitation_paged_model_dto import InvitationPagedModelDTO @@ -220,7 +232,6 @@ from cm_python_openapi_sdk.models.layer_dto_datasets_inner import LayerDTODatasetsInner from cm_python_openapi_sdk.models.layer_dto_datasets_inner_attribute_styles_inner import LayerDTODatasetsInnerAttributeStylesInner from cm_python_openapi_sdk.models.linked_layer_dto import LinkedLayerDTO -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse from cm_python_openapi_sdk.models.map_content_dto import MapContentDTO from cm_python_openapi_sdk.models.map_content_dto_base_layer import MapContentDTOBaseLayer from cm_python_openapi_sdk.models.map_content_dto_options import MapContentDTOOptions @@ -230,6 +241,7 @@ from cm_python_openapi_sdk.models.map_options_dto import MapOptionsDTO from cm_python_openapi_sdk.models.map_options_dto_custom_tile_layer import MapOptionsDTOCustomTileLayer from cm_python_openapi_sdk.models.map_paged_model_dto import MapPagedModelDTO +from cm_python_openapi_sdk.models.map_response_dto import MapResponseDTO from cm_python_openapi_sdk.models.mapycz_ortophoto_dto import MapyczOrtophotoDTO from cm_python_openapi_sdk.models.mapycz_panorama_dto import MapyczPanoramaDTO from cm_python_openapi_sdk.models.marker_content_dto import MarkerContentDTO @@ -237,31 +249,35 @@ from cm_python_openapi_sdk.models.marker_dto import MarkerDTO from cm_python_openapi_sdk.models.marker_link_dto import MarkerLinkDTO from cm_python_openapi_sdk.models.marker_paged_model_dto import MarkerPagedModelDTO +from cm_python_openapi_sdk.models.marker_response_dto import MarkerResponseDTO from cm_python_openapi_sdk.models.marker_selector_content_dto import MarkerSelectorContentDTO from cm_python_openapi_sdk.models.marker_selector_content_dto_keep_filtered import MarkerSelectorContentDTOKeepFiltered from cm_python_openapi_sdk.models.marker_selector_dto import MarkerSelectorDTO from cm_python_openapi_sdk.models.marker_selector_paged_model_dto import MarkerSelectorPagedModelDTO +from cm_python_openapi_sdk.models.marker_selector_response_dto import MarkerSelectorResponseDTO from cm_python_openapi_sdk.models.max_value_dto import MaxValueDTO from cm_python_openapi_sdk.models.measure_dto import MeasureDTO -from cm_python_openapi_sdk.models.membership_dto import MembershipDTO from cm_python_openapi_sdk.models.membership_paged_model_dto import MembershipPagedModelDTO +from cm_python_openapi_sdk.models.membership_response_dto import MembershipResponseDTO from cm_python_openapi_sdk.models.metric_dto import MetricDTO from cm_python_openapi_sdk.models.metric_paged_model_dto import MetricPagedModelDTO +from cm_python_openapi_sdk.models.metric_response_dto import MetricResponseDTO from cm_python_openapi_sdk.models.multi_select_filter_dto import MultiSelectFilterDTO -from cm_python_openapi_sdk.models.new_account_dto import NewAccountDTO from cm_python_openapi_sdk.models.order_by import OrderBy from cm_python_openapi_sdk.models.order_by_dto import OrderByDTO from cm_python_openapi_sdk.models.organization_paged_model_dto import OrganizationPagedModelDTO from cm_python_openapi_sdk.models.organization_response_dto import OrganizationResponseDTO from cm_python_openapi_sdk.models.output_dto import OutputDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO from cm_python_openapi_sdk.models.part_e_tag import PartETag -from cm_python_openapi_sdk.models.password_change_dto import PasswordChangeDTO from cm_python_openapi_sdk.models.position_dto import PositionDTO from cm_python_openapi_sdk.models.project_paged_model_dto import ProjectPagedModelDTO from cm_python_openapi_sdk.models.project_response_dto import ProjectResponseDTO +from cm_python_openapi_sdk.models.project_response_dto_services import ProjectResponseDTOServices from cm_python_openapi_sdk.models.project_settings_content_dto import ProjectSettingsContentDTO from cm_python_openapi_sdk.models.project_settings_dto import ProjectSettingsDTO from cm_python_openapi_sdk.models.project_settings_paged_model_dto import ProjectSettingsPagedModelDTO +from cm_python_openapi_sdk.models.project_settings_response_dto import ProjectSettingsResponseDTO from cm_python_openapi_sdk.models.project_template_dto import ProjectTemplateDTO from cm_python_openapi_sdk.models.property_filter_compare_dto import PropertyFilterCompareDTO from cm_python_openapi_sdk.models.property_filter_in_dto import PropertyFilterInDTO @@ -273,7 +289,6 @@ from cm_python_openapi_sdk.models.query_response_item_wrapper import QueryResponseItemWrapper from cm_python_openapi_sdk.models.ranking_dto import RankingDTO from cm_python_openapi_sdk.models.relations_dto import RelationsDTO -from cm_python_openapi_sdk.models.reset_password_dto import ResetPasswordDTO from cm_python_openapi_sdk.models.restricted_account_dto import RestrictedAccountDTO from cm_python_openapi_sdk.models.result_set_filter import ResultSetFilter from cm_python_openapi_sdk.models.result_set_filter_comp import ResultSetFilterComp @@ -283,29 +298,27 @@ from cm_python_openapi_sdk.models.search_query_hit import SearchQueryHit from cm_python_openapi_sdk.models.search_query_hit_id import SearchQueryHitId from cm_python_openapi_sdk.models.search_query_response import SearchQueryResponse -from cm_python_openapi_sdk.models.send_reset_password_dto import SendResetPasswordDTO from cm_python_openapi_sdk.models.single_select_filter_dto import SingleSelectFilterDTO from cm_python_openapi_sdk.models.static_scale_option_dto import StaticScaleOptionDTO from cm_python_openapi_sdk.models.static_scale_option_dto_breaks import StaticScaleOptionDTOBreaks from cm_python_openapi_sdk.models.style_dto import StyleDTO -from cm_python_openapi_sdk.models.submit_job_execution_request import SubmitJobExecutionRequest from cm_python_openapi_sdk.models.template_dataset_dto import TemplateDatasetDTO from cm_python_openapi_sdk.models.time_series_dto import TimeSeriesDTO from cm_python_openapi_sdk.models.token_request_dto import TokenRequestDTO from cm_python_openapi_sdk.models.token_response_dto import TokenResponseDTO from cm_python_openapi_sdk.models.truncate_job_request import TruncateJobRequest from cm_python_openapi_sdk.models.update_invitation import UpdateInvitation -from cm_python_openapi_sdk.models.update_membership import UpdateMembership +from cm_python_openapi_sdk.models.update_membership_dto import UpdateMembershipDTO from cm_python_openapi_sdk.models.update_organization_dto import UpdateOrganizationDTO from cm_python_openapi_sdk.models.update_project_dto import UpdateProjectDTO from cm_python_openapi_sdk.models.validate_job_request import ValidateJobRequest from cm_python_openapi_sdk.models.validate_request import ValidateRequest from cm_python_openapi_sdk.models.value_option_dto import ValueOptionDTO from cm_python_openapi_sdk.models.variable_dto import VariableDTO -from cm_python_openapi_sdk.models.variable_type import VariableType from cm_python_openapi_sdk.models.variable_value import VariableValue from cm_python_openapi_sdk.models.variables_dto import VariablesDTO from cm_python_openapi_sdk.models.view_content_dto import ViewContentDTO from cm_python_openapi_sdk.models.view_dto import ViewDTO from cm_python_openapi_sdk.models.view_paged_model_dto import ViewPagedModelDTO +from cm_python_openapi_sdk.models.view_response_dto import ViewResponseDTO from cm_python_openapi_sdk.models.zoom_dto import ZoomDTO diff --git a/cm_python_openapi_sdk/models/access_info_dto.py b/cm_python_openapi_sdk/models/access_info_dto.py new file mode 100644 index 0000000..d4f84eb --- /dev/null +++ b/cm_python_openapi_sdk/models/access_info_dto.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class AccessInfoDTO(BaseModel): + """ + AccessInfoDTO + """ # noqa: E501 + created_at: Optional[StrictStr] = Field(default=None, alias="createdAt") + created_by: Optional[StrictStr] = Field(default=None, alias="createdBy") + modified_at: Optional[StrictStr] = Field(default=None, alias="modifiedAt") + modified_by: Optional[StrictStr] = Field(default=None, alias="modifiedBy") + __properties: ClassVar[List[str]] = ["createdAt", "createdBy", "modifiedAt", "modifiedBy"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AccessInfoDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AccessInfoDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "createdAt": obj.get("createdAt"), + "createdBy": obj.get("createdBy"), + "modifiedAt": obj.get("modifiedAt"), + "modifiedBy": obj.get("modifiedBy") + }) + return _obj + + diff --git a/cm_python_openapi_sdk/models/account_dto.py b/cm_python_openapi_sdk/models/account_dto.py index ae0049d..a34e6f7 100644 --- a/cm_python_openapi_sdk/models/account_dto.py +++ b/cm_python_openapi_sdk/models/account_dto.py @@ -21,7 +21,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from cm_python_openapi_sdk.models.account_job_info import AccountJobInfo from cm_python_openapi_sdk.models.account_onboarding_parameters import AccountOnboardingParameters from cm_python_openapi_sdk.models.account_preferences import AccountPreferences from typing import Optional, Set @@ -38,12 +37,10 @@ class AccountDTO(BaseModel): status: Optional[StrictStr] = None anonymous: Optional[StrictBool] = None phone_number: Optional[Annotated[str, Field(min_length=6, strict=True, max_length=20)]] = Field(default=None, alias="phoneNumber") - require_additional_attributes: Optional[StrictBool] = Field(default=None, alias="requireAdditionalAttributes") preferences: Optional[AccountPreferences] = None onboarding: Optional[AccountOnboardingParameters] = None - job_info: Optional[AccountJobInfo] = Field(default=None, alias="jobInfo") links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") - __properties: ClassVar[List[str]] = ["id", "fullName", "email", "consentGranted", "status", "anonymous", "phoneNumber", "requireAdditionalAttributes", "preferences", "onboarding", "jobInfo", "links"] + __properties: ClassVar[List[str]] = ["id", "fullName", "email", "consentGranted", "status", "anonymous", "phoneNumber", "preferences", "onboarding", "links"] @field_validator('status') def status_validate_enum(cls, value): @@ -100,9 +97,6 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of onboarding if self.onboarding: _dict['onboarding'] = self.onboarding.to_dict() - # override the default output from pydantic by calling `to_dict()` of job_info - if self.job_info: - _dict['jobInfo'] = self.job_info.to_dict() return _dict @classmethod @@ -122,10 +116,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "status": obj.get("status"), "anonymous": obj.get("anonymous"), "phoneNumber": obj.get("phoneNumber"), - "requireAdditionalAttributes": obj.get("requireAdditionalAttributes"), "preferences": AccountPreferences.from_dict(obj["preferences"]) if obj.get("preferences") is not None else None, "onboarding": AccountOnboardingParameters.from_dict(obj["onboarding"]) if obj.get("onboarding") is not None else None, - "jobInfo": AccountJobInfo.from_dict(obj["jobInfo"]) if obj.get("jobInfo") is not None else None, "links": obj.get("links") }) return _obj diff --git a/cm_python_openapi_sdk/models/active_filter_abstract_type.py b/cm_python_openapi_sdk/models/active_filter_abstract_type.py index a7adb86..e36c2d7 100644 --- a/cm_python_openapi_sdk/models/active_filter_abstract_type.py +++ b/cm_python_openapi_sdk/models/active_filter_abstract_type.py @@ -58,6 +58,9 @@ class ActiveFilterAbstractType(BaseModel): ) + discriminator_value_class_map: Dict[str, str] = { + } + def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -128,6 +131,81 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `ActiveDateFilterDTO` + if _data_type == "date": + instance.actual_instance = ActiveDateFilterDTO.from_json(json_str) + return instance + + # check if data type is `ActiveFeatureFilterDTO` + if _data_type == "feature": + instance.actual_instance = ActiveFeatureFilterDTO.from_json(json_str) + return instance + + # check if data type is `ActiveGlobalDateFilterDTO` + if _data_type == "globalDate": + instance.actual_instance = ActiveGlobalDateFilterDTO.from_json(json_str) + return instance + + # check if data type is `ActiveHistogramFilterDTO` + if _data_type == "histogram": + instance.actual_instance = ActiveHistogramFilterDTO.from_json(json_str) + return instance + + # check if data type is `ActiveIndicatorFilterDTO` + if _data_type == "indicator": + instance.actual_instance = ActiveIndicatorFilterDTO.from_json(json_str) + return instance + + # check if data type is `ActiveMultiSelectFilterDTO` + if _data_type == "multiSelect": + instance.actual_instance = ActiveMultiSelectFilterDTO.from_json(json_str) + return instance + + # check if data type is `ActiveSingleSelectFilterDTO` + if _data_type == "singleSelect": + instance.actual_instance = ActiveSingleSelectFilterDTO.from_json(json_str) + return instance + + # check if data type is `ActiveDateFilterDTO` + if _data_type == "ActiveDateFilterDTO": + instance.actual_instance = ActiveDateFilterDTO.from_json(json_str) + return instance + + # check if data type is `ActiveFeatureFilterDTO` + if _data_type == "ActiveFeatureFilterDTO": + instance.actual_instance = ActiveFeatureFilterDTO.from_json(json_str) + return instance + + # check if data type is `ActiveGlobalDateFilterDTO` + if _data_type == "ActiveGlobalDateFilterDTO": + instance.actual_instance = ActiveGlobalDateFilterDTO.from_json(json_str) + return instance + + # check if data type is `ActiveHistogramFilterDTO` + if _data_type == "ActiveHistogramFilterDTO": + instance.actual_instance = ActiveHistogramFilterDTO.from_json(json_str) + return instance + + # check if data type is `ActiveIndicatorFilterDTO` + if _data_type == "ActiveIndicatorFilterDTO": + instance.actual_instance = ActiveIndicatorFilterDTO.from_json(json_str) + return instance + + # check if data type is `ActiveMultiSelectFilterDTO` + if _data_type == "ActiveMultiSelectFilterDTO": + instance.actual_instance = ActiveMultiSelectFilterDTO.from_json(json_str) + return instance + + # check if data type is `ActiveSingleSelectFilterDTO` + if _data_type == "ActiveSingleSelectFilterDTO": + instance.actual_instance = ActiveSingleSelectFilterDTO.from_json(json_str) + return instance + # deserialize data into ActiveDateFilterDTO try: instance.actual_instance = ActiveDateFilterDTO.from_json(json_str) diff --git a/cm_python_openapi_sdk/models/attribute_style_paged_model_dto.py b/cm_python_openapi_sdk/models/attribute_style_paged_model_dto.py index 4c651a9..fc2806a 100644 --- a/cm_python_openapi_sdk/models/attribute_style_paged_model_dto.py +++ b/cm_python_openapi_sdk/models/attribute_style_paged_model_dto.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from cm_python_openapi_sdk.models.attribute_style_dto import AttributeStyleDTO -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse +from cm_python_openapi_sdk.models.attribute_style_response_dto import AttributeStyleResponseDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO from typing import Optional, Set from typing_extensions import Self @@ -29,9 +29,9 @@ class AttributeStylePagedModelDTO(BaseModel): """ AttributeStylePagedModelDTO """ # noqa: E501 - content: Optional[List[AttributeStyleDTO]] = None + content: Optional[List[AttributeStyleResponseDTO]] = None links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") - page: Optional[MandatoryKeysForPagableResponse] = None + page: Optional[PageDTO] = None __properties: ClassVar[List[str]] = ["content", "links", "page"] model_config = ConfigDict( @@ -95,9 +95,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "content": [AttributeStyleDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, + "content": [AttributeStyleResponseDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "links": obj.get("links"), - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/attribute_style_response_dto.py b/cm_python_openapi_sdk/models/attribute_style_response_dto.py new file mode 100644 index 0000000..8295a71 --- /dev/null +++ b/cm_python_openapi_sdk/models/attribute_style_response_dto.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from cm_python_openapi_sdk.models.access_info_dto import AccessInfoDTO +from cm_python_openapi_sdk.models.attribute_style_content_dto import AttributeStyleContentDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO +from typing import Optional, Set +from typing_extensions import Self + +class AttributeStyleResponseDTO(BaseModel): + """ + AttributeStyleResponseDTO + """ # noqa: E501 + id: Optional[StrictStr] = None + name: Annotated[str, Field(strict=True)] + type: Optional[StrictStr] = None + title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = None + description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None + content: AttributeStyleContentDTO + links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") + page: Optional[PageDTO] = None + access_info: Optional[AccessInfoDTO] = Field(default=None, alias="accessInfo") + version: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "name", "type", "title", "description", "content", "links", "page", "accessInfo", "version"] + + @field_validator('name') + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z][a-z0-9_-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9_-]*$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle']): + raise ValueError("must be one of enum values ('dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AttributeStyleResponseDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of content + if self.content: + _dict['content'] = self.content.to_dict() + # override the default output from pydantic by calling `to_dict()` of page + if self.page: + _dict['page'] = self.page.to_dict() + # override the default output from pydantic by calling `to_dict()` of access_info + if self.access_info: + _dict['accessInfo'] = self.access_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AttributeStyleResponseDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "title": obj.get("title"), + "description": obj.get("description"), + "content": AttributeStyleContentDTO.from_dict(obj["content"]) if obj.get("content") is not None else None, + "links": obj.get("links"), + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None, + "accessInfo": AccessInfoDTO.from_dict(obj["accessInfo"]) if obj.get("accessInfo") is not None else None, + "version": obj.get("version") + }) + return _obj + + diff --git a/cm_python_openapi_sdk/models/block_abstract_type.py b/cm_python_openapi_sdk/models/block_abstract_type.py index 46674c5..ed45086 100644 --- a/cm_python_openapi_sdk/models/block_abstract_type.py +++ b/cm_python_openapi_sdk/models/block_abstract_type.py @@ -49,6 +49,9 @@ class BlockAbstractType(BaseModel): ) + discriminator_value_class_map: Dict[str, str] = { + } + def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -104,6 +107,51 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `CategoriesDTO` + if _data_type == "categories": + instance.actual_instance = CategoriesDTO.from_json(json_str) + return instance + + # check if data type is `DistributionDTO` + if _data_type == "distribution": + instance.actual_instance = DistributionDTO.from_json(json_str) + return instance + + # check if data type is `RankingDTO` + if _data_type == "ranking": + instance.actual_instance = RankingDTO.from_json(json_str) + return instance + + # check if data type is `TimeSeriesDTO` + if _data_type == "timeSeries": + instance.actual_instance = TimeSeriesDTO.from_json(json_str) + return instance + + # check if data type is `CategoriesDTO` + if _data_type == "CategoriesDTO": + instance.actual_instance = CategoriesDTO.from_json(json_str) + return instance + + # check if data type is `DistributionDTO` + if _data_type == "DistributionDTO": + instance.actual_instance = DistributionDTO.from_json(json_str) + return instance + + # check if data type is `RankingDTO` + if _data_type == "RankingDTO": + instance.actual_instance = RankingDTO.from_json(json_str) + return instance + + # check if data type is `TimeSeriesDTO` + if _data_type == "TimeSeriesDTO": + instance.actual_instance = TimeSeriesDTO.from_json(json_str) + return instance + # deserialize data into CategoriesDTO try: instance.actual_instance = CategoriesDTO.from_json(json_str) diff --git a/cm_python_openapi_sdk/models/block_row_abstract_type.py b/cm_python_openapi_sdk/models/block_row_abstract_type.py index c4eb833..affb978 100644 --- a/cm_python_openapi_sdk/models/block_row_abstract_type.py +++ b/cm_python_openapi_sdk/models/block_row_abstract_type.py @@ -57,6 +57,9 @@ class BlockRowAbstractType(BaseModel): ) + discriminator_value_class_map: Dict[str, str] = { + } + def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -127,6 +130,81 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `BlockRowDTO` + if _data_type == "blockRow": + instance.actual_instance = BlockRowDTO.from_json(json_str) + return instance + + # check if data type is `CategoriesDTO` + if _data_type == "categories": + instance.actual_instance = CategoriesDTO.from_json(json_str) + return instance + + # check if data type is `DistributionDTO` + if _data_type == "distribution": + instance.actual_instance = DistributionDTO.from_json(json_str) + return instance + + # check if data type is `IndicatorLinkDTO` + if _data_type == "indicator": + instance.actual_instance = IndicatorLinkDTO.from_json(json_str) + return instance + + # check if data type is `IndicatorGroupDTO` + if _data_type == "indicatorGroup": + instance.actual_instance = IndicatorGroupDTO.from_json(json_str) + return instance + + # check if data type is `RankingDTO` + if _data_type == "ranking": + instance.actual_instance = RankingDTO.from_json(json_str) + return instance + + # check if data type is `TimeSeriesDTO` + if _data_type == "timeSeries": + instance.actual_instance = TimeSeriesDTO.from_json(json_str) + return instance + + # check if data type is `BlockRowDTO` + if _data_type == "BlockRowDTO": + instance.actual_instance = BlockRowDTO.from_json(json_str) + return instance + + # check if data type is `CategoriesDTO` + if _data_type == "CategoriesDTO": + instance.actual_instance = CategoriesDTO.from_json(json_str) + return instance + + # check if data type is `DistributionDTO` + if _data_type == "DistributionDTO": + instance.actual_instance = DistributionDTO.from_json(json_str) + return instance + + # check if data type is `IndicatorGroupDTO` + if _data_type == "IndicatorGroupDTO": + instance.actual_instance = IndicatorGroupDTO.from_json(json_str) + return instance + + # check if data type is `IndicatorLinkDTO` + if _data_type == "IndicatorLinkDTO": + instance.actual_instance = IndicatorLinkDTO.from_json(json_str) + return instance + + # check if data type is `RankingDTO` + if _data_type == "RankingDTO": + instance.actual_instance = RankingDTO.from_json(json_str) + return instance + + # check if data type is `TimeSeriesDTO` + if _data_type == "TimeSeriesDTO": + instance.actual_instance = TimeSeriesDTO.from_json(json_str) + return instance + # deserialize data into BlockRowDTO try: instance.actual_instance = BlockRowDTO.from_json(json_str) diff --git a/cm_python_openapi_sdk/models/bulk_point_query_request_point_queries_inner.py b/cm_python_openapi_sdk/models/bulk_point_query_request_point_queries_inner.py index a5f6955..b4b8055 100644 --- a/cm_python_openapi_sdk/models/bulk_point_query_request_point_queries_inner.py +++ b/cm_python_openapi_sdk/models/bulk_point_query_request_point_queries_inner.py @@ -43,6 +43,9 @@ class BulkPointQueryRequestPointQueriesInner(BaseModel): ) + discriminator_value_class_map: Dict[str, str] = { + } + def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -88,6 +91,31 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `BulkPointQueryRequestPointQueriesIsochrone` + if _data_type == "isochrone": + instance.actual_instance = BulkPointQueryRequestPointQueriesIsochrone.from_json(json_str) + return instance + + # check if data type is `BulkPointQueryRequestPointQueriesNearest` + if _data_type == "nearest": + instance.actual_instance = BulkPointQueryRequestPointQueriesNearest.from_json(json_str) + return instance + + # check if data type is `BulkPointQueryRequestPointQueriesIsochrone` + if _data_type == "BulkPointQueryRequestPointQueriesIsochrone": + instance.actual_instance = BulkPointQueryRequestPointQueriesIsochrone.from_json(json_str) + return instance + + # check if data type is `BulkPointQueryRequestPointQueriesNearest` + if _data_type == "BulkPointQueryRequestPointQueriesNearest": + instance.actual_instance = BulkPointQueryRequestPointQueriesNearest.from_json(json_str) + return instance + # deserialize data into BulkPointQueryRequestPointQueriesIsochrone try: instance.actual_instance = BulkPointQueryRequestPointQueriesIsochrone.from_json(json_str) diff --git a/cm_python_openapi_sdk/models/create_membership_dto.py b/cm_python_openapi_sdk/models/create_membership_dto.py index 42c40d4..82f7741 100644 --- a/cm_python_openapi_sdk/models/create_membership_dto.py +++ b/cm_python_openapi_sdk/models/create_membership_dto.py @@ -19,7 +19,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -27,14 +27,18 @@ class CreateMembershipDTO(BaseModel): """ CreateMembershipDTO """ # noqa: E501 - account_id: StrictStr = Field(alias="accountId") - status: StrictStr + email: Optional[StrictStr] = None + account_id: Optional[StrictStr] = Field(default=None, alias="accountId") + status: Optional[StrictStr] = None role: StrictStr - __properties: ClassVar[List[str]] = ["accountId", "status", "role"] + __properties: ClassVar[List[str]] = ["email", "accountId", "status", "role"] @field_validator('status') def status_validate_enum(cls, value): """Validates the enum""" + if value is None: + return value + if value not in set(['ENABLED', 'DISABLED']): raise ValueError("must be one of enum values ('ENABLED', 'DISABLED')") return value @@ -97,6 +101,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "email": obj.get("email"), "accountId": obj.get("accountId"), "status": obj.get("status"), "role": obj.get("role") diff --git a/cm_python_openapi_sdk/models/dashboard_paged_model_dto.py b/cm_python_openapi_sdk/models/dashboard_paged_model_dto.py index 7402522..ba95bdb 100644 --- a/cm_python_openapi_sdk/models/dashboard_paged_model_dto.py +++ b/cm_python_openapi_sdk/models/dashboard_paged_model_dto.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from cm_python_openapi_sdk.models.dashboard_dto import DashboardDTO -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse +from cm_python_openapi_sdk.models.dashboard_response_dto import DashboardResponseDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO from typing import Optional, Set from typing_extensions import Self @@ -29,9 +29,9 @@ class DashboardPagedModelDTO(BaseModel): """ DashboardPagedModelDTO """ # noqa: E501 - content: Optional[List[DashboardDTO]] = None + content: Optional[List[DashboardResponseDTO]] = None links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") - page: Optional[MandatoryKeysForPagableResponse] = None + page: Optional[PageDTO] = None __properties: ClassVar[List[str]] = ["content", "links", "page"] model_config = ConfigDict( @@ -95,9 +95,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "content": [DashboardDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, + "content": [DashboardResponseDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "links": obj.get("links"), - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/dashboard_response_dto.py b/cm_python_openapi_sdk/models/dashboard_response_dto.py new file mode 100644 index 0000000..44090fd --- /dev/null +++ b/cm_python_openapi_sdk/models/dashboard_response_dto.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from cm_python_openapi_sdk.models.access_info_dto import AccessInfoDTO +from cm_python_openapi_sdk.models.dashboard_content_dto import DashboardContentDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO +from typing import Optional, Set +from typing_extensions import Self + +class DashboardResponseDTO(BaseModel): + """ + DashboardResponseDTO + """ # noqa: E501 + id: Optional[StrictStr] = None + name: Annotated[str, Field(strict=True)] + type: Optional[StrictStr] = None + title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = None + description: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=2000)]] = None + content: DashboardContentDTO + links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") + page: Optional[PageDTO] = None + access_info: Optional[AccessInfoDTO] = Field(default=None, alias="accessInfo") + version: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "name", "type", "title", "description", "content", "links", "page", "accessInfo", "version"] + + @field_validator('name') + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z][a-z0-9_-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9_-]*$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle']): + raise ValueError("must be one of enum values ('dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DashboardResponseDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of content + if self.content: + _dict['content'] = self.content.to_dict() + # override the default output from pydantic by calling `to_dict()` of page + if self.page: + _dict['page'] = self.page.to_dict() + # override the default output from pydantic by calling `to_dict()` of access_info + if self.access_info: + _dict['accessInfo'] = self.access_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DashboardResponseDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "title": obj.get("title"), + "description": obj.get("description"), + "content": DashboardContentDTO.from_dict(obj["content"]) if obj.get("content") is not None else None, + "links": obj.get("links"), + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None, + "accessInfo": AccessInfoDTO.from_dict(obj["accessInfo"]) if obj.get("accessInfo") is not None else None, + "version": obj.get("version") + }) + return _obj + + diff --git a/cm_python_openapi_sdk/models/data_permission_content_dto.py b/cm_python_openapi_sdk/models/data_permission_content_dto.py index 1d9da5f..449a218 100644 --- a/cm_python_openapi_sdk/models/data_permission_content_dto.py +++ b/cm_python_openapi_sdk/models/data_permission_content_dto.py @@ -18,8 +18,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, field_validator -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from cm_python_openapi_sdk.models.filter_by import FilterBy from typing import Optional, Set @@ -29,15 +29,19 @@ class DataPermissionContentDTO(BaseModel): """ DataPermissionContentDTO """ # noqa: E501 - account_id: Annotated[str, Field(strict=True)] = Field(alias="accountId") + email: Optional[StrictStr] = None + account_id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, alias="accountId") filters: List[FilterBy] - __properties: ClassVar[List[str]] = ["accountId", "filters"] + __properties: ClassVar[List[str]] = ["email", "accountId", "filters"] @field_validator('account_id') def account_id_validate_regular_expression(cls, value): """Validates the regular expression""" - if not re.match(r"^[a-zA-Z0-9]{20}$", value): - raise ValueError(r"must validate the regular expression /^[a-zA-Z0-9]{20}$/") + if value is None: + return value + + if not re.match(r"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$", value): + raise ValueError(r"must validate the regular expression /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/") return value model_config = ConfigDict( @@ -98,6 +102,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ + "email": obj.get("email"), "accountId": obj.get("accountId"), "filters": [FilterBy.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None }) diff --git a/cm_python_openapi_sdk/models/data_permission_paged_model_dto.py b/cm_python_openapi_sdk/models/data_permission_paged_model_dto.py index c46d3ca..53efea7 100644 --- a/cm_python_openapi_sdk/models/data_permission_paged_model_dto.py +++ b/cm_python_openapi_sdk/models/data_permission_paged_model_dto.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from cm_python_openapi_sdk.models.data_permission_dto import DataPermissionDTO -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse +from cm_python_openapi_sdk.models.data_permission_response_dto import DataPermissionResponseDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO from typing import Optional, Set from typing_extensions import Self @@ -29,9 +29,9 @@ class DataPermissionPagedModelDTO(BaseModel): """ DataPermissionPagedModelDTO """ # noqa: E501 - content: Optional[List[DataPermissionDTO]] = None + content: Optional[List[DataPermissionResponseDTO]] = None links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") - page: Optional[MandatoryKeysForPagableResponse] = None + page: Optional[PageDTO] = None __properties: ClassVar[List[str]] = ["content", "links", "page"] model_config = ConfigDict( @@ -95,9 +95,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "content": [DataPermissionDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, + "content": [DataPermissionResponseDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "links": obj.get("links"), - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/data_permission_response_dto.py b/cm_python_openapi_sdk/models/data_permission_response_dto.py new file mode 100644 index 0000000..aff79cf --- /dev/null +++ b/cm_python_openapi_sdk/models/data_permission_response_dto.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from cm_python_openapi_sdk.models.access_info_dto import AccessInfoDTO +from cm_python_openapi_sdk.models.data_permission_content_dto import DataPermissionContentDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO +from typing import Optional, Set +from typing_extensions import Self + +class DataPermissionResponseDTO(BaseModel): + """ + DataPermissionResponseDTO + """ # noqa: E501 + id: Optional[StrictStr] = None + name: Annotated[str, Field(strict=True)] + type: Optional[StrictStr] = None + title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = None + description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None + content: DataPermissionContentDTO + links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") + page: Optional[PageDTO] = None + access_info: Optional[AccessInfoDTO] = Field(default=None, alias="accessInfo") + version: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "name", "type", "title", "description", "content", "links", "page", "accessInfo", "version"] + + @field_validator('name') + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z][a-z0-9_-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9_-]*$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle']): + raise ValueError("must be one of enum values ('dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DataPermissionResponseDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of content + if self.content: + _dict['content'] = self.content.to_dict() + # override the default output from pydantic by calling `to_dict()` of page + if self.page: + _dict['page'] = self.page.to_dict() + # override the default output from pydantic by calling `to_dict()` of access_info + if self.access_info: + _dict['accessInfo'] = self.access_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DataPermissionResponseDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "title": obj.get("title"), + "description": obj.get("description"), + "content": DataPermissionContentDTO.from_dict(obj["content"]) if obj.get("content") is not None else None, + "links": obj.get("links"), + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None, + "accessInfo": AccessInfoDTO.from_dict(obj["accessInfo"]) if obj.get("accessInfo") is not None else None, + "version": obj.get("version") + }) + return _obj + + diff --git a/cm_python_openapi_sdk/models/data_source_paged_model_dto.py b/cm_python_openapi_sdk/models/data_source_paged_model_dto.py index e642072..c7772c5 100644 --- a/cm_python_openapi_sdk/models/data_source_paged_model_dto.py +++ b/cm_python_openapi_sdk/models/data_source_paged_model_dto.py @@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional from cm_python_openapi_sdk.models.data_source_dto import DataSourceDTO -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse +from cm_python_openapi_sdk.models.page_dto import PageDTO from typing import Optional, Set from typing_extensions import Self @@ -31,7 +31,7 @@ class DataSourcePagedModelDTO(BaseModel): """ # noqa: E501 content: Optional[List[DataSourceDTO]] = None links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") - page: Optional[MandatoryKeysForPagableResponse] = None + page: Optional[PageDTO] = None __properties: ClassVar[List[str]] = ["content", "links", "page"] model_config = ConfigDict( @@ -97,7 +97,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "content": [DataSourceDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "links": obj.get("links"), - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/dataset_paged_model_dto.py b/cm_python_openapi_sdk/models/dataset_paged_model_dto.py index 5b918ad..e8741f3 100644 --- a/cm_python_openapi_sdk/models/dataset_paged_model_dto.py +++ b/cm_python_openapi_sdk/models/dataset_paged_model_dto.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from cm_python_openapi_sdk.models.dataset_dto import DatasetDTO -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse +from cm_python_openapi_sdk.models.dataset_response_dto import DatasetResponseDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO from typing import Optional, Set from typing_extensions import Self @@ -29,9 +29,9 @@ class DatasetPagedModelDTO(BaseModel): """ DatasetPagedModelDTO """ # noqa: E501 - content: Optional[List[DatasetDTO]] = None + content: Optional[List[DatasetResponseDTO]] = None links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") - page: Optional[MandatoryKeysForPagableResponse] = None + page: Optional[PageDTO] = None __properties: ClassVar[List[str]] = ["content", "links", "page"] model_config = ConfigDict( @@ -95,9 +95,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "content": [DatasetDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, + "content": [DatasetResponseDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "links": obj.get("links"), - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/dataset_response_dto.py b/cm_python_openapi_sdk/models/dataset_response_dto.py new file mode 100644 index 0000000..f14b611 --- /dev/null +++ b/cm_python_openapi_sdk/models/dataset_response_dto.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from cm_python_openapi_sdk.models.access_info_dto import AccessInfoDTO +from cm_python_openapi_sdk.models.data_source_dto import DataSourceDTO +from cm_python_openapi_sdk.models.dataset_properties_dto import DatasetPropertiesDTO +from cm_python_openapi_sdk.models.dataset_type import DatasetType +from cm_python_openapi_sdk.models.page_dto import PageDTO +from typing import Optional, Set +from typing_extensions import Self + +class DatasetResponseDTO(BaseModel): + """ + DatasetResponseDTO + """ # noqa: E501 + id: Optional[StrictStr] = None + name: Annotated[str, Field(strict=True)] + type: StrictStr + title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = None + description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None + origin: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None + properties: Optional[DatasetPropertiesDTO] = None + ref: DatasetType + data_sources: Optional[List[DataSourceDTO]] = Field(default=None, alias="dataSources") + content: Optional[Dict[str, Any]] = None + links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") + page: Optional[PageDTO] = None + access_info: Optional[AccessInfoDTO] = Field(default=None, alias="accessInfo") + version: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "name", "type", "title", "description", "origin", "properties", "ref", "dataSources", "content", "links", "page", "accessInfo", "version"] + + @field_validator('name') + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z][a-z0-9_-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9_-]*$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle']): + raise ValueError("must be one of enum values ('dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DatasetResponseDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of properties + if self.properties: + _dict['properties'] = self.properties.to_dict() + # override the default output from pydantic by calling `to_dict()` of ref + if self.ref: + _dict['ref'] = self.ref.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in data_sources (list) + _items = [] + if self.data_sources: + for _item_data_sources in self.data_sources: + if _item_data_sources: + _items.append(_item_data_sources.to_dict()) + _dict['dataSources'] = _items + # override the default output from pydantic by calling `to_dict()` of page + if self.page: + _dict['page'] = self.page.to_dict() + # override the default output from pydantic by calling `to_dict()` of access_info + if self.access_info: + _dict['accessInfo'] = self.access_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DatasetResponseDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "title": obj.get("title"), + "description": obj.get("description"), + "origin": obj.get("origin"), + "properties": DatasetPropertiesDTO.from_dict(obj["properties"]) if obj.get("properties") is not None else None, + "ref": DatasetType.from_dict(obj["ref"]) if obj.get("ref") is not None else None, + "dataSources": [DataSourceDTO.from_dict(_item) for _item in obj["dataSources"]] if obj.get("dataSources") is not None else None, + "content": obj.get("content"), + "links": obj.get("links"), + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None, + "accessInfo": AccessInfoDTO.from_dict(obj["accessInfo"]) if obj.get("accessInfo") is not None else None, + "version": obj.get("version") + }) + return _obj + + diff --git a/cm_python_openapi_sdk/models/dataset_type.py b/cm_python_openapi_sdk/models/dataset_type.py index 0919913..d1722f6 100644 --- a/cm_python_openapi_sdk/models/dataset_type.py +++ b/cm_python_openapi_sdk/models/dataset_type.py @@ -46,6 +46,9 @@ class DatasetType(BaseModel): ) + discriminator_value_class_map: Dict[str, str] = { + } + def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -96,6 +99,41 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `DatasetDwhTypeDTO` + if _data_type == "dwh": + instance.actual_instance = DatasetDwhTypeDTO.from_json(json_str) + return instance + + # check if data type is `DatasetH3GridTypeDTO` + if _data_type == "h3Grid": + instance.actual_instance = DatasetH3GridTypeDTO.from_json(json_str) + return instance + + # check if data type is `DatasetVtTypeDTO` + if _data_type == "vt": + instance.actual_instance = DatasetVtTypeDTO.from_json(json_str) + return instance + + # check if data type is `DatasetDwhTypeDTO` + if _data_type == "DatasetDwhTypeDTO": + instance.actual_instance = DatasetDwhTypeDTO.from_json(json_str) + return instance + + # check if data type is `DatasetH3GridTypeDTO` + if _data_type == "DatasetH3GridTypeDTO": + instance.actual_instance = DatasetH3GridTypeDTO.from_json(json_str) + return instance + + # check if data type is `DatasetVtTypeDTO` + if _data_type == "DatasetVtTypeDTO": + instance.actual_instance = DatasetVtTypeDTO.from_json(json_str) + return instance + # deserialize data into DatasetDwhTypeDTO try: instance.actual_instance = DatasetDwhTypeDTO.from_json(json_str) diff --git a/cm_python_openapi_sdk/models/date_range_function_function.py b/cm_python_openapi_sdk/models/date_range_function_function.py index afa6040..5364846 100644 --- a/cm_python_openapi_sdk/models/date_range_function_function.py +++ b/cm_python_openapi_sdk/models/date_range_function_function.py @@ -52,6 +52,9 @@ class DateRangeFunctionFunction(BaseModel): ) + discriminator_value_class_map: Dict[str, str] = { + } + def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -112,6 +115,126 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_avg": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_count": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_count_dist": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionDateTrunc` + if _data_type == "function_date_trunc": + instance.actual_instance = FunctionDateTrunc.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_divide": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionInterval` + if _data_type == "function_interval": + instance.actual_instance = FunctionInterval.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_max": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_min": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_minus": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_modulo": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_multiply": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_plus": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_stddev_pop": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_stddev_samp": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_sum": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionToday` + if _data_type == "function_today": + instance.actual_instance = FunctionToday.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_var_pop": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_var_samp": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "FunctionAggTypeGeneral": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "FunctionArithmTypeGeneral": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionDateTrunc` + if _data_type == "FunctionDateTrunc": + instance.actual_instance = FunctionDateTrunc.from_json(json_str) + return instance + + # check if data type is `FunctionInterval` + if _data_type == "FunctionInterval": + instance.actual_instance = FunctionInterval.from_json(json_str) + return instance + + # check if data type is `FunctionToday` + if _data_type == "FunctionToday": + instance.actual_instance = FunctionToday.from_json(json_str) + return instance + # deserialize data into FunctionAggTypeGeneral try: instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) diff --git a/cm_python_openapi_sdk/models/default_values_histogram_dto.py b/cm_python_openapi_sdk/models/default_values_histogram_dto.py index c75faa2..5b18399 100644 --- a/cm_python_openapi_sdk/models/default_values_histogram_dto.py +++ b/cm_python_openapi_sdk/models/default_values_histogram_dto.py @@ -18,8 +18,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union from typing_extensions import Annotated from typing import Optional, Set from typing_extensions import Self @@ -28,7 +28,7 @@ class DefaultValuesHistogramDTO(BaseModel): """ DefaultValuesHistogramDTO """ # noqa: E501 - values: Optional[Annotated[List[Any], Field(min_length=2, max_length=2)]] = None + values: Optional[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=2)]] = None null_filtered: Optional[StrictBool] = Field(default=None, alias="nullFiltered") __properties: ClassVar[List[str]] = ["values", "nullFiltered"] diff --git a/cm_python_openapi_sdk/models/default_values_indicator_dto.py b/cm_python_openapi_sdk/models/default_values_indicator_dto.py index bed4813..e48a16e 100644 --- a/cm_python_openapi_sdk/models/default_values_indicator_dto.py +++ b/cm_python_openapi_sdk/models/default_values_indicator_dto.py @@ -28,7 +28,7 @@ class DefaultValuesIndicatorDTO(BaseModel): """ DefaultValuesIndicatorDTO """ # noqa: E501 - values: Optional[Annotated[List[Any], Field(min_length=2, max_length=2)]] = None + values: Optional[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=2)]] = None breaks: Optional[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=1)]] = None display_intervals: Optional[List[StrictInt]] = Field(default=None, alias="displayIntervals") granularity: Optional[Annotated[str, Field(strict=True)]] = None diff --git a/cm_python_openapi_sdk/models/dwh_query_function_types.py b/cm_python_openapi_sdk/models/dwh_query_function_types.py index a01820f..f5637a2 100644 --- a/cm_python_openapi_sdk/models/dwh_query_function_types.py +++ b/cm_python_openapi_sdk/models/dwh_query_function_types.py @@ -21,6 +21,7 @@ from cm_python_openapi_sdk.models.dwh_query_metric_type import DwhQueryMetricType from cm_python_openapi_sdk.models.dwh_query_number_type import DwhQueryNumberType from cm_python_openapi_sdk.models.dwh_query_property_type import DwhQueryPropertyType +from cm_python_openapi_sdk.models.dwh_query_variable_type import DwhQueryVariableType from cm_python_openapi_sdk.models.function_agg_type_general import FunctionAggTypeGeneral from cm_python_openapi_sdk.models.function_arithm_type_general import FunctionArithmTypeGeneral from cm_python_openapi_sdk.models.function_condition_type_general import FunctionConditionTypeGeneral @@ -35,12 +36,11 @@ from cm_python_openapi_sdk.models.function_round_type_general import FunctionRoundTypeGeneral from cm_python_openapi_sdk.models.function_row_number import FunctionRowNumber from cm_python_openapi_sdk.models.function_today import FunctionToday -from cm_python_openapi_sdk.models.variable_type import VariableType from pydantic import StrictStr, Field from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -DWHQUERYFUNCTIONTYPES_ONE_OF_SCHEMAS = ["DwhQueryMetricType", "DwhQueryNumberType", "DwhQueryPropertyType", "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionConditionTypeGeneral", "FunctionDateTrunc", "FunctionDistance", "FunctionH3Grid", "FunctionInterval", "FunctionNtile", "FunctionPercentToTotalTypeGeneral", "FunctionPercentile", "FunctionRank", "FunctionRoundTypeGeneral", "FunctionRowNumber", "FunctionToday", "VariableType"] +DWHQUERYFUNCTIONTYPES_ONE_OF_SCHEMAS = ["DwhQueryMetricType", "DwhQueryNumberType", "DwhQueryPropertyType", "DwhQueryVariableType", "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionConditionTypeGeneral", "FunctionDateTrunc", "FunctionDistance", "FunctionH3Grid", "FunctionInterval", "FunctionNtile", "FunctionPercentToTotalTypeGeneral", "FunctionPercentile", "FunctionRank", "FunctionRoundTypeGeneral", "FunctionRowNumber", "FunctionToday"] class DwhQueryFunctionTypes(BaseModel): """ @@ -48,8 +48,8 @@ class DwhQueryFunctionTypes(BaseModel): """ # data type: DwhQueryNumberType oneof_schema_1_validator: Optional[DwhQueryNumberType] = None - # data type: VariableType - oneof_schema_2_validator: Optional[VariableType] = None + # data type: DwhQueryVariableType + oneof_schema_2_validator: Optional[DwhQueryVariableType] = None # data type: DwhQueryPropertyType oneof_schema_3_validator: Optional[DwhQueryPropertyType] = None # data type: DwhQueryMetricType @@ -82,8 +82,8 @@ class DwhQueryFunctionTypes(BaseModel): oneof_schema_17_validator: Optional[FunctionH3Grid] = None # data type: FunctionDistance oneof_schema_18_validator: Optional[FunctionDistance] = None - actual_instance: Optional[Union[DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday, VariableType]] = None - one_of_schemas: Set[str] = { "DwhQueryMetricType", "DwhQueryNumberType", "DwhQueryPropertyType", "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionConditionTypeGeneral", "FunctionDateTrunc", "FunctionDistance", "FunctionH3Grid", "FunctionInterval", "FunctionNtile", "FunctionPercentToTotalTypeGeneral", "FunctionPercentile", "FunctionRank", "FunctionRoundTypeGeneral", "FunctionRowNumber", "FunctionToday", "VariableType" } + actual_instance: Optional[Union[DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday]] = None + one_of_schemas: Set[str] = { "DwhQueryMetricType", "DwhQueryNumberType", "DwhQueryPropertyType", "DwhQueryVariableType", "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionConditionTypeGeneral", "FunctionDateTrunc", "FunctionDistance", "FunctionH3Grid", "FunctionInterval", "FunctionNtile", "FunctionPercentToTotalTypeGeneral", "FunctionPercentile", "FunctionRank", "FunctionRoundTypeGeneral", "FunctionRowNumber", "FunctionToday" } model_config = ConfigDict( validate_assignment=True, @@ -111,9 +111,9 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(f"Error! Input type `{type(v)}` is not `DwhQueryNumberType`") else: match += 1 - # validate data type: VariableType - if not isinstance(v, VariableType): - error_messages.append(f"Error! Input type `{type(v)}` is not `VariableType`") + # validate data type: DwhQueryVariableType + if not isinstance(v, DwhQueryVariableType): + error_messages.append(f"Error! Input type `{type(v)}` is not `DwhQueryVariableType`") else: match += 1 # validate data type: DwhQueryPropertyType @@ -198,10 +198,10 @@ def actual_instance_must_validate_oneof(cls, v): match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in DwhQueryFunctionTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday, VariableType. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in DwhQueryFunctionTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in DwhQueryFunctionTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday, VariableType. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in DwhQueryFunctionTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) else: return v @@ -222,9 +222,9 @@ def from_json(cls, json_str: str) -> Self: match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into VariableType + # deserialize data into DwhQueryVariableType try: - instance.actual_instance = VariableType.from_json(json_str) + instance.actual_instance = DwhQueryVariableType.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) @@ -327,10 +327,10 @@ def from_json(cls, json_str: str) -> Self: if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into DwhQueryFunctionTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday, VariableType. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into DwhQueryFunctionTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into DwhQueryFunctionTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday, VariableType. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into DwhQueryFunctionTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) else: return instance @@ -344,7 +344,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday, VariableType]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/cm_python_openapi_sdk/models/dwh_query_property_types.py b/cm_python_openapi_sdk/models/dwh_query_property_types.py index a558eec..fb275cd 100644 --- a/cm_python_openapi_sdk/models/dwh_query_property_types.py +++ b/cm_python_openapi_sdk/models/dwh_query_property_types.py @@ -21,13 +21,21 @@ from cm_python_openapi_sdk.models.dwh_query_metric_type import DwhQueryMetricType from cm_python_openapi_sdk.models.dwh_query_number_type import DwhQueryNumberType from cm_python_openapi_sdk.models.dwh_query_property_type import DwhQueryPropertyType +from cm_python_openapi_sdk.models.dwh_query_variable_type import DwhQueryVariableType from cm_python_openapi_sdk.models.function_arithm_type_general import FunctionArithmTypeGeneral -from cm_python_openapi_sdk.models.variable_type import VariableType +from cm_python_openapi_sdk.models.function_condition_type_general import FunctionConditionTypeGeneral +from cm_python_openapi_sdk.models.function_date_trunc import FunctionDateTrunc +from cm_python_openapi_sdk.models.function_distance import FunctionDistance +from cm_python_openapi_sdk.models.function_h3_grid import FunctionH3Grid +from cm_python_openapi_sdk.models.function_interval import FunctionInterval +from cm_python_openapi_sdk.models.function_percent_to_total_type_general import FunctionPercentToTotalTypeGeneral +from cm_python_openapi_sdk.models.function_round_type_general import FunctionRoundTypeGeneral +from cm_python_openapi_sdk.models.function_today import FunctionToday from pydantic import StrictStr, Field from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -DWHQUERYPROPERTYTYPES_ONE_OF_SCHEMAS = ["DwhQueryMetricType", "DwhQueryNumberType", "DwhQueryPropertyType", "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "VariableType"] +DWHQUERYPROPERTYTYPES_ONE_OF_SCHEMAS = ["DwhQueryMetricType", "DwhQueryNumberType", "DwhQueryPropertyType", "DwhQueryVariableType", "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionConditionTypeGeneral", "FunctionDateTrunc", "FunctionDistance", "FunctionH3Grid", "FunctionInterval", "FunctionNtile", "FunctionPercentToTotalTypeGeneral", "FunctionPercentile", "FunctionRank", "FunctionRoundTypeGeneral", "FunctionRowNumber", "FunctionToday"] class DwhQueryPropertyTypes(BaseModel): """ @@ -35,8 +43,8 @@ class DwhQueryPropertyTypes(BaseModel): """ # data type: DwhQueryNumberType oneof_schema_1_validator: Optional[DwhQueryNumberType] = None - # data type: VariableType - oneof_schema_2_validator: Optional[VariableType] = None + # data type: DwhQueryVariableType + oneof_schema_2_validator: Optional[DwhQueryVariableType] = None # data type: DwhQueryPropertyType oneof_schema_3_validator: Optional[DwhQueryPropertyType] = None # data type: DwhQueryMetricType @@ -45,8 +53,32 @@ class DwhQueryPropertyTypes(BaseModel): oneof_schema_5_validator: Optional[FunctionAggTypeGeneral] = None # data type: FunctionArithmTypeGeneral oneof_schema_6_validator: Optional[FunctionArithmTypeGeneral] = None - actual_instance: Optional[Union[DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, VariableType]] = None - one_of_schemas: Set[str] = { "DwhQueryMetricType", "DwhQueryNumberType", "DwhQueryPropertyType", "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "VariableType" } + # data type: FunctionConditionTypeGeneral + oneof_schema_7_validator: Optional[FunctionConditionTypeGeneral] = None + # data type: FunctionDateTrunc + oneof_schema_8_validator: Optional[FunctionDateTrunc] = None + # data type: FunctionDistance + oneof_schema_9_validator: Optional[FunctionDistance] = None + # data type: FunctionH3Grid + oneof_schema_10_validator: Optional[FunctionH3Grid] = None + # data type: FunctionInterval + oneof_schema_11_validator: Optional[FunctionInterval] = None + # data type: FunctionNtile + oneof_schema_12_validator: Optional[FunctionNtile] = None + # data type: FunctionPercentToTotalTypeGeneral + oneof_schema_13_validator: Optional[FunctionPercentToTotalTypeGeneral] = None + # data type: FunctionPercentile + oneof_schema_14_validator: Optional[FunctionPercentile] = None + # data type: FunctionRank + oneof_schema_15_validator: Optional[FunctionRank] = None + # data type: FunctionRoundTypeGeneral + oneof_schema_16_validator: Optional[FunctionRoundTypeGeneral] = None + # data type: FunctionRowNumber + oneof_schema_17_validator: Optional[FunctionRowNumber] = None + # data type: FunctionToday + oneof_schema_18_validator: Optional[FunctionToday] = None + actual_instance: Optional[Union[DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday]] = None + one_of_schemas: Set[str] = { "DwhQueryMetricType", "DwhQueryNumberType", "DwhQueryPropertyType", "DwhQueryVariableType", "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionConditionTypeGeneral", "FunctionDateTrunc", "FunctionDistance", "FunctionH3Grid", "FunctionInterval", "FunctionNtile", "FunctionPercentToTotalTypeGeneral", "FunctionPercentile", "FunctionRank", "FunctionRoundTypeGeneral", "FunctionRowNumber", "FunctionToday" } model_config = ConfigDict( validate_assignment=True, @@ -74,9 +106,9 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(f"Error! Input type `{type(v)}` is not `DwhQueryNumberType`") else: match += 1 - # validate data type: VariableType - if not isinstance(v, VariableType): - error_messages.append(f"Error! Input type `{type(v)}` is not `VariableType`") + # validate data type: DwhQueryVariableType + if not isinstance(v, DwhQueryVariableType): + error_messages.append(f"Error! Input type `{type(v)}` is not `DwhQueryVariableType`") else: match += 1 # validate data type: DwhQueryPropertyType @@ -99,12 +131,72 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionArithmTypeGeneral`") else: match += 1 + # validate data type: FunctionConditionTypeGeneral + if not isinstance(v, FunctionConditionTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionConditionTypeGeneral`") + else: + match += 1 + # validate data type: FunctionDateTrunc + if not isinstance(v, FunctionDateTrunc): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionDateTrunc`") + else: + match += 1 + # validate data type: FunctionDistance + if not isinstance(v, FunctionDistance): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionDistance`") + else: + match += 1 + # validate data type: FunctionH3Grid + if not isinstance(v, FunctionH3Grid): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionH3Grid`") + else: + match += 1 + # validate data type: FunctionInterval + if not isinstance(v, FunctionInterval): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionInterval`") + else: + match += 1 + # validate data type: FunctionNtile + if not isinstance(v, FunctionNtile): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionNtile`") + else: + match += 1 + # validate data type: FunctionPercentToTotalTypeGeneral + if not isinstance(v, FunctionPercentToTotalTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionPercentToTotalTypeGeneral`") + else: + match += 1 + # validate data type: FunctionPercentile + if not isinstance(v, FunctionPercentile): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionPercentile`") + else: + match += 1 + # validate data type: FunctionRank + if not isinstance(v, FunctionRank): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionRank`") + else: + match += 1 + # validate data type: FunctionRoundTypeGeneral + if not isinstance(v, FunctionRoundTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionRoundTypeGeneral`") + else: + match += 1 + # validate data type: FunctionRowNumber + if not isinstance(v, FunctionRowNumber): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionRowNumber`") + else: + match += 1 + # validate data type: FunctionToday + if not isinstance(v, FunctionToday): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionToday`") + else: + match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in DwhQueryPropertyTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, VariableType. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in DwhQueryPropertyTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in DwhQueryPropertyTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, VariableType. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in DwhQueryPropertyTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) else: return v @@ -125,9 +217,9 @@ def from_json(cls, json_str: str) -> Self: match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into VariableType + # deserialize data into DwhQueryVariableType try: - instance.actual_instance = VariableType.from_json(json_str) + instance.actual_instance = DwhQueryVariableType.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) @@ -155,13 +247,85 @@ def from_json(cls, json_str: str) -> Self: match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) + # deserialize data into FunctionConditionTypeGeneral + try: + instance.actual_instance = FunctionConditionTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionDateTrunc + try: + instance.actual_instance = FunctionDateTrunc.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionDistance + try: + instance.actual_instance = FunctionDistance.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionH3Grid + try: + instance.actual_instance = FunctionH3Grid.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionInterval + try: + instance.actual_instance = FunctionInterval.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionNtile + try: + instance.actual_instance = FunctionNtile.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionPercentToTotalTypeGeneral + try: + instance.actual_instance = FunctionPercentToTotalTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionPercentile + try: + instance.actual_instance = FunctionPercentile.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionRank + try: + instance.actual_instance = FunctionRank.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionRoundTypeGeneral + try: + instance.actual_instance = FunctionRoundTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionRowNumber + try: + instance.actual_instance = FunctionRowNumber.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionToday + try: + instance.actual_instance = FunctionToday.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into DwhQueryPropertyTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, VariableType. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into DwhQueryPropertyTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into DwhQueryPropertyTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, VariableType. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into DwhQueryPropertyTypes with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday. Details: " + ", ".join(error_messages)) else: return instance @@ -175,7 +339,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, VariableType]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionConditionTypeGeneral, FunctionDateTrunc, FunctionDistance, FunctionH3Grid, FunctionInterval, FunctionNtile, FunctionPercentToTotalTypeGeneral, FunctionPercentile, FunctionRank, FunctionRoundTypeGeneral, FunctionRowNumber, FunctionToday]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None @@ -191,6 +355,10 @@ def to_str(self) -> str: return pprint.pformat(self.model_dump()) from cm_python_openapi_sdk.models.function_agg_type_general import FunctionAggTypeGeneral +from cm_python_openapi_sdk.models.function_ntile import FunctionNtile +from cm_python_openapi_sdk.models.function_percentile import FunctionPercentile +from cm_python_openapi_sdk.models.function_rank import FunctionRank +from cm_python_openapi_sdk.models.function_row_number import FunctionRowNumber # TODO: Rewrite to not use raise_errors DwhQueryPropertyTypes.model_rebuild(raise_errors=False) diff --git a/cm_python_openapi_sdk/models/dwh_query_property_types_filter_comp.py b/cm_python_openapi_sdk/models/dwh_query_property_types_filter_comp.py new file mode 100644 index 0000000..b65e73d --- /dev/null +++ b/cm_python_openapi_sdk/models/dwh_query_property_types_filter_comp.py @@ -0,0 +1,327 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from cm_python_openapi_sdk.models.dwh_query_metric_type import DwhQueryMetricType +from cm_python_openapi_sdk.models.dwh_query_number_type import DwhQueryNumberType +from cm_python_openapi_sdk.models.dwh_query_property_type import DwhQueryPropertyType +from cm_python_openapi_sdk.models.dwh_query_variable_type import DwhQueryVariableType +from cm_python_openapi_sdk.models.function_agg_type_general import FunctionAggTypeGeneral +from cm_python_openapi_sdk.models.function_arithm_type_general import FunctionArithmTypeGeneral +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +DWHQUERYPROPERTYTYPESFILTERCOMP_ONE_OF_SCHEMAS = ["DwhQueryMetricType", "DwhQueryNumberType", "DwhQueryPropertyType", "DwhQueryVariableType", "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral"] + +class DwhQueryPropertyTypesFilterComp(BaseModel): + """ + DwhQueryPropertyTypesFilterComp + """ + # data type: DwhQueryNumberType + oneof_schema_1_validator: Optional[DwhQueryNumberType] = None + # data type: DwhQueryVariableType + oneof_schema_2_validator: Optional[DwhQueryVariableType] = None + # data type: DwhQueryPropertyType + oneof_schema_3_validator: Optional[DwhQueryPropertyType] = None + # data type: DwhQueryMetricType + oneof_schema_4_validator: Optional[DwhQueryMetricType] = None + # data type: FunctionAggTypeGeneral + oneof_schema_5_validator: Optional[FunctionAggTypeGeneral] = None + # data type: FunctionArithmTypeGeneral + oneof_schema_6_validator: Optional[FunctionArithmTypeGeneral] = None + actual_instance: Optional[Union[DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral]] = None + one_of_schemas: Set[str] = { "DwhQueryMetricType", "DwhQueryNumberType", "DwhQueryPropertyType", "DwhQueryVariableType", "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = DwhQueryPropertyTypesFilterComp.model_construct() + error_messages = [] + match = 0 + # validate data type: DwhQueryNumberType + if not isinstance(v, DwhQueryNumberType): + error_messages.append(f"Error! Input type `{type(v)}` is not `DwhQueryNumberType`") + else: + match += 1 + # validate data type: DwhQueryVariableType + if not isinstance(v, DwhQueryVariableType): + error_messages.append(f"Error! Input type `{type(v)}` is not `DwhQueryVariableType`") + else: + match += 1 + # validate data type: DwhQueryPropertyType + if not isinstance(v, DwhQueryPropertyType): + error_messages.append(f"Error! Input type `{type(v)}` is not `DwhQueryPropertyType`") + else: + match += 1 + # validate data type: DwhQueryMetricType + if not isinstance(v, DwhQueryMetricType): + error_messages.append(f"Error! Input type `{type(v)}` is not `DwhQueryMetricType`") + else: + match += 1 + # validate data type: FunctionAggTypeGeneral + if not isinstance(v, FunctionAggTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionAggTypeGeneral`") + else: + match += 1 + # validate data type: FunctionArithmTypeGeneral + if not isinstance(v, FunctionArithmTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionArithmTypeGeneral`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in DwhQueryPropertyTypesFilterComp with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in DwhQueryPropertyTypesFilterComp with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_avg": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_count": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_count_dist": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_divide": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_max": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_min": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_minus": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_modulo": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_multiply": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_plus": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_stddev_pop": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_stddev_samp": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_sum": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_var_pop": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_var_samp": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `DwhQueryMetricType` + if _data_type == "metric": + instance.actual_instance = DwhQueryMetricType.from_json(json_str) + return instance + + # check if data type is `DwhQueryNumberType` + if _data_type == "number": + instance.actual_instance = DwhQueryNumberType.from_json(json_str) + return instance + + # check if data type is `DwhQueryPropertyType` + if _data_type == "property": + instance.actual_instance = DwhQueryPropertyType.from_json(json_str) + return instance + + # check if data type is `DwhQueryVariableType` + if _data_type == "variable": + instance.actual_instance = DwhQueryVariableType.from_json(json_str) + return instance + + # check if data type is `DwhQueryMetricType` + if _data_type == "DwhQueryMetricType": + instance.actual_instance = DwhQueryMetricType.from_json(json_str) + return instance + + # check if data type is `DwhQueryNumberType` + if _data_type == "DwhQueryNumberType": + instance.actual_instance = DwhQueryNumberType.from_json(json_str) + return instance + + # check if data type is `DwhQueryPropertyType` + if _data_type == "DwhQueryPropertyType": + instance.actual_instance = DwhQueryPropertyType.from_json(json_str) + return instance + + # check if data type is `DwhQueryVariableType` + if _data_type == "DwhQueryVariableType": + instance.actual_instance = DwhQueryVariableType.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "FunctionAggTypeGeneral": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "FunctionArithmTypeGeneral": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # deserialize data into DwhQueryNumberType + try: + instance.actual_instance = DwhQueryNumberType.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DwhQueryVariableType + try: + instance.actual_instance = DwhQueryVariableType.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DwhQueryPropertyType + try: + instance.actual_instance = DwhQueryPropertyType.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DwhQueryMetricType + try: + instance.actual_instance = DwhQueryMetricType.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionAggTypeGeneral + try: + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionArithmTypeGeneral + try: + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into DwhQueryPropertyTypesFilterComp with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into DwhQueryPropertyTypesFilterComp with oneOf schemas: DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], DwhQueryMetricType, DwhQueryNumberType, DwhQueryPropertyType, DwhQueryVariableType, FunctionAggTypeGeneral, FunctionArithmTypeGeneral]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/cm_python_openapi_sdk/models/dwh_query_property_types_function_ntile.py b/cm_python_openapi_sdk/models/dwh_query_property_types_function_ntile.py new file mode 100644 index 0000000..3b43c97 --- /dev/null +++ b/cm_python_openapi_sdk/models/dwh_query_property_types_function_ntile.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from cm_python_openapi_sdk.models.function_arithm_type_general import FunctionArithmTypeGeneral +from cm_python_openapi_sdk.models.function_round_type_general import FunctionRoundTypeGeneral +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +DWHQUERYPROPERTYTYPESFUNCTIONNTILE_ONE_OF_SCHEMAS = ["FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionRoundTypeGeneral"] + +class DwhQueryPropertyTypesFunctionNtile(BaseModel): + """ + DwhQueryPropertyTypesFunctionNtile + """ + # data type: FunctionAggTypeGeneral + oneof_schema_1_validator: Optional[FunctionAggTypeGeneral] = None + # data type: FunctionArithmTypeGeneral + oneof_schema_2_validator: Optional[FunctionArithmTypeGeneral] = None + # data type: FunctionRoundTypeGeneral + oneof_schema_3_validator: Optional[FunctionRoundTypeGeneral] = None + actual_instance: Optional[Union[FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral]] = None + one_of_schemas: Set[str] = { "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionRoundTypeGeneral" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = DwhQueryPropertyTypesFunctionNtile.model_construct() + error_messages = [] + match = 0 + # validate data type: FunctionAggTypeGeneral + if not isinstance(v, FunctionAggTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionAggTypeGeneral`") + else: + match += 1 + # validate data type: FunctionArithmTypeGeneral + if not isinstance(v, FunctionArithmTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionArithmTypeGeneral`") + else: + match += 1 + # validate data type: FunctionRoundTypeGeneral + if not isinstance(v, FunctionRoundTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionRoundTypeGeneral`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in DwhQueryPropertyTypesFunctionNtile with oneOf schemas: FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in DwhQueryPropertyTypesFunctionNtile with oneOf schemas: FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_avg": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_count": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_count_dist": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_divide": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_max": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_min": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_minus": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_modulo": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_multiply": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_plus": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionRoundTypeGeneral` + if _data_type == "function_round": + instance.actual_instance = FunctionRoundTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_stddev_pop": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_stddev_samp": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_sum": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_var_pop": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_var_samp": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "FunctionAggTypeGeneral": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "FunctionArithmTypeGeneral": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionRoundTypeGeneral` + if _data_type == "FunctionRoundTypeGeneral": + instance.actual_instance = FunctionRoundTypeGeneral.from_json(json_str) + return instance + + # deserialize data into FunctionAggTypeGeneral + try: + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionArithmTypeGeneral + try: + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionRoundTypeGeneral + try: + instance.actual_instance = FunctionRoundTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into DwhQueryPropertyTypesFunctionNtile with oneOf schemas: FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into DwhQueryPropertyTypesFunctionNtile with oneOf schemas: FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + +from cm_python_openapi_sdk.models.function_agg_type_general import FunctionAggTypeGeneral +# TODO: Rewrite to not use raise_errors +DwhQueryPropertyTypesFunctionNtile.model_rebuild(raise_errors=False) + diff --git a/cm_python_openapi_sdk/models/dwh_query_property_types_function_percentile.py b/cm_python_openapi_sdk/models/dwh_query_property_types_function_percentile.py new file mode 100644 index 0000000..6318665 --- /dev/null +++ b/cm_python_openapi_sdk/models/dwh_query_property_types_function_percentile.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from cm_python_openapi_sdk.models.function_arithm_type_general import FunctionArithmTypeGeneral +from cm_python_openapi_sdk.models.function_round_type_general import FunctionRoundTypeGeneral +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +DWHQUERYPROPERTYTYPESFUNCTIONPERCENTILE_ONE_OF_SCHEMAS = ["FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionRoundTypeGeneral"] + +class DwhQueryPropertyTypesFunctionPercentile(BaseModel): + """ + DwhQueryPropertyTypesFunctionPercentile + """ + # data type: FunctionAggTypeGeneral + oneof_schema_1_validator: Optional[FunctionAggTypeGeneral] = None + # data type: FunctionArithmTypeGeneral + oneof_schema_2_validator: Optional[FunctionArithmTypeGeneral] = None + # data type: FunctionRoundTypeGeneral + oneof_schema_3_validator: Optional[FunctionRoundTypeGeneral] = None + actual_instance: Optional[Union[FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral]] = None + one_of_schemas: Set[str] = { "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionRoundTypeGeneral" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = DwhQueryPropertyTypesFunctionPercentile.model_construct() + error_messages = [] + match = 0 + # validate data type: FunctionAggTypeGeneral + if not isinstance(v, FunctionAggTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionAggTypeGeneral`") + else: + match += 1 + # validate data type: FunctionArithmTypeGeneral + if not isinstance(v, FunctionArithmTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionArithmTypeGeneral`") + else: + match += 1 + # validate data type: FunctionRoundTypeGeneral + if not isinstance(v, FunctionRoundTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionRoundTypeGeneral`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in DwhQueryPropertyTypesFunctionPercentile with oneOf schemas: FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in DwhQueryPropertyTypesFunctionPercentile with oneOf schemas: FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_avg": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_count": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_count_dist": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_divide": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_max": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_min": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_minus": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_modulo": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_multiply": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_plus": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionRoundTypeGeneral` + if _data_type == "function_round": + instance.actual_instance = FunctionRoundTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_stddev_pop": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_stddev_samp": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_sum": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_var_pop": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_var_samp": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "FunctionAggTypeGeneral": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "FunctionArithmTypeGeneral": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionRoundTypeGeneral` + if _data_type == "FunctionRoundTypeGeneral": + instance.actual_instance = FunctionRoundTypeGeneral.from_json(json_str) + return instance + + # deserialize data into FunctionAggTypeGeneral + try: + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionArithmTypeGeneral + try: + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionRoundTypeGeneral + try: + instance.actual_instance = FunctionRoundTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into DwhQueryPropertyTypesFunctionPercentile with oneOf schemas: FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into DwhQueryPropertyTypesFunctionPercentile with oneOf schemas: FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + +from cm_python_openapi_sdk.models.function_agg_type_general import FunctionAggTypeGeneral +# TODO: Rewrite to not use raise_errors +DwhQueryPropertyTypesFunctionPercentile.model_rebuild(raise_errors=False) + diff --git a/cm_python_openapi_sdk/models/dwh_query_property_types_function_rank.py b/cm_python_openapi_sdk/models/dwh_query_property_types_function_rank.py new file mode 100644 index 0000000..99d1680 --- /dev/null +++ b/cm_python_openapi_sdk/models/dwh_query_property_types_function_rank.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from cm_python_openapi_sdk.models.function_arithm_type_general import FunctionArithmTypeGeneral +from cm_python_openapi_sdk.models.function_round_type_general import FunctionRoundTypeGeneral +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +DWHQUERYPROPERTYTYPESFUNCTIONRANK_ONE_OF_SCHEMAS = ["FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionRoundTypeGeneral"] + +class DwhQueryPropertyTypesFunctionRank(BaseModel): + """ + DwhQueryPropertyTypesFunctionRank + """ + # data type: FunctionAggTypeGeneral + oneof_schema_1_validator: Optional[FunctionAggTypeGeneral] = None + # data type: FunctionArithmTypeGeneral + oneof_schema_2_validator: Optional[FunctionArithmTypeGeneral] = None + # data type: FunctionRoundTypeGeneral + oneof_schema_3_validator: Optional[FunctionRoundTypeGeneral] = None + actual_instance: Optional[Union[FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral]] = None + one_of_schemas: Set[str] = { "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionRoundTypeGeneral" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = DwhQueryPropertyTypesFunctionRank.model_construct() + error_messages = [] + match = 0 + # validate data type: FunctionAggTypeGeneral + if not isinstance(v, FunctionAggTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionAggTypeGeneral`") + else: + match += 1 + # validate data type: FunctionArithmTypeGeneral + if not isinstance(v, FunctionArithmTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionArithmTypeGeneral`") + else: + match += 1 + # validate data type: FunctionRoundTypeGeneral + if not isinstance(v, FunctionRoundTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionRoundTypeGeneral`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in DwhQueryPropertyTypesFunctionRank with oneOf schemas: FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in DwhQueryPropertyTypesFunctionRank with oneOf schemas: FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_avg": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_count": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_count_dist": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_divide": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_max": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_min": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_minus": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_modulo": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_multiply": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_plus": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionRoundTypeGeneral` + if _data_type == "function_round": + instance.actual_instance = FunctionRoundTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_stddev_pop": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_stddev_samp": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_sum": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_var_pop": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_var_samp": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "FunctionAggTypeGeneral": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "FunctionArithmTypeGeneral": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionRoundTypeGeneral` + if _data_type == "FunctionRoundTypeGeneral": + instance.actual_instance = FunctionRoundTypeGeneral.from_json(json_str) + return instance + + # deserialize data into FunctionAggTypeGeneral + try: + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionArithmTypeGeneral + try: + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionRoundTypeGeneral + try: + instance.actual_instance = FunctionRoundTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into DwhQueryPropertyTypesFunctionRank with oneOf schemas: FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into DwhQueryPropertyTypesFunctionRank with oneOf schemas: FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + +from cm_python_openapi_sdk.models.function_agg_type_general import FunctionAggTypeGeneral +# TODO: Rewrite to not use raise_errors +DwhQueryPropertyTypesFunctionRank.model_rebuild(raise_errors=False) + diff --git a/cm_python_openapi_sdk/models/dwh_query_property_types_function_row_number.py b/cm_python_openapi_sdk/models/dwh_query_property_types_function_row_number.py new file mode 100644 index 0000000..899c385 --- /dev/null +++ b/cm_python_openapi_sdk/models/dwh_query_property_types_function_row_number.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from cm_python_openapi_sdk.models.function_arithm_type_general import FunctionArithmTypeGeneral +from cm_python_openapi_sdk.models.function_round_type_general import FunctionRoundTypeGeneral +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +DWHQUERYPROPERTYTYPESFUNCTIONROWNUMBER_ONE_OF_SCHEMAS = ["FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionRoundTypeGeneral"] + +class DwhQueryPropertyTypesFunctionRowNumber(BaseModel): + """ + DwhQueryPropertyTypesFunctionRowNumber + """ + # data type: FunctionAggTypeGeneral + oneof_schema_1_validator: Optional[FunctionAggTypeGeneral] = None + # data type: FunctionArithmTypeGeneral + oneof_schema_2_validator: Optional[FunctionArithmTypeGeneral] = None + # data type: FunctionRoundTypeGeneral + oneof_schema_3_validator: Optional[FunctionRoundTypeGeneral] = None + actual_instance: Optional[Union[FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral]] = None + one_of_schemas: Set[str] = { "FunctionAggTypeGeneral", "FunctionArithmTypeGeneral", "FunctionRoundTypeGeneral" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = DwhQueryPropertyTypesFunctionRowNumber.model_construct() + error_messages = [] + match = 0 + # validate data type: FunctionAggTypeGeneral + if not isinstance(v, FunctionAggTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionAggTypeGeneral`") + else: + match += 1 + # validate data type: FunctionArithmTypeGeneral + if not isinstance(v, FunctionArithmTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionArithmTypeGeneral`") + else: + match += 1 + # validate data type: FunctionRoundTypeGeneral + if not isinstance(v, FunctionRoundTypeGeneral): + error_messages.append(f"Error! Input type `{type(v)}` is not `FunctionRoundTypeGeneral`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in DwhQueryPropertyTypesFunctionRowNumber with oneOf schemas: FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in DwhQueryPropertyTypesFunctionRowNumber with oneOf schemas: FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_avg": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_count": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_count_dist": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_divide": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_max": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_min": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_minus": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_modulo": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_multiply": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "function_plus": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionRoundTypeGeneral` + if _data_type == "function_round": + instance.actual_instance = FunctionRoundTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_stddev_pop": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_stddev_samp": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_sum": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_var_pop": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "function_var_samp": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionAggTypeGeneral` + if _data_type == "FunctionAggTypeGeneral": + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionArithmTypeGeneral` + if _data_type == "FunctionArithmTypeGeneral": + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + return instance + + # check if data type is `FunctionRoundTypeGeneral` + if _data_type == "FunctionRoundTypeGeneral": + instance.actual_instance = FunctionRoundTypeGeneral.from_json(json_str) + return instance + + # deserialize data into FunctionAggTypeGeneral + try: + instance.actual_instance = FunctionAggTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionArithmTypeGeneral + try: + instance.actual_instance = FunctionArithmTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into FunctionRoundTypeGeneral + try: + instance.actual_instance = FunctionRoundTypeGeneral.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into DwhQueryPropertyTypesFunctionRowNumber with oneOf schemas: FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into DwhQueryPropertyTypesFunctionRowNumber with oneOf schemas: FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], FunctionAggTypeGeneral, FunctionArithmTypeGeneral, FunctionRoundTypeGeneral]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + +from cm_python_openapi_sdk.models.function_agg_type_general import FunctionAggTypeGeneral +# TODO: Rewrite to not use raise_errors +DwhQueryPropertyTypesFunctionRowNumber.model_rebuild(raise_errors=False) + diff --git a/cm_python_openapi_sdk/models/dwh_query_variable_type.py b/cm_python_openapi_sdk/models/dwh_query_variable_type.py new file mode 100644 index 0000000..5bc6df1 --- /dev/null +++ b/cm_python_openapi_sdk/models/dwh_query_variable_type.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DwhQueryVariableType(BaseModel): + """ + DwhQueryVariableType + """ # noqa: E501 + id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=60)]] = None + type: StrictStr + value: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["id", "type", "value"] + + @field_validator('id') + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if not re.match(r"^[\w_-]+$", value): + raise ValueError(r"must validate the regular expression /^[\w_-]+$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['variable']): + raise ValueError("must be one of enum values ('variable')") + return value + + @field_validator('value') + def value_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z][a-z0-9_-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9_-]*$/") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DwhQueryVariableType from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DwhQueryVariableType from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type"), + "value": obj.get("value") + }) + return _obj + + diff --git a/cm_python_openapi_sdk/models/export_paged_model_dto.py b/cm_python_openapi_sdk/models/export_paged_model_dto.py index ea6da8b..04b2eaa 100644 --- a/cm_python_openapi_sdk/models/export_paged_model_dto.py +++ b/cm_python_openapi_sdk/models/export_paged_model_dto.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from cm_python_openapi_sdk.models.export_dto import ExportDTO -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse +from cm_python_openapi_sdk.models.export_response_dto import ExportResponseDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO from typing import Optional, Set from typing_extensions import Self @@ -29,9 +29,9 @@ class ExportPagedModelDTO(BaseModel): """ ExportPagedModelDTO """ # noqa: E501 - content: Optional[List[ExportDTO]] = None + content: Optional[List[ExportResponseDTO]] = None links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") - page: Optional[MandatoryKeysForPagableResponse] = None + page: Optional[PageDTO] = None __properties: ClassVar[List[str]] = ["content", "links", "page"] model_config = ConfigDict( @@ -95,9 +95,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "content": [ExportDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, + "content": [ExportResponseDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "links": obj.get("links"), - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/export_response_dto.py b/cm_python_openapi_sdk/models/export_response_dto.py new file mode 100644 index 0000000..82cbc11 --- /dev/null +++ b/cm_python_openapi_sdk/models/export_response_dto.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from cm_python_openapi_sdk.models.access_info_dto import AccessInfoDTO +from cm_python_openapi_sdk.models.export_content_dto import ExportContentDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO +from typing import Optional, Set +from typing_extensions import Self + +class ExportResponseDTO(BaseModel): + """ + ExportResponseDTO + """ # noqa: E501 + id: Optional[StrictStr] = None + name: Annotated[str, Field(strict=True)] + type: Optional[StrictStr] = None + title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = None + description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None + content: ExportContentDTO + links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") + page: Optional[PageDTO] = None + access_info: Optional[AccessInfoDTO] = Field(default=None, alias="accessInfo") + version: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "name", "type", "title", "description", "content", "links", "page", "accessInfo", "version"] + + @field_validator('name') + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z][a-z0-9_-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9_-]*$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle']): + raise ValueError("must be one of enum values ('dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ExportResponseDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of content + if self.content: + _dict['content'] = self.content.to_dict() + # override the default output from pydantic by calling `to_dict()` of page + if self.page: + _dict['page'] = self.page.to_dict() + # override the default output from pydantic by calling `to_dict()` of access_info + if self.access_info: + _dict['accessInfo'] = self.access_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ExportResponseDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "title": obj.get("title"), + "description": obj.get("description"), + "content": ExportContentDTO.from_dict(obj["content"]) if obj.get("content") is not None else None, + "links": obj.get("links"), + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None, + "accessInfo": AccessInfoDTO.from_dict(obj["accessInfo"]) if obj.get("accessInfo") is not None else None, + "version": obj.get("version") + }) + return _obj + + diff --git a/cm_python_openapi_sdk/models/feature_property_type.py b/cm_python_openapi_sdk/models/feature_property_type.py index aa1e578..8bb790c 100644 --- a/cm_python_openapi_sdk/models/feature_property_type.py +++ b/cm_python_openapi_sdk/models/feature_property_type.py @@ -46,6 +46,9 @@ class FeaturePropertyType(BaseModel): ) + discriminator_value_class_map: Dict[str, str] = { + } + def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -96,6 +99,41 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `FeatureFunctionDTO` + if _data_type == "function": + instance.actual_instance = FeatureFunctionDTO.from_json(json_str) + return instance + + # check if data type is `FeaturePropertyDTO` + if _data_type == "property": + instance.actual_instance = FeaturePropertyDTO.from_json(json_str) + return instance + + # check if data type is `FeatureTextDTO` + if _data_type == "text": + instance.actual_instance = FeatureTextDTO.from_json(json_str) + return instance + + # check if data type is `FeatureFunctionDTO` + if _data_type == "FeatureFunctionDTO": + instance.actual_instance = FeatureFunctionDTO.from_json(json_str) + return instance + + # check if data type is `FeaturePropertyDTO` + if _data_type == "FeaturePropertyDTO": + instance.actual_instance = FeaturePropertyDTO.from_json(json_str) + return instance + + # check if data type is `FeatureTextDTO` + if _data_type == "FeatureTextDTO": + instance.actual_instance = FeatureTextDTO.from_json(json_str) + return instance + # deserialize data into FeaturePropertyDTO try: instance.actual_instance = FeaturePropertyDTO.from_json(json_str) diff --git a/cm_python_openapi_sdk/models/filter_by.py b/cm_python_openapi_sdk/models/filter_by.py index 9e6a575..943640b 100644 --- a/cm_python_openapi_sdk/models/filter_by.py +++ b/cm_python_openapi_sdk/models/filter_by.py @@ -50,6 +50,9 @@ class FilterBy(BaseModel): ) + discriminator_value_class_map: Dict[str, str] = { + } + def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -110,6 +113,106 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("operator") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `operator` in the input.") + + # check if data type is `FilterByBoolean` + if _data_type == "and": + instance.actual_instance = FilterByBoolean.from_json(json_str) + return instance + + # check if data type is `FilterByComp` + if _data_type == "eq": + instance.actual_instance = FilterByComp.from_json(json_str) + return instance + + # check if data type is `FilterByComp` + if _data_type == "gt": + instance.actual_instance = FilterByComp.from_json(json_str) + return instance + + # check if data type is `FilterByComp` + if _data_type == "gte": + instance.actual_instance = FilterByComp.from_json(json_str) + return instance + + # check if data type is `FilterByIn` + if _data_type == "in": + instance.actual_instance = FilterByIn.from_json(json_str) + return instance + + # check if data type is `FilterByAttribute` + if _data_type == "inAttribute": + instance.actual_instance = FilterByAttribute.from_json(json_str) + return instance + + # check if data type is `FilterByUnary` + if _data_type == "isNotNull": + instance.actual_instance = FilterByUnary.from_json(json_str) + return instance + + # check if data type is `FilterByUnary` + if _data_type == "isNull": + instance.actual_instance = FilterByUnary.from_json(json_str) + return instance + + # check if data type is `FilterByComp` + if _data_type == "lt": + instance.actual_instance = FilterByComp.from_json(json_str) + return instance + + # check if data type is `FilterByComp` + if _data_type == "lte": + instance.actual_instance = FilterByComp.from_json(json_str) + return instance + + # check if data type is `FilterByComp` + if _data_type == "ne": + instance.actual_instance = FilterByComp.from_json(json_str) + return instance + + # check if data type is `FilterByBoolean` + if _data_type == "not": + instance.actual_instance = FilterByBoolean.from_json(json_str) + return instance + + # check if data type is `FilterByAttribute` + if _data_type == "notInAttribute": + instance.actual_instance = FilterByAttribute.from_json(json_str) + return instance + + # check if data type is `FilterByBoolean` + if _data_type == "or": + instance.actual_instance = FilterByBoolean.from_json(json_str) + return instance + + # check if data type is `FilterByAttribute` + if _data_type == "FilterByAttribute": + instance.actual_instance = FilterByAttribute.from_json(json_str) + return instance + + # check if data type is `FilterByBoolean` + if _data_type == "FilterByBoolean": + instance.actual_instance = FilterByBoolean.from_json(json_str) + return instance + + # check if data type is `FilterByComp` + if _data_type == "FilterByComp": + instance.actual_instance = FilterByComp.from_json(json_str) + return instance + + # check if data type is `FilterByIn` + if _data_type == "FilterByIn": + instance.actual_instance = FilterByIn.from_json(json_str) + return instance + + # check if data type is `FilterByUnary` + if _data_type == "FilterByUnary": + instance.actual_instance = FilterByUnary.from_json(json_str) + return instance + # deserialize data into FilterByComp try: instance.actual_instance = FilterByComp.from_json(json_str) diff --git a/cm_python_openapi_sdk/models/filter_by_comp.py b/cm_python_openapi_sdk/models/filter_by_comp.py index d256d3f..b5ae61c 100644 --- a/cm_python_openapi_sdk/models/filter_by_comp.py +++ b/cm_python_openapi_sdk/models/filter_by_comp.py @@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from cm_python_openapi_sdk.models.dwh_query_property_types import DwhQueryPropertyTypes +from cm_python_openapi_sdk.models.dwh_query_property_types_filter_comp import DwhQueryPropertyTypesFilterComp from typing import Optional, Set from typing_extensions import Self @@ -31,7 +31,7 @@ class FilterByComp(BaseModel): """ # noqa: E501 var_property: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, alias="property") value: Optional[Any] = None - function: Optional[DwhQueryPropertyTypes] = None + function: Optional[DwhQueryPropertyTypesFilterComp] = None operator: StrictStr __properties: ClassVar[List[str]] = ["property", "value", "function", "operator"] @@ -113,7 +113,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "property": obj.get("property"), "value": obj.get("value"), - "function": DwhQueryPropertyTypes.from_dict(obj["function"]) if obj.get("function") is not None else None, + "function": DwhQueryPropertyTypesFilterComp.from_dict(obj["function"]) if obj.get("function") is not None else None, "operator": obj.get("operator") }) return _obj diff --git a/cm_python_openapi_sdk/models/function_ntile.py b/cm_python_openapi_sdk/models/function_ntile.py index 0c86a93..ef2f73c 100644 --- a/cm_python_openapi_sdk/models/function_ntile.py +++ b/cm_python_openapi_sdk/models/function_ntile.py @@ -21,7 +21,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from cm_python_openapi_sdk.models.function_ntile_content_inner import FunctionNtileContentInner from cm_python_openapi_sdk.models.function_ntile_options import FunctionNtileOptions from typing import Optional, Set from typing_extensions import Self @@ -32,7 +31,7 @@ class FunctionNtile(BaseModel): """ # noqa: E501 id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=60)]] = None type: StrictStr - content: Annotated[List[FunctionNtileContentInner], Field(min_length=1)] + content: Annotated[List[DwhQueryPropertyTypesFunctionNtile], Field(min_length=1)] options: Optional[FunctionNtileOptions] = None __properties: ClassVar[List[str]] = ["id", "type", "content", "options"] @@ -116,9 +115,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "type": obj.get("type"), - "content": [FunctionNtileContentInner.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, + "content": [DwhQueryPropertyTypesFunctionNtile.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "options": FunctionNtileOptions.from_dict(obj["options"]) if obj.get("options") is not None else None }) return _obj +from cm_python_openapi_sdk.models.dwh_query_property_types_function_ntile import DwhQueryPropertyTypesFunctionNtile +# TODO: Rewrite to not use raise_errors +FunctionNtile.model_rebuild(raise_errors=False) diff --git a/cm_python_openapi_sdk/models/function_percentile.py b/cm_python_openapi_sdk/models/function_percentile.py index d0a3d3a..ffbc73c 100644 --- a/cm_python_openapi_sdk/models/function_percentile.py +++ b/cm_python_openapi_sdk/models/function_percentile.py @@ -21,7 +21,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from cm_python_openapi_sdk.models.function_ntile_content_inner import FunctionNtileContentInner from typing import Optional, Set from typing_extensions import Self @@ -31,7 +30,7 @@ class FunctionPercentile(BaseModel): """ # noqa: E501 id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=60)]] = None type: StrictStr - content: Annotated[List[FunctionNtileContentInner], Field(min_length=1)] + content: Annotated[List[DwhQueryPropertyTypesFunctionPercentile], Field(min_length=1)] options: Dict[str, Any] __properties: ClassVar[List[str]] = ["id", "type", "content", "options"] @@ -112,9 +111,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "type": obj.get("type"), - "content": [FunctionNtileContentInner.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, + "content": [DwhQueryPropertyTypesFunctionPercentile.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "options": obj.get("options") }) return _obj +from cm_python_openapi_sdk.models.dwh_query_property_types_function_percentile import DwhQueryPropertyTypesFunctionPercentile +# TODO: Rewrite to not use raise_errors +FunctionPercentile.model_rebuild(raise_errors=False) diff --git a/cm_python_openapi_sdk/models/function_property_type.py b/cm_python_openapi_sdk/models/function_property_type.py index 98a8cca..3f74f1a 100644 --- a/cm_python_openapi_sdk/models/function_property_type.py +++ b/cm_python_openapi_sdk/models/function_property_type.py @@ -43,6 +43,9 @@ class FunctionPropertyType(BaseModel): ) + discriminator_value_class_map: Dict[str, str] = { + } + def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -88,6 +91,31 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `FeaturePropertyDTO` + if _data_type == "property": + instance.actual_instance = FeaturePropertyDTO.from_json(json_str) + return instance + + # check if data type is `FeatureTextDTO` + if _data_type == "text": + instance.actual_instance = FeatureTextDTO.from_json(json_str) + return instance + + # check if data type is `FeaturePropertyDTO` + if _data_type == "FeaturePropertyDTO": + instance.actual_instance = FeaturePropertyDTO.from_json(json_str) + return instance + + # check if data type is `FeatureTextDTO` + if _data_type == "FeatureTextDTO": + instance.actual_instance = FeatureTextDTO.from_json(json_str) + return instance + # deserialize data into FeaturePropertyDTO try: instance.actual_instance = FeaturePropertyDTO.from_json(json_str) diff --git a/cm_python_openapi_sdk/models/function_rank.py b/cm_python_openapi_sdk/models/function_rank.py index 4a22492..f9a1a76 100644 --- a/cm_python_openapi_sdk/models/function_rank.py +++ b/cm_python_openapi_sdk/models/function_rank.py @@ -21,7 +21,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from cm_python_openapi_sdk.models.function_ntile_content_inner import FunctionNtileContentInner from typing import Optional, Set from typing_extensions import Self @@ -31,7 +30,7 @@ class FunctionRank(BaseModel): """ # noqa: E501 id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=60)]] = None type: StrictStr - content: Annotated[List[FunctionNtileContentInner], Field(min_length=1)] + content: Annotated[List[DwhQueryPropertyTypesFunctionRank], Field(min_length=1)] options: Dict[str, Any] __properties: ClassVar[List[str]] = ["id", "type", "content", "options"] @@ -112,9 +111,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "type": obj.get("type"), - "content": [FunctionNtileContentInner.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, + "content": [DwhQueryPropertyTypesFunctionRank.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "options": obj.get("options") }) return _obj +from cm_python_openapi_sdk.models.dwh_query_property_types_function_rank import DwhQueryPropertyTypesFunctionRank +# TODO: Rewrite to not use raise_errors +FunctionRank.model_rebuild(raise_errors=False) diff --git a/cm_python_openapi_sdk/models/function_row_number.py b/cm_python_openapi_sdk/models/function_row_number.py index b8f2bb2..4278239 100644 --- a/cm_python_openapi_sdk/models/function_row_number.py +++ b/cm_python_openapi_sdk/models/function_row_number.py @@ -21,7 +21,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from cm_python_openapi_sdk.models.function_ntile_content_inner import FunctionNtileContentInner from typing import Optional, Set from typing_extensions import Self @@ -31,7 +30,7 @@ class FunctionRowNumber(BaseModel): """ # noqa: E501 id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=60)]] = None type: StrictStr - content: Annotated[List[FunctionNtileContentInner], Field(min_length=1)] + content: Annotated[List[DwhQueryPropertyTypesFunctionRowNumber], Field(min_length=1)] options: Dict[str, Any] __properties: ClassVar[List[str]] = ["id", "type", "content", "options"] @@ -112,9 +111,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "type": obj.get("type"), - "content": [FunctionNtileContentInner.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, + "content": [DwhQueryPropertyTypesFunctionRowNumber.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "options": obj.get("options") }) return _obj +from cm_python_openapi_sdk.models.dwh_query_property_types_function_row_number import DwhQueryPropertyTypesFunctionRowNumber +# TODO: Rewrite to not use raise_errors +FunctionRowNumber.model_rebuild(raise_errors=False) diff --git a/cm_python_openapi_sdk/models/general_job_request.py b/cm_python_openapi_sdk/models/general_job_request.py new file mode 100644 index 0000000..6a15704 --- /dev/null +++ b/cm_python_openapi_sdk/models/general_job_request.py @@ -0,0 +1,286 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +import pprint +from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator +from typing import Any, List, Optional +from cm_python_openapi_sdk.models.bulk_point_query_job_request import BulkPointQueryJobRequest +from cm_python_openapi_sdk.models.data_dump_job_request import DataDumpJobRequest +from cm_python_openapi_sdk.models.data_pull_job_request import DataPullJobRequest +from cm_python_openapi_sdk.models.export_job_request import ExportJobRequest +from cm_python_openapi_sdk.models.import_project_job_request import ImportProjectJobRequest +from cm_python_openapi_sdk.models.truncate_job_request import TruncateJobRequest +from cm_python_openapi_sdk.models.validate_job_request import ValidateJobRequest +from pydantic import StrictStr, Field +from typing import Union, List, Set, Optional, Dict +from typing_extensions import Literal, Self + +GENERALJOBREQUEST_ONE_OF_SCHEMAS = ["BulkPointQueryJobRequest", "DataDumpJobRequest", "DataPullJobRequest", "ExportJobRequest", "ImportProjectJobRequest", "TruncateJobRequest", "ValidateJobRequest"] + +class GeneralJobRequest(BaseModel): + """ + GeneralJobRequest + """ + # data type: DataDumpJobRequest + oneof_schema_1_validator: Optional[DataDumpJobRequest] = None + # data type: DataPullJobRequest + oneof_schema_2_validator: Optional[DataPullJobRequest] = None + # data type: ExportJobRequest + oneof_schema_3_validator: Optional[ExportJobRequest] = None + # data type: BulkPointQueryJobRequest + oneof_schema_4_validator: Optional[BulkPointQueryJobRequest] = None + # data type: ValidateJobRequest + oneof_schema_5_validator: Optional[ValidateJobRequest] = None + # data type: TruncateJobRequest + oneof_schema_6_validator: Optional[TruncateJobRequest] = None + # data type: ImportProjectJobRequest + oneof_schema_7_validator: Optional[ImportProjectJobRequest] = None + actual_instance: Optional[Union[BulkPointQueryJobRequest, DataDumpJobRequest, DataPullJobRequest, ExportJobRequest, ImportProjectJobRequest, TruncateJobRequest, ValidateJobRequest]] = None + one_of_schemas: Set[str] = { "BulkPointQueryJobRequest", "DataDumpJobRequest", "DataPullJobRequest", "ExportJobRequest", "ImportProjectJobRequest", "TruncateJobRequest", "ValidateJobRequest" } + + model_config = ConfigDict( + validate_assignment=True, + protected_namespaces=(), + ) + + + discriminator_value_class_map: Dict[str, str] = { + } + + def __init__(self, *args, **kwargs) -> None: + if args: + if len(args) > 1: + raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") + if kwargs: + raise ValueError("If a position argument is used, keyword arguments cannot be used.") + super().__init__(actual_instance=args[0]) + else: + super().__init__(**kwargs) + + @field_validator('actual_instance') + def actual_instance_must_validate_oneof(cls, v): + instance = GeneralJobRequest.model_construct() + error_messages = [] + match = 0 + # validate data type: DataDumpJobRequest + if not isinstance(v, DataDumpJobRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `DataDumpJobRequest`") + else: + match += 1 + # validate data type: DataPullJobRequest + if not isinstance(v, DataPullJobRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `DataPullJobRequest`") + else: + match += 1 + # validate data type: ExportJobRequest + if not isinstance(v, ExportJobRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `ExportJobRequest`") + else: + match += 1 + # validate data type: BulkPointQueryJobRequest + if not isinstance(v, BulkPointQueryJobRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `BulkPointQueryJobRequest`") + else: + match += 1 + # validate data type: ValidateJobRequest + if not isinstance(v, ValidateJobRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `ValidateJobRequest`") + else: + match += 1 + # validate data type: TruncateJobRequest + if not isinstance(v, TruncateJobRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `TruncateJobRequest`") + else: + match += 1 + # validate data type: ImportProjectJobRequest + if not isinstance(v, ImportProjectJobRequest): + error_messages.append(f"Error! Input type `{type(v)}` is not `ImportProjectJobRequest`") + else: + match += 1 + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when setting `actual_instance` in GeneralJobRequest with oneOf schemas: BulkPointQueryJobRequest, DataDumpJobRequest, DataPullJobRequest, ExportJobRequest, ImportProjectJobRequest, TruncateJobRequest, ValidateJobRequest. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when setting `actual_instance` in GeneralJobRequest with oneOf schemas: BulkPointQueryJobRequest, DataDumpJobRequest, DataPullJobRequest, ExportJobRequest, ImportProjectJobRequest, TruncateJobRequest, ValidateJobRequest. Details: " + ", ".join(error_messages)) + else: + return v + + @classmethod + def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: + return cls.from_json(json.dumps(obj)) + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Returns the object represented by the json string""" + instance = cls.model_construct() + error_messages = [] + match = 0 + + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `BulkPointQueryJobRequest` + if _data_type == "bulkPointQuery": + instance.actual_instance = BulkPointQueryJobRequest.from_json(json_str) + return instance + + # check if data type is `DataDumpJobRequest` + if _data_type == "dataDump": + instance.actual_instance = DataDumpJobRequest.from_json(json_str) + return instance + + # check if data type is `DataPullJobRequest` + if _data_type == "dataPull": + instance.actual_instance = DataPullJobRequest.from_json(json_str) + return instance + + # check if data type is `ExportJobRequest` + if _data_type == "export": + instance.actual_instance = ExportJobRequest.from_json(json_str) + return instance + + # check if data type is `ImportProjectJobRequest` + if _data_type == "importProject": + instance.actual_instance = ImportProjectJobRequest.from_json(json_str) + return instance + + # check if data type is `TruncateJobRequest` + if _data_type == "truncate": + instance.actual_instance = TruncateJobRequest.from_json(json_str) + return instance + + # check if data type is `ValidateJobRequest` + if _data_type == "validate": + instance.actual_instance = ValidateJobRequest.from_json(json_str) + return instance + + # check if data type is `BulkPointQueryJobRequest` + if _data_type == "BulkPointQueryJobRequest": + instance.actual_instance = BulkPointQueryJobRequest.from_json(json_str) + return instance + + # check if data type is `DataDumpJobRequest` + if _data_type == "DataDumpJobRequest": + instance.actual_instance = DataDumpJobRequest.from_json(json_str) + return instance + + # check if data type is `DataPullJobRequest` + if _data_type == "DataPullJobRequest": + instance.actual_instance = DataPullJobRequest.from_json(json_str) + return instance + + # check if data type is `ExportJobRequest` + if _data_type == "ExportJobRequest": + instance.actual_instance = ExportJobRequest.from_json(json_str) + return instance + + # check if data type is `ImportProjectJobRequest` + if _data_type == "ImportProjectJobRequest": + instance.actual_instance = ImportProjectJobRequest.from_json(json_str) + return instance + + # check if data type is `TruncateJobRequest` + if _data_type == "TruncateJobRequest": + instance.actual_instance = TruncateJobRequest.from_json(json_str) + return instance + + # check if data type is `ValidateJobRequest` + if _data_type == "ValidateJobRequest": + instance.actual_instance = ValidateJobRequest.from_json(json_str) + return instance + + # deserialize data into DataDumpJobRequest + try: + instance.actual_instance = DataDumpJobRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into DataPullJobRequest + try: + instance.actual_instance = DataPullJobRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ExportJobRequest + try: + instance.actual_instance = ExportJobRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into BulkPointQueryJobRequest + try: + instance.actual_instance = BulkPointQueryJobRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ValidateJobRequest + try: + instance.actual_instance = ValidateJobRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into TruncateJobRequest + try: + instance.actual_instance = TruncateJobRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + # deserialize data into ImportProjectJobRequest + try: + instance.actual_instance = ImportProjectJobRequest.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) + + if match > 1: + # more than 1 match + raise ValueError("Multiple matches found when deserializing the JSON string into GeneralJobRequest with oneOf schemas: BulkPointQueryJobRequest, DataDumpJobRequest, DataPullJobRequest, ExportJobRequest, ImportProjectJobRequest, TruncateJobRequest, ValidateJobRequest. Details: " + ", ".join(error_messages)) + elif match == 0: + # no match + raise ValueError("No match found when deserializing the JSON string into GeneralJobRequest with oneOf schemas: BulkPointQueryJobRequest, DataDumpJobRequest, DataPullJobRequest, ExportJobRequest, ImportProjectJobRequest, TruncateJobRequest, ValidateJobRequest. Details: " + ", ".join(error_messages)) + else: + return instance + + def to_json(self) -> str: + """Returns the JSON representation of the actual instance""" + if self.actual_instance is None: + return "null" + + if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): + return self.actual_instance.to_json() + else: + return json.dumps(self.actual_instance) + + def to_dict(self) -> Optional[Union[Dict[str, Any], BulkPointQueryJobRequest, DataDumpJobRequest, DataPullJobRequest, ExportJobRequest, ImportProjectJobRequest, TruncateJobRequest, ValidateJobRequest]]: + """Returns the dict representation of the actual instance""" + if self.actual_instance is None: + return None + + if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): + return self.actual_instance.to_dict() + else: + # primitive type + return self.actual_instance + + def to_str(self) -> str: + """Returns the string representation of the actual instance""" + return pprint.pformat(self.model_dump()) + + diff --git a/cm_python_openapi_sdk/models/geosearch_paged_model_dto.py b/cm_python_openapi_sdk/models/geosearch_paged_model_dto.py index fb675b0..eed30ff 100644 --- a/cm_python_openapi_sdk/models/geosearch_paged_model_dto.py +++ b/cm_python_openapi_sdk/models/geosearch_paged_model_dto.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse +from cm_python_openapi_sdk.models.page_dto import PageDTO from cm_python_openapi_sdk.models.query_hit_dto import QueryHitDTO from typing import Optional, Set from typing_extensions import Self @@ -31,7 +31,7 @@ class GeosearchPagedModelDTO(BaseModel): """ # noqa: E501 links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") content: Optional[List[QueryHitDTO]] = None - page: Optional[MandatoryKeysForPagableResponse] = None + page: Optional[PageDTO] = None __properties: ClassVar[List[str]] = ["links", "content", "page"] model_config = ConfigDict( @@ -97,7 +97,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "links": obj.get("links"), "content": [QueryHitDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/get_project_members200_response.py b/cm_python_openapi_sdk/models/get_project_members200_response.py index 36221f5..aab0828 100644 --- a/cm_python_openapi_sdk/models/get_project_members200_response.py +++ b/cm_python_openapi_sdk/models/get_project_members200_response.py @@ -20,13 +20,13 @@ import re # noqa: F401 from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Optional -from cm_python_openapi_sdk.models.membership_dto import MembershipDTO from cm_python_openapi_sdk.models.membership_paged_model_dto import MembershipPagedModelDTO +from cm_python_openapi_sdk.models.membership_response_dto import MembershipResponseDTO from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict from typing_extensions import Literal, Self from pydantic import Field -GETPROJECTMEMBERS200RESPONSE_ANY_OF_SCHEMAS = ["MembershipDTO", "MembershipPagedModelDTO"] +GETPROJECTMEMBERS200RESPONSE_ANY_OF_SCHEMAS = ["MembershipPagedModelDTO", "MembershipResponseDTO"] class GetProjectMembers200Response(BaseModel): """ @@ -35,13 +35,13 @@ class GetProjectMembers200Response(BaseModel): # data type: MembershipPagedModelDTO anyof_schema_1_validator: Optional[MembershipPagedModelDTO] = None - # data type: MembershipDTO - anyof_schema_2_validator: Optional[MembershipDTO] = None + # data type: MembershipResponseDTO + anyof_schema_2_validator: Optional[MembershipResponseDTO] = None if TYPE_CHECKING: - actual_instance: Optional[Union[MembershipDTO, MembershipPagedModelDTO]] = None + actual_instance: Optional[Union[MembershipPagedModelDTO, MembershipResponseDTO]] = None else: actual_instance: Any = None - any_of_schemas: Set[str] = { "MembershipDTO", "MembershipPagedModelDTO" } + any_of_schemas: Set[str] = { "MembershipPagedModelDTO", "MembershipResponseDTO" } model_config = { "validate_assignment": True, @@ -68,15 +68,15 @@ def actual_instance_must_validate_anyof(cls, v): else: return v - # validate data type: MembershipDTO - if not isinstance(v, MembershipDTO): - error_messages.append(f"Error! Input type `{type(v)}` is not `MembershipDTO`") + # validate data type: MembershipResponseDTO + if not isinstance(v, MembershipResponseDTO): + error_messages.append(f"Error! Input type `{type(v)}` is not `MembershipResponseDTO`") else: return v if error_messages: # no match - raise ValueError("No match found when setting the actual_instance in GetProjectMembers200Response with anyOf schemas: MembershipDTO, MembershipPagedModelDTO. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting the actual_instance in GetProjectMembers200Response with anyOf schemas: MembershipPagedModelDTO, MembershipResponseDTO. Details: " + ", ".join(error_messages)) else: return v @@ -95,16 +95,16 @@ def from_json(cls, json_str: str) -> Self: return instance except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # anyof_schema_2_validator: Optional[MembershipDTO] = None + # anyof_schema_2_validator: Optional[MembershipResponseDTO] = None try: - instance.actual_instance = MembershipDTO.from_json(json_str) + instance.actual_instance = MembershipResponseDTO.from_json(json_str) return instance except (ValidationError, ValueError) as e: error_messages.append(str(e)) if error_messages: # no match - raise ValueError("No match found when deserializing the JSON string into GetProjectMembers200Response with anyOf schemas: MembershipDTO, MembershipPagedModelDTO. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into GetProjectMembers200Response with anyOf schemas: MembershipPagedModelDTO, MembershipResponseDTO. Details: " + ", ".join(error_messages)) else: return instance @@ -118,7 +118,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], MembershipDTO, MembershipPagedModelDTO]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], MembershipPagedModelDTO, MembershipResponseDTO]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/cm_python_openapi_sdk/models/having.py b/cm_python_openapi_sdk/models/having.py index 1adebc4..36157c1 100644 --- a/cm_python_openapi_sdk/models/having.py +++ b/cm_python_openapi_sdk/models/having.py @@ -46,6 +46,9 @@ class Having(BaseModel): ) + discriminator_value_class_map: Dict[str, str] = { + } + def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -96,6 +99,71 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("operator") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `operator` in the input.") + + # check if data type is `HavingComp` + if _data_type == "eq": + instance.actual_instance = HavingComp.from_json(json_str) + return instance + + # check if data type is `HavingComp` + if _data_type == "gt": + instance.actual_instance = HavingComp.from_json(json_str) + return instance + + # check if data type is `HavingComp` + if _data_type == "gte": + instance.actual_instance = HavingComp.from_json(json_str) + return instance + + # check if data type is `HavingIn` + if _data_type == "in": + instance.actual_instance = HavingIn.from_json(json_str) + return instance + + # check if data type is `HavingUnary` + if _data_type == "isNotNull": + instance.actual_instance = HavingUnary.from_json(json_str) + return instance + + # check if data type is `HavingUnary` + if _data_type == "isNull": + instance.actual_instance = HavingUnary.from_json(json_str) + return instance + + # check if data type is `HavingComp` + if _data_type == "lt": + instance.actual_instance = HavingComp.from_json(json_str) + return instance + + # check if data type is `HavingComp` + if _data_type == "lte": + instance.actual_instance = HavingComp.from_json(json_str) + return instance + + # check if data type is `HavingComp` + if _data_type == "ne": + instance.actual_instance = HavingComp.from_json(json_str) + return instance + + # check if data type is `HavingComp` + if _data_type == "HavingComp": + instance.actual_instance = HavingComp.from_json(json_str) + return instance + + # check if data type is `HavingIn` + if _data_type == "HavingIn": + instance.actual_instance = HavingIn.from_json(json_str) + return instance + + # check if data type is `HavingUnary` + if _data_type == "HavingUnary": + instance.actual_instance = HavingUnary.from_json(json_str) + return instance + # deserialize data into HavingComp try: instance.actual_instance = HavingComp.from_json(json_str) diff --git a/cm_python_openapi_sdk/models/having1.py b/cm_python_openapi_sdk/models/having1.py index fae750c..b080b6f 100644 --- a/cm_python_openapi_sdk/models/having1.py +++ b/cm_python_openapi_sdk/models/having1.py @@ -46,6 +46,9 @@ class Having1(BaseModel): ) + discriminator_value_class_map: Dict[str, str] = { + } + def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -96,6 +99,71 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("operator") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `operator` in the input.") + + # check if data type is `HavingComp` + if _data_type == "eq": + instance.actual_instance = HavingComp.from_json(json_str) + return instance + + # check if data type is `HavingComp` + if _data_type == "gt": + instance.actual_instance = HavingComp.from_json(json_str) + return instance + + # check if data type is `HavingComp` + if _data_type == "gte": + instance.actual_instance = HavingComp.from_json(json_str) + return instance + + # check if data type is `HavingIn` + if _data_type == "in": + instance.actual_instance = HavingIn.from_json(json_str) + return instance + + # check if data type is `HavingUnary` + if _data_type == "isNotNull": + instance.actual_instance = HavingUnary.from_json(json_str) + return instance + + # check if data type is `HavingUnary` + if _data_type == "isNull": + instance.actual_instance = HavingUnary.from_json(json_str) + return instance + + # check if data type is `HavingComp` + if _data_type == "lt": + instance.actual_instance = HavingComp.from_json(json_str) + return instance + + # check if data type is `HavingComp` + if _data_type == "lte": + instance.actual_instance = HavingComp.from_json(json_str) + return instance + + # check if data type is `HavingComp` + if _data_type == "ne": + instance.actual_instance = HavingComp.from_json(json_str) + return instance + + # check if data type is `HavingComp` + if _data_type == "HavingComp": + instance.actual_instance = HavingComp.from_json(json_str) + return instance + + # check if data type is `HavingIn1` + if _data_type == "HavingIn_1": + instance.actual_instance = HavingIn1.from_json(json_str) + return instance + + # check if data type is `HavingUnary` + if _data_type == "HavingUnary": + instance.actual_instance = HavingUnary.from_json(json_str) + return instance + # deserialize data into HavingComp try: instance.actual_instance = HavingComp.from_json(json_str) diff --git a/cm_python_openapi_sdk/models/indicator_drill_paged_model_dto.py b/cm_python_openapi_sdk/models/indicator_drill_paged_model_dto.py index ffaae1f..3cd4aea 100644 --- a/cm_python_openapi_sdk/models/indicator_drill_paged_model_dto.py +++ b/cm_python_openapi_sdk/models/indicator_drill_paged_model_dto.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from cm_python_openapi_sdk.models.indicator_drill_dto import IndicatorDrillDTO -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse +from cm_python_openapi_sdk.models.indicator_drill_response_dto import IndicatorDrillResponseDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO from typing import Optional, Set from typing_extensions import Self @@ -29,9 +29,9 @@ class IndicatorDrillPagedModelDTO(BaseModel): """ IndicatorDrillPagedModelDTO """ # noqa: E501 - content: Optional[List[IndicatorDrillDTO]] = None + content: Optional[List[IndicatorDrillResponseDTO]] = None links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") - page: Optional[MandatoryKeysForPagableResponse] = None + page: Optional[PageDTO] = None __properties: ClassVar[List[str]] = ["content", "links", "page"] model_config = ConfigDict( @@ -95,9 +95,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "content": [IndicatorDrillDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, + "content": [IndicatorDrillResponseDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "links": obj.get("links"), - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/indicator_drill_response_dto.py b/cm_python_openapi_sdk/models/indicator_drill_response_dto.py new file mode 100644 index 0000000..a40919a --- /dev/null +++ b/cm_python_openapi_sdk/models/indicator_drill_response_dto.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from cm_python_openapi_sdk.models.access_info_dto import AccessInfoDTO +from cm_python_openapi_sdk.models.indicator_drill_content_dto import IndicatorDrillContentDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO +from typing import Optional, Set +from typing_extensions import Self + +class IndicatorDrillResponseDTO(BaseModel): + """ + IndicatorDrillResponseDTO + """ # noqa: E501 + id: Optional[StrictStr] = None + name: Annotated[str, Field(strict=True)] + type: Optional[StrictStr] = None + title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = None + description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None + content: IndicatorDrillContentDTO + links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") + page: Optional[PageDTO] = None + access_info: Optional[AccessInfoDTO] = Field(default=None, alias="accessInfo") + version: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "name", "type", "title", "description", "content", "links", "page", "accessInfo", "version"] + + @field_validator('name') + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z][a-z0-9_-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9_-]*$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle']): + raise ValueError("must be one of enum values ('dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IndicatorDrillResponseDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of content + if self.content: + _dict['content'] = self.content.to_dict() + # override the default output from pydantic by calling `to_dict()` of page + if self.page: + _dict['page'] = self.page.to_dict() + # override the default output from pydantic by calling `to_dict()` of access_info + if self.access_info: + _dict['accessInfo'] = self.access_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IndicatorDrillResponseDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "title": obj.get("title"), + "description": obj.get("description"), + "content": IndicatorDrillContentDTO.from_dict(obj["content"]) if obj.get("content") is not None else None, + "links": obj.get("links"), + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None, + "accessInfo": AccessInfoDTO.from_dict(obj["accessInfo"]) if obj.get("accessInfo") is not None else None, + "version": obj.get("version") + }) + return _obj + + diff --git a/cm_python_openapi_sdk/models/indicator_link_dto_block_rows_inner.py b/cm_python_openapi_sdk/models/indicator_link_dto_block_rows_inner.py index e6aac91..f1f2a68 100644 --- a/cm_python_openapi_sdk/models/indicator_link_dto_block_rows_inner.py +++ b/cm_python_openapi_sdk/models/indicator_link_dto_block_rows_inner.py @@ -49,6 +49,9 @@ class IndicatorLinkDTOBlockRowsInner(BaseModel): ) + discriminator_value_class_map: Dict[str, str] = { + } + def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -104,6 +107,51 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `CategoriesDTO` + if _data_type == "categories": + instance.actual_instance = CategoriesDTO.from_json(json_str) + return instance + + # check if data type is `DistributionDTO` + if _data_type == "distribution": + instance.actual_instance = DistributionDTO.from_json(json_str) + return instance + + # check if data type is `RankingDTO` + if _data_type == "ranking": + instance.actual_instance = RankingDTO.from_json(json_str) + return instance + + # check if data type is `TimeSeriesDTO` + if _data_type == "timeSeries": + instance.actual_instance = TimeSeriesDTO.from_json(json_str) + return instance + + # check if data type is `CategoriesDTO` + if _data_type == "CategoriesDTO": + instance.actual_instance = CategoriesDTO.from_json(json_str) + return instance + + # check if data type is `DistributionDTO` + if _data_type == "DistributionDTO": + instance.actual_instance = DistributionDTO.from_json(json_str) + return instance + + # check if data type is `RankingDTO` + if _data_type == "RankingDTO": + instance.actual_instance = RankingDTO.from_json(json_str) + return instance + + # check if data type is `TimeSeriesDTO` + if _data_type == "TimeSeriesDTO": + instance.actual_instance = TimeSeriesDTO.from_json(json_str) + return instance + # deserialize data into CategoriesDTO try: instance.actual_instance = CategoriesDTO.from_json(json_str) diff --git a/cm_python_openapi_sdk/models/indicator_paged_model_dto.py b/cm_python_openapi_sdk/models/indicator_paged_model_dto.py index de57aa8..5929746 100644 --- a/cm_python_openapi_sdk/models/indicator_paged_model_dto.py +++ b/cm_python_openapi_sdk/models/indicator_paged_model_dto.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from cm_python_openapi_sdk.models.indicator_dto import IndicatorDTO -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse +from cm_python_openapi_sdk.models.indicator_response_dto import IndicatorResponseDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO from typing import Optional, Set from typing_extensions import Self @@ -29,9 +29,9 @@ class IndicatorPagedModelDTO(BaseModel): """ IndicatorPagedModelDTO """ # noqa: E501 - content: Optional[List[IndicatorDTO]] = None + content: Optional[List[IndicatorResponseDTO]] = None links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") - page: Optional[MandatoryKeysForPagableResponse] = None + page: Optional[PageDTO] = None __properties: ClassVar[List[str]] = ["content", "links", "page"] model_config = ConfigDict( @@ -95,9 +95,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "content": [IndicatorDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, + "content": [IndicatorResponseDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "links": obj.get("links"), - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/indicator_response_dto.py b/cm_python_openapi_sdk/models/indicator_response_dto.py new file mode 100644 index 0000000..b4a36b1 --- /dev/null +++ b/cm_python_openapi_sdk/models/indicator_response_dto.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from cm_python_openapi_sdk.models.access_info_dto import AccessInfoDTO +from cm_python_openapi_sdk.models.indicator_content_dto import IndicatorContentDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO +from typing import Optional, Set +from typing_extensions import Self + +class IndicatorResponseDTO(BaseModel): + """ + IndicatorResponseDTO + """ # noqa: E501 + id: Optional[StrictStr] = None + name: Annotated[str, Field(strict=True)] + type: Optional[StrictStr] = None + title: Annotated[str, Field(min_length=1, strict=True, max_length=255)] + description: Annotated[str, Field(strict=True, max_length=2000)] + content: IndicatorContentDTO + links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") + page: Optional[PageDTO] = None + access_info: Optional[AccessInfoDTO] = Field(default=None, alias="accessInfo") + version: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "name", "type", "title", "description", "content", "links", "page", "accessInfo", "version"] + + @field_validator('name') + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z][a-z0-9_-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9_-]*$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle']): + raise ValueError("must be one of enum values ('dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of IndicatorResponseDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of content + if self.content: + _dict['content'] = self.content.to_dict() + # override the default output from pydantic by calling `to_dict()` of page + if self.page: + _dict['page'] = self.page.to_dict() + # override the default output from pydantic by calling `to_dict()` of access_info + if self.access_info: + _dict['accessInfo'] = self.access_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IndicatorResponseDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "title": obj.get("title"), + "description": obj.get("description"), + "content": IndicatorContentDTO.from_dict(obj["content"]) if obj.get("content") is not None else None, + "links": obj.get("links"), + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None, + "accessInfo": AccessInfoDTO.from_dict(obj["accessInfo"]) if obj.get("accessInfo") is not None else None, + "version": obj.get("version") + }) + return _obj + + diff --git a/cm_python_openapi_sdk/models/invitation_paged_model_dto.py b/cm_python_openapi_sdk/models/invitation_paged_model_dto.py index 991ff67..610f0ca 100644 --- a/cm_python_openapi_sdk/models/invitation_paged_model_dto.py +++ b/cm_python_openapi_sdk/models/invitation_paged_model_dto.py @@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional from cm_python_openapi_sdk.models.invitation_dto import InvitationDTO -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse +from cm_python_openapi_sdk.models.page_dto import PageDTO from typing import Optional, Set from typing_extensions import Self @@ -31,7 +31,7 @@ class InvitationPagedModelDTO(BaseModel): """ # noqa: E501 links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") content: Optional[List[InvitationDTO]] = None - page: Optional[MandatoryKeysForPagableResponse] = None + page: Optional[PageDTO] = None __properties: ClassVar[List[str]] = ["links", "content", "page"] model_config = ConfigDict( @@ -97,7 +97,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "links": obj.get("links"), "content": [InvitationDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/isochrone_paged_model_dto.py b/cm_python_openapi_sdk/models/isochrone_paged_model_dto.py index f6462a2..0ee5889 100644 --- a/cm_python_openapi_sdk/models/isochrone_paged_model_dto.py +++ b/cm_python_openapi_sdk/models/isochrone_paged_model_dto.py @@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional from cm_python_openapi_sdk.models.isochrone_dto import IsochroneDTO -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse +from cm_python_openapi_sdk.models.page_dto import PageDTO from typing import Optional, Set from typing_extensions import Self @@ -31,7 +31,7 @@ class IsochronePagedModelDTO(BaseModel): """ # noqa: E501 links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") content: Optional[List[IsochroneDTO]] = None - page: Optional[MandatoryKeysForPagableResponse] = None + page: Optional[PageDTO] = None __properties: ClassVar[List[str]] = ["links", "content", "page"] model_config = ConfigDict( @@ -97,7 +97,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "links": obj.get("links"), "content": [IsochroneDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/job_detail_response.py b/cm_python_openapi_sdk/models/job_detail_response.py index d885d8c..d867804 100644 --- a/cm_python_openapi_sdk/models/job_detail_response.py +++ b/cm_python_openapi_sdk/models/job_detail_response.py @@ -18,7 +18,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated from typing import Optional, Set @@ -31,8 +31,8 @@ class JobDetailResponse(BaseModel): id: Annotated[str, Field(min_length=1, strict=True)] type: Annotated[str, Field(min_length=1, strict=True)] status: StrictStr - start_date: Optional[Dict[str, Any]] = Field(default=None, alias="startDate") - end_date: Optional[Dict[str, Any]] = Field(default=None, alias="endDate") + start_date: Optional[StrictInt] = Field(default=None, alias="startDate") + end_date: Optional[StrictInt] = Field(default=None, alias="endDate") message: Optional[StrictStr] = None result: Optional[Dict[str, Any]] = None links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") diff --git a/cm_python_openapi_sdk/models/map_context_menu_item_abstract_type.py b/cm_python_openapi_sdk/models/map_context_menu_item_abstract_type.py index 268dfd6..9693248 100644 --- a/cm_python_openapi_sdk/models/map_context_menu_item_abstract_type.py +++ b/cm_python_openapi_sdk/models/map_context_menu_item_abstract_type.py @@ -55,6 +55,9 @@ class MapContextMenuItemAbstractType(BaseModel): ) + discriminator_value_class_map: Dict[str, str] = { + } + def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -120,6 +123,71 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("type") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `type` in the input.") + + # check if data type is `CuzkParcelInfoDTO` + if _data_type == "cuzkParcelInfo": + instance.actual_instance = CuzkParcelInfoDTO.from_json(json_str) + return instance + + # check if data type is `GoogleEarthDTO` + if _data_type == "googleEarth": + instance.actual_instance = GoogleEarthDTO.from_json(json_str) + return instance + + # check if data type is `GoogleSatelliteDTO` + if _data_type == "googleSatellite": + instance.actual_instance = GoogleSatelliteDTO.from_json(json_str) + return instance + + # check if data type is `GoogleStreetViewDTO` + if _data_type == "googleStreetView": + instance.actual_instance = GoogleStreetViewDTO.from_json(json_str) + return instance + + # check if data type is `MapyczOrtophotoDTO` + if _data_type == "mapyczOrtophoto": + instance.actual_instance = MapyczOrtophotoDTO.from_json(json_str) + return instance + + # check if data type is `MapyczPanoramaDTO` + if _data_type == "mapyczPanorama": + instance.actual_instance = MapyczPanoramaDTO.from_json(json_str) + return instance + + # check if data type is `CuzkParcelInfoDTO` + if _data_type == "CuzkParcelInfoDTO": + instance.actual_instance = CuzkParcelInfoDTO.from_json(json_str) + return instance + + # check if data type is `GoogleEarthDTO` + if _data_type == "GoogleEarthDTO": + instance.actual_instance = GoogleEarthDTO.from_json(json_str) + return instance + + # check if data type is `GoogleSatelliteDTO` + if _data_type == "GoogleSatelliteDTO": + instance.actual_instance = GoogleSatelliteDTO.from_json(json_str) + return instance + + # check if data type is `GoogleStreetViewDTO` + if _data_type == "GoogleStreetViewDTO": + instance.actual_instance = GoogleStreetViewDTO.from_json(json_str) + return instance + + # check if data type is `MapyczOrtophotoDTO` + if _data_type == "MapyczOrtophotoDTO": + instance.actual_instance = MapyczOrtophotoDTO.from_json(json_str) + return instance + + # check if data type is `MapyczPanoramaDTO` + if _data_type == "MapyczPanoramaDTO": + instance.actual_instance = MapyczPanoramaDTO.from_json(json_str) + return instance + # deserialize data into GoogleSatelliteDTO try: instance.actual_instance = GoogleSatelliteDTO.from_json(json_str) diff --git a/cm_python_openapi_sdk/models/map_paged_model_dto.py b/cm_python_openapi_sdk/models/map_paged_model_dto.py index 84903cc..d3ee8b3 100644 --- a/cm_python_openapi_sdk/models/map_paged_model_dto.py +++ b/cm_python_openapi_sdk/models/map_paged_model_dto.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse -from cm_python_openapi_sdk.models.map_dto import MapDTO +from cm_python_openapi_sdk.models.map_response_dto import MapResponseDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO from typing import Optional, Set from typing_extensions import Self @@ -29,9 +29,9 @@ class MapPagedModelDTO(BaseModel): """ MapPagedModelDTO """ # noqa: E501 - content: Optional[List[MapDTO]] = None + content: Optional[List[MapResponseDTO]] = None links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") - page: Optional[MandatoryKeysForPagableResponse] = None + page: Optional[PageDTO] = None __properties: ClassVar[List[str]] = ["content", "links", "page"] model_config = ConfigDict( @@ -95,9 +95,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "content": [MapDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, + "content": [MapResponseDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "links": obj.get("links"), - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/map_response_dto.py b/cm_python_openapi_sdk/models/map_response_dto.py new file mode 100644 index 0000000..03718ef --- /dev/null +++ b/cm_python_openapi_sdk/models/map_response_dto.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from cm_python_openapi_sdk.models.access_info_dto import AccessInfoDTO +from cm_python_openapi_sdk.models.map_content_dto import MapContentDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO +from typing import Optional, Set +from typing_extensions import Self + +class MapResponseDTO(BaseModel): + """ + MapResponseDTO + """ # noqa: E501 + id: Optional[StrictStr] = None + name: Annotated[str, Field(strict=True)] + type: Optional[StrictStr] = None + title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = None + description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None + content: MapContentDTO + links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") + page: Optional[PageDTO] = None + access_info: Optional[AccessInfoDTO] = Field(default=None, alias="accessInfo") + version: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "name", "type", "title", "description", "content", "links", "page", "accessInfo", "version"] + + @field_validator('name') + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z][a-z0-9_-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9_-]*$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle']): + raise ValueError("must be one of enum values ('dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MapResponseDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of content + if self.content: + _dict['content'] = self.content.to_dict() + # override the default output from pydantic by calling `to_dict()` of page + if self.page: + _dict['page'] = self.page.to_dict() + # override the default output from pydantic by calling `to_dict()` of access_info + if self.access_info: + _dict['accessInfo'] = self.access_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MapResponseDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "title": obj.get("title"), + "description": obj.get("description"), + "content": MapContentDTO.from_dict(obj["content"]) if obj.get("content") is not None else None, + "links": obj.get("links"), + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None, + "accessInfo": AccessInfoDTO.from_dict(obj["accessInfo"]) if obj.get("accessInfo") is not None else None, + "version": obj.get("version") + }) + return _obj + + diff --git a/cm_python_openapi_sdk/models/marker_content_dto_property_filters_inner.py b/cm_python_openapi_sdk/models/marker_content_dto_property_filters_inner.py index 9a0697b..1c8e743 100644 --- a/cm_python_openapi_sdk/models/marker_content_dto_property_filters_inner.py +++ b/cm_python_openapi_sdk/models/marker_content_dto_property_filters_inner.py @@ -43,6 +43,9 @@ class MarkerContentDTOPropertyFiltersInner(BaseModel): ) + discriminator_value_class_map: Dict[str, str] = { + } + def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -88,6 +91,56 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("operator") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `operator` in the input.") + + # check if data type is `PropertyFilterCompareDTO` + if _data_type == "eq": + instance.actual_instance = PropertyFilterCompareDTO.from_json(json_str) + return instance + + # check if data type is `PropertyFilterCompareDTO` + if _data_type == "gt": + instance.actual_instance = PropertyFilterCompareDTO.from_json(json_str) + return instance + + # check if data type is `PropertyFilterCompareDTO` + if _data_type == "gte": + instance.actual_instance = PropertyFilterCompareDTO.from_json(json_str) + return instance + + # check if data type is `PropertyFilterInDTO` + if _data_type == "in": + instance.actual_instance = PropertyFilterInDTO.from_json(json_str) + return instance + + # check if data type is `PropertyFilterCompareDTO` + if _data_type == "lt": + instance.actual_instance = PropertyFilterCompareDTO.from_json(json_str) + return instance + + # check if data type is `PropertyFilterCompareDTO` + if _data_type == "lte": + instance.actual_instance = PropertyFilterCompareDTO.from_json(json_str) + return instance + + # check if data type is `PropertyFilterCompareDTO` + if _data_type == "ne": + instance.actual_instance = PropertyFilterCompareDTO.from_json(json_str) + return instance + + # check if data type is `PropertyFilterCompareDTO` + if _data_type == "PropertyFilterCompareDTO": + instance.actual_instance = PropertyFilterCompareDTO.from_json(json_str) + return instance + + # check if data type is `PropertyFilterInDTO` + if _data_type == "PropertyFilterInDTO": + instance.actual_instance = PropertyFilterInDTO.from_json(json_str) + return instance + # deserialize data into PropertyFilterCompareDTO try: instance.actual_instance = PropertyFilterCompareDTO.from_json(json_str) diff --git a/cm_python_openapi_sdk/models/marker_paged_model_dto.py b/cm_python_openapi_sdk/models/marker_paged_model_dto.py index 8f173cb..1536015 100644 --- a/cm_python_openapi_sdk/models/marker_paged_model_dto.py +++ b/cm_python_openapi_sdk/models/marker_paged_model_dto.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse -from cm_python_openapi_sdk.models.marker_dto import MarkerDTO +from cm_python_openapi_sdk.models.marker_response_dto import MarkerResponseDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO from typing import Optional, Set from typing_extensions import Self @@ -29,9 +29,9 @@ class MarkerPagedModelDTO(BaseModel): """ MarkerPagedModelDTO """ # noqa: E501 - content: Optional[List[MarkerDTO]] = None + content: Optional[List[MarkerResponseDTO]] = None links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") - page: Optional[MandatoryKeysForPagableResponse] = None + page: Optional[PageDTO] = None __properties: ClassVar[List[str]] = ["content", "links", "page"] model_config = ConfigDict( @@ -95,9 +95,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "content": [MarkerDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, + "content": [MarkerResponseDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "links": obj.get("links"), - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/marker_response_dto.py b/cm_python_openapi_sdk/models/marker_response_dto.py new file mode 100644 index 0000000..770b221 --- /dev/null +++ b/cm_python_openapi_sdk/models/marker_response_dto.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from cm_python_openapi_sdk.models.access_info_dto import AccessInfoDTO +from cm_python_openapi_sdk.models.marker_content_dto import MarkerContentDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO +from typing import Optional, Set +from typing_extensions import Self + +class MarkerResponseDTO(BaseModel): + """ + MarkerResponseDTO + """ # noqa: E501 + id: Optional[StrictStr] = None + name: Annotated[str, Field(strict=True, max_length=50)] + type: Optional[StrictStr] = None + title: Annotated[str, Field(min_length=1, strict=True, max_length=255)] + description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None + content: MarkerContentDTO + links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") + page: Optional[PageDTO] = None + access_info: Optional[AccessInfoDTO] = Field(default=None, alias="accessInfo") + version: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "name", "type", "title", "description", "content", "links", "page", "accessInfo", "version"] + + @field_validator('name') + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z][a-z0-9_-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9_-]*$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle']): + raise ValueError("must be one of enum values ('dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MarkerResponseDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of content + if self.content: + _dict['content'] = self.content.to_dict() + # override the default output from pydantic by calling `to_dict()` of page + if self.page: + _dict['page'] = self.page.to_dict() + # override the default output from pydantic by calling `to_dict()` of access_info + if self.access_info: + _dict['accessInfo'] = self.access_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MarkerResponseDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "title": obj.get("title"), + "description": obj.get("description"), + "content": MarkerContentDTO.from_dict(obj["content"]) if obj.get("content") is not None else None, + "links": obj.get("links"), + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None, + "accessInfo": AccessInfoDTO.from_dict(obj["accessInfo"]) if obj.get("accessInfo") is not None else None, + "version": obj.get("version") + }) + return _obj + + diff --git a/cm_python_openapi_sdk/models/marker_selector_paged_model_dto.py b/cm_python_openapi_sdk/models/marker_selector_paged_model_dto.py index ca0962b..c7c696b 100644 --- a/cm_python_openapi_sdk/models/marker_selector_paged_model_dto.py +++ b/cm_python_openapi_sdk/models/marker_selector_paged_model_dto.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse -from cm_python_openapi_sdk.models.marker_selector_dto import MarkerSelectorDTO +from cm_python_openapi_sdk.models.marker_selector_response_dto import MarkerSelectorResponseDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO from typing import Optional, Set from typing_extensions import Self @@ -29,9 +29,9 @@ class MarkerSelectorPagedModelDTO(BaseModel): """ MarkerSelectorPagedModelDTO """ # noqa: E501 - content: Optional[List[MarkerSelectorDTO]] = None + content: Optional[List[MarkerSelectorResponseDTO]] = None links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") - page: Optional[MandatoryKeysForPagableResponse] = None + page: Optional[PageDTO] = None __properties: ClassVar[List[str]] = ["content", "links", "page"] model_config = ConfigDict( @@ -95,9 +95,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "content": [MarkerSelectorDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, + "content": [MarkerSelectorResponseDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "links": obj.get("links"), - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/marker_selector_response_dto.py b/cm_python_openapi_sdk/models/marker_selector_response_dto.py new file mode 100644 index 0000000..aba6684 --- /dev/null +++ b/cm_python_openapi_sdk/models/marker_selector_response_dto.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from cm_python_openapi_sdk.models.access_info_dto import AccessInfoDTO +from cm_python_openapi_sdk.models.marker_selector_content_dto import MarkerSelectorContentDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO +from typing import Optional, Set +from typing_extensions import Self + +class MarkerSelectorResponseDTO(BaseModel): + """ + MarkerSelectorResponseDTO + """ # noqa: E501 + id: Optional[StrictStr] = None + name: Annotated[str, Field(strict=True)] + type: Optional[StrictStr] = None + title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = None + description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None + content: MarkerSelectorContentDTO + links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") + page: Optional[PageDTO] = None + access_info: Optional[AccessInfoDTO] = Field(default=None, alias="accessInfo") + version: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "name", "type", "title", "description", "content", "links", "page", "accessInfo", "version"] + + @field_validator('name') + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z][a-z0-9_-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9_-]*$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle']): + raise ValueError("must be one of enum values ('dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MarkerSelectorResponseDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of content + if self.content: + _dict['content'] = self.content.to_dict() + # override the default output from pydantic by calling `to_dict()` of page + if self.page: + _dict['page'] = self.page.to_dict() + # override the default output from pydantic by calling `to_dict()` of access_info + if self.access_info: + _dict['accessInfo'] = self.access_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MarkerSelectorResponseDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "title": obj.get("title"), + "description": obj.get("description"), + "content": MarkerSelectorContentDTO.from_dict(obj["content"]) if obj.get("content") is not None else None, + "links": obj.get("links"), + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None, + "accessInfo": AccessInfoDTO.from_dict(obj["accessInfo"]) if obj.get("accessInfo") is not None else None, + "version": obj.get("version") + }) + return _obj + + diff --git a/cm_python_openapi_sdk/models/membership_paged_model_dto.py b/cm_python_openapi_sdk/models/membership_paged_model_dto.py index b28ceab..f2c0b30 100644 --- a/cm_python_openapi_sdk/models/membership_paged_model_dto.py +++ b/cm_python_openapi_sdk/models/membership_paged_model_dto.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse -from cm_python_openapi_sdk.models.membership_dto import MembershipDTO +from cm_python_openapi_sdk.models.membership_response_dto import MembershipResponseDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO from typing import Optional, Set from typing_extensions import Self @@ -30,8 +30,8 @@ class MembershipPagedModelDTO(BaseModel): MembershipPagedModelDTO """ # noqa: E501 links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") - content: Optional[List[MembershipDTO]] = None - page: Optional[MandatoryKeysForPagableResponse] = None + content: Optional[List[MembershipResponseDTO]] = None + page: Optional[PageDTO] = None __properties: ClassVar[List[str]] = ["links", "content", "page"] model_config = ConfigDict( @@ -96,8 +96,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "links": obj.get("links"), - "content": [MembershipDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "content": [MembershipResponseDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/membership_response_dto.py b/cm_python_openapi_sdk/models/membership_response_dto.py new file mode 100644 index 0000000..5b439cc --- /dev/null +++ b/cm_python_openapi_sdk/models/membership_response_dto.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from cm_python_openapi_sdk.models.account_dto import AccountDTO +from typing import Optional, Set +from typing_extensions import Self + +class MembershipResponseDTO(BaseModel): + """ + MembershipResponseDTO + """ # noqa: E501 + id: Optional[StrictStr] = None + account_id: Optional[StrictStr] = Field(default=None, alias="accountId") + status: StrictStr + role: StrictStr + created_at: Optional[StrictStr] = Field(default=None, alias="createdAt") + modified_at: Optional[StrictStr] = Field(default=None, alias="modifiedAt") + account: Optional[AccountDTO] = None + links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") + __properties: ClassVar[List[str]] = ["id", "accountId", "status", "role", "createdAt", "modifiedAt", "account", "links"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ENABLED', 'DISABLED']): + raise ValueError("must be one of enum values ('ENABLED', 'DISABLED')") + return value + + @field_validator('role') + def role_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ANONYMOUS', 'VIEWER', 'VIEW_CREATOR', 'EDITOR', 'DATA_EDITOR', 'ADMIN', 'LOAD_DATA', 'DUMP_DATA', 'LOCATION_API_CONSUMER']): + raise ValueError("must be one of enum values ('ANONYMOUS', 'VIEWER', 'VIEW_CREATOR', 'EDITOR', 'DATA_EDITOR', 'ADMIN', 'LOAD_DATA', 'DUMP_DATA', 'LOCATION_API_CONSUMER')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MembershipResponseDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of account + if self.account: + _dict['account'] = self.account.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MembershipResponseDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "accountId": obj.get("accountId"), + "status": obj.get("status"), + "role": obj.get("role"), + "createdAt": obj.get("createdAt"), + "modifiedAt": obj.get("modifiedAt"), + "account": AccountDTO.from_dict(obj["account"]) if obj.get("account") is not None else None, + "links": obj.get("links") + }) + return _obj + + diff --git a/cm_python_openapi_sdk/models/metric_paged_model_dto.py b/cm_python_openapi_sdk/models/metric_paged_model_dto.py index e522af5..8e62cdd 100644 --- a/cm_python_openapi_sdk/models/metric_paged_model_dto.py +++ b/cm_python_openapi_sdk/models/metric_paged_model_dto.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse -from cm_python_openapi_sdk.models.metric_dto import MetricDTO +from cm_python_openapi_sdk.models.metric_response_dto import MetricResponseDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO from typing import Optional, Set from typing_extensions import Self @@ -29,9 +29,9 @@ class MetricPagedModelDTO(BaseModel): """ MetricPagedModelDTO """ # noqa: E501 - content: Optional[List[MetricDTO]] = None + content: Optional[List[MetricResponseDTO]] = None links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") - page: Optional[MandatoryKeysForPagableResponse] = None + page: Optional[PageDTO] = None __properties: ClassVar[List[str]] = ["content", "links", "page"] model_config = ConfigDict( @@ -95,9 +95,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "content": [MetricDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, + "content": [MetricResponseDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "links": obj.get("links"), - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/metric_response_dto.py b/cm_python_openapi_sdk/models/metric_response_dto.py new file mode 100644 index 0000000..32439ae --- /dev/null +++ b/cm_python_openapi_sdk/models/metric_response_dto.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from cm_python_openapi_sdk.models.access_info_dto import AccessInfoDTO +from cm_python_openapi_sdk.models.dwh_query_function_types import DwhQueryFunctionTypes +from cm_python_openapi_sdk.models.page_dto import PageDTO +from typing import Optional, Set +from typing_extensions import Self + +class MetricResponseDTO(BaseModel): + """ + MetricResponseDTO + """ # noqa: E501 + id: Optional[StrictStr] = None + name: Annotated[str, Field(min_length=1, strict=True, max_length=50)] + type: Optional[StrictStr] = None + title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = None + description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None + content: DwhQueryFunctionTypes + links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") + page: Optional[PageDTO] = None + access_info: Optional[AccessInfoDTO] = Field(default=None, alias="accessInfo") + version: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "name", "type", "title", "description", "content", "links", "page", "accessInfo", "version"] + + @field_validator('name') + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z][a-z0-9_-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9_-]*$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle']): + raise ValueError("must be one of enum values ('dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of MetricResponseDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of content + if self.content: + _dict['content'] = self.content.to_dict() + # override the default output from pydantic by calling `to_dict()` of page + if self.page: + _dict['page'] = self.page.to_dict() + # override the default output from pydantic by calling `to_dict()` of access_info + if self.access_info: + _dict['accessInfo'] = self.access_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of MetricResponseDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "title": obj.get("title"), + "description": obj.get("description"), + "content": DwhQueryFunctionTypes.from_dict(obj["content"]) if obj.get("content") is not None else None, + "links": obj.get("links"), + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None, + "accessInfo": AccessInfoDTO.from_dict(obj["accessInfo"]) if obj.get("accessInfo") is not None else None, + "version": obj.get("version") + }) + return _obj + + diff --git a/cm_python_openapi_sdk/models/organization_paged_model_dto.py b/cm_python_openapi_sdk/models/organization_paged_model_dto.py index 3276acf..8cdb68f 100644 --- a/cm_python_openapi_sdk/models/organization_paged_model_dto.py +++ b/cm_python_openapi_sdk/models/organization_paged_model_dto.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse from cm_python_openapi_sdk.models.organization_response_dto import OrganizationResponseDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO from typing import Optional, Set from typing_extensions import Self @@ -31,7 +31,7 @@ class OrganizationPagedModelDTO(BaseModel): """ # noqa: E501 links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") content: Optional[List[OrganizationResponseDTO]] = None - page: Optional[MandatoryKeysForPagableResponse] = None + page: Optional[PageDTO] = None __properties: ClassVar[List[str]] = ["links", "content", "page"] model_config = ConfigDict( @@ -97,7 +97,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "links": obj.get("links"), "content": [OrganizationResponseDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/page_dto.py b/cm_python_openapi_sdk/models/page_dto.py new file mode 100644 index 0000000..8ea77dc --- /dev/null +++ b/cm_python_openapi_sdk/models/page_dto.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class PageDTO(BaseModel): + """ + define keys links and page that are mandatory for all pageble responses + """ # noqa: E501 + size: StrictInt + total_elements: Optional[Any] = Field(alias="totalElements") + total_pages: StrictInt = Field(alias="totalPages") + number: StrictInt + __properties: ClassVar[List[str]] = ["size", "totalElements", "totalPages", "number"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PageDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if total_elements (nullable) is None + # and model_fields_set contains the field + if self.total_elements is None and "total_elements" in self.model_fields_set: + _dict['totalElements'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PageDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "size": obj.get("size"), + "totalElements": obj.get("totalElements"), + "totalPages": obj.get("totalPages"), + "number": obj.get("number") + }) + return _obj + + diff --git a/cm_python_openapi_sdk/models/project_paged_model_dto.py b/cm_python_openapi_sdk/models/project_paged_model_dto.py index 65ff855..51da8ce 100644 --- a/cm_python_openapi_sdk/models/project_paged_model_dto.py +++ b/cm_python_openapi_sdk/models/project_paged_model_dto.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse +from cm_python_openapi_sdk.models.page_dto import PageDTO from cm_python_openapi_sdk.models.project_response_dto import ProjectResponseDTO from typing import Optional, Set from typing_extensions import Self @@ -31,7 +31,7 @@ class ProjectPagedModelDTO(BaseModel): """ # noqa: E501 links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") content: Optional[List[ProjectResponseDTO]] = None - page: Optional[MandatoryKeysForPagableResponse] = None + page: Optional[PageDTO] = None __properties: ClassVar[List[str]] = ["links", "content", "page"] model_config = ConfigDict( @@ -97,7 +97,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "links": obj.get("links"), "content": [ProjectResponseDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/project_response_dto.py b/cm_python_openapi_sdk/models/project_response_dto.py index 1ff72b9..bf940e8 100644 --- a/cm_python_openapi_sdk/models/project_response_dto.py +++ b/cm_python_openapi_sdk/models/project_response_dto.py @@ -21,7 +21,8 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from cm_python_openapi_sdk.models.membership_dto import MembershipDTO +from cm_python_openapi_sdk.models.membership_response_dto import MembershipResponseDTO +from cm_python_openapi_sdk.models.project_response_dto_services import ProjectResponseDTOServices from typing import Optional, Set from typing_extensions import Self @@ -37,8 +38,8 @@ class ProjectResponseDTO(BaseModel): share: StrictStr created_at: StrictStr = Field(alias="createdAt") modified_at: Optional[StrictStr] = Field(default=None, alias="modifiedAt") - membership: Optional[MembershipDTO] = None - services: Optional[Dict[str, Any]] = None + membership: Optional[MembershipResponseDTO] = None + services: Optional[ProjectResponseDTOServices] = None links: List[Dict[str, Any]] = Field(description="define keys links and page that are mandatory for all pageble responses") __properties: ClassVar[List[str]] = ["id", "title", "description", "organizationId", "status", "share", "createdAt", "modifiedAt", "membership", "services", "links"] @@ -112,6 +113,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of membership if self.membership: _dict['membership'] = self.membership.to_dict() + # override the default output from pydantic by calling `to_dict()` of services + if self.services: + _dict['services'] = self.services.to_dict() return _dict @classmethod @@ -132,8 +136,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "share": obj.get("share"), "createdAt": obj.get("createdAt"), "modifiedAt": obj.get("modifiedAt"), - "membership": MembershipDTO.from_dict(obj["membership"]) if obj.get("membership") is not None else None, - "services": obj.get("services"), + "membership": MembershipResponseDTO.from_dict(obj["membership"]) if obj.get("membership") is not None else None, + "services": ProjectResponseDTOServices.from_dict(obj["services"]) if obj.get("services") is not None else None, "links": obj.get("links") }) return _obj diff --git a/cm_python_openapi_sdk/models/project_response_dto_services.py b/cm_python_openapi_sdk/models/project_response_dto_services.py new file mode 100644 index 0000000..b1a1ce5 --- /dev/null +++ b/cm_python_openapi_sdk/models/project_response_dto_services.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ProjectResponseDTOServices(BaseModel): + """ + ProjectResponseDTOServices + """ # noqa: E501 + kbc: Optional[StrictStr] = None + dwh: Optional[StrictStr] = None + md: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["kbc", "dwh", "md"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectResponseDTOServices from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectResponseDTOServices from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "kbc": obj.get("kbc"), + "dwh": obj.get("dwh"), + "md": obj.get("md") + }) + return _obj + + diff --git a/cm_python_openapi_sdk/models/project_settings_paged_model_dto.py b/cm_python_openapi_sdk/models/project_settings_paged_model_dto.py index efa99ff..e00cb8a 100644 --- a/cm_python_openapi_sdk/models/project_settings_paged_model_dto.py +++ b/cm_python_openapi_sdk/models/project_settings_paged_model_dto.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse -from cm_python_openapi_sdk.models.project_settings_dto import ProjectSettingsDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO +from cm_python_openapi_sdk.models.project_settings_response_dto import ProjectSettingsResponseDTO from typing import Optional, Set from typing_extensions import Self @@ -29,9 +29,9 @@ class ProjectSettingsPagedModelDTO(BaseModel): """ ProjectSettingsPagedModelDTO """ # noqa: E501 - content: Optional[List[ProjectSettingsDTO]] = None + content: Optional[List[ProjectSettingsResponseDTO]] = None links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") - page: Optional[MandatoryKeysForPagableResponse] = None + page: Optional[PageDTO] = None __properties: ClassVar[List[str]] = ["content", "links", "page"] model_config = ConfigDict( @@ -95,9 +95,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "content": [ProjectSettingsDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, + "content": [ProjectSettingsResponseDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "links": obj.get("links"), - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/project_settings_response_dto.py b/cm_python_openapi_sdk/models/project_settings_response_dto.py new file mode 100644 index 0000000..88ea738 --- /dev/null +++ b/cm_python_openapi_sdk/models/project_settings_response_dto.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from cm_python_openapi_sdk.models.access_info_dto import AccessInfoDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO +from cm_python_openapi_sdk.models.project_settings_content_dto import ProjectSettingsContentDTO +from typing import Optional, Set +from typing_extensions import Self + +class ProjectSettingsResponseDTO(BaseModel): + """ + ProjectSettingsResponseDTO + """ # noqa: E501 + id: Optional[StrictStr] = None + name: Annotated[str, Field(strict=True)] + type: Optional[StrictStr] = None + title: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = None + description: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=2000)]] = None + content: ProjectSettingsContentDTO + links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") + page: Optional[PageDTO] = None + access_info: Optional[AccessInfoDTO] = Field(default=None, alias="accessInfo") + version: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "name", "type", "title", "description", "content", "links", "page", "accessInfo", "version"] + + @field_validator('name') + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z][a-z0-9_-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9_-]*$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle']): + raise ValueError("must be one of enum values ('dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ProjectSettingsResponseDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of content + if self.content: + _dict['content'] = self.content.to_dict() + # override the default output from pydantic by calling `to_dict()` of page + if self.page: + _dict['page'] = self.page.to_dict() + # override the default output from pydantic by calling `to_dict()` of access_info + if self.access_info: + _dict['accessInfo'] = self.access_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ProjectSettingsResponseDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "title": obj.get("title"), + "description": obj.get("description"), + "content": ProjectSettingsContentDTO.from_dict(obj["content"]) if obj.get("content") is not None else None, + "links": obj.get("links"), + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None, + "accessInfo": AccessInfoDTO.from_dict(obj["accessInfo"]) if obj.get("accessInfo") is not None else None, + "version": obj.get("version") + }) + return _obj + + diff --git a/cm_python_openapi_sdk/models/property_values_response.py b/cm_python_openapi_sdk/models/property_values_response.py index 2f7b681..fe3d9d9 100644 --- a/cm_python_openapi_sdk/models/property_values_response.py +++ b/cm_python_openapi_sdk/models/property_values_response.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse +from cm_python_openapi_sdk.models.page_dto import PageDTO from cm_python_openapi_sdk.models.property_values_response_content_inner import PropertyValuesResponseContentInner from typing import Optional, Set from typing_extensions import Self @@ -31,7 +31,7 @@ class PropertyValuesResponse(BaseModel): """ # noqa: E501 content: List[PropertyValuesResponseContentInner] links: List[Dict[str, Any]] = Field(description="define keys links and page that are mandatory for all pageble responses") - page: MandatoryKeysForPagableResponse + page: PageDTO __properties: ClassVar[List[str]] = ["content", "links", "page"] model_config = ConfigDict( @@ -97,7 +97,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "content": [PropertyValuesResponseContentInner.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "links": obj.get("links"), - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/query_response.py b/cm_python_openapi_sdk/models/query_response.py index d0613de..60bfde8 100644 --- a/cm_python_openapi_sdk/models/query_response.py +++ b/cm_python_openapi_sdk/models/query_response.py @@ -21,7 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional from cm_python_openapi_sdk.models.execution_detail import ExecutionDetail -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse +from cm_python_openapi_sdk.models.page_dto import PageDTO from cm_python_openapi_sdk.models.query_response_item_wrapper import QueryResponseItemWrapper from typing import Optional, Set from typing_extensions import Self @@ -33,7 +33,7 @@ class QueryResponse(BaseModel): content: List[QueryResponseItemWrapper] execution_detail: Optional[ExecutionDetail] = Field(default=None, alias="executionDetail") links: List[Dict[str, Any]] = Field(description="define keys links and page that are mandatory for all pageble responses") - page: MandatoryKeysForPagableResponse + page: PageDTO __properties: ClassVar[List[str]] = ["content", "executionDetail", "links", "page"] model_config = ConfigDict( @@ -103,7 +103,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "content": [QueryResponseItemWrapper.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "executionDetail": ExecutionDetail.from_dict(obj["executionDetail"]) if obj.get("executionDetail") is not None else None, "links": obj.get("links"), - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/result_set_filter.py b/cm_python_openapi_sdk/models/result_set_filter.py index 7447085..1078c6b 100644 --- a/cm_python_openapi_sdk/models/result_set_filter.py +++ b/cm_python_openapi_sdk/models/result_set_filter.py @@ -46,6 +46,9 @@ class ResultSetFilter(BaseModel): ) + discriminator_value_class_map: Dict[str, str] = { + } + def __init__(self, *args, **kwargs) -> None: if args: if len(args) > 1: @@ -96,6 +99,71 @@ def from_json(cls, json_str: str) -> Self: error_messages = [] match = 0 + # use oneOf discriminator to lookup the data type + _data_type = json.loads(json_str).get("operator") + if not _data_type: + raise ValueError("Failed to lookup data type from the field `operator` in the input.") + + # check if data type is `ResultSetFilterComp` + if _data_type == "eq": + instance.actual_instance = ResultSetFilterComp.from_json(json_str) + return instance + + # check if data type is `ResultSetFilterComp` + if _data_type == "gt": + instance.actual_instance = ResultSetFilterComp.from_json(json_str) + return instance + + # check if data type is `ResultSetFilterComp` + if _data_type == "gte": + instance.actual_instance = ResultSetFilterComp.from_json(json_str) + return instance + + # check if data type is `ResultSetFilterIn` + if _data_type == "in": + instance.actual_instance = ResultSetFilterIn.from_json(json_str) + return instance + + # check if data type is `ResultSetFilterUnary` + if _data_type == "isNotNull": + instance.actual_instance = ResultSetFilterUnary.from_json(json_str) + return instance + + # check if data type is `ResultSetFilterUnary` + if _data_type == "isNull": + instance.actual_instance = ResultSetFilterUnary.from_json(json_str) + return instance + + # check if data type is `ResultSetFilterComp` + if _data_type == "lt": + instance.actual_instance = ResultSetFilterComp.from_json(json_str) + return instance + + # check if data type is `ResultSetFilterComp` + if _data_type == "lte": + instance.actual_instance = ResultSetFilterComp.from_json(json_str) + return instance + + # check if data type is `ResultSetFilterComp` + if _data_type == "ne": + instance.actual_instance = ResultSetFilterComp.from_json(json_str) + return instance + + # check if data type is `ResultSetFilterComp` + if _data_type == "ResultSetFilterComp": + instance.actual_instance = ResultSetFilterComp.from_json(json_str) + return instance + + # check if data type is `ResultSetFilterIn` + if _data_type == "ResultSetFilterIn": + instance.actual_instance = ResultSetFilterIn.from_json(json_str) + return instance + + # check if data type is `ResultSetFilterUnary` + if _data_type == "ResultSetFilterUnary": + instance.actual_instance = ResultSetFilterUnary.from_json(json_str) + return instance + # deserialize data into ResultSetFilterComp try: instance.actual_instance = ResultSetFilterComp.from_json(json_str) diff --git a/cm_python_openapi_sdk/models/search_query_response.py b/cm_python_openapi_sdk/models/search_query_response.py index 89d6fda..422abd8 100644 --- a/cm_python_openapi_sdk/models/search_query_response.py +++ b/cm_python_openapi_sdk/models/search_query_response.py @@ -20,7 +20,7 @@ from pydantic import BaseModel, ConfigDict from typing import Any, ClassVar, Dict, List -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse +from cm_python_openapi_sdk.models.page_dto import PageDTO from cm_python_openapi_sdk.models.search_query_hit import SearchQueryHit from typing import Optional, Set from typing_extensions import Self @@ -31,7 +31,7 @@ class SearchQueryResponse(BaseModel): """ # noqa: E501 content: List[SearchQueryHit] links: List[Dict[str, Any]] - page: MandatoryKeysForPagableResponse + page: PageDTO __properties: ClassVar[List[str]] = ["content", "links", "page"] model_config = ConfigDict( @@ -97,7 +97,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "content": [SearchQueryHit.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "links": obj.get("links"), - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/token_request_dto.py b/cm_python_openapi_sdk/models/token_request_dto.py index 6b42227..d3a309f 100644 --- a/cm_python_openapi_sdk/models/token_request_dto.py +++ b/cm_python_openapi_sdk/models/token_request_dto.py @@ -28,7 +28,7 @@ class TokenRequestDTO(BaseModel): """ TokenRequestDTO """ # noqa: E501 - refresh_token: Optional[Annotated[str, Field(min_length=30, strict=True, max_length=50)]] = None + refresh_token: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None __properties: ClassVar[List[str]] = ["refresh_token"] @field_validator('refresh_token') @@ -37,8 +37,8 @@ def refresh_token_validate_regular_expression(cls, value): if value is None: return value - if not re.match(r"^[\w_-]+$", value): - raise ValueError(r"must validate the regular expression /^[\w_-]+$/") + if not re.match(r"^[\w._-]+$", value): + raise ValueError(r"must validate the regular expression /^[\w._-]+$/") return value model_config = ConfigDict( diff --git a/cm_python_openapi_sdk/models/token_response_dto.py b/cm_python_openapi_sdk/models/token_response_dto.py index 1cb189b..9580498 100644 --- a/cm_python_openapi_sdk/models/token_response_dto.py +++ b/cm_python_openapi_sdk/models/token_response_dto.py @@ -30,10 +30,9 @@ class TokenResponseDTO(BaseModel): token_type: Optional[StrictStr] = None expires_in: Optional[StrictInt] = None access_token: StrictStr - scope: Optional[StrictStr] = None refresh_token: Optional[StrictStr] = None id_token: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["token_type", "expires_in", "access_token", "scope", "refresh_token", "id_token"] + __properties: ClassVar[List[str]] = ["token_type", "expires_in", "access_token", "refresh_token", "id_token"] model_config = ConfigDict( populate_by_name=True, @@ -89,7 +88,6 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "token_type": obj.get("token_type"), "expires_in": obj.get("expires_in"), "access_token": obj.get("access_token"), - "scope": obj.get("scope"), "refresh_token": obj.get("refresh_token"), "id_token": obj.get("id_token") }) diff --git a/cm_python_openapi_sdk/models/update_membership_dto.py b/cm_python_openapi_sdk/models/update_membership_dto.py new file mode 100644 index 0000000..6f3ff18 --- /dev/null +++ b/cm_python_openapi_sdk/models/update_membership_dto.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class UpdateMembershipDTO(BaseModel): + """ + UpdateMembershipDTO + """ # noqa: E501 + status: StrictStr + role: StrictStr + __properties: ClassVar[List[str]] = ["status", "role"] + + @field_validator('status') + def status_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ENABLED', 'DISABLED']): + raise ValueError("must be one of enum values ('ENABLED', 'DISABLED')") + return value + + @field_validator('role') + def role_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ANONYMOUS', 'VIEWER', 'VIEW_CREATOR', 'EDITOR', 'DATA_EDITOR', 'ADMIN', 'LOAD_DATA', 'DUMP_DATA', 'LOCATION_API_CONSUMER']): + raise ValueError("must be one of enum values ('ANONYMOUS', 'VIEWER', 'VIEW_CREATOR', 'EDITOR', 'DATA_EDITOR', 'ADMIN', 'LOAD_DATA', 'DUMP_DATA', 'LOCATION_API_CONSUMER')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of UpdateMembershipDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of UpdateMembershipDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status"), + "role": obj.get("role") + }) + return _obj + + diff --git a/cm_python_openapi_sdk/models/update_project_dto.py b/cm_python_openapi_sdk/models/update_project_dto.py index 1f047b6..068ed1d 100644 --- a/cm_python_openapi_sdk/models/update_project_dto.py +++ b/cm_python_openapi_sdk/models/update_project_dto.py @@ -21,6 +21,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated +from cm_python_openapi_sdk.models.project_response_dto_services import ProjectResponseDTOServices from typing import Optional, Set from typing_extensions import Self @@ -32,7 +33,7 @@ class UpdateProjectDTO(BaseModel): description: Optional[Annotated[str, Field(strict=True, max_length=2000)]] = None organization_id: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, alias="organizationId") status: Optional[StrictStr] = None - services: Optional[Dict[str, Any]] = None + services: Optional[ProjectResponseDTOServices] = None __properties: ClassVar[List[str]] = ["title", "description", "organizationId", "status", "services"] @field_validator('organization_id') @@ -94,6 +95,9 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of services + if self.services: + _dict['services'] = self.services.to_dict() return _dict @classmethod @@ -110,7 +114,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "description": obj.get("description"), "organizationId": obj.get("organizationId"), "status": obj.get("status"), - "services": obj.get("services") + "services": ProjectResponseDTOServices.from_dict(obj["services"]) if obj.get("services") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/view_paged_model_dto.py b/cm_python_openapi_sdk/models/view_paged_model_dto.py index 4a8d82c..c4c0d32 100644 --- a/cm_python_openapi_sdk/models/view_paged_model_dto.py +++ b/cm_python_openapi_sdk/models/view_paged_model_dto.py @@ -20,8 +20,8 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional -from cm_python_openapi_sdk.models.mandatory_keys_for_pagable_response import MandatoryKeysForPagableResponse -from cm_python_openapi_sdk.models.view_dto import ViewDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO +from cm_python_openapi_sdk.models.view_response_dto import ViewResponseDTO from typing import Optional, Set from typing_extensions import Self @@ -29,9 +29,9 @@ class ViewPagedModelDTO(BaseModel): """ ViewPagedModelDTO """ # noqa: E501 - content: Optional[List[ViewDTO]] = None + content: Optional[List[ViewResponseDTO]] = None links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") - page: Optional[MandatoryKeysForPagableResponse] = None + page: Optional[PageDTO] = None __properties: ClassVar[List[str]] = ["content", "links", "page"] model_config = ConfigDict( @@ -95,9 +95,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "content": [ViewDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, + "content": [ViewResponseDTO.from_dict(_item) for _item in obj["content"]] if obj.get("content") is not None else None, "links": obj.get("links"), - "page": MandatoryKeysForPagableResponse.from_dict(obj["page"]) if obj.get("page") is not None else None + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None }) return _obj diff --git a/cm_python_openapi_sdk/models/view_response_dto.py b/cm_python_openapi_sdk/models/view_response_dto.py new file mode 100644 index 0000000..f1e3e63 --- /dev/null +++ b/cm_python_openapi_sdk/models/view_response_dto.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from cm_python_openapi_sdk.models.access_info_dto import AccessInfoDTO +from cm_python_openapi_sdk.models.page_dto import PageDTO +from cm_python_openapi_sdk.models.view_content_dto import ViewContentDTO +from typing import Optional, Set +from typing_extensions import Self + +class ViewResponseDTO(BaseModel): + """ + ViewResponseDTO + """ # noqa: E501 + id: Optional[StrictStr] = None + name: Annotated[str, Field(strict=True)] + type: Optional[StrictStr] = None + title: Annotated[str, Field(min_length=1, strict=True, max_length=255)] + description: Annotated[str, Field(strict=True, max_length=2000)] + content: ViewContentDTO + links: Optional[List[Dict[str, Any]]] = Field(default=None, description="define keys links and page that are mandatory for all pageble responses") + page: Optional[PageDTO] = None + access_info: Optional[AccessInfoDTO] = Field(default=None, alias="accessInfo") + version: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "name", "type", "title", "description", "content", "links", "page", "accessInfo", "version"] + + @field_validator('name') + def name_validate_regular_expression(cls, value): + """Validates the regular expression""" + if not re.match(r"^[a-z][a-z0-9_-]*$", value): + raise ValueError(r"must validate the regular expression /^[a-z][a-z0-9_-]*$/") + return value + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle']): + raise ValueError("must be one of enum values ('dataset', 'view', 'dashboard', 'indicatorDrill', 'indicator', 'metric', 'marker', 'markerSelector', 'export', 'dataPermission', 'projectSettings', 'share', 'map', 'attributeStyle')") + return value + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ViewResponseDTO from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of content + if self.content: + _dict['content'] = self.content.to_dict() + # override the default output from pydantic by calling `to_dict()` of page + if self.page: + _dict['page'] = self.page.to_dict() + # override the default output from pydantic by calling `to_dict()` of access_info + if self.access_info: + _dict['accessInfo'] = self.access_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ViewResponseDTO from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type"), + "title": obj.get("title"), + "description": obj.get("description"), + "content": ViewContentDTO.from_dict(obj["content"]) if obj.get("content") is not None else None, + "links": obj.get("links"), + "page": PageDTO.from_dict(obj["page"]) if obj.get("page") is not None else None, + "accessInfo": AccessInfoDTO.from_dict(obj["accessInfo"]) if obj.get("accessInfo") is not None else None, + "version": obj.get("version") + }) + return _obj + + diff --git a/docs/AccessInfoDTO.md b/docs/AccessInfoDTO.md new file mode 100644 index 0000000..ffd3b9e --- /dev/null +++ b/docs/AccessInfoDTO.md @@ -0,0 +1,32 @@ +# AccessInfoDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **str** | | [optional] +**created_by** | **str** | | [optional] +**modified_at** | **str** | | [optional] +**modified_by** | **str** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.access_info_dto import AccessInfoDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of AccessInfoDTO from a JSON string +access_info_dto_instance = AccessInfoDTO.from_json(json) +# print the JSON string representation of the object +print(AccessInfoDTO.to_json()) + +# convert the object into a dict +access_info_dto_dict = access_info_dto_instance.to_dict() +# create an instance of AccessInfoDTO from a dict +access_info_dto_from_dict = AccessInfoDTO.from_dict(access_info_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AccountDTO.md b/docs/AccountDTO.md index f87cfe9..efa869f 100644 --- a/docs/AccountDTO.md +++ b/docs/AccountDTO.md @@ -12,10 +12,8 @@ Name | Type | Description | Notes **status** | **str** | | [optional] **anonymous** | **bool** | | [optional] **phone_number** | **str** | | [optional] -**require_additional_attributes** | **bool** | | [optional] **preferences** | [**AccountPreferences**](AccountPreferences.md) | | [optional] **onboarding** | [**AccountOnboardingParameters**](AccountOnboardingParameters.md) | | [optional] -**job_info** | [**AccountJobInfo**](AccountJobInfo.md) | | [optional] **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] ## Example diff --git a/docs/AccountsApi.md b/docs/AccountsApi.md index 6317ce8..5212341 100644 --- a/docs/AccountsApi.md +++ b/docs/AccountsApi.md @@ -5,13 +5,11 @@ All URIs are relative to *https://staging.dev.clevermaps.io/rest* Method | HTTP request | Description ------------- | ------------- | ------------- [**change_onboarding**](AccountsApi.md#change_onboarding) | **PUT** /accounts/{accountId}/onboarding | Change account onboarding -[**change_password**](AccountsApi.md#change_password) | **PUT** /accounts/{accountId}/password | Change password [**change_preferences**](AccountsApi.md#change_preferences) | **PUT** /accounts/{accountId}/preferences | Change account preferences [**delete_account_by_id**](AccountsApi.md#delete_account_by_id) | **DELETE** /accounts/{accountId} | Delete account. [**get_account_by_account_id**](AccountsApi.md#get_account_by_account_id) | **GET** /accounts/{accountId} | Get account by accountId [**get_account_by_email**](AccountsApi.md#get_account_by_email) | **GET** /accounts | Find if account with email exists. [**get_current_account**](AccountsApi.md#get_current_account) | **GET** /accounts/current | Get current account. -[**register_account**](AccountsApi.md#register_account) | **POST** /accounts | Register new account # **change_onboarding** @@ -97,94 +95,6 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **change_password** -> change_password(account_id, password_change_dto=password_change_dto) - -Change password - -Set password for user Account. New password must match all of following restrictions: -- minimal length 8 characters -- must contains at least one uppercase character -- must contains at least one lowercase character -- must contains at least one numeric character - -**Security:** -User is allowed to change only it's own password. Bearer token must match `accountId` - - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.password_change_dto import PasswordChangeDTO -from cm_python_openapi_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest -# See configuration.py for a list of all supported configuration parameters. -configuration = cm_python_openapi_sdk.Configuration( - host = "https://staging.dev.clevermaps.io/rest" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = cm_python_openapi_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with cm_python_openapi_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = cm_python_openapi_sdk.AccountsApi(api_client) - account_id = 'account_id_example' # str | Id of the account - password_change_dto = cm_python_openapi_sdk.PasswordChangeDTO() # PasswordChangeDTO | (optional) - - try: - # Change password - api_instance.change_password(account_id, password_change_dto=password_change_dto) - except Exception as e: - print("Exception when calling AccountsApi->change_password: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **account_id** | **str**| Id of the account | - **password_change_dto** | [**PasswordChangeDTO**](PasswordChangeDTO.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Password changed | - | -**400** | Bad request, new password does not match requirements for password or old password is invalid | - | -**403** | accountId does not match user account provided in bearer token | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - # **change_preferences** > change_preferences(account_id, account_preferences=account_preferences) @@ -585,71 +495,3 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **register_account** -> AccountDTO register_account(new_account_dto) - -Register new account - -### Example - - -```python -import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.account_dto import AccountDTO -from cm_python_openapi_sdk.models.new_account_dto import NewAccountDTO -from cm_python_openapi_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest -# See configuration.py for a list of all supported configuration parameters. -configuration = cm_python_openapi_sdk.Configuration( - host = "https://staging.dev.clevermaps.io/rest" -) - - -# Enter a context with an instance of the API client -with cm_python_openapi_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = cm_python_openapi_sdk.AccountsApi(api_client) - new_account_dto = cm_python_openapi_sdk.NewAccountDTO() # NewAccountDTO | - - try: - # Register new account - api_response = api_instance.register_account(new_account_dto) - print("The response of AccountsApi->register_account:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AccountsApi->register_account: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **new_account_dto** | [**NewAccountDTO**](NewAccountDTO.md)| | - -### Return type - -[**AccountDTO**](AccountDTO.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Account was successfully registered | - | -**409** | Account with this email already exists | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/AttributeStylePagedModelDTO.md b/docs/AttributeStylePagedModelDTO.md index afcd623..b9be756 100644 --- a/docs/AttributeStylePagedModelDTO.md +++ b/docs/AttributeStylePagedModelDTO.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**content** | [**List[AttributeStyleDTO]**](AttributeStyleDTO.md) | | [optional] +**content** | [**List[AttributeStyleResponseDTO]**](AttributeStyleResponseDTO.md) | | [optional] **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] ## Example diff --git a/docs/AttributeStyleResponseDTO.md b/docs/AttributeStyleResponseDTO.md new file mode 100644 index 0000000..b21b962 --- /dev/null +++ b/docs/AttributeStyleResponseDTO.md @@ -0,0 +1,38 @@ +# AttributeStyleResponseDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | +**type** | **str** | | [optional] +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**content** | [**AttributeStyleContentDTO**](AttributeStyleContentDTO.md) | | +**links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] +**access_info** | [**AccessInfoDTO**](AccessInfoDTO.md) | | [optional] +**version** | **int** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.attribute_style_response_dto import AttributeStyleResponseDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of AttributeStyleResponseDTO from a JSON string +attribute_style_response_dto_instance = AttributeStyleResponseDTO.from_json(json) +# print the JSON string representation of the object +print(AttributeStyleResponseDTO.to_json()) + +# convert the object into a dict +attribute_style_response_dto_dict = attribute_style_response_dto_instance.to_dict() +# create an instance of AttributeStyleResponseDTO from a dict +attribute_style_response_dto_from_dict = AttributeStyleResponseDTO.from_dict(attribute_style_response_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AttributeStylesApi.md b/docs/AttributeStylesApi.md index f6e6ea1..06caefb 100644 --- a/docs/AttributeStylesApi.md +++ b/docs/AttributeStylesApi.md @@ -8,11 +8,12 @@ Method | HTTP request | Description [**delete_attribute_style_by_id**](AttributeStylesApi.md#delete_attribute_style_by_id) | **DELETE** /projects/{projectId}/md/attributeStyles/{id} | Deletes attribute style by id [**get_all_attribute_styles**](AttributeStylesApi.md#get_all_attribute_styles) | **GET** /projects/{projectId}/md/attributeStyles | Returns paged collection of all Attribute Styles in a project [**get_attribute_style_by_id**](AttributeStylesApi.md#get_attribute_style_by_id) | **GET** /projects/{projectId}/md/attributeStyles/{id} | Gets attribute style by id +[**get_attribute_style_by_name**](AttributeStylesApi.md#get_attribute_style_by_name) | **GET** /projects/{projectId}/md/attributeStyles/{name} | Gets attribute style by name [**update_attribute_style_by_id**](AttributeStylesApi.md#update_attribute_style_by_id) | **PUT** /projects/{projectId}/md/attributeStyles/{id} | Updates attribute style by id # **create_attribute_style** -> AttributeStyleDTO create_attribute_style(project_id, attribute_style_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> AttributeStyleResponseDTO create_attribute_style(project_id, attribute_style_dto, x_can_strict_json_validation=x_can_strict_json_validation) Creates new attribute style @@ -25,6 +26,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.attribute_style_dto import AttributeStyleDTO +from cm_python_openapi_sdk.models.attribute_style_response_dto import AttributeStyleResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -74,7 +76,7 @@ Name | Type | Description | Notes ### Return type -[**AttributeStyleDTO**](AttributeStyleDTO.md) +[**AttributeStyleResponseDTO**](AttributeStyleResponseDTO.md) ### Authorization @@ -256,7 +258,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_attribute_style_by_id** -> AttributeStyleDTO get_attribute_style_by_id(project_id, id) +> AttributeStyleResponseDTO get_attribute_style_by_id(project_id, id) Gets attribute style by id @@ -266,7 +268,7 @@ Gets attribute style by id ```python import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.attribute_style_dto import AttributeStyleDTO +from cm_python_openapi_sdk.models.attribute_style_response_dto import AttributeStyleResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -314,7 +316,86 @@ Name | Type | Description | Notes ### Return type -[**AttributeStyleDTO**](AttributeStyleDTO.md) +[**AttributeStyleResponseDTO**](AttributeStyleResponseDTO.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**404** | Attribute style not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_attribute_style_by_name** +> AttributeStyleResponseDTO get_attribute_style_by_name(project_id, name) + +Gets attribute style by name + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.attribute_style_response_dto import AttributeStyleResponseDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.AttributeStylesApi(api_client) + project_id = 'project_id_example' # str | Id of the project + name = 'name_example' # str | Name of the attribute style + + try: + # Gets attribute style by name + api_response = api_instance.get_attribute_style_by_name(project_id, name) + print("The response of AttributeStylesApi->get_attribute_style_by_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AttributeStylesApi->get_attribute_style_by_name: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **name** | **str**| Name of the attribute style | + +### Return type + +[**AttributeStyleResponseDTO**](AttributeStyleResponseDTO.md) ### Authorization @@ -335,7 +416,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_attribute_style_by_id** -> AttributeStyleDTO update_attribute_style_by_id(project_id, id, if_match, attribute_style_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> AttributeStyleResponseDTO update_attribute_style_by_id(project_id, id, if_match, attribute_style_dto, x_can_strict_json_validation=x_can_strict_json_validation) Updates attribute style by id @@ -348,6 +429,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.attribute_style_dto import AttributeStyleDTO +from cm_python_openapi_sdk.models.attribute_style_response_dto import AttributeStyleResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -401,7 +483,7 @@ Name | Type | Description | Notes ### Return type -[**AttributeStyleDTO**](AttributeStyleDTO.md) +[**AttributeStyleResponseDTO**](AttributeStyleResponseDTO.md) ### Authorization diff --git a/docs/CreateMembershipDTO.md b/docs/CreateMembershipDTO.md index e2d42c2..7db8fcb 100644 --- a/docs/CreateMembershipDTO.md +++ b/docs/CreateMembershipDTO.md @@ -5,8 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**account_id** | **str** | | -**status** | **str** | | +**email** | **str** | | [optional] +**account_id** | **str** | | [optional] +**status** | **str** | | [optional] **role** | **str** | | ## Example diff --git a/docs/DashboardPagedModelDTO.md b/docs/DashboardPagedModelDTO.md index 0111059..52bdb2a 100644 --- a/docs/DashboardPagedModelDTO.md +++ b/docs/DashboardPagedModelDTO.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**content** | [**List[DashboardDTO]**](DashboardDTO.md) | | [optional] +**content** | [**List[DashboardResponseDTO]**](DashboardResponseDTO.md) | | [optional] **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] ## Example diff --git a/docs/DashboardResponseDTO.md b/docs/DashboardResponseDTO.md new file mode 100644 index 0000000..053d8b4 --- /dev/null +++ b/docs/DashboardResponseDTO.md @@ -0,0 +1,38 @@ +# DashboardResponseDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | +**type** | **str** | | [optional] +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**content** | [**DashboardContentDTO**](DashboardContentDTO.md) | | +**links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] +**access_info** | [**AccessInfoDTO**](AccessInfoDTO.md) | | [optional] +**version** | **int** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.dashboard_response_dto import DashboardResponseDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of DashboardResponseDTO from a JSON string +dashboard_response_dto_instance = DashboardResponseDTO.from_json(json) +# print the JSON string representation of the object +print(DashboardResponseDTO.to_json()) + +# convert the object into a dict +dashboard_response_dto_dict = dashboard_response_dto_instance.to_dict() +# create an instance of DashboardResponseDTO from a dict +dashboard_response_dto_from_dict = DashboardResponseDTO.from_dict(dashboard_response_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DashboardsApi.md b/docs/DashboardsApi.md index efaa07e..09f629c 100644 --- a/docs/DashboardsApi.md +++ b/docs/DashboardsApi.md @@ -8,11 +8,12 @@ Method | HTTP request | Description [**delete_dashboard_by_id**](DashboardsApi.md#delete_dashboard_by_id) | **DELETE** /projects/{projectId}/md/dashboards/{id} | Deletes dashboard by id [**get_all_dashboards**](DashboardsApi.md#get_all_dashboards) | **GET** /projects/{projectId}/md/dashboards | Returns paged collection of all Dashboards in a project [**get_dashboard_by_id**](DashboardsApi.md#get_dashboard_by_id) | **GET** /projects/{projectId}/md/dashboards/{id} | Gets dashboard by id +[**get_dashboard_by_name**](DashboardsApi.md#get_dashboard_by_name) | **GET** /projects/{projectId}/md/dashboards/{name} | Gets dashboard by name [**update_dashboard_by_id**](DashboardsApi.md#update_dashboard_by_id) | **PUT** /projects/{projectId}/md/dashboards/{id} | Updates dashboard by id # **create_dashboard** -> DashboardDTO create_dashboard(project_id, dashboard_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> DashboardResponseDTO create_dashboard(project_id, dashboard_dto, x_can_strict_json_validation=x_can_strict_json_validation) Creates new dashboard @@ -25,6 +26,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.dashboard_dto import DashboardDTO +from cm_python_openapi_sdk.models.dashboard_response_dto import DashboardResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -74,7 +76,7 @@ Name | Type | Description | Notes ### Return type -[**DashboardDTO**](DashboardDTO.md) +[**DashboardResponseDTO**](DashboardResponseDTO.md) ### Authorization @@ -256,7 +258,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_dashboard_by_id** -> DashboardDTO get_dashboard_by_id(project_id, id) +> DashboardResponseDTO get_dashboard_by_id(project_id, id) Gets dashboard by id @@ -266,7 +268,7 @@ Gets dashboard by id ```python import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.dashboard_dto import DashboardDTO +from cm_python_openapi_sdk.models.dashboard_response_dto import DashboardResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -314,7 +316,86 @@ Name | Type | Description | Notes ### Return type -[**DashboardDTO**](DashboardDTO.md) +[**DashboardResponseDTO**](DashboardResponseDTO.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**404** | Dashboard not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_dashboard_by_name** +> DashboardResponseDTO get_dashboard_by_name(project_id, name) + +Gets dashboard by name + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.dashboard_response_dto import DashboardResponseDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.DashboardsApi(api_client) + project_id = 'project_id_example' # str | Id of the project + name = 'name_example' # str | Name of the dashboard + + try: + # Gets dashboard by name + api_response = api_instance.get_dashboard_by_name(project_id, name) + print("The response of DashboardsApi->get_dashboard_by_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DashboardsApi->get_dashboard_by_name: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **name** | **str**| Name of the dashboard | + +### Return type + +[**DashboardResponseDTO**](DashboardResponseDTO.md) ### Authorization @@ -335,7 +416,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_dashboard_by_id** -> DashboardDTO update_dashboard_by_id(project_id, id, if_match, dashboard_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> DashboardResponseDTO update_dashboard_by_id(project_id, id, if_match, dashboard_dto, x_can_strict_json_validation=x_can_strict_json_validation) Updates dashboard by id @@ -348,6 +429,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.dashboard_dto import DashboardDTO +from cm_python_openapi_sdk.models.dashboard_response_dto import DashboardResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -401,7 +483,7 @@ Name | Type | Description | Notes ### Return type -[**DashboardDTO**](DashboardDTO.md) +[**DashboardResponseDTO**](DashboardResponseDTO.md) ### Authorization diff --git a/docs/DataPermissionContentDTO.md b/docs/DataPermissionContentDTO.md index ceecb30..dccdc36 100644 --- a/docs/DataPermissionContentDTO.md +++ b/docs/DataPermissionContentDTO.md @@ -5,7 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**account_id** | **str** | | +**email** | **str** | | [optional] +**account_id** | **str** | | [optional] **filters** | [**List[FilterBy]**](FilterBy.md) | | ## Example diff --git a/docs/DataPermissionPagedModelDTO.md b/docs/DataPermissionPagedModelDTO.md index 2b63446..d848620 100644 --- a/docs/DataPermissionPagedModelDTO.md +++ b/docs/DataPermissionPagedModelDTO.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**content** | [**List[DataPermissionDTO]**](DataPermissionDTO.md) | | [optional] +**content** | [**List[DataPermissionResponseDTO]**](DataPermissionResponseDTO.md) | | [optional] **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] ## Example diff --git a/docs/DataPermissionResponseDTO.md b/docs/DataPermissionResponseDTO.md new file mode 100644 index 0000000..047afc4 --- /dev/null +++ b/docs/DataPermissionResponseDTO.md @@ -0,0 +1,38 @@ +# DataPermissionResponseDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | +**type** | **str** | | [optional] +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**content** | [**DataPermissionContentDTO**](DataPermissionContentDTO.md) | | +**links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] +**access_info** | [**AccessInfoDTO**](AccessInfoDTO.md) | | [optional] +**version** | **int** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.data_permission_response_dto import DataPermissionResponseDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of DataPermissionResponseDTO from a JSON string +data_permission_response_dto_instance = DataPermissionResponseDTO.from_json(json) +# print the JSON string representation of the object +print(DataPermissionResponseDTO.to_json()) + +# convert the object into a dict +data_permission_response_dto_dict = data_permission_response_dto_instance.to_dict() +# create an instance of DataPermissionResponseDTO from a dict +data_permission_response_dto_from_dict = DataPermissionResponseDTO.from_dict(data_permission_response_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DataPermissionsApi.md b/docs/DataPermissionsApi.md index 88423c8..47940fd 100644 --- a/docs/DataPermissionsApi.md +++ b/docs/DataPermissionsApi.md @@ -8,11 +8,12 @@ Method | HTTP request | Description [**delete_data_permission_by_id**](DataPermissionsApi.md#delete_data_permission_by_id) | **DELETE** /projects/{projectId}/md/dataPermissions/{id} | Deletes data permission by id [**get_all_data_permissions**](DataPermissionsApi.md#get_all_data_permissions) | **GET** /projects/{projectId}/md/dataPermissions | Returns paged collection of all data permissions in a project [**get_data_permission_by_id**](DataPermissionsApi.md#get_data_permission_by_id) | **GET** /projects/{projectId}/md/dataPermissions/{id} | Gets data permission by id +[**get_data_permission_by_name**](DataPermissionsApi.md#get_data_permission_by_name) | **GET** /projects/{projectId}/md/dataPermissions/{name} | Gets data permission by name [**update_data_permission_by_id**](DataPermissionsApi.md#update_data_permission_by_id) | **PUT** /projects/{projectId}/md/dataPermissions/{id} | Updates data permission by id # **create_data_permission** -> DataPermissionDTO create_data_permission(project_id, data_permission_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> DataPermissionResponseDTO create_data_permission(project_id, data_permission_dto, x_can_strict_json_validation=x_can_strict_json_validation) Creates new data permission @@ -25,6 +26,7 @@ Restricted to ADMIN project role that has the permission to update data permissi ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.data_permission_dto import DataPermissionDTO +from cm_python_openapi_sdk.models.data_permission_response_dto import DataPermissionResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -74,7 +76,7 @@ Name | Type | Description | Notes ### Return type -[**DataPermissionDTO**](DataPermissionDTO.md) +[**DataPermissionResponseDTO**](DataPermissionResponseDTO.md) ### Authorization @@ -258,7 +260,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_data_permission_by_id** -> DataPermissionDTO get_data_permission_by_id(project_id, id) +> DataPermissionResponseDTO get_data_permission_by_id(project_id, id) Gets data permission by id @@ -270,7 +272,7 @@ Restricted to ADMIN project role that has the permission to update data permissi ```python import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.data_permission_dto import DataPermissionDTO +from cm_python_openapi_sdk.models.data_permission_response_dto import DataPermissionResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -318,7 +320,88 @@ Name | Type | Description | Notes ### Return type -[**DataPermissionDTO**](DataPermissionDTO.md) +[**DataPermissionResponseDTO**](DataPermissionResponseDTO.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**404** | Data permission not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_data_permission_by_name** +> DataPermissionResponseDTO get_data_permission_by_name(project_id, name) + +Gets data permission by name + +Restricted to ADMIN project role that has the permission to update data permissions of the project. + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.data_permission_response_dto import DataPermissionResponseDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.DataPermissionsApi(api_client) + project_id = 'project_id_example' # str | Id of the project + name = 'name_example' # str | Name of the data permission + + try: + # Gets data permission by name + api_response = api_instance.get_data_permission_by_name(project_id, name) + print("The response of DataPermissionsApi->get_data_permission_by_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DataPermissionsApi->get_data_permission_by_name: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **name** | **str**| Name of the data permission | + +### Return type + +[**DataPermissionResponseDTO**](DataPermissionResponseDTO.md) ### Authorization @@ -339,7 +422,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_data_permission_by_id** -> DataPermissionDTO update_data_permission_by_id(project_id, id, if_match, data_permission_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> DataPermissionResponseDTO update_data_permission_by_id(project_id, id, if_match, data_permission_dto, x_can_strict_json_validation=x_can_strict_json_validation) Updates data permission by id @@ -352,6 +435,7 @@ Restricted to ADMIN project role that has the permission to update data permissi ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.data_permission_dto import DataPermissionDTO +from cm_python_openapi_sdk.models.data_permission_response_dto import DataPermissionResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -405,7 +489,7 @@ Name | Type | Description | Notes ### Return type -[**DataPermissionDTO**](DataPermissionDTO.md) +[**DataPermissionResponseDTO**](DataPermissionResponseDTO.md) ### Authorization diff --git a/docs/DataSourcePagedModelDTO.md b/docs/DataSourcePagedModelDTO.md index e0e97f8..e7eb385 100644 --- a/docs/DataSourcePagedModelDTO.md +++ b/docs/DataSourcePagedModelDTO.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **content** | [**List[DataSourceDTO]**](DataSourceDTO.md) | | [optional] **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] ## Example diff --git a/docs/DataUploadApi.md b/docs/DataUploadApi.md index aca702f..d32a769 100644 --- a/docs/DataUploadApi.md +++ b/docs/DataUploadApi.md @@ -139,7 +139,7 @@ To upload a large CSV file in multiple parts, follow these steps: 2. **Receive a response** containing: - An `id` identifying the upload. - A list of **uploadUrls**, which are S3 pre-signed URLs, one for each part. -3. **Split the CSV file** and upload each part to its corresponding URL using: PUT {uploadUrl} +3. **Split the CSV file**, compress each part with GZIP and upload each part to its corresponding URL using: PUT {uploadUrl} - No additional authentication is required. 4. **Complete the upload** - Once all parts are uploaded, send the [Complete Multipart Data Upload](#operation/completeMultipartUpload) request. diff --git a/docs/DatasetPagedModelDTO.md b/docs/DatasetPagedModelDTO.md index 85bb20a..e1b38dd 100644 --- a/docs/DatasetPagedModelDTO.md +++ b/docs/DatasetPagedModelDTO.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**content** | [**List[DatasetDTO]**](DatasetDTO.md) | | [optional] +**content** | [**List[DatasetResponseDTO]**](DatasetResponseDTO.md) | | [optional] **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] ## Example diff --git a/docs/DatasetResponseDTO.md b/docs/DatasetResponseDTO.md new file mode 100644 index 0000000..dd88d69 --- /dev/null +++ b/docs/DatasetResponseDTO.md @@ -0,0 +1,42 @@ +# DatasetResponseDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | +**type** | **str** | | +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**origin** | **str** | | [optional] +**properties** | [**DatasetPropertiesDTO**](DatasetPropertiesDTO.md) | | [optional] +**ref** | [**DatasetType**](DatasetType.md) | | +**data_sources** | [**List[DataSourceDTO]**](DataSourceDTO.md) | | [optional] +**content** | **object** | | [optional] +**links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] +**access_info** | [**AccessInfoDTO**](AccessInfoDTO.md) | | [optional] +**version** | **int** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.dataset_response_dto import DatasetResponseDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of DatasetResponseDTO from a JSON string +dataset_response_dto_instance = DatasetResponseDTO.from_json(json) +# print the JSON string representation of the object +print(DatasetResponseDTO.to_json()) + +# convert the object into a dict +dataset_response_dto_dict = dataset_response_dto_instance.to_dict() +# create an instance of DatasetResponseDTO from a dict +dataset_response_dto_from_dict = DatasetResponseDTO.from_dict(dataset_response_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DatasetsApi.md b/docs/DatasetsApi.md index 4950144..972c3f7 100644 --- a/docs/DatasetsApi.md +++ b/docs/DatasetsApi.md @@ -9,11 +9,12 @@ Method | HTTP request | Description [**generate_dataset_from_csv**](DatasetsApi.md#generate_dataset_from_csv) | **POST** /projects/{projectId}/md/datasets/generateDataset | Generate dataset from CSV [**get_all_datasets**](DatasetsApi.md#get_all_datasets) | **GET** /projects/{projectId}/md/datasets | Returns paged collection of all datasets in a project [**get_dataset_by_id**](DatasetsApi.md#get_dataset_by_id) | **GET** /projects/{projectId}/md/datasets/{id} | Gets dataset by id +[**get_dataset_by_name**](DatasetsApi.md#get_dataset_by_name) | **GET** /projects/{projectId}/md/datasets/{name} | Gets dataset by name [**update_dataset_by_id**](DatasetsApi.md#update_dataset_by_id) | **PUT** /projects/{projectId}/md/datasets/{id} | Updates dataset by id # **create_dataset** -> DatasetDTO create_dataset(project_id, dataset_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> DatasetResponseDTO create_dataset(project_id, dataset_dto, x_can_strict_json_validation=x_can_strict_json_validation) Creates new dataset @@ -26,6 +27,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.dataset_dto import DatasetDTO +from cm_python_openapi_sdk.models.dataset_response_dto import DatasetResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -75,7 +77,7 @@ Name | Type | Description | Notes ### Return type -[**DatasetDTO**](DatasetDTO.md) +[**DatasetResponseDTO**](DatasetResponseDTO.md) ### Authorization @@ -356,7 +358,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_dataset_by_id** -> DatasetDTO get_dataset_by_id(project_id, id) +> DatasetResponseDTO get_dataset_by_id(project_id, id) Gets dataset by id @@ -366,7 +368,7 @@ Gets dataset by id ```python import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.dataset_dto import DatasetDTO +from cm_python_openapi_sdk.models.dataset_response_dto import DatasetResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -414,7 +416,86 @@ Name | Type | Description | Notes ### Return type -[**DatasetDTO**](DatasetDTO.md) +[**DatasetResponseDTO**](DatasetResponseDTO.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**404** | Dataset not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_dataset_by_name** +> DatasetResponseDTO get_dataset_by_name(project_id, name) + +Gets dataset by name + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.dataset_response_dto import DatasetResponseDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.DatasetsApi(api_client) + project_id = 'project_id_example' # str | Id of the project + name = 'name_example' # str | Name of the dataset + + try: + # Gets dataset by name + api_response = api_instance.get_dataset_by_name(project_id, name) + print("The response of DatasetsApi->get_dataset_by_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DatasetsApi->get_dataset_by_name: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **name** | **str**| Name of the dataset | + +### Return type + +[**DatasetResponseDTO**](DatasetResponseDTO.md) ### Authorization @@ -435,7 +516,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_dataset_by_id** -> DatasetDTO update_dataset_by_id(project_id, id, if_match, dataset_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> DatasetResponseDTO update_dataset_by_id(project_id, id, if_match, dataset_dto, x_can_strict_json_validation=x_can_strict_json_validation) Updates dataset by id @@ -448,6 +529,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.dataset_dto import DatasetDTO +from cm_python_openapi_sdk.models.dataset_response_dto import DatasetResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -501,7 +583,7 @@ Name | Type | Description | Notes ### Return type -[**DatasetDTO**](DatasetDTO.md) +[**DatasetResponseDTO**](DatasetResponseDTO.md) ### Authorization diff --git a/docs/DwhQueryPropertyTypes.md b/docs/DwhQueryPropertyTypes.md index fef4e45..4e29e4c 100644 --- a/docs/DwhQueryPropertyTypes.md +++ b/docs/DwhQueryPropertyTypes.md @@ -9,8 +9,8 @@ Name | Type | Description | Notes **type** | **str** | | **value** | **str** | | **metric** | **str** | | -**content** | **List[object]** | | -**options** | **object** | | [optional] +**content** | [**List[DwhQueryPropertyTypesFunctionRowNumber]**](DwhQueryPropertyTypesFunctionRowNumber.md) | | +**options** | **object** | | ## Example diff --git a/docs/DwhQueryPropertyTypesFilterComp.md b/docs/DwhQueryPropertyTypesFilterComp.md new file mode 100644 index 0000000..f41b902 --- /dev/null +++ b/docs/DwhQueryPropertyTypesFilterComp.md @@ -0,0 +1,34 @@ +# DwhQueryPropertyTypesFilterComp + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**type** | **str** | | +**value** | **str** | | +**metric** | **str** | | +**content** | **List[object]** | | +**options** | **object** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.dwh_query_property_types_filter_comp import DwhQueryPropertyTypesFilterComp + +# TODO update the JSON string below +json = "{}" +# create an instance of DwhQueryPropertyTypesFilterComp from a JSON string +dwh_query_property_types_filter_comp_instance = DwhQueryPropertyTypesFilterComp.from_json(json) +# print the JSON string representation of the object +print(DwhQueryPropertyTypesFilterComp.to_json()) + +# convert the object into a dict +dwh_query_property_types_filter_comp_dict = dwh_query_property_types_filter_comp_instance.to_dict() +# create an instance of DwhQueryPropertyTypesFilterComp from a dict +dwh_query_property_types_filter_comp_from_dict = DwhQueryPropertyTypesFilterComp.from_dict(dwh_query_property_types_filter_comp_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DwhQueryPropertyTypesFunctionNtile.md b/docs/DwhQueryPropertyTypesFunctionNtile.md new file mode 100644 index 0000000..b45374e --- /dev/null +++ b/docs/DwhQueryPropertyTypesFunctionNtile.md @@ -0,0 +1,32 @@ +# DwhQueryPropertyTypesFunctionNtile + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**type** | **str** | | +**content** | **List[object]** | | +**options** | **object** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.dwh_query_property_types_function_ntile import DwhQueryPropertyTypesFunctionNtile + +# TODO update the JSON string below +json = "{}" +# create an instance of DwhQueryPropertyTypesFunctionNtile from a JSON string +dwh_query_property_types_function_ntile_instance = DwhQueryPropertyTypesFunctionNtile.from_json(json) +# print the JSON string representation of the object +print(DwhQueryPropertyTypesFunctionNtile.to_json()) + +# convert the object into a dict +dwh_query_property_types_function_ntile_dict = dwh_query_property_types_function_ntile_instance.to_dict() +# create an instance of DwhQueryPropertyTypesFunctionNtile from a dict +dwh_query_property_types_function_ntile_from_dict = DwhQueryPropertyTypesFunctionNtile.from_dict(dwh_query_property_types_function_ntile_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DwhQueryPropertyTypesFunctionPercentile.md b/docs/DwhQueryPropertyTypesFunctionPercentile.md new file mode 100644 index 0000000..7656deb --- /dev/null +++ b/docs/DwhQueryPropertyTypesFunctionPercentile.md @@ -0,0 +1,32 @@ +# DwhQueryPropertyTypesFunctionPercentile + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**type** | **str** | | +**content** | **List[object]** | | +**options** | **object** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.dwh_query_property_types_function_percentile import DwhQueryPropertyTypesFunctionPercentile + +# TODO update the JSON string below +json = "{}" +# create an instance of DwhQueryPropertyTypesFunctionPercentile from a JSON string +dwh_query_property_types_function_percentile_instance = DwhQueryPropertyTypesFunctionPercentile.from_json(json) +# print the JSON string representation of the object +print(DwhQueryPropertyTypesFunctionPercentile.to_json()) + +# convert the object into a dict +dwh_query_property_types_function_percentile_dict = dwh_query_property_types_function_percentile_instance.to_dict() +# create an instance of DwhQueryPropertyTypesFunctionPercentile from a dict +dwh_query_property_types_function_percentile_from_dict = DwhQueryPropertyTypesFunctionPercentile.from_dict(dwh_query_property_types_function_percentile_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DwhQueryPropertyTypesFunctionRank.md b/docs/DwhQueryPropertyTypesFunctionRank.md new file mode 100644 index 0000000..57c35a4 --- /dev/null +++ b/docs/DwhQueryPropertyTypesFunctionRank.md @@ -0,0 +1,32 @@ +# DwhQueryPropertyTypesFunctionRank + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**type** | **str** | | +**content** | **List[object]** | | +**options** | **object** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.dwh_query_property_types_function_rank import DwhQueryPropertyTypesFunctionRank + +# TODO update the JSON string below +json = "{}" +# create an instance of DwhQueryPropertyTypesFunctionRank from a JSON string +dwh_query_property_types_function_rank_instance = DwhQueryPropertyTypesFunctionRank.from_json(json) +# print the JSON string representation of the object +print(DwhQueryPropertyTypesFunctionRank.to_json()) + +# convert the object into a dict +dwh_query_property_types_function_rank_dict = dwh_query_property_types_function_rank_instance.to_dict() +# create an instance of DwhQueryPropertyTypesFunctionRank from a dict +dwh_query_property_types_function_rank_from_dict = DwhQueryPropertyTypesFunctionRank.from_dict(dwh_query_property_types_function_rank_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DwhQueryPropertyTypesFunctionRowNumber.md b/docs/DwhQueryPropertyTypesFunctionRowNumber.md new file mode 100644 index 0000000..d8942b7 --- /dev/null +++ b/docs/DwhQueryPropertyTypesFunctionRowNumber.md @@ -0,0 +1,32 @@ +# DwhQueryPropertyTypesFunctionRowNumber + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**type** | **str** | | +**content** | **List[object]** | | +**options** | **object** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.dwh_query_property_types_function_row_number import DwhQueryPropertyTypesFunctionRowNumber + +# TODO update the JSON string below +json = "{}" +# create an instance of DwhQueryPropertyTypesFunctionRowNumber from a JSON string +dwh_query_property_types_function_row_number_instance = DwhQueryPropertyTypesFunctionRowNumber.from_json(json) +# print the JSON string representation of the object +print(DwhQueryPropertyTypesFunctionRowNumber.to_json()) + +# convert the object into a dict +dwh_query_property_types_function_row_number_dict = dwh_query_property_types_function_row_number_instance.to_dict() +# create an instance of DwhQueryPropertyTypesFunctionRowNumber from a dict +dwh_query_property_types_function_row_number_from_dict = DwhQueryPropertyTypesFunctionRowNumber.from_dict(dwh_query_property_types_function_row_number_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DwhQueryVariableType.md b/docs/DwhQueryVariableType.md new file mode 100644 index 0000000..f4527ab --- /dev/null +++ b/docs/DwhQueryVariableType.md @@ -0,0 +1,31 @@ +# DwhQueryVariableType + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**type** | **str** | | +**value** | **str** | | + +## Example + +```python +from cm_python_openapi_sdk.models.dwh_query_variable_type import DwhQueryVariableType + +# TODO update the JSON string below +json = "{}" +# create an instance of DwhQueryVariableType from a JSON string +dwh_query_variable_type_instance = DwhQueryVariableType.from_json(json) +# print the JSON string representation of the object +print(DwhQueryVariableType.to_json()) + +# convert the object into a dict +dwh_query_variable_type_dict = dwh_query_variable_type_instance.to_dict() +# create an instance of DwhQueryVariableType from a dict +dwh_query_variable_type_from_dict = DwhQueryVariableType.from_dict(dwh_query_variable_type_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExportPagedModelDTO.md b/docs/ExportPagedModelDTO.md index 1c3d15a..76b1c3b 100644 --- a/docs/ExportPagedModelDTO.md +++ b/docs/ExportPagedModelDTO.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**content** | [**List[ExportDTO]**](ExportDTO.md) | | [optional] +**content** | [**List[ExportResponseDTO]**](ExportResponseDTO.md) | | [optional] **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] ## Example diff --git a/docs/ExportResponseDTO.md b/docs/ExportResponseDTO.md new file mode 100644 index 0000000..9491e21 --- /dev/null +++ b/docs/ExportResponseDTO.md @@ -0,0 +1,38 @@ +# ExportResponseDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | +**type** | **str** | | [optional] +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**content** | [**ExportContentDTO**](ExportContentDTO.md) | | +**links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] +**access_info** | [**AccessInfoDTO**](AccessInfoDTO.md) | | [optional] +**version** | **int** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.export_response_dto import ExportResponseDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of ExportResponseDTO from a JSON string +export_response_dto_instance = ExportResponseDTO.from_json(json) +# print the JSON string representation of the object +print(ExportResponseDTO.to_json()) + +# convert the object into a dict +export_response_dto_dict = export_response_dto_instance.to_dict() +# create an instance of ExportResponseDTO from a dict +export_response_dto_from_dict = ExportResponseDTO.from_dict(export_response_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExportsApi.md b/docs/ExportsApi.md index 753e2ed..f9e1516 100644 --- a/docs/ExportsApi.md +++ b/docs/ExportsApi.md @@ -8,11 +8,12 @@ Method | HTTP request | Description [**delete_export_by_id**](ExportsApi.md#delete_export_by_id) | **DELETE** /projects/{projectId}/md/exports/{id} | Deletes export by id [**get_all_exports**](ExportsApi.md#get_all_exports) | **GET** /projects/{projectId}/md/exports | Returns paged collection of all Exports in a project [**get_export_by_id**](ExportsApi.md#get_export_by_id) | **GET** /projects/{projectId}/md/exports/{id} | Gets export by id +[**get_export_by_name**](ExportsApi.md#get_export_by_name) | **GET** /projects/{projectId}/md/exports/{name} | Gets export by name [**update_export_by_id**](ExportsApi.md#update_export_by_id) | **PUT** /projects/{projectId}/md/exports/{id} | Updates export by id # **create_export** -> ExportDTO create_export(project_id, export_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> ExportResponseDTO create_export(project_id, export_dto, x_can_strict_json_validation=x_can_strict_json_validation) Creates new export @@ -25,6 +26,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.export_dto import ExportDTO +from cm_python_openapi_sdk.models.export_response_dto import ExportResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -74,7 +76,7 @@ Name | Type | Description | Notes ### Return type -[**ExportDTO**](ExportDTO.md) +[**ExportResponseDTO**](ExportResponseDTO.md) ### Authorization @@ -256,7 +258,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_export_by_id** -> ExportDTO get_export_by_id(project_id, id) +> ExportResponseDTO get_export_by_id(project_id, id) Gets export by id @@ -266,7 +268,7 @@ Gets export by id ```python import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.export_dto import ExportDTO +from cm_python_openapi_sdk.models.export_response_dto import ExportResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -314,7 +316,86 @@ Name | Type | Description | Notes ### Return type -[**ExportDTO**](ExportDTO.md) +[**ExportResponseDTO**](ExportResponseDTO.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**404** | Export not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_export_by_name** +> ExportResponseDTO get_export_by_name(project_id, name) + +Gets export by name + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.export_response_dto import ExportResponseDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.ExportsApi(api_client) + project_id = 'project_id_example' # str | Id of the project + name = 'name_example' # str | Name of the export + + try: + # Gets export by name + api_response = api_instance.get_export_by_name(project_id, name) + print("The response of ExportsApi->get_export_by_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ExportsApi->get_export_by_name: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **name** | **str**| Name of the export | + +### Return type + +[**ExportResponseDTO**](ExportResponseDTO.md) ### Authorization @@ -335,7 +416,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_export_by_id** -> ExportDTO update_export_by_id(project_id, id, if_match, export_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> ExportResponseDTO update_export_by_id(project_id, id, if_match, export_dto, x_can_strict_json_validation=x_can_strict_json_validation) Updates export by id @@ -348,6 +429,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.export_dto import ExportDTO +from cm_python_openapi_sdk.models.export_response_dto import ExportResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -401,7 +483,7 @@ Name | Type | Description | Notes ### Return type -[**ExportDTO**](ExportDTO.md) +[**ExportResponseDTO**](ExportResponseDTO.md) ### Authorization diff --git a/docs/FilterByComp.md b/docs/FilterByComp.md index 06f7591..a708168 100644 --- a/docs/FilterByComp.md +++ b/docs/FilterByComp.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **var_property** | **str** | | [optional] **value** | **object** | | [optional] -**function** | [**DwhQueryPropertyTypes**](DwhQueryPropertyTypes.md) | | [optional] +**function** | [**DwhQueryPropertyTypesFilterComp**](DwhQueryPropertyTypesFilterComp.md) | | [optional] **operator** | **str** | | ## Example diff --git a/docs/FunctionNtile.md b/docs/FunctionNtile.md index c5c453d..89cb1ca 100644 --- a/docs/FunctionNtile.md +++ b/docs/FunctionNtile.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | | [optional] **type** | **str** | | -**content** | [**List[FunctionNtileContentInner]**](FunctionNtileContentInner.md) | | +**content** | [**List[DwhQueryPropertyTypesFunctionNtile]**](DwhQueryPropertyTypesFunctionNtile.md) | | **options** | [**FunctionNtileOptions**](FunctionNtileOptions.md) | | [optional] ## Example diff --git a/docs/FunctionPercentile.md b/docs/FunctionPercentile.md index a2eb1ae..193ed78 100644 --- a/docs/FunctionPercentile.md +++ b/docs/FunctionPercentile.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | | [optional] **type** | **str** | | -**content** | [**List[FunctionNtileContentInner]**](FunctionNtileContentInner.md) | | +**content** | [**List[DwhQueryPropertyTypesFunctionPercentile]**](DwhQueryPropertyTypesFunctionPercentile.md) | | **options** | **object** | | ## Example diff --git a/docs/FunctionRank.md b/docs/FunctionRank.md index 8b4b8f9..2734530 100644 --- a/docs/FunctionRank.md +++ b/docs/FunctionRank.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | | [optional] **type** | **str** | | -**content** | [**List[FunctionNtileContentInner]**](FunctionNtileContentInner.md) | | +**content** | [**List[DwhQueryPropertyTypesFunctionRank]**](DwhQueryPropertyTypesFunctionRank.md) | | **options** | **object** | | ## Example diff --git a/docs/FunctionRowNumber.md b/docs/FunctionRowNumber.md index 7acfe74..0dd53ec 100644 --- a/docs/FunctionRowNumber.md +++ b/docs/FunctionRowNumber.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | | [optional] **type** | **str** | | -**content** | [**List[FunctionNtileContentInner]**](FunctionNtileContentInner.md) | | +**content** | [**List[DwhQueryPropertyTypesFunctionRowNumber]**](DwhQueryPropertyTypesFunctionRowNumber.md) | | **options** | **object** | | ## Example diff --git a/docs/GeneralJobRequest.md b/docs/GeneralJobRequest.md new file mode 100644 index 0000000..eca3428 --- /dev/null +++ b/docs/GeneralJobRequest.md @@ -0,0 +1,31 @@ +# GeneralJobRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | | +**project_id** | **str** | | +**content** | [**ImportProjectRequest**](ImportProjectRequest.md) | | + +## Example + +```python +from cm_python_openapi_sdk.models.general_job_request import GeneralJobRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of GeneralJobRequest from a JSON string +general_job_request_instance = GeneralJobRequest.from_json(json) +# print the JSON string representation of the object +print(GeneralJobRequest.to_json()) + +# convert the object into a dict +general_job_request_dict = general_job_request_instance.to_dict() +# create an instance of GeneralJobRequest from a dict +general_job_request_from_dict = GeneralJobRequest.from_dict(general_job_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/GeosearchApi.md b/docs/GeosearchApi.md new file mode 100644 index 0000000..f12c5d5 --- /dev/null +++ b/docs/GeosearchApi.md @@ -0,0 +1,98 @@ +# cm_python_openapi_sdk.GeosearchApi + +All URIs are relative to *https://staging.dev.clevermaps.io/rest* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**geographic_search**](GeosearchApi.md#geographic_search) | **GET** /geosearch | Geographic search + + +# **geographic_search** +> GeosearchPagedModelDTO geographic_search(query, page=page, size=size, country=country, language=language, types=types) + +Geographic search + +Wrapper of [Mapbox Geocoding service](https://docs.mapbox.com/api/search/geocoding/). Processes the query and validates the URL parameters. If the query is valid, it is executed on Mapbox API. The result is then translated and returned. + + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.geosearch_paged_model_dto import GeosearchPagedModelDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.GeosearchApi(api_client) + query = 'Birmingham' # str | Query search phrase. It is highlighted in the query result. + page = 0 # int | Number of the page (optional) (default to 0) + size = 100 # int | The count of records to return for one page (optional) (default to 100) + country = 'GB' # str | Array of ISO 3166 alpha-2 country codes to limit the search. (optional) + language = 'en' # str | Language to use for query results as defined by ISO 639-1. (optional) + types = 'city, locality, address' # str | Array of place types, available types are [region, district, city, locality, address, postcode] (optional) + + try: + # Geographic search + api_response = api_instance.geographic_search(query, page=page, size=size, country=country, language=language, types=types) + print("The response of GeosearchApi->geographic_search:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling GeosearchApi->geographic_search: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **str**| Query search phrase. It is highlighted in the query result. | + **page** | **int**| Number of the page | [optional] [default to 0] + **size** | **int**| The count of records to return for one page | [optional] [default to 100] + **country** | **str**| Array of ISO 3166 alpha-2 country codes to limit the search. | [optional] + **language** | **str**| Language to use for query results as defined by ISO 639-1. | [optional] + **types** | **str**| Array of place types, available types are [region, district, city, locality, address, postcode] | [optional] + +### Return type + +[**GeosearchPagedModelDTO**](GeosearchPagedModelDTO.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/GeosearchPagedModelDTO.md b/docs/GeosearchPagedModelDTO.md index 54908df..8eb3ffb 100644 --- a/docs/GeosearchPagedModelDTO.md +++ b/docs/GeosearchPagedModelDTO.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] **content** | [**List[QueryHitDTO]**](QueryHitDTO.md) | | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] ## Example diff --git a/docs/GetAccountByAccountId200Response.md b/docs/GetAccountByAccountId200Response.md index 99a8972..c576219 100644 --- a/docs/GetAccountByAccountId200Response.md +++ b/docs/GetAccountByAccountId200Response.md @@ -13,9 +13,7 @@ Name | Type | Description | Notes **consent_granted** | **bool** | | [optional] **anonymous** | **bool** | | [optional] **phone_number** | **str** | | [optional] -**require_additional_attributes** | **bool** | | [optional] **onboarding** | [**AccountOnboardingParameters**](AccountOnboardingParameters.md) | | [optional] -**job_info** | [**AccountJobInfo**](AccountJobInfo.md) | | [optional] **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] ## Example diff --git a/docs/GetOrganizations200Response.md b/docs/GetOrganizations200Response.md index f093d8f..8364273 100644 --- a/docs/GetOrganizations200Response.md +++ b/docs/GetOrganizations200Response.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] **content** | [**List[OrganizationResponseDTO]**](OrganizationResponseDTO.md) | | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] **id** | **str** | | [optional] **title** | **str** | | [optional] **invitation_email** | **str** | | [optional] diff --git a/docs/GetProjectMembers200Response.md b/docs/GetProjectMembers200Response.md index df25710..7ed56f5 100644 --- a/docs/GetProjectMembers200Response.md +++ b/docs/GetProjectMembers200Response.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] -**content** | [**List[MembershipDTO]**](MembershipDTO.md) | | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**content** | [**List[MembershipResponseDTO]**](MembershipResponseDTO.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] **id** | **str** | | [optional] **account_id** | **str** | | [optional] **status** | **str** | | diff --git a/docs/IndicatorDrillPagedModelDTO.md b/docs/IndicatorDrillPagedModelDTO.md index 7b25896..33ef3ad 100644 --- a/docs/IndicatorDrillPagedModelDTO.md +++ b/docs/IndicatorDrillPagedModelDTO.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**content** | [**List[IndicatorDrillDTO]**](IndicatorDrillDTO.md) | | [optional] +**content** | [**List[IndicatorDrillResponseDTO]**](IndicatorDrillResponseDTO.md) | | [optional] **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] ## Example diff --git a/docs/IndicatorDrillResponseDTO.md b/docs/IndicatorDrillResponseDTO.md new file mode 100644 index 0000000..4d9f9c0 --- /dev/null +++ b/docs/IndicatorDrillResponseDTO.md @@ -0,0 +1,38 @@ +# IndicatorDrillResponseDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | +**type** | **str** | | [optional] +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**content** | [**IndicatorDrillContentDTO**](IndicatorDrillContentDTO.md) | | +**links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] +**access_info** | [**AccessInfoDTO**](AccessInfoDTO.md) | | [optional] +**version** | **int** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.indicator_drill_response_dto import IndicatorDrillResponseDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of IndicatorDrillResponseDTO from a JSON string +indicator_drill_response_dto_instance = IndicatorDrillResponseDTO.from_json(json) +# print the JSON string representation of the object +print(IndicatorDrillResponseDTO.to_json()) + +# convert the object into a dict +indicator_drill_response_dto_dict = indicator_drill_response_dto_instance.to_dict() +# create an instance of IndicatorDrillResponseDTO from a dict +indicator_drill_response_dto_from_dict = IndicatorDrillResponseDTO.from_dict(indicator_drill_response_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IndicatorDrillsApi.md b/docs/IndicatorDrillsApi.md index 4ca4d26..e44a1a7 100644 --- a/docs/IndicatorDrillsApi.md +++ b/docs/IndicatorDrillsApi.md @@ -8,11 +8,12 @@ Method | HTTP request | Description [**delete_indicator_drill_by_id**](IndicatorDrillsApi.md#delete_indicator_drill_by_id) | **DELETE** /projects/{projectId}/md/indicatorDrills/{id} | Deletes indicator drill by id [**get_all_indicator_drills**](IndicatorDrillsApi.md#get_all_indicator_drills) | **GET** /projects/{projectId}/md/indicatorDrills | Returns paged collection of all Indicator Drills in a project. [**get_indicator_drill_by_id**](IndicatorDrillsApi.md#get_indicator_drill_by_id) | **GET** /projects/{projectId}/md/indicatorDrills/{id} | Gets indicator drill by id +[**get_indicator_drill_by_name**](IndicatorDrillsApi.md#get_indicator_drill_by_name) | **GET** /projects/{projectId}/md/indicatorDrills/{name} | Gets indicator drill by name [**update_indicator_drill_by_id**](IndicatorDrillsApi.md#update_indicator_drill_by_id) | **PUT** /projects/{projectId}/md/indicatorDrills/{id} | Updates indicator drill by id # **create_indicator_drill** -> IndicatorDrillDTO create_indicator_drill(project_id, indicator_drill_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> IndicatorDrillResponseDTO create_indicator_drill(project_id, indicator_drill_dto, x_can_strict_json_validation=x_can_strict_json_validation) Creates new Indicator Drill. @@ -25,6 +26,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.indicator_drill_dto import IndicatorDrillDTO +from cm_python_openapi_sdk.models.indicator_drill_response_dto import IndicatorDrillResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -74,7 +76,7 @@ Name | Type | Description | Notes ### Return type -[**IndicatorDrillDTO**](IndicatorDrillDTO.md) +[**IndicatorDrillResponseDTO**](IndicatorDrillResponseDTO.md) ### Authorization @@ -256,7 +258,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_indicator_drill_by_id** -> IndicatorDrillDTO get_indicator_drill_by_id(project_id, id) +> IndicatorDrillResponseDTO get_indicator_drill_by_id(project_id, id) Gets indicator drill by id @@ -266,7 +268,7 @@ Gets indicator drill by id ```python import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.indicator_drill_dto import IndicatorDrillDTO +from cm_python_openapi_sdk.models.indicator_drill_response_dto import IndicatorDrillResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -314,7 +316,86 @@ Name | Type | Description | Notes ### Return type -[**IndicatorDrillDTO**](IndicatorDrillDTO.md) +[**IndicatorDrillResponseDTO**](IndicatorDrillResponseDTO.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**404** | Indicator Drill not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_indicator_drill_by_name** +> IndicatorDrillResponseDTO get_indicator_drill_by_name(project_id, name) + +Gets indicator drill by name + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.indicator_drill_response_dto import IndicatorDrillResponseDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.IndicatorDrillsApi(api_client) + project_id = 'project_id_example' # str | Id of the project + name = 'name_example' # str | Name of the indicator drill + + try: + # Gets indicator drill by name + api_response = api_instance.get_indicator_drill_by_name(project_id, name) + print("The response of IndicatorDrillsApi->get_indicator_drill_by_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndicatorDrillsApi->get_indicator_drill_by_name: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **name** | **str**| Name of the indicator drill | + +### Return type + +[**IndicatorDrillResponseDTO**](IndicatorDrillResponseDTO.md) ### Authorization @@ -335,7 +416,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_indicator_drill_by_id** -> IndicatorDrillDTO update_indicator_drill_by_id(project_id, id, if_match, indicator_drill_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> IndicatorDrillResponseDTO update_indicator_drill_by_id(project_id, id, if_match, indicator_drill_dto, x_can_strict_json_validation=x_can_strict_json_validation) Updates indicator drill by id @@ -348,6 +429,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.indicator_drill_dto import IndicatorDrillDTO +from cm_python_openapi_sdk.models.indicator_drill_response_dto import IndicatorDrillResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -401,7 +483,7 @@ Name | Type | Description | Notes ### Return type -[**IndicatorDrillDTO**](IndicatorDrillDTO.md) +[**IndicatorDrillResponseDTO**](IndicatorDrillResponseDTO.md) ### Authorization diff --git a/docs/IndicatorPagedModelDTO.md b/docs/IndicatorPagedModelDTO.md index bd9fc7f..851a129 100644 --- a/docs/IndicatorPagedModelDTO.md +++ b/docs/IndicatorPagedModelDTO.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**content** | [**List[IndicatorDTO]**](IndicatorDTO.md) | | [optional] +**content** | [**List[IndicatorResponseDTO]**](IndicatorResponseDTO.md) | | [optional] **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] ## Example diff --git a/docs/IndicatorResponseDTO.md b/docs/IndicatorResponseDTO.md new file mode 100644 index 0000000..fb6a564 --- /dev/null +++ b/docs/IndicatorResponseDTO.md @@ -0,0 +1,38 @@ +# IndicatorResponseDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | +**type** | **str** | | [optional] +**title** | **str** | | +**description** | **str** | | +**content** | [**IndicatorContentDTO**](IndicatorContentDTO.md) | | +**links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] +**access_info** | [**AccessInfoDTO**](AccessInfoDTO.md) | | [optional] +**version** | **int** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.indicator_response_dto import IndicatorResponseDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of IndicatorResponseDTO from a JSON string +indicator_response_dto_instance = IndicatorResponseDTO.from_json(json) +# print the JSON string representation of the object +print(IndicatorResponseDTO.to_json()) + +# convert the object into a dict +indicator_response_dto_dict = indicator_response_dto_instance.to_dict() +# create an instance of IndicatorResponseDTO from a dict +indicator_response_dto_from_dict = IndicatorResponseDTO.from_dict(indicator_response_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IndicatorsApi.md b/docs/IndicatorsApi.md index 1d7896a..0ced48a 100644 --- a/docs/IndicatorsApi.md +++ b/docs/IndicatorsApi.md @@ -8,11 +8,12 @@ Method | HTTP request | Description [**delete_indicator_by_id**](IndicatorsApi.md#delete_indicator_by_id) | **DELETE** /projects/{projectId}/md/indicators/{id} | Deletes indicator by id [**get_all_indicators**](IndicatorsApi.md#get_all_indicators) | **GET** /projects/{projectId}/md/indicators | Returns paged collection of all Indicators in a project. [**get_indicator_by_id**](IndicatorsApi.md#get_indicator_by_id) | **GET** /projects/{projectId}/md/indicators/{id} | Gets indicator by id +[**get_indicator_by_name**](IndicatorsApi.md#get_indicator_by_name) | **GET** /projects/{projectId}/md/indicators/{name} | Gets indicator by name [**update_indicator_by_id**](IndicatorsApi.md#update_indicator_by_id) | **PUT** /projects/{projectId}/md/indicators/{id} | Updates indicator by id # **create_indicator** -> IndicatorDTO create_indicator(project_id, indicator_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> IndicatorResponseDTO create_indicator(project_id, indicator_dto, x_can_strict_json_validation=x_can_strict_json_validation) Creates new Indicator. @@ -25,6 +26,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.indicator_dto import IndicatorDTO +from cm_python_openapi_sdk.models.indicator_response_dto import IndicatorResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -74,7 +76,7 @@ Name | Type | Description | Notes ### Return type -[**IndicatorDTO**](IndicatorDTO.md) +[**IndicatorResponseDTO**](IndicatorResponseDTO.md) ### Authorization @@ -256,7 +258,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_indicator_by_id** -> IndicatorDTO get_indicator_by_id(project_id, id) +> IndicatorResponseDTO get_indicator_by_id(project_id, id) Gets indicator by id @@ -266,7 +268,7 @@ Gets indicator by id ```python import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.indicator_dto import IndicatorDTO +from cm_python_openapi_sdk.models.indicator_response_dto import IndicatorResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -314,7 +316,86 @@ Name | Type | Description | Notes ### Return type -[**IndicatorDTO**](IndicatorDTO.md) +[**IndicatorResponseDTO**](IndicatorResponseDTO.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**404** | Indicator not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_indicator_by_name** +> IndicatorResponseDTO get_indicator_by_name(project_id, name) + +Gets indicator by name + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.indicator_response_dto import IndicatorResponseDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.IndicatorsApi(api_client) + project_id = 'project_id_example' # str | Id of the project + name = 'name_example' # str | Name of the indicator + + try: + # Gets indicator by name + api_response = api_instance.get_indicator_by_name(project_id, name) + print("The response of IndicatorsApi->get_indicator_by_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndicatorsApi->get_indicator_by_name: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **name** | **str**| Name of the indicator | + +### Return type + +[**IndicatorResponseDTO**](IndicatorResponseDTO.md) ### Authorization @@ -335,7 +416,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_indicator_by_id** -> IndicatorDTO update_indicator_by_id(project_id, id, if_match, indicator_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> IndicatorResponseDTO update_indicator_by_id(project_id, id, if_match, indicator_dto, x_can_strict_json_validation=x_can_strict_json_validation) Updates indicator by id @@ -348,6 +429,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.indicator_dto import IndicatorDTO +from cm_python_openapi_sdk.models.indicator_response_dto import IndicatorResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -401,7 +483,7 @@ Name | Type | Description | Notes ### Return type -[**IndicatorDTO**](IndicatorDTO.md) +[**IndicatorResponseDTO**](IndicatorResponseDTO.md) ### Authorization diff --git a/docs/InvitationPagedModelDTO.md b/docs/InvitationPagedModelDTO.md index f016019..48d75d9 100644 --- a/docs/InvitationPagedModelDTO.md +++ b/docs/InvitationPagedModelDTO.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] **content** | [**List[InvitationDTO]**](InvitationDTO.md) | | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] ## Example diff --git a/docs/IsochronePagedModelDTO.md b/docs/IsochronePagedModelDTO.md index df9f54b..bc51adc 100644 --- a/docs/IsochronePagedModelDTO.md +++ b/docs/IsochronePagedModelDTO.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] **content** | [**List[IsochroneDTO]**](IsochroneDTO.md) | | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] ## Example diff --git a/docs/JobDetailResponse.md b/docs/JobDetailResponse.md index a03ebe3..f583324 100644 --- a/docs/JobDetailResponse.md +++ b/docs/JobDetailResponse.md @@ -8,8 +8,8 @@ Name | Type | Description | Notes **id** | **str** | | **type** | **str** | | **status** | **str** | | -**start_date** | **object** | | [optional] -**end_date** | **object** | | [optional] +**start_date** | **int** | | [optional] +**end_date** | **int** | | [optional] **message** | **str** | | [optional] **result** | **object** | | [optional] **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] diff --git a/docs/JobsApi.md b/docs/JobsApi.md index a02ab96..353ab9c 100644 --- a/docs/JobsApi.md +++ b/docs/JobsApi.md @@ -196,7 +196,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **submit_job_execution** -> JobDetailResponse submit_job_execution(submit_job_execution_request) +> JobDetailResponse submit_job_execution(general_job_request) Submit job execution @@ -224,8 +224,8 @@ Starts the execution of a new project task. Tasks are processed asynchronously, ```python import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.general_job_request import GeneralJobRequest from cm_python_openapi_sdk.models.job_detail_response import JobDetailResponse -from cm_python_openapi_sdk.models.submit_job_execution_request import SubmitJobExecutionRequest from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -249,11 +249,11 @@ configuration = cm_python_openapi_sdk.Configuration( with cm_python_openapi_sdk.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cm_python_openapi_sdk.JobsApi(api_client) - submit_job_execution_request = cm_python_openapi_sdk.SubmitJobExecutionRequest() # SubmitJobExecutionRequest | Successful response + general_job_request = cm_python_openapi_sdk.GeneralJobRequest() # GeneralJobRequest | Successful response try: # Submit job execution - api_response = api_instance.submit_job_execution(submit_job_execution_request) + api_response = api_instance.submit_job_execution(general_job_request) print("The response of JobsApi->submit_job_execution:\n") pprint(api_response) except Exception as e: @@ -267,7 +267,7 @@ with cm_python_openapi_sdk.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **submit_job_execution_request** | [**SubmitJobExecutionRequest**](SubmitJobExecutionRequest.md)| Successful response | + **general_job_request** | [**GeneralJobRequest**](GeneralJobRequest.md)| Successful response | ### Return type diff --git a/docs/MapPagedModelDTO.md b/docs/MapPagedModelDTO.md index aa529cf..c77c339 100644 --- a/docs/MapPagedModelDTO.md +++ b/docs/MapPagedModelDTO.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**content** | [**List[MapDTO]**](MapDTO.md) | | [optional] +**content** | [**List[MapResponseDTO]**](MapResponseDTO.md) | | [optional] **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] ## Example diff --git a/docs/MapResponseDTO.md b/docs/MapResponseDTO.md new file mode 100644 index 0000000..29b1576 --- /dev/null +++ b/docs/MapResponseDTO.md @@ -0,0 +1,38 @@ +# MapResponseDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | +**type** | **str** | | [optional] +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**content** | [**MapContentDTO**](MapContentDTO.md) | | +**links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] +**access_info** | [**AccessInfoDTO**](AccessInfoDTO.md) | | [optional] +**version** | **int** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.map_response_dto import MapResponseDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of MapResponseDTO from a JSON string +map_response_dto_instance = MapResponseDTO.from_json(json) +# print the JSON string representation of the object +print(MapResponseDTO.to_json()) + +# convert the object into a dict +map_response_dto_dict = map_response_dto_instance.to_dict() +# create an instance of MapResponseDTO from a dict +map_response_dto_from_dict = MapResponseDTO.from_dict(map_response_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MapsApi.md b/docs/MapsApi.md index 7b5a72a..81fa214 100644 --- a/docs/MapsApi.md +++ b/docs/MapsApi.md @@ -8,11 +8,12 @@ Method | HTTP request | Description [**delete_map_by_id**](MapsApi.md#delete_map_by_id) | **DELETE** /projects/{projectId}/md/maps/{id} | Deletes map by id [**get_all_maps**](MapsApi.md#get_all_maps) | **GET** /projects/{projectId}/md/maps | Returns paged collection of all Maps in a project. [**get_map_by_id**](MapsApi.md#get_map_by_id) | **GET** /projects/{projectId}/md/maps/{id} | Gets map by id +[**get_map_by_name**](MapsApi.md#get_map_by_name) | **GET** /projects/{projectId}/md/maps/{name} | Gets map by name [**update_map_by_id**](MapsApi.md#update_map_by_id) | **PUT** /projects/{projectId}/md/maps/{id} | Updates map by id # **create_map** -> MapDTO create_map(project_id, map_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> MapResponseDTO create_map(project_id, map_dto, x_can_strict_json_validation=x_can_strict_json_validation) Creates new Map. @@ -25,6 +26,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.map_dto import MapDTO +from cm_python_openapi_sdk.models.map_response_dto import MapResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -74,7 +76,7 @@ Name | Type | Description | Notes ### Return type -[**MapDTO**](MapDTO.md) +[**MapResponseDTO**](MapResponseDTO.md) ### Authorization @@ -256,7 +258,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_map_by_id** -> MapDTO get_map_by_id(project_id, id) +> MapResponseDTO get_map_by_id(project_id, id) Gets map by id @@ -266,7 +268,7 @@ Gets map by id ```python import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.map_dto import MapDTO +from cm_python_openapi_sdk.models.map_response_dto import MapResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -314,7 +316,86 @@ Name | Type | Description | Notes ### Return type -[**MapDTO**](MapDTO.md) +[**MapResponseDTO**](MapResponseDTO.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**404** | Map not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_map_by_name** +> MapResponseDTO get_map_by_name(project_id, name) + +Gets map by name + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.map_response_dto import MapResponseDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.MapsApi(api_client) + project_id = 'project_id_example' # str | Id of the project + name = 'name_example' # str | Name of the map + + try: + # Gets map by name + api_response = api_instance.get_map_by_name(project_id, name) + print("The response of MapsApi->get_map_by_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MapsApi->get_map_by_name: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **name** | **str**| Name of the map | + +### Return type + +[**MapResponseDTO**](MapResponseDTO.md) ### Authorization @@ -335,7 +416,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_map_by_id** -> MapDTO update_map_by_id(project_id, id, if_match, map_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> MapResponseDTO update_map_by_id(project_id, id, if_match, map_dto, x_can_strict_json_validation=x_can_strict_json_validation) Updates map by id @@ -348,6 +429,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.map_dto import MapDTO +from cm_python_openapi_sdk.models.map_response_dto import MapResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -401,7 +483,7 @@ Name | Type | Description | Notes ### Return type -[**MapDTO**](MapDTO.md) +[**MapResponseDTO**](MapResponseDTO.md) ### Authorization diff --git a/docs/MarkerPagedModelDTO.md b/docs/MarkerPagedModelDTO.md index 23d130b..79878fe 100644 --- a/docs/MarkerPagedModelDTO.md +++ b/docs/MarkerPagedModelDTO.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**content** | [**List[MarkerDTO]**](MarkerDTO.md) | | [optional] +**content** | [**List[MarkerResponseDTO]**](MarkerResponseDTO.md) | | [optional] **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] ## Example diff --git a/docs/MarkerResponseDTO.md b/docs/MarkerResponseDTO.md new file mode 100644 index 0000000..83cf895 --- /dev/null +++ b/docs/MarkerResponseDTO.md @@ -0,0 +1,38 @@ +# MarkerResponseDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | +**type** | **str** | | [optional] +**title** | **str** | | +**description** | **str** | | [optional] +**content** | [**MarkerContentDTO**](MarkerContentDTO.md) | | +**links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] +**access_info** | [**AccessInfoDTO**](AccessInfoDTO.md) | | [optional] +**version** | **int** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.marker_response_dto import MarkerResponseDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of MarkerResponseDTO from a JSON string +marker_response_dto_instance = MarkerResponseDTO.from_json(json) +# print the JSON string representation of the object +print(MarkerResponseDTO.to_json()) + +# convert the object into a dict +marker_response_dto_dict = marker_response_dto_instance.to_dict() +# create an instance of MarkerResponseDTO from a dict +marker_response_dto_from_dict = MarkerResponseDTO.from_dict(marker_response_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MarkerSelectorPagedModelDTO.md b/docs/MarkerSelectorPagedModelDTO.md index e148d44..b8359f0 100644 --- a/docs/MarkerSelectorPagedModelDTO.md +++ b/docs/MarkerSelectorPagedModelDTO.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**content** | [**List[MarkerSelectorDTO]**](MarkerSelectorDTO.md) | | [optional] +**content** | [**List[MarkerSelectorResponseDTO]**](MarkerSelectorResponseDTO.md) | | [optional] **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] ## Example diff --git a/docs/MarkerSelectorResponseDTO.md b/docs/MarkerSelectorResponseDTO.md new file mode 100644 index 0000000..a3cedd5 --- /dev/null +++ b/docs/MarkerSelectorResponseDTO.md @@ -0,0 +1,38 @@ +# MarkerSelectorResponseDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | +**type** | **str** | | [optional] +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**content** | [**MarkerSelectorContentDTO**](MarkerSelectorContentDTO.md) | | +**links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] +**access_info** | [**AccessInfoDTO**](AccessInfoDTO.md) | | [optional] +**version** | **int** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.marker_selector_response_dto import MarkerSelectorResponseDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of MarkerSelectorResponseDTO from a JSON string +marker_selector_response_dto_instance = MarkerSelectorResponseDTO.from_json(json) +# print the JSON string representation of the object +print(MarkerSelectorResponseDTO.to_json()) + +# convert the object into a dict +marker_selector_response_dto_dict = marker_selector_response_dto_instance.to_dict() +# create an instance of MarkerSelectorResponseDTO from a dict +marker_selector_response_dto_from_dict = MarkerSelectorResponseDTO.from_dict(marker_selector_response_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MarkerSelectorsApi.md b/docs/MarkerSelectorsApi.md index c4c6386..df871a1 100644 --- a/docs/MarkerSelectorsApi.md +++ b/docs/MarkerSelectorsApi.md @@ -8,11 +8,12 @@ Method | HTTP request | Description [**delete_marker_selector_by_id**](MarkerSelectorsApi.md#delete_marker_selector_by_id) | **DELETE** /projects/{projectId}/md/markerSelectors/{id} | Deletes marker selector by id [**get_all_marker_selectors**](MarkerSelectorsApi.md#get_all_marker_selectors) | **GET** /projects/{projectId}/md/markerSelectors | Returns paged collection of all Marker Selectors in a project. [**get_marker_selector_by_id**](MarkerSelectorsApi.md#get_marker_selector_by_id) | **GET** /projects/{projectId}/md/markerSelectors/{id} | Gets marker selector by id +[**get_marker_selector_by_name**](MarkerSelectorsApi.md#get_marker_selector_by_name) | **GET** /projects/{projectId}/md/markerSelectors/{name} | Gets marker selector by name [**update_marker_selector_by_id**](MarkerSelectorsApi.md#update_marker_selector_by_id) | **PUT** /projects/{projectId}/md/markerSelectors/{id} | Updates marker selector by id # **create_marker_selector** -> MarkerSelectorDTO create_marker_selector(project_id, marker_selector_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> MarkerSelectorResponseDTO create_marker_selector(project_id, marker_selector_dto, x_can_strict_json_validation=x_can_strict_json_validation) Creates new Marker Selector. @@ -25,6 +26,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.marker_selector_dto import MarkerSelectorDTO +from cm_python_openapi_sdk.models.marker_selector_response_dto import MarkerSelectorResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -74,7 +76,7 @@ Name | Type | Description | Notes ### Return type -[**MarkerSelectorDTO**](MarkerSelectorDTO.md) +[**MarkerSelectorResponseDTO**](MarkerSelectorResponseDTO.md) ### Authorization @@ -256,7 +258,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_marker_selector_by_id** -> MarkerSelectorDTO get_marker_selector_by_id(project_id, id) +> MarkerSelectorResponseDTO get_marker_selector_by_id(project_id, id) Gets marker selector by id @@ -266,7 +268,7 @@ Gets marker selector by id ```python import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.marker_selector_dto import MarkerSelectorDTO +from cm_python_openapi_sdk.models.marker_selector_response_dto import MarkerSelectorResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -314,7 +316,86 @@ Name | Type | Description | Notes ### Return type -[**MarkerSelectorDTO**](MarkerSelectorDTO.md) +[**MarkerSelectorResponseDTO**](MarkerSelectorResponseDTO.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**404** | Marker selector not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_marker_selector_by_name** +> MarkerSelectorResponseDTO get_marker_selector_by_name(project_id, name) + +Gets marker selector by name + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.marker_selector_response_dto import MarkerSelectorResponseDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.MarkerSelectorsApi(api_client) + project_id = 'project_id_example' # str | Id of the project + name = 'name_example' # str | Name of the marker selector + + try: + # Gets marker selector by name + api_response = api_instance.get_marker_selector_by_name(project_id, name) + print("The response of MarkerSelectorsApi->get_marker_selector_by_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarkerSelectorsApi->get_marker_selector_by_name: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **name** | **str**| Name of the marker selector | + +### Return type + +[**MarkerSelectorResponseDTO**](MarkerSelectorResponseDTO.md) ### Authorization @@ -335,7 +416,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_marker_selector_by_id** -> MarkerSelectorDTO update_marker_selector_by_id(project_id, id, if_match, marker_selector_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> MarkerSelectorResponseDTO update_marker_selector_by_id(project_id, id, if_match, marker_selector_dto, x_can_strict_json_validation=x_can_strict_json_validation) Updates marker selector by id @@ -348,6 +429,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.marker_selector_dto import MarkerSelectorDTO +from cm_python_openapi_sdk.models.marker_selector_response_dto import MarkerSelectorResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -401,7 +483,7 @@ Name | Type | Description | Notes ### Return type -[**MarkerSelectorDTO**](MarkerSelectorDTO.md) +[**MarkerSelectorResponseDTO**](MarkerSelectorResponseDTO.md) ### Authorization diff --git a/docs/MarkersApi.md b/docs/MarkersApi.md index 3050d48..2b3f10f 100644 --- a/docs/MarkersApi.md +++ b/docs/MarkersApi.md @@ -8,11 +8,12 @@ Method | HTTP request | Description [**delete_marker_by_id**](MarkersApi.md#delete_marker_by_id) | **DELETE** /projects/{projectId}/md/markers/{id} | Deletes marker by id [**get_all_markers**](MarkersApi.md#get_all_markers) | **GET** /projects/{projectId}/md/markers | Returns paged collection of all Markers in a project. [**get_marker_by_id**](MarkersApi.md#get_marker_by_id) | **GET** /projects/{projectId}/md/markers/{id} | Gets marker by id +[**get_marker_by_name**](MarkersApi.md#get_marker_by_name) | **GET** /projects/{projectId}/md/markers/{name} | Gets marker by name [**update_marker_by_id**](MarkersApi.md#update_marker_by_id) | **PUT** /projects/{projectId}/md/markers/{id} | Updates marker by id # **create_marker** -> MarkerDTO create_marker(project_id, marker_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> MarkerResponseDTO create_marker(project_id, marker_dto, x_can_strict_json_validation=x_can_strict_json_validation) Creates new Marker. @@ -25,6 +26,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.marker_dto import MarkerDTO +from cm_python_openapi_sdk.models.marker_response_dto import MarkerResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -74,7 +76,7 @@ Name | Type | Description | Notes ### Return type -[**MarkerDTO**](MarkerDTO.md) +[**MarkerResponseDTO**](MarkerResponseDTO.md) ### Authorization @@ -256,7 +258,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_marker_by_id** -> MarkerDTO get_marker_by_id(project_id, id) +> MarkerResponseDTO get_marker_by_id(project_id, id) Gets marker by id @@ -266,7 +268,7 @@ Gets marker by id ```python import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.marker_dto import MarkerDTO +from cm_python_openapi_sdk.models.marker_response_dto import MarkerResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -314,7 +316,86 @@ Name | Type | Description | Notes ### Return type -[**MarkerDTO**](MarkerDTO.md) +[**MarkerResponseDTO**](MarkerResponseDTO.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**404** | Marker not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_marker_by_name** +> MarkerResponseDTO get_marker_by_name(project_id, name) + +Gets marker by name + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.marker_response_dto import MarkerResponseDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.MarkersApi(api_client) + project_id = 'project_id_example' # str | Id of the project + name = 'name_example' # str | Name of the marker + + try: + # Gets marker by name + api_response = api_instance.get_marker_by_name(project_id, name) + print("The response of MarkersApi->get_marker_by_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MarkersApi->get_marker_by_name: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **name** | **str**| Name of the marker | + +### Return type + +[**MarkerResponseDTO**](MarkerResponseDTO.md) ### Authorization @@ -335,7 +416,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_marker_by_id** -> MarkerDTO update_marker_by_id(project_id, id, if_match, marker_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> MarkerResponseDTO update_marker_by_id(project_id, id, if_match, marker_dto, x_can_strict_json_validation=x_can_strict_json_validation) Updates marker by id @@ -348,6 +429,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.marker_dto import MarkerDTO +from cm_python_openapi_sdk.models.marker_response_dto import MarkerResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -401,7 +483,7 @@ Name | Type | Description | Notes ### Return type -[**MarkerDTO**](MarkerDTO.md) +[**MarkerResponseDTO**](MarkerResponseDTO.md) ### Authorization diff --git a/docs/MembersApi.md b/docs/MembersApi.md index 830af84..4f0bf0d 100644 --- a/docs/MembersApi.md +++ b/docs/MembersApi.md @@ -12,11 +12,13 @@ Method | HTTP request | Description # **add_project_member** -> MembershipDTO add_project_member(project_id, create_membership_dto) +> MembershipResponseDTO add_project_member(project_id, create_membership_dto) Add new project member and assign a role. -The user is added into the project without any cooperation (acknowledgement) with invited user. +The user is added into the project without any cooperation (acknowledgement) with invited user. You can add user +by accountId or email. + See the Project Invitation resource too. It allows to invite a new member by email address and sends an invitation email. **Security:** @@ -30,7 +32,7 @@ Restricted to ADMIN project role. ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.create_membership_dto import CreateMembershipDTO -from cm_python_openapi_sdk.models.membership_dto import MembershipDTO +from cm_python_openapi_sdk.models.membership_response_dto import MembershipResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -78,7 +80,7 @@ Name | Type | Description | Notes ### Return type -[**MembershipDTO**](MembershipDTO.md) +[**MembershipResponseDTO**](MembershipResponseDTO.md) ### Authorization @@ -180,7 +182,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_membership_by_id** -> MembershipDTO get_membership_by_id(project_id, membership_id) +> MembershipResponseDTO get_membership_by_id(project_id, membership_id) Get detail of user membership in project by membership id. @@ -194,7 +196,7 @@ Restricted to ADMIN project role. ```python import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.membership_dto import MembershipDTO +from cm_python_openapi_sdk.models.membership_response_dto import MembershipResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -242,7 +244,7 @@ Name | Type | Description | Notes ### Return type -[**MembershipDTO**](MembershipDTO.md) +[**MembershipResponseDTO**](MembershipResponseDTO.md) ### Authorization @@ -357,7 +359,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_membership** -> MembershipDTO update_membership(project_id, membership_id, update_membership) +> MembershipResponseDTO update_membership(project_id, membership_id, update_membership_dto) Update membership by changing role or status in project. @@ -371,8 +373,8 @@ Restricted to ADMIN project role. ```python import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.membership_dto import MembershipDTO -from cm_python_openapi_sdk.models.update_membership import UpdateMembership +from cm_python_openapi_sdk.models.membership_response_dto import MembershipResponseDTO +from cm_python_openapi_sdk.models.update_membership_dto import UpdateMembershipDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -398,11 +400,11 @@ with cm_python_openapi_sdk.ApiClient(configuration) as api_client: api_instance = cm_python_openapi_sdk.MembersApi(api_client) project_id = 'project_id_example' # str | Id of the project membership_id = 'membership_id_example' # str | Id of the membership - update_membership = cm_python_openapi_sdk.UpdateMembership() # UpdateMembership | + update_membership_dto = cm_python_openapi_sdk.UpdateMembershipDTO() # UpdateMembershipDTO | try: # Update membership by changing role or status in project. - api_response = api_instance.update_membership(project_id, membership_id, update_membership) + api_response = api_instance.update_membership(project_id, membership_id, update_membership_dto) print("The response of MembersApi->update_membership:\n") pprint(api_response) except Exception as e: @@ -418,11 +420,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **project_id** | **str**| Id of the project | **membership_id** | **str**| Id of the membership | - **update_membership** | [**UpdateMembership**](UpdateMembership.md)| | + **update_membership_dto** | [**UpdateMembershipDTO**](UpdateMembershipDTO.md)| | ### Return type -[**MembershipDTO**](MembershipDTO.md) +[**MembershipResponseDTO**](MembershipResponseDTO.md) ### Authorization diff --git a/docs/MembershipPagedModelDTO.md b/docs/MembershipPagedModelDTO.md index 2fe08c6..eef4356 100644 --- a/docs/MembershipPagedModelDTO.md +++ b/docs/MembershipPagedModelDTO.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] -**content** | [**List[MembershipDTO]**](MembershipDTO.md) | | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**content** | [**List[MembershipResponseDTO]**](MembershipResponseDTO.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] ## Example diff --git a/docs/MembershipResponseDTO.md b/docs/MembershipResponseDTO.md new file mode 100644 index 0000000..87bc9d3 --- /dev/null +++ b/docs/MembershipResponseDTO.md @@ -0,0 +1,36 @@ +# MembershipResponseDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**account_id** | **str** | | [optional] +**status** | **str** | | +**role** | **str** | | +**created_at** | **str** | | [optional] +**modified_at** | **str** | | [optional] +**account** | [**AccountDTO**](AccountDTO.md) | | [optional] +**links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.membership_response_dto import MembershipResponseDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of MembershipResponseDTO from a JSON string +membership_response_dto_instance = MembershipResponseDTO.from_json(json) +# print the JSON string representation of the object +print(MembershipResponseDTO.to_json()) + +# convert the object into a dict +membership_response_dto_dict = membership_response_dto_instance.to_dict() +# create an instance of MembershipResponseDTO from a dict +membership_response_dto_from_dict = MembershipResponseDTO.from_dict(membership_response_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MetricPagedModelDTO.md b/docs/MetricPagedModelDTO.md index a8aeb20..6850328 100644 --- a/docs/MetricPagedModelDTO.md +++ b/docs/MetricPagedModelDTO.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**content** | [**List[MetricDTO]**](MetricDTO.md) | | [optional] +**content** | [**List[MetricResponseDTO]**](MetricResponseDTO.md) | | [optional] **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] ## Example diff --git a/docs/MetricResponseDTO.md b/docs/MetricResponseDTO.md new file mode 100644 index 0000000..73de055 --- /dev/null +++ b/docs/MetricResponseDTO.md @@ -0,0 +1,38 @@ +# MetricResponseDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | +**type** | **str** | | [optional] +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**content** | [**DwhQueryFunctionTypes**](DwhQueryFunctionTypes.md) | | +**links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] +**access_info** | [**AccessInfoDTO**](AccessInfoDTO.md) | | [optional] +**version** | **int** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.metric_response_dto import MetricResponseDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of MetricResponseDTO from a JSON string +metric_response_dto_instance = MetricResponseDTO.from_json(json) +# print the JSON string representation of the object +print(MetricResponseDTO.to_json()) + +# convert the object into a dict +metric_response_dto_dict = metric_response_dto_instance.to_dict() +# create an instance of MetricResponseDTO from a dict +metric_response_dto_from_dict = MetricResponseDTO.from_dict(metric_response_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MetricsApi.md b/docs/MetricsApi.md index 697a8e6..6727c51 100644 --- a/docs/MetricsApi.md +++ b/docs/MetricsApi.md @@ -8,11 +8,12 @@ Method | HTTP request | Description [**delete_metric_by_id**](MetricsApi.md#delete_metric_by_id) | **DELETE** /projects/{projectId}/md/metrics/{id} | Deletes metric by id [**get_all_metrics**](MetricsApi.md#get_all_metrics) | **GET** /projects/{projectId}/md/metrics | Returns paged collection of all Metrics in a project. [**get_metric_by_id**](MetricsApi.md#get_metric_by_id) | **GET** /projects/{projectId}/md/metrics/{id} | Gets metric by id +[**get_metric_by_name**](MetricsApi.md#get_metric_by_name) | **GET** /projects/{projectId}/md/metrics/{name} | Gets metric by name [**update_metric_by_id**](MetricsApi.md#update_metric_by_id) | **PUT** /projects/{projectId}/md/metrics/{id} | Updates metric by id # **create_metric** -> MetricDTO create_metric(project_id, metric_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> MetricResponseDTO create_metric(project_id, metric_dto, x_can_strict_json_validation=x_can_strict_json_validation) Creates new metric. @@ -25,6 +26,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.metric_dto import MetricDTO +from cm_python_openapi_sdk.models.metric_response_dto import MetricResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -74,7 +76,7 @@ Name | Type | Description | Notes ### Return type -[**MetricDTO**](MetricDTO.md) +[**MetricResponseDTO**](MetricResponseDTO.md) ### Authorization @@ -256,7 +258,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_metric_by_id** -> MetricDTO get_metric_by_id(project_id, id) +> MetricResponseDTO get_metric_by_id(project_id, id) Gets metric by id @@ -266,7 +268,7 @@ Gets metric by id ```python import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.metric_dto import MetricDTO +from cm_python_openapi_sdk.models.metric_response_dto import MetricResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -314,7 +316,86 @@ Name | Type | Description | Notes ### Return type -[**MetricDTO**](MetricDTO.md) +[**MetricResponseDTO**](MetricResponseDTO.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**404** | Metric not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_metric_by_name** +> MetricResponseDTO get_metric_by_name(project_id, name) + +Gets metric by name + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.metric_response_dto import MetricResponseDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.MetricsApi(api_client) + project_id = 'project_id_example' # str | Id of the project + name = 'name_example' # str | Name of the metric + + try: + # Gets metric by name + api_response = api_instance.get_metric_by_name(project_id, name) + print("The response of MetricsApi->get_metric_by_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling MetricsApi->get_metric_by_name: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **name** | **str**| Name of the metric | + +### Return type + +[**MetricResponseDTO**](MetricResponseDTO.md) ### Authorization @@ -335,7 +416,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_metric_by_id** -> MetricDTO update_metric_by_id(project_id, id, if_match, metric_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> MetricResponseDTO update_metric_by_id(project_id, id, if_match, metric_dto, x_can_strict_json_validation=x_can_strict_json_validation) Updates metric by id @@ -348,6 +429,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.metric_dto import MetricDTO +from cm_python_openapi_sdk.models.metric_response_dto import MetricResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -401,7 +483,7 @@ Name | Type | Description | Notes ### Return type -[**MetricDTO**](MetricDTO.md) +[**MetricResponseDTO**](MetricResponseDTO.md) ### Authorization diff --git a/docs/OrganizationPagedModelDTO.md b/docs/OrganizationPagedModelDTO.md index c9f7389..945ab0d 100644 --- a/docs/OrganizationPagedModelDTO.md +++ b/docs/OrganizationPagedModelDTO.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] **content** | [**List[OrganizationResponseDTO]**](OrganizationResponseDTO.md) | | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] ## Example diff --git a/docs/PageDTO.md b/docs/PageDTO.md new file mode 100644 index 0000000..e111dea --- /dev/null +++ b/docs/PageDTO.md @@ -0,0 +1,33 @@ +# PageDTO + +define keys links and page that are mandatory for all pageble responses + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**size** | **int** | | +**total_elements** | **object** | | +**total_pages** | **int** | | +**number** | **int** | | + +## Example + +```python +from cm_python_openapi_sdk.models.page_dto import PageDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of PageDTO from a JSON string +page_dto_instance = PageDTO.from_json(json) +# print the JSON string representation of the object +print(PageDTO.to_json()) + +# convert the object into a dict +page_dto_dict = page_dto_instance.to_dict() +# create an instance of PageDTO from a dict +page_dto_from_dict = PageDTO.from_dict(page_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProjectPagedModelDTO.md b/docs/ProjectPagedModelDTO.md index fdd741c..0ca0528 100644 --- a/docs/ProjectPagedModelDTO.md +++ b/docs/ProjectPagedModelDTO.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] **content** | [**List[ProjectResponseDTO]**](ProjectResponseDTO.md) | | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] ## Example diff --git a/docs/ProjectResponseDTO.md b/docs/ProjectResponseDTO.md index 28f5802..eb913cd 100644 --- a/docs/ProjectResponseDTO.md +++ b/docs/ProjectResponseDTO.md @@ -13,8 +13,8 @@ Name | Type | Description | Notes **share** | **str** | | **created_at** | **str** | | **modified_at** | **str** | | [optional] -**membership** | [**MembershipDTO**](MembershipDTO.md) | | [optional] -**services** | **object** | | [optional] +**membership** | [**MembershipResponseDTO**](MembershipResponseDTO.md) | | [optional] +**services** | [**ProjectResponseDTOServices**](ProjectResponseDTOServices.md) | | [optional] **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | ## Example diff --git a/docs/ProjectResponseDTOServices.md b/docs/ProjectResponseDTOServices.md new file mode 100644 index 0000000..73a654e --- /dev/null +++ b/docs/ProjectResponseDTOServices.md @@ -0,0 +1,31 @@ +# ProjectResponseDTOServices + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**kbc** | **str** | | [optional] +**dwh** | **str** | | [optional] +**md** | **str** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.project_response_dto_services import ProjectResponseDTOServices + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectResponseDTOServices from a JSON string +project_response_dto_services_instance = ProjectResponseDTOServices.from_json(json) +# print the JSON string representation of the object +print(ProjectResponseDTOServices.to_json()) + +# convert the object into a dict +project_response_dto_services_dict = project_response_dto_services_instance.to_dict() +# create an instance of ProjectResponseDTOServices from a dict +project_response_dto_services_from_dict = ProjectResponseDTOServices.from_dict(project_response_dto_services_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ProjectSettingsApi.md b/docs/ProjectSettingsApi.md index f79933b..5de4707 100644 --- a/docs/ProjectSettingsApi.md +++ b/docs/ProjectSettingsApi.md @@ -8,11 +8,12 @@ Method | HTTP request | Description [**delete_project_settings_by_id**](ProjectSettingsApi.md#delete_project_settings_by_id) | **DELETE** /projects/{projectId}/md/projectSettings/{id} | Deletes project settings by id [**get_all_project_settings**](ProjectSettingsApi.md#get_all_project_settings) | **GET** /projects/{projectId}/md/projectSettings | Returns paged collection of all Project Settings objects in a project. This page will always contain only one object. [**get_project_settings_by_id**](ProjectSettingsApi.md#get_project_settings_by_id) | **GET** /projects/{projectId}/md/projectSettings/{id} | Gets project settings by id +[**get_project_settings_by_name**](ProjectSettingsApi.md#get_project_settings_by_name) | **GET** /projects/{projectId}/md/projectSettings/{name} | Gets projectSettings by name [**update_project_settings_by_id**](ProjectSettingsApi.md#update_project_settings_by_id) | **PUT** /projects/{projectId}/md/projectSettings/{id} | Updates project settings by id # **create_project_settings** -> ProjectSettingsDTO create_project_settings(project_id, project_settings_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> ProjectSettingsResponseDTO create_project_settings(project_id, project_settings_dto, x_can_strict_json_validation=x_can_strict_json_validation) Creates new project settings @@ -25,6 +26,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.project_settings_dto import ProjectSettingsDTO +from cm_python_openapi_sdk.models.project_settings_response_dto import ProjectSettingsResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -74,7 +76,7 @@ Name | Type | Description | Notes ### Return type -[**ProjectSettingsDTO**](ProjectSettingsDTO.md) +[**ProjectSettingsResponseDTO**](ProjectSettingsResponseDTO.md) ### Authorization @@ -256,7 +258,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_project_settings_by_id** -> ProjectSettingsDTO get_project_settings_by_id(project_id, id) +> ProjectSettingsResponseDTO get_project_settings_by_id(project_id, id) Gets project settings by id @@ -266,7 +268,7 @@ Gets project settings by id ```python import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.project_settings_dto import ProjectSettingsDTO +from cm_python_openapi_sdk.models.project_settings_response_dto import ProjectSettingsResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -314,7 +316,7 @@ Name | Type | Description | Notes ### Return type -[**ProjectSettingsDTO**](ProjectSettingsDTO.md) +[**ProjectSettingsResponseDTO**](ProjectSettingsResponseDTO.md) ### Authorization @@ -334,8 +336,87 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_project_settings_by_name** +> ProjectSettingsResponseDTO get_project_settings_by_name(project_id, name) + +Gets projectSettings by name + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.project_settings_response_dto import ProjectSettingsResponseDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.ProjectSettingsApi(api_client) + project_id = 'project_id_example' # str | Id of the project + name = 'name_example' # str | Name of the projectSettings + + try: + # Gets projectSettings by name + api_response = api_instance.get_project_settings_by_name(project_id, name) + print("The response of ProjectSettingsApi->get_project_settings_by_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ProjectSettingsApi->get_project_settings_by_name: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **name** | **str**| Name of the projectSettings | + +### Return type + +[**ProjectSettingsResponseDTO**](ProjectSettingsResponseDTO.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**404** | ProjectSettings not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **update_project_settings_by_id** -> ProjectSettingsDTO update_project_settings_by_id(project_id, id, if_match, project_settings_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> ProjectSettingsResponseDTO update_project_settings_by_id(project_id, id, if_match, project_settings_dto, x_can_strict_json_validation=x_can_strict_json_validation) Updates project settings by id @@ -348,6 +429,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.project_settings_dto import ProjectSettingsDTO +from cm_python_openapi_sdk.models.project_settings_response_dto import ProjectSettingsResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -401,7 +483,7 @@ Name | Type | Description | Notes ### Return type -[**ProjectSettingsDTO**](ProjectSettingsDTO.md) +[**ProjectSettingsResponseDTO**](ProjectSettingsResponseDTO.md) ### Authorization diff --git a/docs/ProjectSettingsPagedModelDTO.md b/docs/ProjectSettingsPagedModelDTO.md index 5707e90..8ebf1c2 100644 --- a/docs/ProjectSettingsPagedModelDTO.md +++ b/docs/ProjectSettingsPagedModelDTO.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**content** | [**List[ProjectSettingsDTO]**](ProjectSettingsDTO.md) | | [optional] +**content** | [**List[ProjectSettingsResponseDTO]**](ProjectSettingsResponseDTO.md) | | [optional] **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] ## Example diff --git a/docs/ProjectSettingsResponseDTO.md b/docs/ProjectSettingsResponseDTO.md new file mode 100644 index 0000000..3cada2a --- /dev/null +++ b/docs/ProjectSettingsResponseDTO.md @@ -0,0 +1,38 @@ +# ProjectSettingsResponseDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | +**type** | **str** | | [optional] +**title** | **str** | | [optional] +**description** | **str** | | [optional] +**content** | [**ProjectSettingsContentDTO**](ProjectSettingsContentDTO.md) | | +**links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] +**access_info** | [**AccessInfoDTO**](AccessInfoDTO.md) | | [optional] +**version** | **int** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.project_settings_response_dto import ProjectSettingsResponseDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of ProjectSettingsResponseDTO from a JSON string +project_settings_response_dto_instance = ProjectSettingsResponseDTO.from_json(json) +# print the JSON string representation of the object +print(ProjectSettingsResponseDTO.to_json()) + +# convert the object into a dict +project_settings_response_dto_dict = project_settings_response_dto_instance.to_dict() +# create an instance of ProjectSettingsResponseDTO from a dict +project_settings_response_dto_from_dict = ProjectSettingsResponseDTO.from_dict(project_settings_response_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PropertyValuesResponse.md b/docs/PropertyValuesResponse.md index 7ff02a5..e6389c9 100644 --- a/docs/PropertyValuesResponse.md +++ b/docs/PropertyValuesResponse.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **content** | [**List[PropertyValuesResponseContentInner]**](PropertyValuesResponseContentInner.md) | | **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | +**page** | [**PageDTO**](PageDTO.md) | | ## Example diff --git a/docs/QueriesApi.md b/docs/QueriesApi.md index 9292094..3701757 100644 --- a/docs/QueriesApi.md +++ b/docs/QueriesApi.md @@ -106,7 +106,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_queries** -> QueryResponse get_queries(project_id, dwh_cluster_id, dwh_cache_id) +> QueryResponse get_queries(project_id, dwh_cluster_id, dwh_cache_id, page=page, size=size) Get queries @@ -154,10 +154,12 @@ with cm_python_openapi_sdk.ApiClient(configuration) as api_client: project_id = 'project_id_example' # str | Id of the project dwh_cluster_id = 'dwh_cluster_id_example' # str | Id of the dwh cluster dwh_cache_id = 'q:vb2b3d8v91jao331:DqBZN5IjSwfufj-7rDMAOQ' # str | Id of the dwh cache + page = 0 # int | Number of the page (optional) (default to 0) + size = 100 # int | The count of records to return for one page (optional) (default to 100) try: # Get queries - api_response = api_instance.get_queries(project_id, dwh_cluster_id, dwh_cache_id) + api_response = api_instance.get_queries(project_id, dwh_cluster_id, dwh_cache_id, page=page, size=size) print("The response of QueriesApi->get_queries:\n") pprint(api_response) except Exception as e: @@ -174,6 +176,8 @@ Name | Type | Description | Notes **project_id** | **str**| Id of the project | **dwh_cluster_id** | **str**| Id of the dwh cluster | **dwh_cache_id** | **str**| Id of the dwh cache | + **page** | **int**| Number of the page | [optional] [default to 0] + **size** | **int**| The count of records to return for one page | [optional] [default to 100] ### Return type diff --git a/docs/QueryResponse.md b/docs/QueryResponse.md index a73b56b..16b1504 100644 --- a/docs/QueryResponse.md +++ b/docs/QueryResponse.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **content** | [**List[QueryResponseItemWrapper]**](QueryResponseItemWrapper.md) | | **execution_detail** | [**ExecutionDetail**](ExecutionDetail.md) | | [optional] **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | +**page** | [**PageDTO**](PageDTO.md) | | ## Example diff --git a/docs/SearchApi.md b/docs/SearchApi.md index 13d78ef..fa2c9af 100644 --- a/docs/SearchApi.md +++ b/docs/SearchApi.md @@ -5,7 +5,6 @@ All URIs are relative to *https://staging.dev.clevermaps.io/rest* Method | HTTP request | Description ------------- | ------------- | ------------- [**full_text_search**](SearchApi.md#full_text_search) | **GET** /projects/{projectId}/search | Full text search on all internal project data. -[**geographic_search**](SearchApi.md#geographic_search) | **GET** /geosearch | Geographic search # **full_text_search** @@ -100,92 +99,3 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **geographic_search** -> GeosearchPagedModelDTO geographic_search(query, page=page, size=size, country=country, language=language, types=types) - -Geographic search - -Wrapper of [Mapbox Geocoding service](https://docs.mapbox.com/api/search/geocoding/). Processes the query and validates the URL parameters. If the query is valid, it is executed on Mapbox API. The result is then translated and returned. - - -### Example - -* Bearer Authentication (bearerAuth): - -```python -import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.geosearch_paged_model_dto import GeosearchPagedModelDTO -from cm_python_openapi_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest -# See configuration.py for a list of all supported configuration parameters. -configuration = cm_python_openapi_sdk.Configuration( - host = "https://staging.dev.clevermaps.io/rest" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization: bearerAuth -configuration = cm_python_openapi_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with cm_python_openapi_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = cm_python_openapi_sdk.SearchApi(api_client) - query = 'Birmingham' # str | Query search phrase. It is highlighted in the query result. - page = 0 # int | Number of the page (optional) (default to 0) - size = 100 # int | The count of records to return for one page (optional) (default to 100) - country = 'GB' # str | Array of ISO 3166 alpha-2 country codes to limit the search. (optional) - language = 'en' # str | Language to use for query results as defined by ISO 639-1. (optional) - types = 'city, locality, address' # str | Array of place types, available types are [region, district, city, locality, address, postcode] (optional) - - try: - # Geographic search - api_response = api_instance.geographic_search(query, page=page, size=size, country=country, language=language, types=types) - print("The response of SearchApi->geographic_search:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling SearchApi->geographic_search: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **str**| Query search phrase. It is highlighted in the query result. | - **page** | **int**| Number of the page | [optional] [default to 0] - **size** | **int**| The count of records to return for one page | [optional] [default to 100] - **country** | **str**| Array of ISO 3166 alpha-2 country codes to limit the search. | [optional] - **language** | **str**| Language to use for query results as defined by ISO 639-1. | [optional] - **types** | **str**| Array of place types, available types are [region, district, city, locality, address, postcode] | [optional] - -### Return type - -[**GeosearchPagedModelDTO**](GeosearchPagedModelDTO.md) - -### Authorization - -[bearerAuth](../README.md#bearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful response | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/SearchQueryResponse.md b/docs/SearchQueryResponse.md index dc6866f..73467bb 100644 --- a/docs/SearchQueryResponse.md +++ b/docs/SearchQueryResponse.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **content** | [**List[SearchQueryHit]**](SearchQueryHit.md) | | **links** | **List[object]** | | -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | +**page** | [**PageDTO**](PageDTO.md) | | ## Example diff --git a/docs/TokenResponseDTO.md b/docs/TokenResponseDTO.md index 6728eb1..b8385b2 100644 --- a/docs/TokenResponseDTO.md +++ b/docs/TokenResponseDTO.md @@ -8,7 +8,6 @@ Name | Type | Description | Notes **token_type** | **str** | | [optional] **expires_in** | **int** | | [optional] **access_token** | **str** | | -**scope** | **str** | | [optional] **refresh_token** | **str** | | [optional] **id_token** | **str** | | [optional] diff --git a/docs/UpdateMembershipDTO.md b/docs/UpdateMembershipDTO.md new file mode 100644 index 0000000..acf7243 --- /dev/null +++ b/docs/UpdateMembershipDTO.md @@ -0,0 +1,30 @@ +# UpdateMembershipDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **str** | | +**role** | **str** | | + +## Example + +```python +from cm_python_openapi_sdk.models.update_membership_dto import UpdateMembershipDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of UpdateMembershipDTO from a JSON string +update_membership_dto_instance = UpdateMembershipDTO.from_json(json) +# print the JSON string representation of the object +print(UpdateMembershipDTO.to_json()) + +# convert the object into a dict +update_membership_dto_dict = update_membership_dto_instance.to_dict() +# create an instance of UpdateMembershipDTO from a dict +update_membership_dto_from_dict = UpdateMembershipDTO.from_dict(update_membership_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateProjectDTO.md b/docs/UpdateProjectDTO.md index 88da2e3..2e2050e 100644 --- a/docs/UpdateProjectDTO.md +++ b/docs/UpdateProjectDTO.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **description** | **str** | | [optional] **organization_id** | **str** | | [optional] **status** | **str** | | [optional] -**services** | **object** | | [optional] +**services** | [**ProjectResponseDTOServices**](ProjectResponseDTOServices.md) | | [optional] ## Example diff --git a/docs/VectorTilesApi.md b/docs/VectorTilesApi.md new file mode 100644 index 0000000..5741bcd --- /dev/null +++ b/docs/VectorTilesApi.md @@ -0,0 +1,102 @@ +# cm_python_openapi_sdk.VectorTilesApi + +All URIs are relative to *https://staging.dev.clevermaps.io/rest* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_vector_tile**](VectorTilesApi.md#get_vector_tile) | **GET** /projects/{projectId}/dwh/{dwhClusterId}/tiles/{datasetName}/{z}/{x}/{y}.vector.pbf | + + +# **get_vector_tile** +> bytearray get_vector_tile(project_id, dwh_cluster_id, dataset_name, z, x, y) + +Get a vector tile from a geometryPolygon or geometryLine dataset. +This endpoint provides on-the-fly rendering of vector tiles from DWH geometryLine or geometryPolygon datasets that include a geometry property. + +Vector tiles are rendered upon request and cached in a Redis in-memory database to improve performance. Geometries are not generalized, so this endpoint is not optimized for serving very large datasets. + +This endpoint synchronously starts the vector tile computation and waits for the data. For very large datasets, the request may time out. +If the vector tile is empty, a 404 response is returned. + + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.VectorTilesApi(api_client) + project_id = 'project_id_example' # str | Id of the project + dwh_cluster_id = 'dwh_cluster_id_example' # str | Id of the dwh cluster + dataset_name = 'dataset_name_example' # str | Name of the DWH dataset with geometry data + z = 56 # int | Z coordinate of a vector tile + x = 56 # int | X coordinate of a vector tile + y = 56 # int | Y coordinate of a vector tile + + try: + api_response = api_instance.get_vector_tile(project_id, dwh_cluster_id, dataset_name, z, x, y) + print("The response of VectorTilesApi->get_vector_tile:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling VectorTilesApi->get_vector_tile: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **dwh_cluster_id** | **str**| Id of the dwh cluster | + **dataset_name** | **str**| Name of the DWH dataset with geometry data | + **z** | **int**| Z coordinate of a vector tile | + **x** | **int**| X coordinate of a vector tile | + **y** | **int**| Y coordinate of a vector tile | + +### Return type + +**bytearray** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/vnd.mapbox-vector-tile + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | OK - vector tile was successfully processed | - | +**400** | Bad Request - dataset is not type geometryPolygon, geometryLine or doesn't contain geometry data | - | +**404** | Not Found - some uri parameter was not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/ViewPagedModelDTO.md b/docs/ViewPagedModelDTO.md index fbb2229..55bb07e 100644 --- a/docs/ViewPagedModelDTO.md +++ b/docs/ViewPagedModelDTO.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**content** | [**List[ViewDTO]**](ViewDTO.md) | | [optional] +**content** | [**List[ViewResponseDTO]**](ViewResponseDTO.md) | | [optional] **links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] -**page** | [**MandatoryKeysForPagableResponse**](MandatoryKeysForPagableResponse.md) | | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] ## Example diff --git a/docs/ViewResponseDTO.md b/docs/ViewResponseDTO.md new file mode 100644 index 0000000..ba4325a --- /dev/null +++ b/docs/ViewResponseDTO.md @@ -0,0 +1,38 @@ +# ViewResponseDTO + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **str** | | [optional] +**name** | **str** | | +**type** | **str** | | [optional] +**title** | **str** | | +**description** | **str** | | +**content** | [**ViewContentDTO**](ViewContentDTO.md) | | +**links** | **List[object]** | define keys links and page that are mandatory for all pageble responses | [optional] +**page** | [**PageDTO**](PageDTO.md) | | [optional] +**access_info** | [**AccessInfoDTO**](AccessInfoDTO.md) | | [optional] +**version** | **int** | | [optional] + +## Example + +```python +from cm_python_openapi_sdk.models.view_response_dto import ViewResponseDTO + +# TODO update the JSON string below +json = "{}" +# create an instance of ViewResponseDTO from a JSON string +view_response_dto_instance = ViewResponseDTO.from_json(json) +# print the JSON string representation of the object +print(ViewResponseDTO.to_json()) + +# convert the object into a dict +view_response_dto_dict = view_response_dto_instance.to_dict() +# create an instance of ViewResponseDTO from a dict +view_response_dto_from_dict = ViewResponseDTO.from_dict(view_response_dto_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ViewsApi.md b/docs/ViewsApi.md index 4b92e4f..18e8357 100644 --- a/docs/ViewsApi.md +++ b/docs/ViewsApi.md @@ -8,11 +8,12 @@ Method | HTTP request | Description [**delete_view_by_id**](ViewsApi.md#delete_view_by_id) | **DELETE** /projects/{projectId}/md/views/{id} | Deletes view by id [**get_all_views**](ViewsApi.md#get_all_views) | **GET** /projects/{projectId}/md/views | Returns collection of all views in a project [**get_view_by_id**](ViewsApi.md#get_view_by_id) | **GET** /projects/{projectId}/md/views/{id} | Gets view by id +[**get_view_by_name**](ViewsApi.md#get_view_by_name) | **GET** /projects/{projectId}/md/views/{name} | Gets view by name [**update_view_by_id**](ViewsApi.md#update_view_by_id) | **PUT** /projects/{projectId}/md/views/{id} | Updates view by id # **create_view** -> ViewDTO create_view(project_id, view_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> ViewResponseDTO create_view(project_id, view_dto, x_can_strict_json_validation=x_can_strict_json_validation) Creates new view @@ -25,6 +26,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.view_dto import ViewDTO +from cm_python_openapi_sdk.models.view_response_dto import ViewResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -74,7 +76,7 @@ Name | Type | Description | Notes ### Return type -[**ViewDTO**](ViewDTO.md) +[**ViewResponseDTO**](ViewResponseDTO.md) ### Authorization @@ -256,7 +258,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_view_by_id** -> ViewDTO get_view_by_id(project_id, id) +> ViewResponseDTO get_view_by_id(project_id, id) Gets view by id @@ -266,7 +268,7 @@ Gets view by id ```python import cm_python_openapi_sdk -from cm_python_openapi_sdk.models.view_dto import ViewDTO +from cm_python_openapi_sdk.models.view_response_dto import ViewResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -314,7 +316,86 @@ Name | Type | Description | Notes ### Return type -[**ViewDTO**](ViewDTO.md) +[**ViewResponseDTO**](ViewResponseDTO.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful response | - | +**404** | View not found | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_view_by_name** +> ViewResponseDTO get_view_by_name(project_id, name) + +Gets view by name + +### Example + +* Bearer Authentication (bearerAuth): + +```python +import cm_python_openapi_sdk +from cm_python_openapi_sdk.models.view_response_dto import ViewResponseDTO +from cm_python_openapi_sdk.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://staging.dev.clevermaps.io/rest +# See configuration.py for a list of all supported configuration parameters. +configuration = cm_python_openapi_sdk.Configuration( + host = "https://staging.dev.clevermaps.io/rest" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure Bearer authorization: bearerAuth +configuration = cm_python_openapi_sdk.Configuration( + access_token = os.environ["BEARER_TOKEN"] +) + +# Enter a context with an instance of the API client +with cm_python_openapi_sdk.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cm_python_openapi_sdk.ViewsApi(api_client) + project_id = 'project_id_example' # str | Id of the project + name = 'name_example' # str | Name of the view + + try: + # Gets view by name + api_response = api_instance.get_view_by_name(project_id, name) + print("The response of ViewsApi->get_view_by_name:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling ViewsApi->get_view_by_name: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **project_id** | **str**| Id of the project | + **name** | **str**| Name of the view | + +### Return type + +[**ViewResponseDTO**](ViewResponseDTO.md) ### Authorization @@ -335,7 +416,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **update_view_by_id** -> ViewDTO update_view_by_id(project_id, id, if_match, view_dto, x_can_strict_json_validation=x_can_strict_json_validation) +> ViewResponseDTO update_view_by_id(project_id, id, if_match, view_dto, x_can_strict_json_validation=x_can_strict_json_validation) Updates view by id @@ -348,6 +429,7 @@ Restricted to EDITOR project role that has the permission to update metadata of ```python import cm_python_openapi_sdk from cm_python_openapi_sdk.models.view_dto import ViewDTO +from cm_python_openapi_sdk.models.view_response_dto import ViewResponseDTO from cm_python_openapi_sdk.rest import ApiException from pprint import pprint @@ -401,7 +483,7 @@ Name | Type | Description | Notes ### Return type -[**ViewDTO**](ViewDTO.md) +[**ViewResponseDTO**](ViewResponseDTO.md) ### Authorization diff --git a/pyproject.toml b/pyproject.toml index 363d5b2..c329107 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,9 +10,9 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "clevermaps-client"] include = ["cm_python_openapi_sdk/py.typed"] [tool.poetry.dependencies] -python = "^3.8" +python = "^3.9" -urllib3 = ">= 1.25.3, < 3.0.0" +urllib3 = ">= 2.1.0, < 3.0.0" python-dateutil = ">= 2.8.2" pydantic = ">= 2" typing-extensions = ">= 4.7.1" diff --git a/requirements.txt b/requirements.txt index 67f7f68..6cbb2b9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -urllib3 >= 1.25.3, < 3.0.0 +urllib3 >= 2.1.0, < 3.0.0 python_dateutil >= 2.8.2 pydantic >= 2 typing-extensions >= 4.7.1 diff --git a/setup.py b/setup.py index 0ed7832..7aaca4e 100644 --- a/setup.py +++ b/setup.py @@ -23,9 +23,9 @@ # http://pypi.python.org/pypi/setuptools NAME = "cm-python-openapi-sdk" VERSION = "1.0.0" -PYTHON_REQUIRES = ">= 3.8" +PYTHON_REQUIRES = ">= 3.9" REQUIRES = [ - "urllib3 >= 1.25.3, < 3.0.0", + "urllib3 >= 2.1.0, < 3.0.0", "python-dateutil >= 2.8.2", "pydantic >= 2", "typing-extensions >= 4.7.1", diff --git a/test/test_access_info_dto.py b/test/test_access_info_dto.py new file mode 100644 index 0000000..7eaf13f --- /dev/null +++ b/test/test_access_info_dto.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.access_info_dto import AccessInfoDTO + +class TestAccessInfoDTO(unittest.TestCase): + """AccessInfoDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AccessInfoDTO: + """Test AccessInfoDTO + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AccessInfoDTO` + """ + model = AccessInfoDTO() + if include_optional: + return AccessInfoDTO( + created_at = '', + created_by = '', + modified_at = '', + modified_by = '' + ) + else: + return AccessInfoDTO( + ) + """ + + def testAccessInfoDTO(self): + """Test AccessInfoDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_account_dto.py b/test/test_account_dto.py index 8ee08f1..b5812d4 100644 --- a/test/test_account_dto.py +++ b/test/test_account_dto.py @@ -43,10 +43,8 @@ def make_instance(self, include_optional) -> AccountDTO: status = 'ENABLED', anonymous = True, phone_number = '012345', - require_additional_attributes = True, preferences = {sendNewsletter=true, lastActiveOrganization=lastActiveOrganization, language=language, lastActiveProject=lastActiveProject}, onboarding = {introShown=[introShown, introShown], tipsShown=[tipsShown, tipsShown]}, - job_info = {companyName=companyName, industry=industry, jobPosition=jobPosition}, links = [ None ] diff --git a/test/test_accounts_api.py b/test/test_accounts_api.py index fe9521b..73d15f1 100644 --- a/test/test_accounts_api.py +++ b/test/test_accounts_api.py @@ -34,13 +34,6 @@ def test_change_onboarding(self) -> None: """ pass - def test_change_password(self) -> None: - """Test case for change_password - - Change password - """ - pass - def test_change_preferences(self) -> None: """Test case for change_preferences @@ -76,13 +69,6 @@ def test_get_current_account(self) -> None: """ pass - def test_register_account(self) -> None: - """Test case for register_account - - Register new account - """ - pass - if __name__ == '__main__': unittest.main() diff --git a/test/test_attribute_style_paged_model_dto.py b/test/test_attribute_style_paged_model_dto.py index b0481ee..205d676 100644 --- a/test/test_attribute_style_paged_model_dto.py +++ b/test/test_attribute_style_paged_model_dto.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> AttributeStylePagedModelDTO: if include_optional: return AttributeStylePagedModelDTO( content = [ - {name=name, description=description, id=id, type=dataset, title=title, content={fallbackCategory={style={fillColor=purple, fillOpacity=0.8008281904610115, outlineWidth=1.4658129805029452, size=5.962133916683182, fillHexColor=fillHexColor, outlineColor=purple, outlineHexColor=outlineHexColor, outlineOpacity=6.027456183070403}, title=title}, property=property, categories=[{style={fillColor=purple, fillOpacity=0.8008281904610115, outlineWidth=1.4658129805029452, size=5.962133916683182, fillHexColor=fillHexColor, outlineColor=purple, outlineHexColor=outlineHexColor, outlineOpacity=6.027456183070403}, title=title, value=}, {style={fillColor=purple, fillOpacity=0.8008281904610115, outlineWidth=1.4658129805029452, size=5.962133916683182, fillHexColor=fillHexColor, outlineColor=purple, outlineHexColor=outlineHexColor, outlineOpacity=6.027456183070403}, title=title, value=}]}} + {name=name, description=description, links=[{}, {}], id=id, page={number=1, size=0, totalPages=6, totalElements=}, accessInfo={createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, type=dataset, title=title, version=5, content={fallbackCategory={style={fillColor=purple, fillOpacity=0.8008281904610115, outlineWidth=1.4658129805029452, size=5.962133916683182, fillHexColor=fillHexColor, outlineColor=purple, outlineHexColor=outlineHexColor, outlineOpacity=6.027456183070403}, title=title}, property=property, categories=[{style={fillColor=purple, fillOpacity=0.8008281904610115, outlineWidth=1.4658129805029452, size=5.962133916683182, fillHexColor=fillHexColor, outlineColor=purple, outlineHexColor=outlineHexColor, outlineOpacity=6.027456183070403}, title=title, value=}, {style={fillColor=purple, fillOpacity=0.8008281904610115, outlineWidth=1.4658129805029452, size=5.962133916683182, fillHexColor=fillHexColor, outlineColor=purple, outlineHexColor=outlineHexColor, outlineOpacity=6.027456183070403}, title=title, value=}]}} ], links = [ None diff --git a/test/test_attribute_style_response_dto.py b/test/test_attribute_style_response_dto.py new file mode 100644 index 0000000..2264d69 --- /dev/null +++ b/test/test_attribute_style_response_dto.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.attribute_style_response_dto import AttributeStyleResponseDTO + +class TestAttributeStyleResponseDTO(unittest.TestCase): + """AttributeStyleResponseDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AttributeStyleResponseDTO: + """Test AttributeStyleResponseDTO + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AttributeStyleResponseDTO` + """ + model = AttributeStyleResponseDTO() + if include_optional: + return AttributeStyleResponseDTO( + id = '', + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + type = 'dataset', + title = '0', + description = '', + content = {fallbackCategory={style={fillColor=purple, fillOpacity=0.8008281904610115, outlineWidth=1.4658129805029452, size=5.962133916683182, fillHexColor=fillHexColor, outlineColor=purple, outlineHexColor=outlineHexColor, outlineOpacity=6.027456183070403}, title=title}, property=property, categories=[{style={fillColor=purple, fillOpacity=0.8008281904610115, outlineWidth=1.4658129805029452, size=5.962133916683182, fillHexColor=fillHexColor, outlineColor=purple, outlineHexColor=outlineHexColor, outlineOpacity=6.027456183070403}, title=title, value=}, {style={fillColor=purple, fillOpacity=0.8008281904610115, outlineWidth=1.4658129805029452, size=5.962133916683182, fillHexColor=fillHexColor, outlineColor=purple, outlineHexColor=outlineHexColor, outlineOpacity=6.027456183070403}, title=title, value=}]}, + links = [ + None + ], + page = {number=1, size=0, totalPages=6, totalElements=}, + access_info = {createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, + version = 56 + ) + else: + return AttributeStyleResponseDTO( + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + content = {fallbackCategory={style={fillColor=purple, fillOpacity=0.8008281904610115, outlineWidth=1.4658129805029452, size=5.962133916683182, fillHexColor=fillHexColor, outlineColor=purple, outlineHexColor=outlineHexColor, outlineOpacity=6.027456183070403}, title=title}, property=property, categories=[{style={fillColor=purple, fillOpacity=0.8008281904610115, outlineWidth=1.4658129805029452, size=5.962133916683182, fillHexColor=fillHexColor, outlineColor=purple, outlineHexColor=outlineHexColor, outlineOpacity=6.027456183070403}, title=title, value=}, {style={fillColor=purple, fillOpacity=0.8008281904610115, outlineWidth=1.4658129805029452, size=5.962133916683182, fillHexColor=fillHexColor, outlineColor=purple, outlineHexColor=outlineHexColor, outlineOpacity=6.027456183070403}, title=title, value=}]}, + ) + """ + + def testAttributeStyleResponseDTO(self): + """Test AttributeStyleResponseDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_attribute_styles_api.py b/test/test_attribute_styles_api.py index d6f45fa..bc0151e 100644 --- a/test/test_attribute_styles_api.py +++ b/test/test_attribute_styles_api.py @@ -55,6 +55,13 @@ def test_get_attribute_style_by_id(self) -> None: """ pass + def test_get_attribute_style_by_name(self) -> None: + """Test case for get_attribute_style_by_name + + Gets attribute style by name + """ + pass + def test_update_attribute_style_by_id(self) -> None: """Test case for update_attribute_style_by_id diff --git a/test/test_create_membership_dto.py b/test/test_create_membership_dto.py index 62e451c..3f6c988 100644 --- a/test/test_create_membership_dto.py +++ b/test/test_create_membership_dto.py @@ -36,14 +36,13 @@ def make_instance(self, include_optional) -> CreateMembershipDTO: model = CreateMembershipDTO() if include_optional: return CreateMembershipDTO( + email = '', account_id = '', status = 'ENABLED', role = 'ANONYMOUS' ) else: return CreateMembershipDTO( - account_id = '', - status = 'ENABLED', role = 'ANONYMOUS', ) """ diff --git a/test/test_dashboard_paged_model_dto.py b/test/test_dashboard_paged_model_dto.py index 7416cbf..f4c154f 100644 --- a/test/test_dashboard_paged_model_dto.py +++ b/test/test_dashboard_paged_model_dto.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> DashboardPagedModelDTO: if include_optional: return DashboardPagedModelDTO( content = [ - {name=name, description=description, id=id, type=dataset, title=title, content={blockRows=[{blocks=[{indicator=indicator, layout=primary, collapsed=true, blockRows=[{indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}, {indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}], type=indicator, title=title, indicatorDrill=indicatorDrill}, {indicator=indicator, layout=primary, collapsed=true, blockRows=[{indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}, {indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}], type=indicator, title=title, indicatorDrill=indicatorDrill}], type=blockRow}, {blocks=[{indicator=indicator, layout=primary, collapsed=true, blockRows=[{indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}, {indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}], type=indicator, title=title, indicatorDrill=indicatorDrill}, {indicator=indicator, layout=primary, collapsed=true, blockRows=[{indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}, {indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}], type=indicator, title=title, indicatorDrill=indicatorDrill}], type=blockRow}], datasetProperties=[{defaultSearch=enable, featureAttributes=[{layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}, {layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}], dataset=dataset}, {defaultSearch=enable, featureAttributes=[{layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}, {layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}], dataset=dataset}]}} + {name=name, description=description, links=[{}, {}], id=id, page={number=1, size=0, totalPages=6, totalElements=}, accessInfo={createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, type=dataset, title=title, version=1, content={blockRows=[{blocks=[{indicator=indicator, layout=primary, collapsed=true, blockRows=[{indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}, {indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}], type=indicator, title=title, indicatorDrill=indicatorDrill}, {indicator=indicator, layout=primary, collapsed=true, blockRows=[{indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}, {indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}], type=indicator, title=title, indicatorDrill=indicatorDrill}], type=blockRow}, {blocks=[{indicator=indicator, layout=primary, collapsed=true, blockRows=[{indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}, {indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}], type=indicator, title=title, indicatorDrill=indicatorDrill}, {indicator=indicator, layout=primary, collapsed=true, blockRows=[{indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}, {indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}], type=indicator, title=title, indicatorDrill=indicatorDrill}], type=blockRow}], datasetProperties=[{defaultSearch=enable, featureAttributes=[{layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}, {layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}], dataset=dataset}, {defaultSearch=enable, featureAttributes=[{layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}, {layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}], dataset=dataset}]}} ], links = [ None diff --git a/test/test_dashboard_response_dto.py b/test/test_dashboard_response_dto.py new file mode 100644 index 0000000..668c2ff --- /dev/null +++ b/test/test_dashboard_response_dto.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.dashboard_response_dto import DashboardResponseDTO + +class TestDashboardResponseDTO(unittest.TestCase): + """DashboardResponseDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DashboardResponseDTO: + """Test DashboardResponseDTO + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DashboardResponseDTO` + """ + model = DashboardResponseDTO() + if include_optional: + return DashboardResponseDTO( + id = '', + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + type = 'dataset', + title = '0', + description = '0', + content = {blockRows=[{blocks=[{indicator=indicator, layout=primary, collapsed=true, blockRows=[{indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}, {indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}], type=indicator, title=title, indicatorDrill=indicatorDrill}, {indicator=indicator, layout=primary, collapsed=true, blockRows=[{indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}, {indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}], type=indicator, title=title, indicatorDrill=indicatorDrill}], type=blockRow}, {blocks=[{indicator=indicator, layout=primary, collapsed=true, blockRows=[{indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}, {indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}], type=indicator, title=title, indicatorDrill=indicatorDrill}, {indicator=indicator, layout=primary, collapsed=true, blockRows=[{indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}, {indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}], type=indicator, title=title, indicatorDrill=indicatorDrill}], type=blockRow}], datasetProperties=[{defaultSearch=enable, featureAttributes=[{layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}, {layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}], dataset=dataset}, {defaultSearch=enable, featureAttributes=[{layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}, {layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}], dataset=dataset}]}, + links = [ + None + ], + page = {number=1, size=0, totalPages=6, totalElements=}, + access_info = {createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, + version = 56 + ) + else: + return DashboardResponseDTO( + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + content = {blockRows=[{blocks=[{indicator=indicator, layout=primary, collapsed=true, blockRows=[{indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}, {indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}], type=indicator, title=title, indicatorDrill=indicatorDrill}, {indicator=indicator, layout=primary, collapsed=true, blockRows=[{indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}, {indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}], type=indicator, title=title, indicatorDrill=indicatorDrill}], type=blockRow}, {blocks=[{indicator=indicator, layout=primary, collapsed=true, blockRows=[{indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}, {indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}], type=indicator, title=title, indicatorDrill=indicatorDrill}, {indicator=indicator, layout=primary, collapsed=true, blockRows=[{indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}, {indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}], type=indicator, title=title, indicatorDrill=indicatorDrill}], type=blockRow}], datasetProperties=[{defaultSearch=enable, featureAttributes=[{layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}, {layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}], dataset=dataset}, {defaultSearch=enable, featureAttributes=[{layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}, {layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}], dataset=dataset}]}, + ) + """ + + def testDashboardResponseDTO(self): + """Test DashboardResponseDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dashboards_api.py b/test/test_dashboards_api.py index dbd9365..7a1508f 100644 --- a/test/test_dashboards_api.py +++ b/test/test_dashboards_api.py @@ -55,6 +55,13 @@ def test_get_dashboard_by_id(self) -> None: """ pass + def test_get_dashboard_by_name(self) -> None: + """Test case for get_dashboard_by_name + + Gets dashboard by name + """ + pass + def test_update_dashboard_by_id(self) -> None: """Test case for update_dashboard_by_id diff --git a/test/test_data_dump_job_request.py b/test/test_data_dump_job_request.py index 6fc6a69..51ecd16 100644 --- a/test/test_data_dump_job_request.py +++ b/test/test_data_dump_job_request.py @@ -38,15 +38,13 @@ def make_instance(self, include_optional) -> DataDumpJobRequest: return DataDumpJobRequest( type = 'E', project_id = 'w8q6zgckec0l3o4g', - content = cm_python_openapi_sdk.models.data_dump_request.DataDumpRequest( - dataset = '0', ) + content = {dataset=dataset} ) else: return DataDumpJobRequest( type = 'E', project_id = 'w8q6zgckec0l3o4g', - content = cm_python_openapi_sdk.models.data_dump_request.DataDumpRequest( - dataset = '0', ), + content = {dataset=dataset}, ) """ diff --git a/test/test_data_permission_content_dto.py b/test/test_data_permission_content_dto.py index e0f2632..fecdb27 100644 --- a/test/test_data_permission_content_dto.py +++ b/test/test_data_permission_content_dto.py @@ -36,14 +36,14 @@ def make_instance(self, include_optional) -> DataPermissionContentDTO: model = DataPermissionContentDTO() if include_optional: return DataPermissionContentDTO( - account_id = 'gCu2LC4aWwWL9Y864DZt', + email = '', + account_id = '62ECB020-8429-30cc-01FF-CCfeEe150AC3', filters = [ null ] ) else: return DataPermissionContentDTO( - account_id = 'gCu2LC4aWwWL9Y864DZt', filters = [ null ], diff --git a/test/test_data_permission_dto.py b/test/test_data_permission_dto.py index e35fca1..a726599 100644 --- a/test/test_data_permission_dto.py +++ b/test/test_data_permission_dto.py @@ -41,12 +41,12 @@ def make_instance(self, include_optional) -> DataPermissionDTO: type = 'dataset', title = '0', description = '', - content = {accountId=accountId, filters=[{function={id=id, type=number, value=0.8008281904610115}, property=property, value=, operator=eq}, {function={id=id, type=number, value=0.8008281904610115}, property=property, value=, operator=eq}]} + content = {accountId=accountId, filters=[{function={id=id, type=number, value=0.8008281904610115}, property=property, value=, operator=eq}, {function={id=id, type=number, value=0.8008281904610115}, property=property, value=, operator=eq}], email=email} ) else: return DataPermissionDTO( name = 'awat5ikwowtta-3mh2lcafqw3zhes', - content = {accountId=accountId, filters=[{function={id=id, type=number, value=0.8008281904610115}, property=property, value=, operator=eq}, {function={id=id, type=number, value=0.8008281904610115}, property=property, value=, operator=eq}]}, + content = {accountId=accountId, filters=[{function={id=id, type=number, value=0.8008281904610115}, property=property, value=, operator=eq}, {function={id=id, type=number, value=0.8008281904610115}, property=property, value=, operator=eq}], email=email}, ) """ diff --git a/test/test_data_permission_paged_model_dto.py b/test/test_data_permission_paged_model_dto.py index 4026deb..0c9dbc6 100644 --- a/test/test_data_permission_paged_model_dto.py +++ b/test/test_data_permission_paged_model_dto.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> DataPermissionPagedModelDTO: if include_optional: return DataPermissionPagedModelDTO( content = [ - {name=name, description=description, id=id, type=dataset, title=title, content={accountId=accountId, filters=[{function={id=id, type=number, value=0.8008281904610115}, property=property, value=, operator=eq}, {function={id=id, type=number, value=0.8008281904610115}, property=property, value=, operator=eq}]}} + {name=name, description=description, links=[{}, {}], id=id, page={number=1, size=0, totalPages=6, totalElements=}, accessInfo={createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, type=dataset, title=title, version=6, content={accountId=accountId, filters=[{function={id=id, type=number, value=0.8008281904610115}, property=property, value=, operator=eq}, {function={id=id, type=number, value=0.8008281904610115}, property=property, value=, operator=eq}], email=email}} ], links = [ None diff --git a/test/test_data_permission_response_dto.py b/test/test_data_permission_response_dto.py new file mode 100644 index 0000000..39178eb --- /dev/null +++ b/test/test_data_permission_response_dto.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.data_permission_response_dto import DataPermissionResponseDTO + +class TestDataPermissionResponseDTO(unittest.TestCase): + """DataPermissionResponseDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DataPermissionResponseDTO: + """Test DataPermissionResponseDTO + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DataPermissionResponseDTO` + """ + model = DataPermissionResponseDTO() + if include_optional: + return DataPermissionResponseDTO( + id = '', + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + type = 'dataset', + title = '0', + description = '', + content = {accountId=accountId, filters=[{function={id=id, type=number, value=0.8008281904610115}, property=property, value=, operator=eq}, {function={id=id, type=number, value=0.8008281904610115}, property=property, value=, operator=eq}], email=email}, + links = [ + None + ], + page = {number=1, size=0, totalPages=6, totalElements=}, + access_info = {createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, + version = 56 + ) + else: + return DataPermissionResponseDTO( + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + content = {accountId=accountId, filters=[{function={id=id, type=number, value=0.8008281904610115}, property=property, value=, operator=eq}, {function={id=id, type=number, value=0.8008281904610115}, property=property, value=, operator=eq}], email=email}, + ) + """ + + def testDataPermissionResponseDTO(self): + """Test DataPermissionResponseDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_data_permissions_api.py b/test/test_data_permissions_api.py index 46fe0cc..d326e01 100644 --- a/test/test_data_permissions_api.py +++ b/test/test_data_permissions_api.py @@ -55,6 +55,13 @@ def test_get_data_permission_by_id(self) -> None: """ pass + def test_get_data_permission_by_name(self) -> None: + """Test case for get_data_permission_by_name + + Gets data permission by name + """ + pass + def test_update_data_permission_by_id(self) -> None: """Test case for update_data_permission_by_id diff --git a/test/test_dataset_paged_model_dto.py b/test/test_dataset_paged_model_dto.py index 32af96c..1ec1fdb 100644 --- a/test/test_dataset_paged_model_dto.py +++ b/test/test_dataset_paged_model_dto.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> DatasetPagedModelDTO: if include_optional: return DatasetPagedModelDTO( content = [ - {ref={visualizations=[{zoom={min=3, optimal=11, max=4, visibleFrom=11}, type=areas}, {zoom={min=3, optimal=11, max=4, visibleFrom=11}, type=areas}], spatialIndex=true, zoom={min=3, optimal=11, max=4, visibleFrom=11}, fullTextIndex=true, type=dwh, geometryTable=geometryTable, h3Geometries=[h3Geometries, h3Geometries], subtype=geometryPolygon, geometry=geometry, table=table, categorizable=true, properties=[{filterable=true, name=name, column=column, description=description, title=title, type=type, calculated=true, displayOptions={valueOptions=[{hexColor=hexColor, color=purple, pattern=solid, weight=5.637376656633329, value=}, {hexColor=hexColor, color=purple, pattern=solid, weight=5.637376656633329, value=}]}}, {filterable=true, name=name, column=column, description=description, title=title, type=type, calculated=true, displayOptions={valueOptions=[{hexColor=hexColor, color=purple, pattern=solid, weight=5.637376656633329, value=}, {hexColor=hexColor, color=purple, pattern=solid, weight=5.637376656633329, value=}]}}], primaryKey=primaryKey}, origin=origin, name=name, description=description, id=id, type=dataset, title=title, dataSources=[{licenceHolderLogo=https://openapi-generator.tech, licenceUrl=https://openapi-generator.tech, licenceHolder=licenceHolder, licenceHolderUrl=https://openapi-generator.tech}, {licenceHolderLogo=https://openapi-generator.tech, licenceUrl=https://openapi-generator.tech, licenceHolder=licenceHolder, licenceHolderUrl=https://openapi-generator.tech}], properties={featureTitle={type=property, value=value}, featureAttributes=[{layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}, {layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}], featureSubtitle=null}, content={}} + {origin=origin, description=description, type=dataset, title=title, version=2, content=null, ref={visualizations=[{zoom={min=3, optimal=11, max=4, visibleFrom=11}, type=areas}, {zoom={min=3, optimal=11, max=4, visibleFrom=11}, type=areas}], spatialIndex=true, zoom={min=3, optimal=11, max=4, visibleFrom=11}, fullTextIndex=true, type=dwh, geometryTable=geometryTable, h3Geometries=[h3Geometries, h3Geometries], subtype=geometryPolygon, geometry=geometry, table=table, categorizable=true, properties=[{filterable=true, name=name, column=column, description=description, title=title, type=type, calculated=true, displayOptions={valueOptions=[{hexColor=hexColor, color=purple, pattern=solid, weight=5.637376656633329, value=}, {hexColor=hexColor, color=purple, pattern=solid, weight=5.637376656633329, value=}]}}, {filterable=true, name=name, column=column, description=description, title=title, type=type, calculated=true, displayOptions={valueOptions=[{hexColor=hexColor, color=purple, pattern=solid, weight=5.637376656633329, value=}, {hexColor=hexColor, color=purple, pattern=solid, weight=5.637376656633329, value=}]}}], primaryKey=primaryKey}, name=name, links=[{}, {}], id=id, page={number=1, size=0, totalPages=6, totalElements=}, accessInfo={createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, dataSources=[{licenceHolderLogo=https://openapi-generator.tech, licenceUrl=https://openapi-generator.tech, licenceHolder=licenceHolder, licenceHolderUrl=https://openapi-generator.tech}, {licenceHolderLogo=https://openapi-generator.tech, licenceUrl=https://openapi-generator.tech, licenceHolder=licenceHolder, licenceHolderUrl=https://openapi-generator.tech}], properties={featureTitle={type=property, value=value}, featureAttributes=[{layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}, {layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}], featureSubtitle=null}} ], links = [ None diff --git a/test/test_dataset_response_dto.py b/test/test_dataset_response_dto.py new file mode 100644 index 0000000..463bfa8 --- /dev/null +++ b/test/test_dataset_response_dto.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.dataset_response_dto import DatasetResponseDTO + +class TestDatasetResponseDTO(unittest.TestCase): + """DatasetResponseDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DatasetResponseDTO: + """Test DatasetResponseDTO + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DatasetResponseDTO` + """ + model = DatasetResponseDTO() + if include_optional: + return DatasetResponseDTO( + id = '', + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + type = 'dataset', + title = '0', + description = '', + origin = '0', + properties = {featureTitle={type=property, value=value}, featureAttributes=[{layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}, {layout=primary, format={symbol=symbol, type=text, fraction=0}, type=property, value=value}], featureSubtitle=null}, + ref = None, + data_sources = [ + {licenceHolderLogo=https://openapi-generator.tech, licenceUrl=https://openapi-generator.tech, licenceHolder=licenceHolder, licenceHolderUrl=https://openapi-generator.tech} + ], + content = cm_python_openapi_sdk.models.dataset_content_dto.DatasetContentDTO(), + links = [ + None + ], + page = {number=1, size=0, totalPages=6, totalElements=}, + access_info = {createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, + version = 56 + ) + else: + return DatasetResponseDTO( + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + type = 'dataset', + ref = None, + ) + """ + + def testDatasetResponseDTO(self): + """Test DatasetResponseDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_datasets_api.py b/test/test_datasets_api.py index d3ced80..a346e16 100644 --- a/test/test_datasets_api.py +++ b/test/test_datasets_api.py @@ -62,6 +62,13 @@ def test_get_dataset_by_id(self) -> None: """ pass + def test_get_dataset_by_name(self) -> None: + """Test case for get_dataset_by_name + + Gets dataset by name + """ + pass + def test_update_dataset_by_id(self) -> None: """Test case for update_dataset_by_id diff --git a/test/test_dwh_query_property_types.py b/test/test_dwh_query_property_types.py index 23e4d3b..2e2944b 100644 --- a/test/test_dwh_query_property_types.py +++ b/test/test_dwh_query_property_types.py @@ -43,7 +43,7 @@ def make_instance(self, include_optional) -> DwhQueryPropertyTypes: content = [ null ], - options = cm_python_openapi_sdk.models.function_options_arithm.FunctionOptionsArithm() + options = cm_python_openapi_sdk.models.options.options() ) else: return DwhQueryPropertyTypes( @@ -53,6 +53,7 @@ def make_instance(self, include_optional) -> DwhQueryPropertyTypes: content = [ null ], + options = cm_python_openapi_sdk.models.options.options(), ) """ diff --git a/test/test_dwh_query_property_types_filter_comp.py b/test/test_dwh_query_property_types_filter_comp.py new file mode 100644 index 0000000..2f91087 --- /dev/null +++ b/test/test_dwh_query_property_types_filter_comp.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.dwh_query_property_types_filter_comp import DwhQueryPropertyTypesFilterComp + +class TestDwhQueryPropertyTypesFilterComp(unittest.TestCase): + """DwhQueryPropertyTypesFilterComp unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DwhQueryPropertyTypesFilterComp: + """Test DwhQueryPropertyTypesFilterComp + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DwhQueryPropertyTypesFilterComp` + """ + model = DwhQueryPropertyTypesFilterComp() + if include_optional: + return DwhQueryPropertyTypesFilterComp( + id = 'z0', + type = 'number', + value = 'awat5ikwowtta-3mh2lcafqw3zhes.i16mckwqaot6282x4vh6wt7cgd04d0gu12zwv6v61pi05te5cj19uo1-vud_-tc_vbqgp4vj0u4t9xwduicwscq-4zge8f37mn0', + metric = '/rest/projects/8q6zgckec0l3o4gi/md/metrics?name=lcafqw3zheseh16mckwqaot6282x4vh6wt7cgd04d0gu12zwv6v61pi05te5cj19uo1-vud_-tc_vbqgp4vj0u4t9xwduicwsc', + content = [ + null + ], + options = cm_python_openapi_sdk.models.function_options_arithm.FunctionOptionsArithm() + ) + else: + return DwhQueryPropertyTypesFilterComp( + type = 'number', + value = 'awat5ikwowtta-3mh2lcafqw3zhes.i16mckwqaot6282x4vh6wt7cgd04d0gu12zwv6v61pi05te5cj19uo1-vud_-tc_vbqgp4vj0u4t9xwduicwscq-4zge8f37mn0', + metric = '/rest/projects/8q6zgckec0l3o4gi/md/metrics?name=lcafqw3zheseh16mckwqaot6282x4vh6wt7cgd04d0gu12zwv6v61pi05te5cj19uo1-vud_-tc_vbqgp4vj0u4t9xwduicwsc', + content = [ + null + ], + ) + """ + + def testDwhQueryPropertyTypesFilterComp(self): + """Test DwhQueryPropertyTypesFilterComp""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dwh_query_property_types_function_ntile.py b/test/test_dwh_query_property_types_function_ntile.py new file mode 100644 index 0000000..ddfd5d8 --- /dev/null +++ b/test/test_dwh_query_property_types_function_ntile.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.dwh_query_property_types_function_ntile import DwhQueryPropertyTypesFunctionNtile + +class TestDwhQueryPropertyTypesFunctionNtile(unittest.TestCase): + """DwhQueryPropertyTypesFunctionNtile unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DwhQueryPropertyTypesFunctionNtile: + """Test DwhQueryPropertyTypesFunctionNtile + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DwhQueryPropertyTypesFunctionNtile` + """ + model = DwhQueryPropertyTypesFunctionNtile() + if include_optional: + return DwhQueryPropertyTypesFunctionNtile( + id = 'z0', + type = 'function_avg', + content = [ + null + ], + options = cm_python_openapi_sdk.models.options.options() + ) + else: + return DwhQueryPropertyTypesFunctionNtile( + type = 'function_avg', + content = [ + null + ], + ) + """ + + def testDwhQueryPropertyTypesFunctionNtile(self): + """Test DwhQueryPropertyTypesFunctionNtile""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dwh_query_property_types_function_percentile.py b/test/test_dwh_query_property_types_function_percentile.py new file mode 100644 index 0000000..e5f5173 --- /dev/null +++ b/test/test_dwh_query_property_types_function_percentile.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.dwh_query_property_types_function_percentile import DwhQueryPropertyTypesFunctionPercentile + +class TestDwhQueryPropertyTypesFunctionPercentile(unittest.TestCase): + """DwhQueryPropertyTypesFunctionPercentile unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DwhQueryPropertyTypesFunctionPercentile: + """Test DwhQueryPropertyTypesFunctionPercentile + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DwhQueryPropertyTypesFunctionPercentile` + """ + model = DwhQueryPropertyTypesFunctionPercentile() + if include_optional: + return DwhQueryPropertyTypesFunctionPercentile( + id = 'z0', + type = 'function_avg', + content = [ + null + ], + options = cm_python_openapi_sdk.models.options.options() + ) + else: + return DwhQueryPropertyTypesFunctionPercentile( + type = 'function_avg', + content = [ + null + ], + ) + """ + + def testDwhQueryPropertyTypesFunctionPercentile(self): + """Test DwhQueryPropertyTypesFunctionPercentile""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dwh_query_property_types_function_rank.py b/test/test_dwh_query_property_types_function_rank.py new file mode 100644 index 0000000..da49132 --- /dev/null +++ b/test/test_dwh_query_property_types_function_rank.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.dwh_query_property_types_function_rank import DwhQueryPropertyTypesFunctionRank + +class TestDwhQueryPropertyTypesFunctionRank(unittest.TestCase): + """DwhQueryPropertyTypesFunctionRank unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DwhQueryPropertyTypesFunctionRank: + """Test DwhQueryPropertyTypesFunctionRank + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DwhQueryPropertyTypesFunctionRank` + """ + model = DwhQueryPropertyTypesFunctionRank() + if include_optional: + return DwhQueryPropertyTypesFunctionRank( + id = 'z0', + type = 'function_avg', + content = [ + null + ], + options = cm_python_openapi_sdk.models.options.options() + ) + else: + return DwhQueryPropertyTypesFunctionRank( + type = 'function_avg', + content = [ + null + ], + ) + """ + + def testDwhQueryPropertyTypesFunctionRank(self): + """Test DwhQueryPropertyTypesFunctionRank""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dwh_query_property_types_function_row_number.py b/test/test_dwh_query_property_types_function_row_number.py new file mode 100644 index 0000000..a58c103 --- /dev/null +++ b/test/test_dwh_query_property_types_function_row_number.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.dwh_query_property_types_function_row_number import DwhQueryPropertyTypesFunctionRowNumber + +class TestDwhQueryPropertyTypesFunctionRowNumber(unittest.TestCase): + """DwhQueryPropertyTypesFunctionRowNumber unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DwhQueryPropertyTypesFunctionRowNumber: + """Test DwhQueryPropertyTypesFunctionRowNumber + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DwhQueryPropertyTypesFunctionRowNumber` + """ + model = DwhQueryPropertyTypesFunctionRowNumber() + if include_optional: + return DwhQueryPropertyTypesFunctionRowNumber( + id = 'z0', + type = 'function_avg', + content = [ + null + ], + options = cm_python_openapi_sdk.models.options.options() + ) + else: + return DwhQueryPropertyTypesFunctionRowNumber( + type = 'function_avg', + content = [ + null + ], + ) + """ + + def testDwhQueryPropertyTypesFunctionRowNumber(self): + """Test DwhQueryPropertyTypesFunctionRowNumber""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_dwh_query_variable_type.py b/test/test_dwh_query_variable_type.py new file mode 100644 index 0000000..7c52e06 --- /dev/null +++ b/test/test_dwh_query_variable_type.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.dwh_query_variable_type import DwhQueryVariableType + +class TestDwhQueryVariableType(unittest.TestCase): + """DwhQueryVariableType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DwhQueryVariableType: + """Test DwhQueryVariableType + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DwhQueryVariableType` + """ + model = DwhQueryVariableType() + if include_optional: + return DwhQueryVariableType( + id = 'z0', + type = 'variable', + value = 'awat5ikwowtta-3mh2lcafqw3zhes' + ) + else: + return DwhQueryVariableType( + type = 'variable', + value = 'awat5ikwowtta-3mh2lcafqw3zhes', + ) + """ + + def testDwhQueryVariableType(self): + """Test DwhQueryVariableType""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_export_paged_model_dto.py b/test/test_export_paged_model_dto.py index 0a26690..9c1f9b0 100644 --- a/test/test_export_paged_model_dto.py +++ b/test/test_export_paged_model_dto.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> ExportPagedModelDTO: if include_optional: return ExportPagedModelDTO( content = [ - {name=name, description=description, id=id, type=dataset, title=title, content={output={filename=filename, format=csv, header=basic, type=file}, properties=[properties, properties]}} + {name=name, description=description, links=[{}, {}], id=id, page={number=1, size=0, totalPages=6, totalElements=}, accessInfo={createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, type=dataset, title=title, version=0, content={output={filename=filename, format=csv, header=basic, type=file}, properties=[properties, properties]}} ], links = [ None diff --git a/test/test_export_response_dto.py b/test/test_export_response_dto.py new file mode 100644 index 0000000..86de631 --- /dev/null +++ b/test/test_export_response_dto.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.export_response_dto import ExportResponseDTO + +class TestExportResponseDTO(unittest.TestCase): + """ExportResponseDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ExportResponseDTO: + """Test ExportResponseDTO + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ExportResponseDTO` + """ + model = ExportResponseDTO() + if include_optional: + return ExportResponseDTO( + id = '', + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + type = 'dataset', + title = '0', + description = '', + content = {output={filename=filename, format=csv, header=basic, type=file}, properties=[properties, properties]}, + links = [ + None + ], + page = {number=1, size=0, totalPages=6, totalElements=}, + access_info = {createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, + version = 56 + ) + else: + return ExportResponseDTO( + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + content = {output={filename=filename, format=csv, header=basic, type=file}, properties=[properties, properties]}, + ) + """ + + def testExportResponseDTO(self): + """Test ExportResponseDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_exports_api.py b/test/test_exports_api.py index ba2b610..e123b6d 100644 --- a/test/test_exports_api.py +++ b/test/test_exports_api.py @@ -55,6 +55,13 @@ def test_get_export_by_id(self) -> None: """ pass + def test_get_export_by_name(self) -> None: + """Test case for get_export_by_name + + Gets export by name + """ + pass + def test_update_export_by_id(self) -> None: """Test case for update_export_by_id diff --git a/test/test_function_percent_to_total_type_general.py b/test/test_function_percent_to_total_type_general.py index 77f038c..6eb2ab3 100644 --- a/test/test_function_percent_to_total_type_general.py +++ b/test/test_function_percent_to_total_type_general.py @@ -41,7 +41,7 @@ def make_instance(self, include_optional) -> FunctionPercentToTotalTypeGeneral: content = [ null ], - options = None + options = cm_python_openapi_sdk.models.options.options() ) else: return FunctionPercentToTotalTypeGeneral( diff --git a/test/test_function_percentile.py b/test/test_function_percentile.py index 95e313d..7874743 100644 --- a/test/test_function_percentile.py +++ b/test/test_function_percentile.py @@ -41,7 +41,7 @@ def make_instance(self, include_optional) -> FunctionPercentile: content = [ null ], - options = None + options = cm_python_openapi_sdk.models.options.options() ) else: return FunctionPercentile( @@ -49,7 +49,7 @@ def make_instance(self, include_optional) -> FunctionPercentile: content = [ null ], - options = None, + options = cm_python_openapi_sdk.models.options.options(), ) """ diff --git a/test/test_function_rank.py b/test/test_function_rank.py index d2223d6..ffe1000 100644 --- a/test/test_function_rank.py +++ b/test/test_function_rank.py @@ -41,7 +41,7 @@ def make_instance(self, include_optional) -> FunctionRank: content = [ null ], - options = None + options = cm_python_openapi_sdk.models.options.options() ) else: return FunctionRank( @@ -49,7 +49,7 @@ def make_instance(self, include_optional) -> FunctionRank: content = [ null ], - options = None, + options = cm_python_openapi_sdk.models.options.options(), ) """ diff --git a/test/test_function_row_number.py b/test/test_function_row_number.py index 177d178..d99777d 100644 --- a/test/test_function_row_number.py +++ b/test/test_function_row_number.py @@ -41,7 +41,7 @@ def make_instance(self, include_optional) -> FunctionRowNumber: content = [ null ], - options = None + options = cm_python_openapi_sdk.models.options.options() ) else: return FunctionRowNumber( @@ -49,7 +49,7 @@ def make_instance(self, include_optional) -> FunctionRowNumber: content = [ null ], - options = None, + options = cm_python_openapi_sdk.models.options.options(), ) """ diff --git a/test/test_general_job_request.py b/test/test_general_job_request.py new file mode 100644 index 0000000..922cf24 --- /dev/null +++ b/test/test_general_job_request.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.general_job_request import GeneralJobRequest + +class TestGeneralJobRequest(unittest.TestCase): + """GeneralJobRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> GeneralJobRequest: + """Test GeneralJobRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `GeneralJobRequest` + """ + model = GeneralJobRequest() + if include_optional: + return GeneralJobRequest( + type = 'E', + project_id = 'w8q6zgckec0l3o4g', + content = cm_python_openapi_sdk.models.import_project_request.ImportProjectRequest( + force = True, + source_project_id = '', + cascade_from = '', + prefix = '', + attribute_styles = True, + dashboard = True, + data_permissions = True, + datasets = True, + exports = True, + indicators = True, + indicator_drills = True, + maps = True, + markers = True, + marker_selectors = True, + metrics = True, + project_settings = True, + views = True, + skip_data = True, ) + ) + else: + return GeneralJobRequest( + type = 'E', + project_id = 'w8q6zgckec0l3o4g', + content = cm_python_openapi_sdk.models.import_project_request.ImportProjectRequest( + force = True, + source_project_id = '', + cascade_from = '', + prefix = '', + attribute_styles = True, + dashboard = True, + data_permissions = True, + datasets = True, + exports = True, + indicators = True, + indicator_drills = True, + maps = True, + markers = True, + marker_selectors = True, + metrics = True, + project_settings = True, + views = True, + skip_data = True, ), + ) + """ + + def testGeneralJobRequest(self): + """Test GeneralJobRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_geosearch_api.py b/test/test_geosearch_api.py new file mode 100644 index 0000000..0dc002c --- /dev/null +++ b/test/test_geosearch_api.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.api.geosearch_api import GeosearchApi + + +class TestGeosearchApi(unittest.TestCase): + """GeosearchApi unit test stubs""" + + def setUp(self) -> None: + self.api = GeosearchApi() + + def tearDown(self) -> None: + pass + + def test_geographic_search(self) -> None: + """Test case for geographic_search + + Geographic search + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_get_account_by_account_id200_response.py b/test/test_get_account_by_account_id200_response.py index 2d0257f..6763211 100644 --- a/test/test_get_account_by_account_id200_response.py +++ b/test/test_get_account_by_account_id200_response.py @@ -44,9 +44,7 @@ def make_instance(self, include_optional) -> GetAccountByAccountId200Response: consent_granted = True, anonymous = True, phone_number = '012345', - require_additional_attributes = True, onboarding = {introShown=[introShown, introShown], tipsShown=[tipsShown, tipsShown]}, - job_info = {companyName=companyName, industry=industry, jobPosition=jobPosition}, links = [ None ] diff --git a/test/test_get_project_members200_response.py b/test/test_get_project_members200_response.py index 0153057..288e152 100644 --- a/test/test_get_project_members200_response.py +++ b/test/test_get_project_members200_response.py @@ -40,7 +40,7 @@ def make_instance(self, include_optional) -> GetProjectMembers200Response: None ], content = [ - {accountId=accountId, createdAt=createdAt, role=ANONYMOUS, modifiedAt=modifiedAt, links=[{}, {}], id=id, account={preferences={sendNewsletter=true, lastActiveOrganization=lastActiveOrganization, language=language, lastActiveProject=lastActiveProject}, phoneNumber=phoneNumber, requireAdditionalAttributes=true, fullName=fullName, anonymous=true, onboarding={introShown=[introShown, introShown], tipsShown=[tipsShown, tipsShown]}, links=[{}, {}], id=id, consentGranted=true, jobInfo={companyName=companyName, industry=industry, jobPosition=jobPosition}, email=email, status=ENABLED}, status=ENABLED} + {accountId=accountId, createdAt=createdAt, role=ANONYMOUS, modifiedAt=modifiedAt, links=[{}, {}], id=id, account={preferences={sendNewsletter=true, lastActiveOrganization=lastActiveOrganization, language=language, lastActiveProject=lastActiveProject}, phoneNumber=phoneNumber, fullName=fullName, anonymous=true, onboarding={introShown=[introShown, introShown], tipsShown=[tipsShown, tipsShown]}, links=[{}, {}], id=id, consentGranted=true, email=email, status=ENABLED}, status=ENABLED} ], page = {number=1, size=0, totalPages=6, totalElements=}, id = '', @@ -49,7 +49,7 @@ def make_instance(self, include_optional) -> GetProjectMembers200Response: role = 'ANONYMOUS', created_at = '', modified_at = '', - account = {preferences={sendNewsletter=true, lastActiveOrganization=lastActiveOrganization, language=language, lastActiveProject=lastActiveProject}, phoneNumber=phoneNumber, requireAdditionalAttributes=true, fullName=fullName, anonymous=true, onboarding={introShown=[introShown, introShown], tipsShown=[tipsShown, tipsShown]}, links=[{}, {}], id=id, consentGranted=true, jobInfo={companyName=companyName, industry=industry, jobPosition=jobPosition}, email=email, status=ENABLED} + account = {preferences={sendNewsletter=true, lastActiveOrganization=lastActiveOrganization, language=language, lastActiveProject=lastActiveProject}, phoneNumber=phoneNumber, fullName=fullName, anonymous=true, onboarding={introShown=[introShown, introShown], tipsShown=[tipsShown, tipsShown]}, links=[{}, {}], id=id, consentGranted=true, email=email, status=ENABLED} ) else: return GetProjectMembers200Response( diff --git a/test/test_indicator_drill_paged_model_dto.py b/test/test_indicator_drill_paged_model_dto.py index 7a215e1..4f9e31f 100644 --- a/test/test_indicator_drill_paged_model_dto.py +++ b/test/test_indicator_drill_paged_model_dto.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> IndicatorDrillPagedModelDTO: if include_optional: return IndicatorDrillPagedModelDTO( content = [ - {name=name, description=description, id=id, type=dataset, title=title, content={blocks=[{indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}, {indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}]}} + {name=name, description=description, links=[{}, {}], id=id, page={number=1, size=0, totalPages=6, totalElements=}, accessInfo={createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, type=dataset, title=title, version=0, content={blocks=[{indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}, {indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}]}} ], links = [ None diff --git a/test/test_indicator_drill_response_dto.py b/test/test_indicator_drill_response_dto.py new file mode 100644 index 0000000..d92d8ae --- /dev/null +++ b/test/test_indicator_drill_response_dto.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.indicator_drill_response_dto import IndicatorDrillResponseDTO + +class TestIndicatorDrillResponseDTO(unittest.TestCase): + """IndicatorDrillResponseDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IndicatorDrillResponseDTO: + """Test IndicatorDrillResponseDTO + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IndicatorDrillResponseDTO` + """ + model = IndicatorDrillResponseDTO() + if include_optional: + return IndicatorDrillResponseDTO( + id = '', + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + type = 'dataset', + title = '0', + description = '', + content = {blocks=[{indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}, {indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}]}, + links = [ + None + ], + page = {number=1, size=0, totalPages=6, totalElements=}, + access_info = {createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, + version = 56 + ) + else: + return IndicatorDrillResponseDTO( + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + content = {blocks=[{indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}, {indicator=indicator, filterable=true, visualized=true, collapsed=true, hideNullItems=true, description=description, orderBy={property=property, direction=asc}, condensed=true, vertical=true, label=label, type=categories, title=title, sizeLimit=0, dualProperty=dualProperty, splitProperty=splitProperty, attributeStyle=attributeStyle, dualAttributeStyle=dualAttributeStyle}]}, + ) + """ + + def testIndicatorDrillResponseDTO(self): + """Test IndicatorDrillResponseDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_indicator_drills_api.py b/test/test_indicator_drills_api.py index 90306f6..d0bdacf 100644 --- a/test/test_indicator_drills_api.py +++ b/test/test_indicator_drills_api.py @@ -55,6 +55,13 @@ def test_get_indicator_drill_by_id(self) -> None: """ pass + def test_get_indicator_drill_by_name(self) -> None: + """Test case for get_indicator_drill_by_name + + Gets indicator drill by name + """ + pass + def test_update_indicator_drill_by_id(self) -> None: """Test case for update_indicator_drill_by_id diff --git a/test/test_indicator_paged_model_dto.py b/test/test_indicator_paged_model_dto.py index e24f599..c3e64b2 100644 --- a/test/test_indicator_paged_model_dto.py +++ b/test/test_indicator_paged_model_dto.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> IndicatorPagedModelDTO: if include_optional: return IndicatorPagedModelDTO( content = [ - {name=name, description=description, id=id, type=dataset, title=title, content={scaleOptions={static=[{breaks={selection=[5.962133916683182, 5.962133916683182], global=[1.4658129805029452, 1.4658129805029452]}, dataset=dataset, maxValues=[{selection=0.7061401241503109, zoom=11, global=0.23021358869347652}, {selection=0.7061401241503109, zoom=11, global=0.23021358869347652}]}, {breaks={selection=[5.962133916683182, 5.962133916683182], global=[1.4658129805029452, 1.4658129805029452]}, dataset=dataset, maxValues=[{selection=0.7061401241503109, zoom=11, global=0.23021358869347652}, {selection=0.7061401241503109, zoom=11, global=0.23021358869347652}]}], defaultDistribution={displayIntervals=[2.027123023002322, 2.027123023002322], breaks=[3.616076749251911, 3.616076749251911], range=[9.301444243932576, 9.301444243932576]}}, visualizations={heatmap=true, heatmapScaleFactor=0.8008281904610115, dotmap=true, grid=true, line=true, areas=true, dominance=true, zones=true}, metric=metric, format={symbol=symbol, type=number, fraction=0}, scale=standard, distribution=geometric, relations={reversedMetric=reversedMetric, type=self}}} + {name=name, description=description, links=[{}, {}], id=id, page={number=1, size=0, totalPages=6, totalElements=}, accessInfo={createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, type=dataset, title=title, version=4, content={scaleOptions={static=[{breaks={selection=[5.962133916683182, 5.962133916683182], global=[1.4658129805029452, 1.4658129805029452]}, dataset=dataset, maxValues=[{selection=0.7061401241503109, zoom=11, global=0.23021358869347652}, {selection=0.7061401241503109, zoom=11, global=0.23021358869347652}]}, {breaks={selection=[5.962133916683182, 5.962133916683182], global=[1.4658129805029452, 1.4658129805029452]}, dataset=dataset, maxValues=[{selection=0.7061401241503109, zoom=11, global=0.23021358869347652}, {selection=0.7061401241503109, zoom=11, global=0.23021358869347652}]}], defaultDistribution={displayIntervals=[2.027123023002322, 2.027123023002322], breaks=[3.616076749251911, 3.616076749251911], range=[9.301444243932576, 9.301444243932576]}}, visualizations={heatmap=true, heatmapScaleFactor=0.8008281904610115, dotmap=true, grid=true, line=true, areas=true, dominance=true, zones=true}, metric=metric, format={symbol=symbol, type=number, fraction=0}, scale=standard, distribution=geometric, relations={reversedMetric=reversedMetric, type=self}}} ], links = [ None diff --git a/test/test_indicator_response_dto.py b/test/test_indicator_response_dto.py new file mode 100644 index 0000000..9d637fe --- /dev/null +++ b/test/test_indicator_response_dto.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.indicator_response_dto import IndicatorResponseDTO + +class TestIndicatorResponseDTO(unittest.TestCase): + """IndicatorResponseDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IndicatorResponseDTO: + """Test IndicatorResponseDTO + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `IndicatorResponseDTO` + """ + model = IndicatorResponseDTO() + if include_optional: + return IndicatorResponseDTO( + id = '', + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + type = 'dataset', + title = '0', + description = '', + content = {scaleOptions={static=[{breaks={selection=[5.962133916683182, 5.962133916683182], global=[1.4658129805029452, 1.4658129805029452]}, dataset=dataset, maxValues=[{selection=0.7061401241503109, zoom=11, global=0.23021358869347652}, {selection=0.7061401241503109, zoom=11, global=0.23021358869347652}]}, {breaks={selection=[5.962133916683182, 5.962133916683182], global=[1.4658129805029452, 1.4658129805029452]}, dataset=dataset, maxValues=[{selection=0.7061401241503109, zoom=11, global=0.23021358869347652}, {selection=0.7061401241503109, zoom=11, global=0.23021358869347652}]}], defaultDistribution={displayIntervals=[2.027123023002322, 2.027123023002322], breaks=[3.616076749251911, 3.616076749251911], range=[9.301444243932576, 9.301444243932576]}}, visualizations={heatmap=true, heatmapScaleFactor=0.8008281904610115, dotmap=true, grid=true, line=true, areas=true, dominance=true, zones=true}, metric=metric, format={symbol=symbol, type=number, fraction=0}, scale=standard, distribution=geometric, relations={reversedMetric=reversedMetric, type=self}}, + links = [ + None + ], + page = {number=1, size=0, totalPages=6, totalElements=}, + access_info = {createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, + version = 56 + ) + else: + return IndicatorResponseDTO( + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + title = '0', + description = '', + content = {scaleOptions={static=[{breaks={selection=[5.962133916683182, 5.962133916683182], global=[1.4658129805029452, 1.4658129805029452]}, dataset=dataset, maxValues=[{selection=0.7061401241503109, zoom=11, global=0.23021358869347652}, {selection=0.7061401241503109, zoom=11, global=0.23021358869347652}]}, {breaks={selection=[5.962133916683182, 5.962133916683182], global=[1.4658129805029452, 1.4658129805029452]}, dataset=dataset, maxValues=[{selection=0.7061401241503109, zoom=11, global=0.23021358869347652}, {selection=0.7061401241503109, zoom=11, global=0.23021358869347652}]}], defaultDistribution={displayIntervals=[2.027123023002322, 2.027123023002322], breaks=[3.616076749251911, 3.616076749251911], range=[9.301444243932576, 9.301444243932576]}}, visualizations={heatmap=true, heatmapScaleFactor=0.8008281904610115, dotmap=true, grid=true, line=true, areas=true, dominance=true, zones=true}, metric=metric, format={symbol=symbol, type=number, fraction=0}, scale=standard, distribution=geometric, relations={reversedMetric=reversedMetric, type=self}}, + ) + """ + + def testIndicatorResponseDTO(self): + """Test IndicatorResponseDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_indicators_api.py b/test/test_indicators_api.py index f36945a..b0d17d0 100644 --- a/test/test_indicators_api.py +++ b/test/test_indicators_api.py @@ -55,6 +55,13 @@ def test_get_indicator_by_id(self) -> None: """ pass + def test_get_indicator_by_name(self) -> None: + """Test case for get_indicator_by_name + + Gets indicator by name + """ + pass + def test_update_indicator_by_id(self) -> None: """Test case for update_indicator_by_id diff --git a/test/test_job_detail_response.py b/test/test_job_detail_response.py index ab0e62f..07c7ae9 100644 --- a/test/test_job_detail_response.py +++ b/test/test_job_detail_response.py @@ -39,8 +39,8 @@ def make_instance(self, include_optional) -> JobDetailResponse: id = '0', type = '0', status = 'RUNNING', - start_date = None, - end_date = None, + start_date = 56, + end_date = 56, message = '', result = None, links = [ diff --git a/test/test_map_paged_model_dto.py b/test/test_map_paged_model_dto.py index e14699a..73b389e 100644 --- a/test/test_map_paged_model_dto.py +++ b/test/test_map_paged_model_dto.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> MapPagedModelDTO: if include_optional: return MapPagedModelDTO( content = [ - {name=name, description=description, id=id, type=dataset, title=title, content={contextMenu={items=[{type=googleSatellite}, {type=googleSatellite}]}, baseLayer={menu=true, type=mapbox, accessToken=accessToken, url=url}, options={maxZoom=5, center={lng=6.027456183070403, lat=0.8008281904610115}, minZoom=0, zoom=1}, layers=[{indicator=inherit, baseStyle={fillColor=purple, fillOpacity=0.8008281904610115, outlineWidth=1.4658129805029452, size=5.962133916683182, fillHexColor=fillHexColor, outlineColor=purple, outlineHexColor=outlineHexColor, outlineOpacity=6.027456183070403}, visible=true, name=name, showIndicatorValueLabels=true, datasets=[{visualization=dotmap, attributeStyles=[{attributeStyle=attributeStyle}, {attributeStyle=attributeStyle}], dataset=dataset}, {visualization=dotmap, attributeStyles=[{attributeStyle=attributeStyle}, {attributeStyle=attributeStyle}], dataset=dataset}], clusterPoints=true, defaultDataset=defaultDataset, defaultVisualization=dotmap, keepFiltered=true}, {indicator=inherit, baseStyle={fillColor=purple, fillOpacity=0.8008281904610115, outlineWidth=1.4658129805029452, size=5.962133916683182, fillHexColor=fillHexColor, outlineColor=purple, outlineHexColor=outlineHexColor, outlineOpacity=6.027456183070403}, visible=true, name=name, showIndicatorValueLabels=true, datasets=[{visualization=dotmap, attributeStyles=[{attributeStyle=attributeStyle}, {attributeStyle=attributeStyle}], dataset=dataset}, {visualization=dotmap, attributeStyles=[{attributeStyle=attributeStyle}, {attributeStyle=attributeStyle}], dataset=dataset}], clusterPoints=true, defaultDataset=defaultDataset, defaultVisualization=dotmap, keepFiltered=true}]}} + {name=name, description=description, links=[{}, {}], id=id, page={number=1, size=0, totalPages=6, totalElements=}, accessInfo={createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, type=dataset, title=title, version=2, content={contextMenu={items=[{type=googleSatellite}, {type=googleSatellite}]}, baseLayer={menu=true, type=mapbox, accessToken=accessToken, url=url}, options={maxZoom=5, center={lng=6.027456183070403, lat=0.8008281904610115}, minZoom=0, zoom=1}, layers=[{indicator=inherit, baseStyle={fillColor=purple, fillOpacity=0.8008281904610115, outlineWidth=1.4658129805029452, size=5.962133916683182, fillHexColor=fillHexColor, outlineColor=purple, outlineHexColor=outlineHexColor, outlineOpacity=6.027456183070403}, visible=true, name=name, showIndicatorValueLabels=true, datasets=[{visualization=dotmap, attributeStyles=[{attributeStyle=attributeStyle}, {attributeStyle=attributeStyle}], dataset=dataset}, {visualization=dotmap, attributeStyles=[{attributeStyle=attributeStyle}, {attributeStyle=attributeStyle}], dataset=dataset}], clusterPoints=true, defaultDataset=defaultDataset, defaultVisualization=dotmap, keepFiltered=true}, {indicator=inherit, baseStyle={fillColor=purple, fillOpacity=0.8008281904610115, outlineWidth=1.4658129805029452, size=5.962133916683182, fillHexColor=fillHexColor, outlineColor=purple, outlineHexColor=outlineHexColor, outlineOpacity=6.027456183070403}, visible=true, name=name, showIndicatorValueLabels=true, datasets=[{visualization=dotmap, attributeStyles=[{attributeStyle=attributeStyle}, {attributeStyle=attributeStyle}], dataset=dataset}, {visualization=dotmap, attributeStyles=[{attributeStyle=attributeStyle}, {attributeStyle=attributeStyle}], dataset=dataset}], clusterPoints=true, defaultDataset=defaultDataset, defaultVisualization=dotmap, keepFiltered=true}]}} ], links = [ None diff --git a/test/test_map_response_dto.py b/test/test_map_response_dto.py new file mode 100644 index 0000000..4c4ccf5 --- /dev/null +++ b/test/test_map_response_dto.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.map_response_dto import MapResponseDTO + +class TestMapResponseDTO(unittest.TestCase): + """MapResponseDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MapResponseDTO: + """Test MapResponseDTO + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MapResponseDTO` + """ + model = MapResponseDTO() + if include_optional: + return MapResponseDTO( + id = '', + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + type = 'dataset', + title = '0', + description = '', + content = {contextMenu={items=[{type=googleSatellite}, {type=googleSatellite}]}, baseLayer={menu=true, type=mapbox, accessToken=accessToken, url=url}, options={maxZoom=5, center={lng=6.027456183070403, lat=0.8008281904610115}, minZoom=0, zoom=1}, layers=[{indicator=inherit, baseStyle={fillColor=purple, fillOpacity=0.8008281904610115, outlineWidth=1.4658129805029452, size=5.962133916683182, fillHexColor=fillHexColor, outlineColor=purple, outlineHexColor=outlineHexColor, outlineOpacity=6.027456183070403}, visible=true, name=name, showIndicatorValueLabels=true, datasets=[{visualization=dotmap, attributeStyles=[{attributeStyle=attributeStyle}, {attributeStyle=attributeStyle}], dataset=dataset}, {visualization=dotmap, attributeStyles=[{attributeStyle=attributeStyle}, {attributeStyle=attributeStyle}], dataset=dataset}], clusterPoints=true, defaultDataset=defaultDataset, defaultVisualization=dotmap, keepFiltered=true}, {indicator=inherit, baseStyle={fillColor=purple, fillOpacity=0.8008281904610115, outlineWidth=1.4658129805029452, size=5.962133916683182, fillHexColor=fillHexColor, outlineColor=purple, outlineHexColor=outlineHexColor, outlineOpacity=6.027456183070403}, visible=true, name=name, showIndicatorValueLabels=true, datasets=[{visualization=dotmap, attributeStyles=[{attributeStyle=attributeStyle}, {attributeStyle=attributeStyle}], dataset=dataset}, {visualization=dotmap, attributeStyles=[{attributeStyle=attributeStyle}, {attributeStyle=attributeStyle}], dataset=dataset}], clusterPoints=true, defaultDataset=defaultDataset, defaultVisualization=dotmap, keepFiltered=true}]}, + links = [ + None + ], + page = {number=1, size=0, totalPages=6, totalElements=}, + access_info = {createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, + version = 56 + ) + else: + return MapResponseDTO( + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + content = {contextMenu={items=[{type=googleSatellite}, {type=googleSatellite}]}, baseLayer={menu=true, type=mapbox, accessToken=accessToken, url=url}, options={maxZoom=5, center={lng=6.027456183070403, lat=0.8008281904610115}, minZoom=0, zoom=1}, layers=[{indicator=inherit, baseStyle={fillColor=purple, fillOpacity=0.8008281904610115, outlineWidth=1.4658129805029452, size=5.962133916683182, fillHexColor=fillHexColor, outlineColor=purple, outlineHexColor=outlineHexColor, outlineOpacity=6.027456183070403}, visible=true, name=name, showIndicatorValueLabels=true, datasets=[{visualization=dotmap, attributeStyles=[{attributeStyle=attributeStyle}, {attributeStyle=attributeStyle}], dataset=dataset}, {visualization=dotmap, attributeStyles=[{attributeStyle=attributeStyle}, {attributeStyle=attributeStyle}], dataset=dataset}], clusterPoints=true, defaultDataset=defaultDataset, defaultVisualization=dotmap, keepFiltered=true}, {indicator=inherit, baseStyle={fillColor=purple, fillOpacity=0.8008281904610115, outlineWidth=1.4658129805029452, size=5.962133916683182, fillHexColor=fillHexColor, outlineColor=purple, outlineHexColor=outlineHexColor, outlineOpacity=6.027456183070403}, visible=true, name=name, showIndicatorValueLabels=true, datasets=[{visualization=dotmap, attributeStyles=[{attributeStyle=attributeStyle}, {attributeStyle=attributeStyle}], dataset=dataset}, {visualization=dotmap, attributeStyles=[{attributeStyle=attributeStyle}, {attributeStyle=attributeStyle}], dataset=dataset}], clusterPoints=true, defaultDataset=defaultDataset, defaultVisualization=dotmap, keepFiltered=true}]}, + ) + """ + + def testMapResponseDTO(self): + """Test MapResponseDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_maps_api.py b/test/test_maps_api.py index a94b926..5d25a16 100644 --- a/test/test_maps_api.py +++ b/test/test_maps_api.py @@ -55,6 +55,13 @@ def test_get_map_by_id(self) -> None: """ pass + def test_get_map_by_name(self) -> None: + """Test case for get_map_by_name + + Gets map by name + """ + pass + def test_update_map_by_id(self) -> None: """Test case for update_map_by_id diff --git a/test/test_marker_paged_model_dto.py b/test/test_marker_paged_model_dto.py index 924b2ff..ceb91e4 100644 --- a/test/test_marker_paged_model_dto.py +++ b/test/test_marker_paged_model_dto.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> MarkerPagedModelDTO: if include_optional: return MarkerPagedModelDTO( content = [ - {name=name, description=description, id=id, type=dataset, title=title, content={propertyFilters=[{propertyName=propertyName, value=, operator=eq}, {propertyName=propertyName, value=, operator=eq}], style=style}} + {name=name, description=description, links=[{}, {}], id=id, page={number=1, size=0, totalPages=6, totalElements=}, accessInfo={createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, type=dataset, title=title, version=0, content={propertyFilters=[{propertyName=propertyName, value=, operator=eq}, {propertyName=propertyName, value=, operator=eq}], style=style}} ], links = [ None diff --git a/test/test_marker_response_dto.py b/test/test_marker_response_dto.py new file mode 100644 index 0000000..5c9fb8d --- /dev/null +++ b/test/test_marker_response_dto.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.marker_response_dto import MarkerResponseDTO + +class TestMarkerResponseDTO(unittest.TestCase): + """MarkerResponseDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MarkerResponseDTO: + """Test MarkerResponseDTO + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MarkerResponseDTO` + """ + model = MarkerResponseDTO() + if include_optional: + return MarkerResponseDTO( + id = '', + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + type = 'dataset', + title = '0', + description = '', + content = {propertyFilters=[{propertyName=propertyName, value=, operator=eq}, {propertyName=propertyName, value=, operator=eq}], style=style}, + links = [ + None + ], + page = {number=1, size=0, totalPages=6, totalElements=}, + access_info = {createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, + version = 56 + ) + else: + return MarkerResponseDTO( + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + title = '0', + content = {propertyFilters=[{propertyName=propertyName, value=, operator=eq}, {propertyName=propertyName, value=, operator=eq}], style=style}, + ) + """ + + def testMarkerResponseDTO(self): + """Test MarkerResponseDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_marker_selector_paged_model_dto.py b/test/test_marker_selector_paged_model_dto.py index ce92a09..dca8daa 100644 --- a/test/test_marker_selector_paged_model_dto.py +++ b/test/test_marker_selector_paged_model_dto.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> MarkerSelectorPagedModelDTO: if include_optional: return MarkerSelectorPagedModelDTO( content = [ - {name=name, description=description, id=id, type=dataset, title=title, content={granularityCategories=[{styleType=color, splitPropertyName=splitPropertyName, dataset=dataset}, {styleType=color, splitPropertyName=splitPropertyName, dataset=dataset}], showIndicatorValuesOnMap=true, categories=[{linkedLayers=[{visible=true, style=style, dataset=dataset}, {visible=true, style=style, dataset=dataset}], markers=[{addOnExpand=true, visible=true, marker=marker}, {addOnExpand=true, visible=true, marker=marker}], dataset=dataset}, {linkedLayers=[{visible=true, style=style, dataset=dataset}, {visible=true, style=style, dataset=dataset}], markers=[{addOnExpand=true, visible=true, marker=marker}, {addOnExpand=true, visible=true, marker=marker}], dataset=dataset}], clusterMarkers=true, hideGranularity=true, keepFiltered={granularity=true, markers=true}}} + {name=name, description=description, links=[{}, {}], id=id, page={number=1, size=0, totalPages=6, totalElements=}, accessInfo={createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, type=dataset, title=title, version=0, content={granularityCategories=[{styleType=color, splitPropertyName=splitPropertyName, dataset=dataset}, {styleType=color, splitPropertyName=splitPropertyName, dataset=dataset}], showIndicatorValuesOnMap=true, categories=[{linkedLayers=[{visible=true, style=style, dataset=dataset}, {visible=true, style=style, dataset=dataset}], markers=[{addOnExpand=true, visible=true, marker=marker}, {addOnExpand=true, visible=true, marker=marker}], dataset=dataset}, {linkedLayers=[{visible=true, style=style, dataset=dataset}, {visible=true, style=style, dataset=dataset}], markers=[{addOnExpand=true, visible=true, marker=marker}, {addOnExpand=true, visible=true, marker=marker}], dataset=dataset}], clusterMarkers=true, hideGranularity=true, keepFiltered={granularity=true, markers=true}}} ], links = [ None diff --git a/test/test_marker_selector_response_dto.py b/test/test_marker_selector_response_dto.py new file mode 100644 index 0000000..2a00220 --- /dev/null +++ b/test/test_marker_selector_response_dto.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.marker_selector_response_dto import MarkerSelectorResponseDTO + +class TestMarkerSelectorResponseDTO(unittest.TestCase): + """MarkerSelectorResponseDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MarkerSelectorResponseDTO: + """Test MarkerSelectorResponseDTO + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MarkerSelectorResponseDTO` + """ + model = MarkerSelectorResponseDTO() + if include_optional: + return MarkerSelectorResponseDTO( + id = '', + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + type = 'dataset', + title = '0', + description = '', + content = {granularityCategories=[{styleType=color, splitPropertyName=splitPropertyName, dataset=dataset}, {styleType=color, splitPropertyName=splitPropertyName, dataset=dataset}], showIndicatorValuesOnMap=true, categories=[{linkedLayers=[{visible=true, style=style, dataset=dataset}, {visible=true, style=style, dataset=dataset}], markers=[{addOnExpand=true, visible=true, marker=marker}, {addOnExpand=true, visible=true, marker=marker}], dataset=dataset}, {linkedLayers=[{visible=true, style=style, dataset=dataset}, {visible=true, style=style, dataset=dataset}], markers=[{addOnExpand=true, visible=true, marker=marker}, {addOnExpand=true, visible=true, marker=marker}], dataset=dataset}], clusterMarkers=true, hideGranularity=true, keepFiltered={granularity=true, markers=true}}, + links = [ + None + ], + page = {number=1, size=0, totalPages=6, totalElements=}, + access_info = {createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, + version = 56 + ) + else: + return MarkerSelectorResponseDTO( + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + content = {granularityCategories=[{styleType=color, splitPropertyName=splitPropertyName, dataset=dataset}, {styleType=color, splitPropertyName=splitPropertyName, dataset=dataset}], showIndicatorValuesOnMap=true, categories=[{linkedLayers=[{visible=true, style=style, dataset=dataset}, {visible=true, style=style, dataset=dataset}], markers=[{addOnExpand=true, visible=true, marker=marker}, {addOnExpand=true, visible=true, marker=marker}], dataset=dataset}, {linkedLayers=[{visible=true, style=style, dataset=dataset}, {visible=true, style=style, dataset=dataset}], markers=[{addOnExpand=true, visible=true, marker=marker}, {addOnExpand=true, visible=true, marker=marker}], dataset=dataset}], clusterMarkers=true, hideGranularity=true, keepFiltered={granularity=true, markers=true}}, + ) + """ + + def testMarkerSelectorResponseDTO(self): + """Test MarkerSelectorResponseDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_marker_selectors_api.py b/test/test_marker_selectors_api.py index 97e2f5e..f6082ac 100644 --- a/test/test_marker_selectors_api.py +++ b/test/test_marker_selectors_api.py @@ -55,6 +55,13 @@ def test_get_marker_selector_by_id(self) -> None: """ pass + def test_get_marker_selector_by_name(self) -> None: + """Test case for get_marker_selector_by_name + + Gets marker selector by name + """ + pass + def test_update_marker_selector_by_id(self) -> None: """Test case for update_marker_selector_by_id diff --git a/test/test_markers_api.py b/test/test_markers_api.py index 7318d42..28b324b 100644 --- a/test/test_markers_api.py +++ b/test/test_markers_api.py @@ -55,6 +55,13 @@ def test_get_marker_by_id(self) -> None: """ pass + def test_get_marker_by_name(self) -> None: + """Test case for get_marker_by_name + + Gets marker by name + """ + pass + def test_update_marker_by_id(self) -> None: """Test case for update_marker_by_id diff --git a/test/test_membership_paged_model_dto.py b/test/test_membership_paged_model_dto.py index 8b312db..ec129b0 100644 --- a/test/test_membership_paged_model_dto.py +++ b/test/test_membership_paged_model_dto.py @@ -40,7 +40,7 @@ def make_instance(self, include_optional) -> MembershipPagedModelDTO: None ], content = [ - {accountId=accountId, createdAt=createdAt, role=ANONYMOUS, modifiedAt=modifiedAt, links=[{}, {}], id=id, account={preferences={sendNewsletter=true, lastActiveOrganization=lastActiveOrganization, language=language, lastActiveProject=lastActiveProject}, phoneNumber=phoneNumber, requireAdditionalAttributes=true, fullName=fullName, anonymous=true, onboarding={introShown=[introShown, introShown], tipsShown=[tipsShown, tipsShown]}, links=[{}, {}], id=id, consentGranted=true, jobInfo={companyName=companyName, industry=industry, jobPosition=jobPosition}, email=email, status=ENABLED}, status=ENABLED} + {accountId=accountId, createdAt=createdAt, role=ANONYMOUS, modifiedAt=modifiedAt, links=[{}, {}], id=id, account={preferences={sendNewsletter=true, lastActiveOrganization=lastActiveOrganization, language=language, lastActiveProject=lastActiveProject}, phoneNumber=phoneNumber, fullName=fullName, anonymous=true, onboarding={introShown=[introShown, introShown], tipsShown=[tipsShown, tipsShown]}, links=[{}, {}], id=id, consentGranted=true, email=email, status=ENABLED}, status=ENABLED} ], page = {number=1, size=0, totalPages=6, totalElements=} ) diff --git a/test/test_membership_response_dto.py b/test/test_membership_response_dto.py new file mode 100644 index 0000000..b34ab20 --- /dev/null +++ b/test/test_membership_response_dto.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.membership_response_dto import MembershipResponseDTO + +class TestMembershipResponseDTO(unittest.TestCase): + """MembershipResponseDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MembershipResponseDTO: + """Test MembershipResponseDTO + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MembershipResponseDTO` + """ + model = MembershipResponseDTO() + if include_optional: + return MembershipResponseDTO( + id = '', + account_id = '', + status = 'ENABLED', + role = 'ANONYMOUS', + created_at = '', + modified_at = '', + account = {preferences={sendNewsletter=true, lastActiveOrganization=lastActiveOrganization, language=language, lastActiveProject=lastActiveProject}, phoneNumber=phoneNumber, fullName=fullName, anonymous=true, onboarding={introShown=[introShown, introShown], tipsShown=[tipsShown, tipsShown]}, links=[{}, {}], id=id, consentGranted=true, email=email, status=ENABLED}, + links = [ + None + ] + ) + else: + return MembershipResponseDTO( + status = 'ENABLED', + role = 'ANONYMOUS', + ) + """ + + def testMembershipResponseDTO(self): + """Test MembershipResponseDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_metric_paged_model_dto.py b/test/test_metric_paged_model_dto.py index e5cc069..2435198 100644 --- a/test/test_metric_paged_model_dto.py +++ b/test/test_metric_paged_model_dto.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> MetricPagedModelDTO: if include_optional: return MetricPagedModelDTO( content = [ - {name=name, description=description, id=id, type=dataset, title=title, content={id=id, type=number, value=0.8008281904610115}} + {name=name, description=description, links=[{}, {}], id=id, page={number=1, size=0, totalPages=6, totalElements=}, accessInfo={createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, type=dataset, title=title, version=0, content={id=id, type=number, value=0.8008281904610115}} ], links = [ None diff --git a/test/test_metric_response_dto.py b/test/test_metric_response_dto.py new file mode 100644 index 0000000..4f0f7ab --- /dev/null +++ b/test/test_metric_response_dto.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.metric_response_dto import MetricResponseDTO + +class TestMetricResponseDTO(unittest.TestCase): + """MetricResponseDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MetricResponseDTO: + """Test MetricResponseDTO + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MetricResponseDTO` + """ + model = MetricResponseDTO() + if include_optional: + return MetricResponseDTO( + id = '', + name = 'awat5ikwowtta-3mh2lcafqw3zhes0', + type = 'dataset', + title = '0', + description = '', + content = None, + links = [ + None + ], + page = {number=1, size=0, totalPages=6, totalElements=}, + access_info = {createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, + version = 56 + ) + else: + return MetricResponseDTO( + name = 'awat5ikwowtta-3mh2lcafqw3zhes0', + content = None, + ) + """ + + def testMetricResponseDTO(self): + """Test MetricResponseDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_metrics_api.py b/test/test_metrics_api.py index c91cbc5..f0756a2 100644 --- a/test/test_metrics_api.py +++ b/test/test_metrics_api.py @@ -55,6 +55,13 @@ def test_get_metric_by_id(self) -> None: """ pass + def test_get_metric_by_name(self) -> None: + """Test case for get_metric_by_name + + Gets metric by name + """ + pass + def test_update_metric_by_id(self) -> None: """Test case for update_metric_by_id diff --git a/test/test_page_dto.py b/test/test_page_dto.py new file mode 100644 index 0000000..d6921be --- /dev/null +++ b/test/test_page_dto.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.page_dto import PageDTO + +class TestPageDTO(unittest.TestCase): + """PageDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PageDTO: + """Test PageDTO + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PageDTO` + """ + model = PageDTO() + if include_optional: + return PageDTO( + size = 56, + total_elements = None, + total_pages = 56, + number = 56 + ) + else: + return PageDTO( + size = 56, + total_elements = None, + total_pages = 56, + number = 56, + ) + """ + + def testPageDTO(self): + """Test PageDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_project_paged_model_dto.py b/test/test_project_paged_model_dto.py index bc19335..d75bd11 100644 --- a/test/test_project_paged_model_dto.py +++ b/test/test_project_paged_model_dto.py @@ -40,7 +40,7 @@ def make_instance(self, include_optional) -> ProjectPagedModelDTO: None ], content = [ - {organizationId=organizationId, createdAt=createdAt, modifiedAt=modifiedAt, description=description, share=PRIVATE, links=[{}, {}], id=id, membership={accountId=accountId, createdAt=createdAt, role=ANONYMOUS, modifiedAt=modifiedAt, links=[{}, {}], id=id, account={preferences={sendNewsletter=true, lastActiveOrganization=lastActiveOrganization, language=language, lastActiveProject=lastActiveProject}, phoneNumber=phoneNumber, requireAdditionalAttributes=true, fullName=fullName, anonymous=true, onboarding={introShown=[introShown, introShown], tipsShown=[tipsShown, tipsShown]}, links=[{}, {}], id=id, consentGranted=true, jobInfo={companyName=companyName, industry=industry, jobPosition=jobPosition}, email=email, status=ENABLED}, status=ENABLED}, services={}, title=title, status=ENABLED} + {organizationId=organizationId, createdAt=createdAt, modifiedAt=modifiedAt, description=description, share=PRIVATE, links=[{}, {}], id=id, membership={accountId=accountId, createdAt=createdAt, role=ANONYMOUS, modifiedAt=modifiedAt, links=[{}, {}], id=id, account={preferences={sendNewsletter=true, lastActiveOrganization=lastActiveOrganization, language=language, lastActiveProject=lastActiveProject}, phoneNumber=phoneNumber, fullName=fullName, anonymous=true, onboarding={introShown=[introShown, introShown], tipsShown=[tipsShown, tipsShown]}, links=[{}, {}], id=id, consentGranted=true, email=email, status=ENABLED}, status=ENABLED}, services={dwh=dwh, md=md, kbc=kbc}, title=title, status=ENABLED} ], page = {number=1, size=0, totalPages=6, totalElements=} ) diff --git a/test/test_project_response_dto.py b/test/test_project_response_dto.py index d12e296..f87c2b0 100644 --- a/test/test_project_response_dto.py +++ b/test/test_project_response_dto.py @@ -44,8 +44,8 @@ def make_instance(self, include_optional) -> ProjectResponseDTO: share = 'PRIVATE', created_at = '', modified_at = '', - membership = {accountId=accountId, createdAt=createdAt, role=ANONYMOUS, modifiedAt=modifiedAt, links=[{}, {}], id=id, account={preferences={sendNewsletter=true, lastActiveOrganization=lastActiveOrganization, language=language, lastActiveProject=lastActiveProject}, phoneNumber=phoneNumber, requireAdditionalAttributes=true, fullName=fullName, anonymous=true, onboarding={introShown=[introShown, introShown], tipsShown=[tipsShown, tipsShown]}, links=[{}, {}], id=id, consentGranted=true, jobInfo={companyName=companyName, industry=industry, jobPosition=jobPosition}, email=email, status=ENABLED}, status=ENABLED}, - services = None, + membership = {accountId=accountId, createdAt=createdAt, role=ANONYMOUS, modifiedAt=modifiedAt, links=[{}, {}], id=id, account={preferences={sendNewsletter=true, lastActiveOrganization=lastActiveOrganization, language=language, lastActiveProject=lastActiveProject}, phoneNumber=phoneNumber, fullName=fullName, anonymous=true, onboarding={introShown=[introShown, introShown], tipsShown=[tipsShown, tipsShown]}, links=[{}, {}], id=id, consentGranted=true, email=email, status=ENABLED}, status=ENABLED}, + services = {dwh=dwh, md=md, kbc=kbc}, links = [ None ] diff --git a/test/test_project_response_dto_services.py b/test/test_project_response_dto_services.py new file mode 100644 index 0000000..0c1aa37 --- /dev/null +++ b/test/test_project_response_dto_services.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.project_response_dto_services import ProjectResponseDTOServices + +class TestProjectResponseDTOServices(unittest.TestCase): + """ProjectResponseDTOServices unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProjectResponseDTOServices: + """Test ProjectResponseDTOServices + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProjectResponseDTOServices` + """ + model = ProjectResponseDTOServices() + if include_optional: + return ProjectResponseDTOServices( + kbc = '', + dwh = '', + md = '' + ) + else: + return ProjectResponseDTOServices( + ) + """ + + def testProjectResponseDTOServices(self): + """Test ProjectResponseDTOServices""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_project_settings_api.py b/test/test_project_settings_api.py index 6e9d9ca..f816bb6 100644 --- a/test/test_project_settings_api.py +++ b/test/test_project_settings_api.py @@ -55,6 +55,13 @@ def test_get_project_settings_by_id(self) -> None: """ pass + def test_get_project_settings_by_name(self) -> None: + """Test case for get_project_settings_by_name + + Gets projectSettings by name + """ + pass + def test_update_project_settings_by_id(self) -> None: """Test case for update_project_settings_by_id diff --git a/test/test_project_settings_paged_model_dto.py b/test/test_project_settings_paged_model_dto.py index 7364786..5006203 100644 --- a/test/test_project_settings_paged_model_dto.py +++ b/test/test_project_settings_paged_model_dto.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> ProjectSettingsPagedModelDTO: if include_optional: return ProjectSettingsPagedModelDTO( content = [ - {name=name, description=description, id=id, type=dataset, title=title, content={defaultViews=[defaultViews, defaultViews], geoSearchCountries=[geoSearchCountries, geoSearchCountries], trustedOrigins=[trustedOrigins, trustedOrigins], geoSearchProviders=[Mapbox, Mapbox], projectTemplate={templateDatasets=[{dataset=dataset}, {dataset=dataset}]}, allowUnsecuredOrigins=false}} + {name=name, description=description, links=[{}, {}], id=id, page={number=1, size=0, totalPages=6, totalElements=}, accessInfo={createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, type=dataset, title=title, version=0, content={defaultViews=[defaultViews, defaultViews], geoSearchCountries=[geoSearchCountries, geoSearchCountries], trustedOrigins=[trustedOrigins, trustedOrigins], geoSearchProviders=[Mapbox, Mapbox], projectTemplate={templateDatasets=[{dataset=dataset}, {dataset=dataset}]}, allowUnsecuredOrigins=false}} ], links = [ None diff --git a/test/test_project_settings_response_dto.py b/test/test_project_settings_response_dto.py new file mode 100644 index 0000000..4fbb44c --- /dev/null +++ b/test/test_project_settings_response_dto.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.project_settings_response_dto import ProjectSettingsResponseDTO + +class TestProjectSettingsResponseDTO(unittest.TestCase): + """ProjectSettingsResponseDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ProjectSettingsResponseDTO: + """Test ProjectSettingsResponseDTO + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ProjectSettingsResponseDTO` + """ + model = ProjectSettingsResponseDTO() + if include_optional: + return ProjectSettingsResponseDTO( + id = '', + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + type = 'dataset', + title = '0', + description = '0', + content = {defaultViews=[defaultViews, defaultViews], geoSearchCountries=[geoSearchCountries, geoSearchCountries], trustedOrigins=[trustedOrigins, trustedOrigins], geoSearchProviders=[Mapbox, Mapbox], projectTemplate={templateDatasets=[{dataset=dataset}, {dataset=dataset}]}, allowUnsecuredOrigins=false}, + links = [ + None + ], + page = {number=1, size=0, totalPages=6, totalElements=}, + access_info = {createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, + version = 56 + ) + else: + return ProjectSettingsResponseDTO( + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + content = {defaultViews=[defaultViews, defaultViews], geoSearchCountries=[geoSearchCountries, geoSearchCountries], trustedOrigins=[trustedOrigins, trustedOrigins], geoSearchProviders=[Mapbox, Mapbox], projectTemplate={templateDatasets=[{dataset=dataset}, {dataset=dataset}]}, allowUnsecuredOrigins=false}, + ) + """ + + def testProjectSettingsResponseDTO(self): + """Test ProjectSettingsResponseDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_search_api.py b/test/test_search_api.py index d594aa4..4ba5f23 100644 --- a/test/test_search_api.py +++ b/test/test_search_api.py @@ -34,13 +34,6 @@ def test_full_text_search(self) -> None: """ pass - def test_geographic_search(self) -> None: - """Test case for geographic_search - - Geographic search - """ - pass - if __name__ == '__main__': unittest.main() diff --git a/test/test_token_request_dto.py b/test/test_token_request_dto.py index 7e26cbf..5a46481 100644 --- a/test/test_token_request_dto.py +++ b/test/test_token_request_dto.py @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> TokenRequestDTO: model = TokenRequestDTO() if include_optional: return TokenRequestDTO( - refresh_token = 'z01234567891011121314151617181920212223242526272829' + refresh_token = '2' ) else: return TokenRequestDTO( diff --git a/test/test_token_response_dto.py b/test/test_token_response_dto.py index f65f17b..a76340a 100644 --- a/test/test_token_response_dto.py +++ b/test/test_token_response_dto.py @@ -39,7 +39,6 @@ def make_instance(self, include_optional) -> TokenResponseDTO: token_type = '', expires_in = 56, access_token = '', - scope = '', refresh_token = '', id_token = '' ) diff --git a/test/test_update_membership_dto.py b/test/test_update_membership_dto.py new file mode 100644 index 0000000..5fc52f0 --- /dev/null +++ b/test/test_update_membership_dto.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.update_membership_dto import UpdateMembershipDTO + +class TestUpdateMembershipDTO(unittest.TestCase): + """UpdateMembershipDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> UpdateMembershipDTO: + """Test UpdateMembershipDTO + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `UpdateMembershipDTO` + """ + model = UpdateMembershipDTO() + if include_optional: + return UpdateMembershipDTO( + status = 'ENABLED', + role = 'ANONYMOUS' + ) + else: + return UpdateMembershipDTO( + status = 'ENABLED', + role = 'ANONYMOUS', + ) + """ + + def testUpdateMembershipDTO(self): + """Test UpdateMembershipDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_project_dto.py b/test/test_update_project_dto.py index b4cbfd3..56ba4b6 100644 --- a/test/test_update_project_dto.py +++ b/test/test_update_project_dto.py @@ -40,7 +40,7 @@ def make_instance(self, include_optional) -> UpdateProjectDTO: description = '', organization_id = 'w8q6zgckec0l3o4g', status = 'ENABLED', - services = None + services = {dwh=dwh, md=md, kbc=kbc} ) else: return UpdateProjectDTO( diff --git a/test/test_vector_tiles_api.py b/test/test_vector_tiles_api.py new file mode 100644 index 0000000..51b1d76 --- /dev/null +++ b/test/test_vector_tiles_api.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.api.vector_tiles_api import VectorTilesApi + + +class TestVectorTilesApi(unittest.TestCase): + """VectorTilesApi unit test stubs""" + + def setUp(self) -> None: + self.api = VectorTilesApi() + + def tearDown(self) -> None: + pass + + def test_get_vector_tile(self) -> None: + """Test case for get_vector_tile + + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_view_paged_model_dto.py b/test/test_view_paged_model_dto.py index 2bd2583..ef9bc6f 100644 --- a/test/test_view_paged_model_dto.py +++ b/test/test_view_paged_model_dto.py @@ -37,7 +37,7 @@ def make_instance(self, include_optional) -> ViewPagedModelDTO: if include_optional: return ViewPagedModelDTO( content = [ - {name=name, description=description, id=id, type=dataset, title=title, content={compareCollapsed=true, defaultCompareType=dominance, filterGroup=[{property=property, type=date}, {property=property, type=date}], exports=[{export=export}, {export=export}], icon=icon, defaultGranularity=defaultGranularity, defaultTool=search, defaultVisualization=areas, excludeDatasets=[excludeDatasets, excludeDatasets], mapOptions={maxZoom=2, customTileLayer={accessToken=accessToken, url=url}, tileLayer=mapbox, center={lng=6.027456183070403, lat=0.8008281904610115}, tileLayerMenu=true, minZoom=0, zoom=9}, map=map, dashboard=dashboard, showAttributesOnDrill=true, defaultDrilled=defaultDrilled, defaultActiveFilters=[{property=property, defaultValues={endDate=null, startDate={value=value}}, type=date}, {property=property, defaultValues={endDate=null, startDate={value=value}}, type=date}], variables=[{variables=[{minValue=0.8008281904610115, maxValue=6.027456183070403, defaultValue=1.4658129805029452, name=name, format={symbol=symbol, type=number, fraction=0}, title=title}, {minValue=0.8008281904610115, maxValue=6.027456183070403, defaultValue=1.4658129805029452, name=name, format={symbol=symbol, type=number, fraction=0}, title=title}], type=type, title=title}, {variables=[{minValue=0.8008281904610115, maxValue=6.027456183070403, defaultValue=1.4658129805029452, name=name, format={symbol=symbol, type=number, fraction=0}, title=title}, {minValue=0.8008281904610115, maxValue=6.027456183070403, defaultValue=1.4658129805029452, name=name, format={symbol=symbol, type=number, fraction=0}, title=title}], type=type, title=title}], defaultSelected={coordinates=[{lng=6.027456183070403, lat=0.8008281904610115}, {lng=6.027456183070403, lat=0.8008281904610115}], ids=[, ], dataset=dataset}, markerSelector=markerSelector, mapContextMenu={items=[{type=googleSatellite}, {type=googleSatellite}]}, spatialQuery={unit=time, amount=1, lng=22.945559638799807, profile=car, geometry={}, lat=34.63682100059455}, markersOnly=true, defaultVisualized=defaultVisualized, fitnessGroups=4, measure={type=line, zones=[{unit=time, amount=1, lng=22.945559638799807, profile=car, geometry={}, lat=34.63682100059455}, {unit=time, amount=1, lng=22.945559638799807, profile=car, geometry={}, lat=34.63682100059455}], points=[{unit=time, amount=1, lng=22.945559638799807, profile=car, geometry={}, lat=34.63682100059455}, {unit=time, amount=1, lng=22.945559638799807, profile=car, geometry={}, lat=34.63682100059455}]}, disableFitness=true}} + {name=name, description=description, links=[{}, {}], id=id, page={number=1, size=0, totalPages=6, totalElements=}, accessInfo={createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, type=dataset, title=title, version=4, content={compareCollapsed=true, defaultCompareType=dominance, filterGroup=[{property=property, type=date}, {property=property, type=date}], exports=[{export=export}, {export=export}], icon=icon, defaultGranularity=defaultGranularity, defaultTool=search, defaultVisualization=areas, excludeDatasets=[excludeDatasets, excludeDatasets], mapOptions={maxZoom=2, customTileLayer={accessToken=accessToken, url=url}, tileLayer=mapbox, center={lng=6.027456183070403, lat=0.8008281904610115}, tileLayerMenu=true, minZoom=0, zoom=9}, map=map, dashboard=dashboard, showAttributesOnDrill=true, defaultDrilled=defaultDrilled, defaultActiveFilters=[{property=property, defaultValues={endDate=null, startDate={value=value}}, type=date}, {property=property, defaultValues={endDate=null, startDate={value=value}}, type=date}], variables=[{variables=[{minValue=0.8008281904610115, maxValue=6.027456183070403, defaultValue=1.4658129805029452, name=name, format={symbol=symbol, type=number, fraction=0}, title=title}, {minValue=0.8008281904610115, maxValue=6.027456183070403, defaultValue=1.4658129805029452, name=name, format={symbol=symbol, type=number, fraction=0}, title=title}], type=type, title=title}, {variables=[{minValue=0.8008281904610115, maxValue=6.027456183070403, defaultValue=1.4658129805029452, name=name, format={symbol=symbol, type=number, fraction=0}, title=title}, {minValue=0.8008281904610115, maxValue=6.027456183070403, defaultValue=1.4658129805029452, name=name, format={symbol=symbol, type=number, fraction=0}, title=title}], type=type, title=title}], defaultSelected={coordinates=[{lng=6.027456183070403, lat=0.8008281904610115}, {lng=6.027456183070403, lat=0.8008281904610115}], ids=[, ], dataset=dataset}, markerSelector=markerSelector, mapContextMenu={items=[{type=googleSatellite}, {type=googleSatellite}]}, spatialQuery={unit=time, amount=1, lng=22.945559638799807, profile=car, geometry={}, lat=34.63682100059455}, markersOnly=true, defaultVisualized=defaultVisualized, fitnessGroups=4, measure={type=line, zones=[{unit=time, amount=1, lng=22.945559638799807, profile=car, geometry={}, lat=34.63682100059455}, {unit=time, amount=1, lng=22.945559638799807, profile=car, geometry={}, lat=34.63682100059455}], points=[{unit=time, amount=1, lng=22.945559638799807, profile=car, geometry={}, lat=34.63682100059455}, {unit=time, amount=1, lng=22.945559638799807, profile=car, geometry={}, lat=34.63682100059455}]}, disableFitness=true}} ], links = [ None diff --git a/test/test_view_response_dto.py b/test/test_view_response_dto.py new file mode 100644 index 0000000..7af138a --- /dev/null +++ b/test/test_view_response_dto.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + clevermaps-client + + CleverMaps REST API provides access to location intelligence and geospatial analytics platform. ### Main capabilities include: - Project and user access management - Multidimensional data model and metrics management - Data upload and exports - Ad-hoc analysis of geospatial data - Full text and geographic search - Configuration of CleverMaps Studio visualizations + + The version of the OpenAPI document: 1.0.0 + Contact: support@clevermaps.io + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cm_python_openapi_sdk.models.view_response_dto import ViewResponseDTO + +class TestViewResponseDTO(unittest.TestCase): + """ViewResponseDTO unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ViewResponseDTO: + """Test ViewResponseDTO + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ViewResponseDTO` + """ + model = ViewResponseDTO() + if include_optional: + return ViewResponseDTO( + id = '', + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + type = 'dataset', + title = '0', + description = '', + content = {compareCollapsed=true, defaultCompareType=dominance, filterGroup=[{property=property, type=date}, {property=property, type=date}], exports=[{export=export}, {export=export}], icon=icon, defaultGranularity=defaultGranularity, defaultTool=search, defaultVisualization=areas, excludeDatasets=[excludeDatasets, excludeDatasets], mapOptions={maxZoom=2, customTileLayer={accessToken=accessToken, url=url}, tileLayer=mapbox, center={lng=6.027456183070403, lat=0.8008281904610115}, tileLayerMenu=true, minZoom=0, zoom=9}, map=map, dashboard=dashboard, showAttributesOnDrill=true, defaultDrilled=defaultDrilled, defaultActiveFilters=[{property=property, defaultValues={endDate=null, startDate={value=value}}, type=date}, {property=property, defaultValues={endDate=null, startDate={value=value}}, type=date}], variables=[{variables=[{minValue=0.8008281904610115, maxValue=6.027456183070403, defaultValue=1.4658129805029452, name=name, format={symbol=symbol, type=number, fraction=0}, title=title}, {minValue=0.8008281904610115, maxValue=6.027456183070403, defaultValue=1.4658129805029452, name=name, format={symbol=symbol, type=number, fraction=0}, title=title}], type=type, title=title}, {variables=[{minValue=0.8008281904610115, maxValue=6.027456183070403, defaultValue=1.4658129805029452, name=name, format={symbol=symbol, type=number, fraction=0}, title=title}, {minValue=0.8008281904610115, maxValue=6.027456183070403, defaultValue=1.4658129805029452, name=name, format={symbol=symbol, type=number, fraction=0}, title=title}], type=type, title=title}], defaultSelected={coordinates=[{lng=6.027456183070403, lat=0.8008281904610115}, {lng=6.027456183070403, lat=0.8008281904610115}], ids=[, ], dataset=dataset}, markerSelector=markerSelector, mapContextMenu={items=[{type=googleSatellite}, {type=googleSatellite}]}, spatialQuery={unit=time, amount=1, lng=22.945559638799807, profile=car, geometry={}, lat=34.63682100059455}, markersOnly=true, defaultVisualized=defaultVisualized, fitnessGroups=4, measure={type=line, zones=[{unit=time, amount=1, lng=22.945559638799807, profile=car, geometry={}, lat=34.63682100059455}, {unit=time, amount=1, lng=22.945559638799807, profile=car, geometry={}, lat=34.63682100059455}], points=[{unit=time, amount=1, lng=22.945559638799807, profile=car, geometry={}, lat=34.63682100059455}, {unit=time, amount=1, lng=22.945559638799807, profile=car, geometry={}, lat=34.63682100059455}]}, disableFitness=true}, + links = [ + None + ], + page = {number=1, size=0, totalPages=6, totalElements=}, + access_info = {createdAt=createdAt, createdBy=createdBy, modifiedAt=modifiedAt, modifiedBy=modifiedBy}, + version = 56 + ) + else: + return ViewResponseDTO( + name = 'awat5ikwowtta-3mh2lcafqw3zhes', + title = '0', + description = '', + content = {compareCollapsed=true, defaultCompareType=dominance, filterGroup=[{property=property, type=date}, {property=property, type=date}], exports=[{export=export}, {export=export}], icon=icon, defaultGranularity=defaultGranularity, defaultTool=search, defaultVisualization=areas, excludeDatasets=[excludeDatasets, excludeDatasets], mapOptions={maxZoom=2, customTileLayer={accessToken=accessToken, url=url}, tileLayer=mapbox, center={lng=6.027456183070403, lat=0.8008281904610115}, tileLayerMenu=true, minZoom=0, zoom=9}, map=map, dashboard=dashboard, showAttributesOnDrill=true, defaultDrilled=defaultDrilled, defaultActiveFilters=[{property=property, defaultValues={endDate=null, startDate={value=value}}, type=date}, {property=property, defaultValues={endDate=null, startDate={value=value}}, type=date}], variables=[{variables=[{minValue=0.8008281904610115, maxValue=6.027456183070403, defaultValue=1.4658129805029452, name=name, format={symbol=symbol, type=number, fraction=0}, title=title}, {minValue=0.8008281904610115, maxValue=6.027456183070403, defaultValue=1.4658129805029452, name=name, format={symbol=symbol, type=number, fraction=0}, title=title}], type=type, title=title}, {variables=[{minValue=0.8008281904610115, maxValue=6.027456183070403, defaultValue=1.4658129805029452, name=name, format={symbol=symbol, type=number, fraction=0}, title=title}, {minValue=0.8008281904610115, maxValue=6.027456183070403, defaultValue=1.4658129805029452, name=name, format={symbol=symbol, type=number, fraction=0}, title=title}], type=type, title=title}], defaultSelected={coordinates=[{lng=6.027456183070403, lat=0.8008281904610115}, {lng=6.027456183070403, lat=0.8008281904610115}], ids=[, ], dataset=dataset}, markerSelector=markerSelector, mapContextMenu={items=[{type=googleSatellite}, {type=googleSatellite}]}, spatialQuery={unit=time, amount=1, lng=22.945559638799807, profile=car, geometry={}, lat=34.63682100059455}, markersOnly=true, defaultVisualized=defaultVisualized, fitnessGroups=4, measure={type=line, zones=[{unit=time, amount=1, lng=22.945559638799807, profile=car, geometry={}, lat=34.63682100059455}, {unit=time, amount=1, lng=22.945559638799807, profile=car, geometry={}, lat=34.63682100059455}], points=[{unit=time, amount=1, lng=22.945559638799807, profile=car, geometry={}, lat=34.63682100059455}, {unit=time, amount=1, lng=22.945559638799807, profile=car, geometry={}, lat=34.63682100059455}]}, disableFitness=true}, + ) + """ + + def testViewResponseDTO(self): + """Test ViewResponseDTO""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_views_api.py b/test/test_views_api.py index f9817aa..71b9730 100644 --- a/test/test_views_api.py +++ b/test/test_views_api.py @@ -55,6 +55,13 @@ def test_get_view_by_id(self) -> None: """ pass + def test_get_view_by_name(self) -> None: + """Test case for get_view_by_name + + Gets view by name + """ + pass + def test_update_view_by_id(self) -> None: """Test case for update_view_by_id